aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2017-08-30iwlwifi: mvm: bump API to 34 for 8000 and upEmmanuel Grumbach3-4/+4
These devices support -34.ucode, so load it. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-30iwlwifi: mvm: Avoid deferring non bufferable framesDavid Spinadel1-4/+5
Use bcast station for all non bufferable frames on AP and AD-HOC. The host is no longer aware of STAs PS status because of buffer station offload, so we can't rely on mac80211 to toggle on IEEE80211_TX_CTL_NO_PS_BUFFER bit. A possible issue with buffering such frames, beside the obvious spec violation, is when a station disconnects while in PS but the AP isn't aware of that. In such scenarios the AP won't be able to send probe responses or auth frames so the STA won't be able to reconnect and the AP will have a queue hang. Fixes: 3e56eadfb6a1 ("iwlwifi: mvm: implement AP/GO uAPSD support") Signed-off-by: David Spinadel <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-30iwlwifi: fix long debug printLiad Kaufman1-2/+7
There is a debug print that sometimes reaches over 110 chars, thus generating a warning in those cases. Split the print into two to prevent these cases. Fixes: 92b0f7b26b31 ("iwlwifi: split the regulatory rules when the bandwidth flags require it") Signed-off-by: Liad Kaufman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-24iwlwifi: pcie: move rx workqueue initialization to iwl_trans_pcie_alloc()Luca Coelho3-9/+12
Work queues cannot be allocated when a mutex is held because the mutex may be in use and that would make it sleep. Doing so generates the following splat with 4.13+: [ 19.513298] ====================================================== [ 19.513429] WARNING: possible circular locking dependency detected [ 19.513557] 4.13.0-rc5+ #6 Not tainted [ 19.513638] ------------------------------------------------------ [ 19.513767] cpuhp/0/12 is trying to acquire lock: [ 19.513867] (&tz->lock){+.+.+.}, at: [<ffffffff924afebb>] thermal_zone_get_temp+0x5b/0xb0 [ 19.514047] [ 19.514047] but task is already holding lock: [ 19.514166] (cpuhp_state){+.+.+.}, at: [<ffffffff91cc4baa>] cpuhp_thread_fun+0x3a/0x210 [ 19.514338] [ 19.514338] which lock already depends on the new lock. This lock dependency already existed with previous kernel versions, but it was not detected until commit 49dfe2a67797 ("cpuhotplug: Link lock stacks for hotplug callbacks") was introduced. Reported-by: David Weinehall <[email protected]> Reported-by: Jiri Kosina <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.gitKalle Valo13-41/+89
Stephen Rothwell reported quite a few conflicts in iwlwifi between wireless-drivers and wireless-drivers-next. To avoid any problems later in other trees merge w-d to w-d-next to fix those conflicts early.
2017-08-24wireless: ipw2x00: make iw_handler_def constBhumika Goyal2-3/+3
Make these const as they are only stored in the const field of a net_device structure. Signed-off-by: Bhumika Goyal <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24net: rsi: mac80211: constify ieee80211_opsArvind Yadav1-1/+1
ieee80211_ops are not supposed to change at runtime. All functions working with ieee80211_ops provided by <net/mac80211.h> work with const ieee80211_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24wireless: ipw2200: Replace PCI pool old APIRomain Perier1-6/+7
The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier <[email protected]> Reviewed-by: Peter Senna Tschudin <[email protected]> Acked-by: Stanislav Yakovlev <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24rtlwifi: rtl8821ae: fix spelling mistake: "faill" -> "failed"Colin Ian King1-1/+1
Trivial fix to spelling mistake in RT_TRACE message Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24mt7601u: check memory allocation failureChristophe Jaillet1-0/+5
Check memory allocation failure and return -ENOMEM in such a case, as already done a few lines below. As 'dev->tx_q' can be NULL, we also need to check for that in 'mt7601u_free_tx()', and return early. Signed-off-by: Christophe JAILLET <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24rtlwifi: make a couple arrays largerDan Carpenter1-2/+3
This is a static checker fix. "cal_num" is 10. We're declaring the tx_dt[] and rx_td[] arrays as 3 element arrays. The static checker complains that we do: tx_dt[cal] = (vdf_y[1]>>20)-(vdf_y[0]>>20); "cal" is the iterator and it is in the 0-9 range so it looks like we could corrupt memory. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24rtlwifi: btcoex: 23b 1ant: fix duplicated code for different branchesGustavo A. R. Silva1-8/+2
Refactor code in order to avoid identical code for different branches. This issue was detected with the help of Coccinelle. Addresses-Coverity-ID: 1415177 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24wlcore: add missing nvs file name info for wilink8Reizer, Eyal4-0/+28
The following commits: commit c815fdebef44 ("wlcore: spi: Populate config firmware data") commit d776fc86b82f ("wlcore: sdio: Populate config firmware data") Populated the nvs entry for wilink6 and wilink7 only while it is still needed for wilink8 as well. This broke user space backward compatibility when upgrading from older kernels, as the alternate mac address would not be read from the nvs that is present in the file system (lib/firmware/ti-connectivity/wl1271-nvs.bin) causing mac address change of the wlan interface. This patch fix this and update the structure field with the same default nvs file name that has been used before. In addition, some distros hold a default wl1271-nvs.bin in the file system with a bogus mac address (deadbeef...) that overrides the mac address that is stored inside the device. Warn users about this bogus mac address and use the internal mac address Fixes: c815fdebef44 ("wlcore: spi: Populate config firmware data") Fixes: d776fc86b82f ("wlcore: sdio: Populate config firmware data") Signed-off-by: Eyal Reizer <[email protected]> Reviewed-by: Sebastian Reichel <[email protected]> Tested-by: Tony Lindgren <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-24Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.gitKalle Valo17-15/+1738
ath.git patches for 4.14. Major changes: ath10k * initial UBS bus support (no full support yet) * add tdls support for 10.4 firmware ath9k * add Dell Wireless 1802 wil6210 * support FW RSSI reporting
2017-08-18iwlwifi: use big-endian for the hw section of the nvmLuca Coelho3-9/+9
Unlike the other sections of the NVM, the hw section is in big-endian. To read a value from it, we had to cast it to __be16. Fix that by using __be16 * for the entire section. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: remove useless check for mvm->cfg in iwl_parse_nvm_section()Luca Coelho1-3/+0
At this point we have already copied the cfg pointer to mvm and we have been dereferencing this pointer many times before, so it will never be NULL or we would have crashed. Remove the useless check. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: remove useless argument in iwl_nvm_init()Luca Coelho3-54/+51
We always call iwl_nvm_init() with read_nvm_from_nic == true, so this argument is useless. Remove it. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: fw: fix lar_enabled endian problem in iwl_fw_get_nvmLuca Coelho1-2/+1
We read the regulatory.lar_enabled field in iwl_fw_get_nvm() and store it in nvm->lar_enabled, taking care of endianness. But then later we read it again to pass the value to iwl_init_sbands() without handling endianness. To solve this, simply reuse nvm->lar_enabled when calling that function. Fixes: e9e1ba3dbf00 ("iwlwifi: mvm: support getting nvm data from firmware") Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: add workaround to disable wide channels in 5GHzLuca Coelho3-12/+56
The OTP in some SKUs have erroneously allowed 40MHz and 80MHz channels in the 5.2GHz band. The firmware has been modified to not allow this in those SKUs, so the driver needs to do the same otherwise the firmware will assert when we try to use it. Cc: [email protected] Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: change open and close criteria of a BA sessionGregory Greenman3-52/+73
Tx BA session should be started according to the current throughput without any dependence on the internal rate scaling state. The criteria for opening a BA session will be 10 frames per second. Sending frequent del BAs can cause inter-op issues with some APs. We'll not close a BA session until we receive an explicit del BA from the peer. Signed-off-by: Gregory Greenman <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: update channel flags parserLuca Coelho1-21/+30
There are some new flags in the channel flags that we don't know about. Also, the "WIDE" flag is very confusing, because it actually means 20MHz bandwidth, which is not very wide. Add the new flags and rename the confusing one. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: pci: add new PCI ID for 7265DLuca Coelho1-0/+1
We have a new PCI subsystem ID for 7265D. Add it to the list. Cc: [email protected] Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: distinguish different RF modules in A000 devicesTzipi Peres5-12/+58
Newer versions of A000 devices come with two diffenent RF modules. The PCI_ID, the subsystem ID and the RF ID are identical in these two cases, so we need to differentiate them by using the CSR_HW_RF_ID register- in order to load the appropriate firmware. Signed-off-by: Tzipi Peres <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: Fix channel switch in case of count <= 1Ilan Peer1-4/+9
The code did not consider the case that the channel switch counter is <= 1, which would result with an inaccurate calculation of the time event apply time. As the specification states that in case of counter == 0 the switch occurs at any time after the reception the frame, and for counter == 1 the switch would happens before the next TBTT, schedule the time event immediately. Signed-off-by: Ilan Peer <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: Demote messages about fw flags size to infoJoão Paulo Rechi Vita1-6/+6
These messages are not reporting a real error, just the fact that the firmware knows about more flags than the driver. Currently these messages are presented to the user during boot if there is no bootsplash covering the console, even when booting the kernel with "quiet". Demoting it to the warn level helps having a clean boot process. Signed-off-by: João Paulo Rechi Vita <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: move BT_MBOX_PRINT macro to common headerLuca Coelho2-12/+6
Move the BT_MBOX_PRINT() macro from mvm/debugfs.c to fw/api/coex.h so it can be reused and remove duplicate definition of BT_MBOX_MSG(), keeping only the one already in coex.h. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: don't send BAR on flushed framesEmmanuel Grumbach1-1/+6
When we flush a queue, the packets will have a 'failed' status but we shouldn't send a BAR. This check was missing. Because of that, when we got an ampdu_action with IEEE80211_AMPDU_TX_STOP_FLUSH, we started the following ping pong with the firmware: 1) Set the station as 'draining' 2) Get a failed Tx status (DRAINED) 3) Send a BAR because of the failed Tx status (loop of 2 and 3) This loop wasn't endless since the BAR isn't sent on a queue that would trigger a "nested" BAR. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: remove session protection to allow channel switchAvraham Stern2-4/+33
If a time event is already scheduled when trying to schedule one for channel switch, the code assumes the channel switch is already scheduled and no further action is required. However, it is possible that the scheduled time event is actually for session protection (e.g. when the first beacon after association contains the CSA IE). In this case the channel switch will not be scheduled which will finally lead to disconnection. Fix this by removing the old time event and schduling a new one for the channel switch. Signed-off-by: Avraham Stern <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: update the firmware API in TXEmmanuel Grumbach2-7/+4
The firmware team is now re-using a bit that hasn't been used for a few generations. Re-use for TX_ON_AIR drop. This bit will be set by the firmware to indicate that a frame in an A-MPDU was dropped but not because of the already mapped reasons. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: use mvmsta consistently in rs.cLuca Coelho1-15/+15
We use mvmsta for the sta->drv_priv in mvm, but in rs.c we have a bunch of instances using sta_priv, which is probably due to it being copied from dvm. Change all occurrences to mvmsta for consistency with the rest of the driver Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: group all dummy SAR function declarations togetherLuca Coelho2-14/+11
We have some of the SAR dummy functions when ACPI is not set declared in mvm.h and some declared in fw.c. Group them all together in fw.c for consistency and to avoid static/non-static issues. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: include more debug data when we get an unexpected baidEmmanuel Grumbach1-3/+5
When we get a valid baid in a received frame, we need to check that we are aware of this baid. If not, we check that the OLD_SN bit set. If that's not the case, we issue a WARNING. Print more data when that happens. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: add command name for FRAME_RELEASEEmmanuel Grumbach1-0/+1
This name was missing in the list. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: pcie: support short Tx queues for A000 device familyEmmanuel Grumbach6-36/+37
This allows to modify TFD_TX_CMD_SLOTS to a power of 2 which is smaller than 256. Note that we still need to set values to wrap at 256 into the scheduler's write pointer, but all the rest of the code can use shorter transmit queues. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: support new Coex firmware APIEmmanuel Grumbach5-9/+77
The firmware now adds more information about time sharing with the Bluetooth core. Adapt the API structures and add the new fields in the debugfs hooks. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: call iwl_remove_notification from iwl_wait_notificationLuca Coelho1-13/+12
The iwl_wait_notification() function removes the wait entry from the list. To make it clearer that it's doing the same thing as iwl_remove_notification(), call the latter instead of having duplicate code. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: consider RFKILL during INIT as successLuca Coelho2-22/+17
There's no need to differentiate an INIT that ended early because of RFKILL from one that succeded. Additionally, if INIT fails later, during calibration, due to RFKILL, we can just return success and continue as if we were already in RFKILL to start with. Remove this unnecessary differentiation and do some other small clean-ups while at it. Signed-off-by: Luca Coelho <[email protected]>
2017-08-18iwlwifi: mvm: remove the corunning supportEmmanuel Grumbach8-320/+0
The corunning block was supposed to help in coex scenarios. It required the driver to configure the firmware based on the coupling between the two antennas of the devices. This was never in use and the configuration sent by the driver has always been blank. Remove all that code. Signed-off-by: Emmanuel Grumbach <[email protected]> Signed-off-by: Luca Coelho <[email protected]>
2017-08-17rsi: security enhancements for AP modePrameela Rani Garnepudi4-18/+56
Station id should be set in load key frame configured to device. For WEP mode, key is configured once from mac80211. This key is saved and configured to device every time a station is connected. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: aggregation parameters frame for AP modePrameela Rani Garnepudi3-13/+39
TX command frame ampdu aggregation parameters is updated to include sta_id for AP mode. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: update tx auto rate command frame for AP modePrameela Rani Garnepudi1-10/+34
Auto rate frame is sent to firmware when a new station is connected. Station id and station's ht capabilities are updated in auto rate command frame. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: use common descriptor for auto rate framePrameela Rani Garnepudi2-12/+8
TX command frame auto rate request is modified to use common descriptor struture. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: data and managemet path changes for AP modePrameela Rani Garnepudi5-27/+96
Station id needs to be get for data and management frames to fill in the descruptor for AP mode. Few other changes related to AP mode are covered here. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: handle station disconnection in AP modePrameela Rani Garnepudi1-11/+45
When sta_remove of mac80211 is called, driver iterates through list of existing stations to get the station id. Then peer notify is prepared and send to firmare. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: handle station connection in AP modePrameela Rani Garnepudi3-26/+110
Station structures are maintained in driver with required fields. When mac80211 callback sta_add is called, driver iterates through list of connected stations to check available index and assigns station id which is important for further communication to that station. Then peer notify frame is send to firmware to inform the firmware about new station connection. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: add beacon changes for AP modePrameela Rani Garnepudi7-14/+152
Mac80211 config parameter BEACON_ENABLE is handled. When VAP capabilities frame with AP mode is configured to firmware, beacon events start coming to host at each PreTBTT. At this time, beacon is taken from mac80211, descriptor is prepared and send to firmware. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: remove interface changes for AP modePrameela Rani Garnepudi1-4/+22
remove_interface callback of mac80211 is handled for AP mode. Same is notified to firmware through vap_capabilities frame with VAP status VAP_DELETE. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: add interface changes for ap modePrameela Rani Garnepudi4-13/+44
AP mode is handled in add_interface callback of mac80211. Also for AP mode, sending rx filter frame to disallow beacons to host is added. Station structures are initialized to NULL. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17rsi: advertise ap mode supportPrameela Rani Garnepudi2-1/+37
AP mode support is advertised to cfg80211. Necessary wiphy parameters are initialized. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-08-17qtnfmac: modify tx reclaim lockingSergey Matyukevich2-13/+8
Perform additional reclaim from qtnf_pcie_data_tx. Lock tx_lock serves only reclaim synchronization purposes. Rename it accordingly and improve granularity moving this lock to qtnf_pcie_data_tx_reclaim. Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>