summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-11-24Merge tag 'iwlwifi-next-for-john-2014-11-24' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Emmanuel Grumbach <egrumbach@gmail.com> says: "Major works are CSA and TDLS. On top of that I have a new firmware API for scan and a few rate control improvements. Johannes find a few tricks to improve our CPU utilization and adds support for a new spin of 7265 called 7265D. Along with this a few random things that don't stand out." Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-24iwlwifi: update the secure mem space and for the CPUsEmmanuel Grumbach
Also update the timeout for the data verification. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: sdio: new SDIO card id for 4165 seriesOren Givon
Add a new SDIO card id intended for the new 4165 series. Signed-off-by: Oren Givon <oren.givon@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: declare d0i3 support for IWL_DEVICE_8000Eliad Peller
Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: disconnect TDLS peers before channel switchArik Nemtsov
In case of channel switch, we need to teardown the TDLS peers. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: declare support for VHT BF info in radiotapEyal Shapira
The driver knows whether an rx frame was beamformed and marks it in the radiotap VHT flags. However it should also declare that it knows to extract this info otherwise this gets discarded by sniffers like Wireshark. Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: add support to MFUART loading notificationChaya Rachel Ivgy
Add support to MFUART loading notification (print notification data with IWL_DEBUG_INFO) Signed-off-by: Chaya Rachel Ivgy <chaya.rachel.ivgi@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: call iwl_trans_suspend/resumeEliad Peller
call the appropriate iwl_trans_suspend/resume ops on iwl_mvm_suspend/resume calls. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: trans: add suspend/resume opsEliad Peller
Add suspend/resume trans ops that will be called from mac80211's suspend/resume ops. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: treat netdetect wake up separatelyLuciano Coelho
When the device wakes up due to netdetect, we need to query different things from the firmware than when it wakes up with a normal WoWLAN. To make this easier, separate the netdetect wake up handling from the rest. For now, we don't send netdetect as a wake up reason, treating it as a non-wireless wake up. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: refactor iwl_mvm_query_wakeup_reasons()Luciano Coelho
Refactor the iwl_mvm_query_wakeup_reasons() function to split the part that gets the firmware status from the part that sets up the WoWLAN status. This will allow netdetect to reuse the code. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: refactor wowlan and netdetect configuration when suspendingLuciano Coelho
We need to send a WOWLAN_CONFIGURATION command also for netdetect and configure the rfkill release trigger if needed. To do so, refactor the code that configures wowlan and netdetect when suspending and send the WOWLAN_CONFIGURATION command also for net_detect. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: add support for net detectLuciano Coelho
Add the net detect WoWLAN flag to indicate support and use the nd_config from the WoWLAN configuration to start net detect, if it is set. The WoWLAN configuration takes precedence over the debugfs configuration. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: protect session during CSALuciano Coelho
When another vif is also running during a channel switch, we need to use a session protection when we move to the new channel, so that we don't miss the beacons. Without this, sometimes the other vif repeatedly gets time exactly when we should be hearing the beacons, preventing channel switch from completing. Adding a session protection that lasts from the moment the channel changes until 2 TBTTs later, ensures that we will hear the beacons on the destination channel. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: clear TE data if CSA time event fails to startLuciano Coelho
If setting the CSA time event fails, we must clear the TE data, otherwise we'll try to remove it when, for instance, a disconnection occurs, causing a SYSASSERT. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: disable beacon filtering during CSALuciano Coelho
After a channel switch, transmission on the new channel is only started once we see a beacon on it. Thus, beacon filtering needs to be disabled during channel switch so that mac80211 receives this beacon and finishes the process. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: add a channel_switch op to bypass mac80211 timerLuciano Coelho
We need to call ieee80211_chswitch_done() ourselves just when the absence TE started, so we perform the actual context switch early enough. To do so, add a dummy channel_switch op, which will cause mac80211 to skip the countdown timer and allow us to call ieee80211_chswitch_done() to complete the operation. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: finalize on post_switch instead of unassignLuciano Coelho
Now that mac80211 waits for the first beacon on the new channel before calling post_channel_switch, the reconfiguration of the firmware should be done in the post_channel_switch operation instead of when assigning the vif to the new context. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: schedule CSA time event a bit before beacon 1Luciano Coelho
Instead of using a hardcoded number of TUs before beacon 0 as the time to start the absence and actual channel switch, calculate it in relation to the beacon interval. We use 10 TUs + beacon interval before beacon 0 to target a bit before beacon 1. This gives us enough time to switch to the new channel before the AP/GO switches. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: add CSA absent time event for clientsLuciano Coelho
Add an absent time event when pre_channel_switch is called and use the time event started indication to set the disable_tx bit instead of doing it in unassign_vif(). This is done so that the firmware queues are stopped before the actual switch takes place to avoid losing packets while the AP/GO is performing its actual switch. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: use switching_chanctx argument instead of csa_activeLuciano Coelho
Now that all CSA flows are using the switch_vif_chanctx op, we can rely on the switching_chanctx boolean that is passed to the __iwl_mvm_assign_vif_chanctx() and __iwl_mvm_unassign_vif_chanctx() functions to decide whether the context switch flows need to be executed. In this way we make the chanctx switch flow more generic, without having to rely on the csa_active flag being set. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: disable PS during channel switchLuciano Coelho
Disable PS when pre_channel_switch is called and add the post_channel_switch operation to re-enable PS when the channel switch is completed. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: Handle failed beacon transmissions during CSAAndrei Otcheretianski
The spec requires to decrement the CSA counters based on TBTT, regardless if the beacon was actually transmitted. Previously, the fw would send beacon notifications only for successfully transmitted beacons. This behavior resulted in inaccurate CSA countdown. In order to address this issue, the fw was changed to send beacon notifications also for not transmitted beacons. Such notifications have TX_STATUS_INTERNAL_ABORT (0x92). Don't start the CSA countdown before first successfully transmitted beacon, in order to guarantee that the CSA is announced for a required period. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
2014-11-24iwlwifi: mvm: return the actual error code when switch_vif_chanctx failsLuciano Coelho
We have code to recover and go back to the original channel context if something fails in the middle of switch_vif_chanctx, but we return the error code of the recover calls instead of the original code, so if the recovery succeeds, we will return 0 (success). Fix this by not assigning the return value of the recovery calls to ret. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: add support for CHANCTX_SWMODE_REASSIGN_VIFLuciano Coelho
Add support to reassign vif in switch_vif_chanctx. This is similar to the existing CHANCTX_SWMODE_SWAP_CONTEXTS mode, but doesn't delete the old context nor creates a new one, doing to switch between two existing contexts. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: refactor iwl_mvm_switch_vif_chanctx to support other modesLuciano Coelho
Currently we only support the CHANCTX_SWMODE_SWAP_CONTEXTS mode, but we need to support other modes as well. Spin a new function off in order to make it easier to support other modes. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: only save csa_vif in AP/GO modeLuciano Coelho
We only need the csa_vif in AP/GO modes, and assigning for other interfaces may cause problems, because csa_vif is never cleared. To prevent this, only assign the value if the iftype is NL80211_IFTYPE_AP. Use a switch to do this, even though, for now, only the AP interface type is handled, because soon other interface types will be added as well. Additionally, convert the WARN() in the error case when a channel-switch is already running to WARN_ONCE(). Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: use new pre_channel_switch op instead of channel_switch_beaconLuciano Coelho
A new callback has been added to prepare the device for a channel switch. Use the new callback instead of the old channel_switch_beacon operation. This makes it possible to remove the channel_switch_beacon operation from mac80211. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
2014-11-24iwlwifi: mvm: implement mac80211 TDLS channel-switch APIsArik Nemtsov
Maintain a TDLS channel-switch state and update it according to notifications from FW and timeouts. Explicitly check all state transitions are valid. When switching is initiated by mac80211, use a delayed work to periodically reschedule it from iwlwifi. Give the FW mac80211 generated TDLS channel-switch request/response templates. It will change appropriate values (switch timings) and Tx them at appropriate times. Enable the channel switch wiphy capability bit when the FW supports it. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: block TID when using TDLSLiad Kaufman
Block TID 4 (VI) on a vif when using TDLS. This TID will be used by FW for TDLS channel-switch requests and PTI requests. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: use private TFD queues for TDLS stationsArik Nemtsov
When adding a TDLS station, allocate 4 new queues for it. Configure them to FW and enable them. On station removal, drain the queues if needed and disable them when empty. Make sure to flush all packets in the private queues of TDLS stations in the mac80211 flush() callback. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: disconnect TDLS peers on reconfigArik Nemtsov
When TDLS peers are present the FW will send packets on a dedicated TID vs. the peer when performing TDLS channel-switches. The driver configures the TID on connection to the peer and the FW is responsible for maintaining the state of QoS seqno and PN/IV for encryption. If the FW asserts, the driver cannot correctly reconfigure the starting seqno/PN to the reloaded FW, thus forcing us to reconnect the peer. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: allow private per-STA TFD queuesArik Nemtsov
TDLS stations will have private queues, so consider them as well when allocating a new one. Consolidate the HW-queue iterating code into a single exported function, to be used by the TDLS code in the future. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: configure TDLS peers to FWArik Nemtsov
Send a dedicated TDLS_CONFIG command when a TDLS peer joins/leaves. The fields for the command are mostly place-holders, as most of the FW functionality is not implemented. In the future the dedicated FW TID will be used for channel-switching and buffer-sta functionality. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: add TDLS channel switch FW APIsArik Nemtsov
Add a channel-switch command and a switch-start notification. Also add a FW TLV bit indicating TDLS channel switching support. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: declare TDLS supportArik Nemtsov
The driver/FW combination now support TDLS. Check the FW support with the TLV bit. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: pull SNAP header into skb->headJohannes Berg
When we pre-populate the skb->head for the stack, we only pull in the 802.11 header including crypto (assuming the packet isn't short enough to be in there completely.) This is fine, but in ieee80211_data_to_8023() we later unconditionally pull 8 more bytes for the SNAP header and ethertype field (except for mesh or 4-addr, where it's even more, but we don't care as much about them). Avoid the additional later pull by pulling in those 8 bytes here. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: IdoX Yariv <ido@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: pull crypto header into skb->headJohannes Berg
When we pre-populate the skb->head for the stack, we only pull in the 802.11 header (assuming the packet isn't short enough to be in there completely.) This is fine, but in many cases we'll pull in the crypto headers pretty much immediately afterwards, so to avoid that pull in the crypto header early. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: IdoX Yariv <ido@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: build mac80211 rx_status in placeJohannes Berg
Instead of building the rx_status on the stack and then copying it to the skb, allocate the skb a bit earlier and then build the rx_status in place. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: IdoX Yariv <ido@wizery.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: add WEP RX hardware offload supportJohannes Berg
In the original driver, we decided to not implement WEP RX hardware offload because of a quirk with the firmware API - it allows setting global WEP keys that then get used for all virtual interfaces, which is clearly wrong if more than one exists, and it allows setting per- station keys but then separates multicast and unicast keys. In order to implement WEP RX hardware offload, work around these limitations by uploading each WEP key twice, once as multicast and once as unicast, but point them both to the same key slot (offset) and use the same key material so the slot overwrite on the second upload doesn't actually change anything. Upon removal, also remove the key twice so the station no longer references it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: refactor key add/remove functionsJohannes Berg
Refactor the key add/remove functions to be able to reuse parts of them later for RX WEP keys, which need to be uploaded twice. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: add remove flow for AUX ROC time eventsMatti Gottlieb
Add a flow that handles the requests to cancel the roc time event, that has been triggered via the aux framework. The roc for bss is different than the roc for p2p devices, and is done via the aux framework using the aux queue, thus requires a different flow to cancel the time event. Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: remove warning on unknown scan completeDavid Spinadel
Remove warning on scan complete with unknown ID, since this scan could be already cleared in abort flow. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: mvm: use unsigned for ssid_bitmapJohannes Berg
The ssid_bitmap should be unsigned, though it doesn't matter much as the high bits aren't used. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-24iwlwifi: pcie: support 7265-D devicesJohannes Berg
Identify 7265-D devices using the hardware revision (they have the same PCI IDs as 7265) and change the configuration for them taking the differences (currently only the firmware image) into account. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: pcie: support loading FW with extended mem rangeArik Nemtsov
Toggle the LMPM_CHICK register when writing chunks into the FW's extended SRAM. This tells the FW to put the chunk into a different memory space. Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: mvm: disable beacon filtering escape timerEliad Peller
There is no reason to pass every 50th beacon if nothing was changed. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: mvm: make nd_ies part of the mvm structLuciano Coelho
Instead of allocating nd_ies separately, make it part of the iwl_mvm structure so it's easier to handle its lifetime. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: pcie: properly reset the deviceEmmanuel Grumbach
We were toggling the wrong bit when we reset the device, fix that. Moreover, since the reset can take time, we need to wait before we set the rfkill interrupt. Not doing so can be racy since the driver is enabling the rfkill interrupt while the device is resetting which will clear all the registers including the CSR_INT_MASK. This can basically lead to a situation where we don't enable the rfkill interrupt. If that happens, the user will not be able to re-enable the device when de-asserting rfkill. This scenario happened to the submitter of: https://bugzilla.kernel.org/show_bug.cgi?id=87191 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-11-23iwlwifi: mvm: support random MAC address for scanningJohannes Berg
For background and scheduled scan, using the new unified scan API, support random MAC address scanning. Unfortunately, the firmware right now doesn't support randomising itself, so for now do it on the host - we'll change this once the firmware supports randomising the address for each scan iteration using the address/mask. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>