aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25iwlwifi: mvm: rely on mac80211 to configure TWT supportEmmanuel Grumbach1-20/+2
Mac80211 will check both the HE Capability IE and the Extended Capability IE, so set the TWT support bit when mac80211 tells us to. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-12-14iwlwifi: mvm: activate apply pointsSara Sharon1-0/+2
Call the previously introduced apply points entry point when reaching an apply point. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-11-23iwlwifi: mvm: set MAC_FILTER_IN_11AX in AP modeShaul Triebitz1-0/+3
In AP mode, if AP supports 11ax, add the MAC_FILTER_IN_11AX flag in MAC_CTXT command (needed for various 11ax stuff). Signed-off-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-11-23iwlwifi: mvm: add support for TWT capabilitiesEmmanuel Grumbach1-1/+23
We need to check the TWT support of the peer and to propagte the capability to the firmware. The current implementation will enable TWT only if the TWT support is advertised in the HE CAP IE and in the Extended Capability IE. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-11-23iwlwifi: mvm: remove assignment of the reciprocalEmmanuel Grumbach1-12/+0
The firmware stopped looking at this field long ago. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-11-11iwlwifi: mvm: switch management tx antenna only on tx failureAvraham Stern1-5/+2
Switch the antenna used for management tx only if previous tx failed. If previous tx succeeded, there is no reason to switch antennas. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-10-06iwlwifi: dbg: group trigger condition to helper functionSara Sharon1-9/+3
The triplet of get trigger, is trigger enabled and is trigger stopped repeats itself. Group them in a function to avoid code duplication. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-09-28iwlwifi: mvm: use correct FIFO lengthSara Sharon1-0/+4
Current FIFO size calculation is wrong for two reasons: - We access lmac 0 by default - We don't take 11ax into consideration. Fix both. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: remove all occurrences of the FSF address paragraphLuca Coelho1-5/+0
The Free Software Foundation address is superfluous and causes checkpatch to issue a warning when present. Remove all paragraphs with FSF's address to prevent that. Signed-off-by: Luca Coelho <[email protected]>
2018-08-31iwlwifi: mvm: add NOA and CSA to a probe responseGregory Greenman1-0/+61
A probe response built by a P2P GO should contain: 1. CSA/eCSA IE when relevant 2. If the corresponding probe request had P2P IE, then need to add P2P IE with NOA attributes. However, the NOA attributes and the updated channel switch counter are known only to the FW. The solution is that FW will send a notification with the relevant probe response data and the driver will save it and update the probe response accordingly. Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2018-07-26iwlwifi: add module parameter to disable 802.11axLuca Coelho1-1/+2
Add a module parameter to disable 802.11ax features in supported devices. This is useful for testing or if there are interoperability issues with some APs. Signed-off-by: Luca Coelho <[email protected]>
2018-07-26iwlwifi: add support for IEEE802.11axLuca Coelho1-0/+3
Add support for the HE in the iwlwifi driver conforming with P802.11ax_D2.0. Signed-off-by: Luca Coelho <[email protected]>
2018-02-16iwlwifi: mvm: fix IBSS for devices that support station type APISara Sharon1-1/+2
In IBSS, the mac80211 sets the cab_queue to be invalid. However, the multicast station uses it, so we need to override it. A previous patch did it, but it was nested inside the if's and was applied only for legacy FWs that don't support the new station type API, instead of being applied for all paths. In addition, add a missing NL80211_IFTYPE_ADHOC to the initialization of the queues in iwl_mvm_mac_ctxt_init() Fixes: ee48b72211f8 ("iwlwifi: mvm: support ibss in dqa mode") Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-11-25iwlwifi: mvm: fix packet injectionEmmanuel Grumbach1-1/+1
We need to have a station and a queue for the monitor interface to be able to inject traffic. We used to have this traffic routed to the auxiliary queue, but this queue isn't scheduled for the station we had linked to the monitor vif. Allocate a new queue, link it to the monitor vif's station and make that queue use the BE fifo. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=196715 Cc: [email protected] Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-09iwlwifi: mvm: support new beacon template commandHaim Dreyfuss1-13/+34
Support a new version of the beacon template command. This replaces v8 of the command, which was missing the rate code. Also, export rate decision logic to a separate function. Signed-off-by: Haim Dreyfuss <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-01iwlwifi: mvm: remove non-DQA modeJohannes Berg1-148/+16
All the firmware versions the driver supports enable DQA, and thus the only way to get non-DQA mode is to modify the source. Remove this mode to simplify the code. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-01iwlwifi: mvm: fix the FIFO numbers in A000 devicesEmmanuel Grumbach1-1/+8
The FIFO numbering is different in A000 devices. This means that we routed BE packets to BK FIFO. Fix this. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-01iwlwifi: mvm: refactor beacon template command codeLuca Coelho1-81/+121
We currently support 3 different versions of the beacon template command and the code does some tricks in order to reuse what is possible across these versions. But it is a bit complicated to read and soon there will be one more variation that the driver needs implement, which would complicate it even further. Refactor the way we send beacon template commands, which increases the code size a bit, but makes it much easier to read. Signed-off-by: Luca Coelho <[email protected]>
2017-08-01iwlwifi: refactor firmware debug codeJohannes Berg1-3/+4
Split out the firmware debug code to be more general, so that it can be used by different subdrivers. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-29iwlwifi: mvm: fix mac80211's hw_queue in DQA modeJohannes Berg1-6/+26
When in non-DQA mode, mac80211 actually gets a pretty much perfect idea (in vif->hw_queue/cab_queue) of which queues we're using. But in DQA mode, this isn't true - nonetheless, we were adding all the queues, even the ones stations are using, to the queue allocation bitmap. Fix this, we should only add the queues we really are using in DQA mode: * IWL_MVM_OFFCHANNEL_QUEUE, as we use this in both modes * mvm->aux_queue, as we use this in both modes - mac80211 never really knows about it but we use it as a cookie internally, so can't reuse it * possibly the GCAST queue (cab_queue) * all the "queues" we told mac80211 about we were using on each interface (vif->hw_queue), these are entirely virtual in this mode Also add back the failure now when we can't allocate any more of these - now virtual - queues; this was skipped in DQA mode and would lead to having multiple ACs or even interfaces use the same queue number in mac80211 (10, since that's the limit), which would stop far too many queues if stopped. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-28Merge tag 'iwlwifi-next-for-kalle-2017-06-28' of ↵Kalle Valo1-0/+3
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next More iwlwifi patches for 4.13 * Some changes in suspend/resume handling to support new FWs; * A bunch of RF-kill related fixes; * Continued work towards the A000 family; * Support for a new version of the TX flush FW API; * Some fixes in monitor interfaces; * A few fixes in the recovery flows; * Johannes' documentation fixes and FW API struct cleanups continue; * Remove some noise from the kernel logs; * Some other small improvements, fixes and cleanups;
2017-06-25Merge tag 'wireless-drivers-next-for-davem-2017-06-25' of ↵David S. Miller1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for 4.13 New features and bug fixes to quite a few different drivers, but nothing really special standing out. What makes me happy that we have now more vendors actively contributing to upstream drivers. In this pull request we have patches from Broadcom, Intel, Qualcomm, Realtek and Redpine Signals, and I still have patches from Marvell and Quantenna pending in patchwork. Now that's something comparing to how things looked 11 years ago in Jeff Garzik's "State of the Union: Wireless" email: https://lkml.org/lkml/2006/1/5/671 Major changes: wil6210 * add low level RF sector interface via nl80211 vendor commands * add module parameter ftm_mode to load separate firmware for factory testing * support devices with different PCIe bar size * add support for PCIe D3hot in system suspend * remove ioctl interface which should not be in a wireless driver ath10k * go back to using dma_alloc_coherent() for firmware scratch memory * add per chain RSSI reporting brcmfmac * add support multi-scheduled scan * add scheduled scan support for specified BSSIDs * add support for brcm43430 revision 0 wlcore * add wil1285 compatible rsi * add RS9113 USB support iwlwifi * FW API documentation improvements (for tools and htmldoc) * continuing work for the new A000 family * bump the maximum supported FW API to 31 * improve the differentiation between 8000, 9000 and A000 families ==================== Signed-off-by: David S. Miller <[email protected]>
2017-06-23iwlwifi: mvm: set assoc_beacon_arrive_timeAvraham Stern1-0/+2
When updating the mac context after association, assoc_beacon_arrive_time is not being set, which causes the FW to set a wrong TSF to the MAC. Fix this by setting the assoc_beacon_arrive_time when updating the mac context after association. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-23iwlwifi: mvm: track and report IBSS manager status to mac80211Johannes Berg1-0/+1
Shaul reported that when iwlmvm was sending beacons, it didn't properly also take ownership of the probe responses. This is because the whole mac80211 callback (tx_last_beacon) wasn't implemented. Fix that to make IBSS discovery work better. Reported-by: Shaul Triebitz <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-16networking: introduce and use skb_put_data()Johannes Berg1-1/+1
A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2017-06-12Merge tag 'iwlwifi-next-for-kalle-2017-06-06' of ↵Kalle Valo1-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next First batch of iwlwifi driver patches 4.13 * Loads of FW API documentation improvements (for tools and htmldoc); * Continued work for the new A000 family; * Bumped the maximum supported FW API to 31; * Improve the differentiation between 8000, 9000 and A000 families; * A lot of fixes and cleanups here and there; kvalo: There were conflicts iwl_mvm_stop_device() and iwl_mvm_tcool_set_cur_state(). The former was easy but latter needed more thought. Apparently the mutex was taken too late, so I fixed so that the mutex is taken first and then check for iwl_mvm_firmware_running().
2017-06-05iwlwifi: mvm: use schedule_delayed_work()Johannes Berg1-3/+3
There's no need to refer to system_wq directly, use the provided wrapper schedule_delayed_work(). Made with the following spatch: @@ expression E,F; @@ -queue_delayed_work(system_wq, E, F); +schedule_delayed_work(E, F); Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-06-05iwlwifi: mvm: clear new beacon command template structJohannes Berg1-1/+1
Clear the struct so that all reserved fields are zero when we send the struct down to the device. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-25iwlwifi: mvm: support station type APISara Sharon1-2/+4
Support change to ADD_STA API to support station types. Each station is assigned its type. This simplifies FW handling of the broadcast and multicast stations: * broadcast station is identified by its type and not the mac address. * multicast queue is no longer treated differently. The opening and closing of it is done by referring to its station. There is no need to specify it in the MAC command. * When disabling TX to all station driver can disable the traffic on multicast station, so FW doesn't have to do it. Change is backward compatible. Change the order of adding and removing the stations according to FW requirements. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-25iwlwifi: mvm: map cab_queue to different txq_idSara Sharon1-0/+5
cab_queue can now get bigger than u8, since in TVQM we will support 512 queues.. Support it by maintaining internal mapping between the actual number and mac80211 queue (IWL_MVM_DQA_GCAST_QUEUE). For pre-a000 the internal queue will be the same as the mac80211 queue. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-19iwlwifi: mvm: support new TX response for TVQMSara Sharon1-1/+3
In TVQM mode the TX responses were changed to include queue number since legacy TX queue number retrieval cannot be scaled up to 512 queues. Support this change. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-19iwlwifi: mvm: prepare for station count changeSara Sharon1-3/+3
In a000 devices we will support up to 32 stations. The max station define is used also for invalid station marking which makes finding usages of actual maximum station pretty hard to sort through - change it to be a different define in order to make future changes easier. Use also ARRAY_SIZE intead of define when possible. Do not move yet to 32 stations until firmware do it though. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-04-18Merge tag 'iwlwifi-next-for-kalle-2017-04-13' of ↵Kalle Valo1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next Patches intended for v4.12: * Some small fixes here and there; * The usual cleanups and small improvements; * Work to support A000 devices continues; * New FW API version; * Some debugging improvements;
2017-04-11iwlwifi: mvm: add multicast stationSara Sharon1-0/+1
Currently multicast queue is associated with the broadcast station. This raises quite a few issues: The multicast queue has a special treatment: - It is sent in the MAC context command - It is excluded from tfd_queue_mask In DQA mode we end up enabling two queues - the probe response queue and the multicast queue - with the same station (broadcast) and TID while in DQA mode it should be unique RA-TID. Firmware will enforce it for a000 devices, so this allocation will fail. In addition, in a000 devices the FW will set the FIFO and not the driver. So there is a need for FW to know when we enable the queue that it is multicast queue so it will be bound to the multicast FIFO. There is no such way in current design. In order to simplify driver and firmware handling of this queue create a multicast station. This solves the unique RA-TID issue in the short term and serves as preparation for the long term. In the long term we will also add a flag marking this station for the FW as the multicast station. Once we will do that the FW will know this is the multicast queue immediately when it is added and bind it to the correct FIFO. It will also enable removing the special treatment of the queue in the MAC context command. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-03-24iwlwifi: mvm: support ibss in dqa modeLiad Kaufman1-1/+2
Allow working IBSS also when working in DQA mode. This is done by setting it to treat the queues the same as a BSS AP treats the queues. Fixes: 7948b87308a4 ("iwlwifi: mvm: enable dynamic queue allocation mode") Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-02-06iwlwifi: mvm: support new beacon template commandSara Sharon1-23/+48
Support new version of beacon template command which deprecates the use of the tx command inside. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-02-06iwlwifi: mvm: release static queues on bcast releaseLiad Kaufman1-23/+11
A few of the static queues are enabled along with the bcast STA. Make sure they are removed along with it, rather than waiting for the mac ctxt release. This is needed because we sometimes have a STA being removed and then added again (either with the same sta_id or a different one). If we wait for the mac ctxt release we will try to allocate the queues again (as this is currently done in the STA allocation and not in the MAC init) although they weren't freed, and even if the sta_id of the STA has changed. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-01-26iwlwifi: mvm: support version 2 of stored beacon notificationSara Sharon1-1/+1
For 9000 devices withg upload, FW cannot send the entire phy flags, and will send only the band - which is what we really care about anyway. Change is backward compatible. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-10-19iwlwifi: mvm: assign cab queue to the correct stationSara Sharon1-9/+7
Currently when configuring the cab queue the scheduler is configured without station id - which results in station id 0. In DQA mode this causes firmware to assert later on when the actual station 0 is added with an empty tfd_queue_mask. Fix that by configuring the queue to the broadcast station. This is a bit trickier since the queue should not be included in the tfd_queue_mask of the ADD_STA since it is a multicast queue, and the tfd_queue_mask is only unicast queue. As a result the queue should be enabled only after the broadcast station is added. Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-10-19iwlwifi: mvm: support MONITOR vif in DQA modeLiad Kaufman1-3/+5
In DQA mode the TXQs are allocated on demand, so make sure the sniffer STA tfd_queue_msk isn't set. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: move AP-specific code to right functionJohannes Berg1-22/+20
There's no need for the common MAC context function to have an if on AP mode, the values can be overridden in the AP-specific function later. Clean that up by adding the full command as a new parameter to the AP-specific function, and doing it there. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-09-19iwlwifi: mvm: disable P2P queue on mac context releaseSara Sharon1-0/+5
AP queue is properly released, but P2P queue isn't. Fixes: commit 4c965139a3cd ("iwlwifi: mvm: support p2p device frames tx on dqa queue #2") Signed-off-by: Sara Sharon <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-07-01iwlwifi: mvm: Support CSA countdown offloadingAndrei Otcheretianski1-13/+95
Add support CSA countdown offloading. When CSA starts, the driver specifies the offsets to the eCSA and CSA IEs in the beacon template command and the fw performs the countdown. The fw notifies the driver when the channel switch flow should be performed. Beacon sent notifications are not used anymore. Signed-off-by: Andrei Otcheretianski <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: support p2p device frames tx on dqa queue #2Liad Kaufman1-6/+10
Support sending P2P device frames should be sent from queue #2, as required in DQA mode. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-05-10iwlwifi: mvm: allocate queue for probe response in dqa modeLiad Kaufman1-0/+6
In DQA mode, allocate a dedicated queue (#9) for P2P GO/soft AP probe responses. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2016-04-12cfg80211: remove enum ieee80211_bandJohannes Berg1-4/+4
This enum is already perfectly aliased to enum nl80211_band, and the only reason for it is that we get IEEE80211_NUM_BANDS out of it. There's no really good reason to not declare the number of bands in nl80211 though, so do that and remove the cfg80211 one. Signed-off-by: Johannes Berg <[email protected]>
2016-04-11Merge tag 'wireless-drivers-next-for-davem-2016-04-11' of ↵David S. Miller1-10/+37
git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers patches for 4.7 Major changes: iwlwifi * support for Link Quality measurement * more work 9000 devices and MSIx * continuation of the Dynamic Queue Allocation work * make the paging less memory hungry * 9000 new Rx path * removal of IWLWIFI_UAPSD Kconfig option ath10k * implement push-pull tx model using mac80211 software queuing support * enable scan in AP mode (NL80211_FEATURE_AP_SCAN) wil6210 * add basic PBSS (Personal Basic Service Set) support * add initial P2P support * add oob_mode module parameter ==================== Signed-off-by: David S. Miller <[email protected]>
2016-04-06mac80211: allow passing transmitter station on RXJohannes Berg1-1/+1
Sometimes drivers already looked up, or know out-of-band from their device, which station transmitted a given RX frame. Allow them to pass the station pointer to mac80211 to save the extra lookup. Signed-off-by: Johannes Berg <[email protected]>
2016-03-30iwlwifi: mvm: move cmd queue to be #0 in dqa modeLiad Kaufman1-2/+6
Change the CMD queue to be queue #0 (rather than queue #9) when working in DQA mode. Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2016-03-30iwlwifi: mvm: allocate dedicated queue for cab in dqa modeLiad Kaufman1-6/+12
In DQA mode, allocate a dedicated queue (#3) for content after beacon (AKA "CaB"). Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>