aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-01rtlwifi: rtl8192ce: Fix editing error that causes silent memory corruptionLarry Finger1-4/+3
In the major update of the rtlwifi-family of drivers, there was an editing mistake. Unfortunately, this particular error leads to memory corruption that silently leads to failure of the system. This patch is one of three needed to fix the kernel regression reported at https://bugzilla.kernel.org/show_bug.cgi?id=88951. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Catalin Iacob <iacobcatalin@gmail.com> Tested-by: Catalin Iacob <iacobcatalin@gmail.com> Cc: Catalin Iacob <iacobcatalin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-12-01iwlwifi: pcie: add fh registers to dump dataLiad Kaufman2-0/+33
Adds all FH registers between FH_MEM_UPPER_BOUND and FH_MEM_LOWER_BOUND (which should be readable to the driver) to the dump data when it is collected. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: support ucode load for family_8000 B0 onlyEran Harary2-71/+72
The ucode load flow changed for B0 hardware step. Change the code accordingly. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: remove a dangling line of documentationDavid Spinadel1-1/+0
Signed-off-by: David Spinadel <david.spinadel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: pcie: claim ownership on the device after stop_device()Emmanuel Grumbach1-0/+3
Not doing so would allow other possible users of the device to take ownership and prevent normal WiFi operation. This fixes the second part of: https://bugzilla.kernel.org/show_bug.cgi?id=87191 Reviewed-by: Moshe Harel <moshe.harel@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: don't load on 7265D with old NVMEmmanuel Grumbach1-3/+5
7265D are new devices that should always have a new NVM (at least 0x0c11). The firmware has issues with older versions of the NVM which are not and will not be available to the common mortals. Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: support NVM file with headerIdan Kahlon1-8/+23
Handle NVM file header. When NVM header detected, skip the header and reading only the sections data. Signed-off-by: Idan Kahlon <idanx.kahlon@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: add channel information to the netdetect notificationsLuciano Coelho2-11/+54
Add the channels on which there was a match for every match reported by the firmware. The firmware reports the channels as indices to the array of channels that was passed in the scheduled scan request, so we need to save the array when entering D3 to make sure it is available when we resume. 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-12-01iwlwifi: mvm: add SSID match information for net-detectLuciano Coelho2-5/+68
Add SSID information to the net-detect indication to userspace. Fetch the matched profiles from the firmware in order to find the correct SSIDs in the profiles that matched. Since the net-detect information is stored in cfg80211, and in theory it could change while we are waking up and reading the matched profiles, we need to save it when we enter D3 so it is available during resume. 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-12-01iwlwifi: pcie: refactor cmd_in_flight set/clear codeEliad Peller1-36/+66
A following patche will use trans_pcie->cmd_in_flight for reference accounting as well. get ready for it. 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-12-01iwlwifi: mvm: add missing mvm ref debug printEliad Peller1-0/+1
IWL_MVM_REF_PROTECT_CSA is missing from the ref strings used by debugfs. Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: BT Coex - change the MPLUT registers' valueEmmanuel Grumbach1-2/+2
This impacts the partition between BT and Wifi. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: remove IWL_UCODE_TLV_API_CSA_FLOWEmmanuel Grumbach1-2/+1
All the supported firmwares have this TLV flag set. Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: remove IWL_UCODE_TLV_API_WOWLAN_CONFIG_TIDEmmanuel Grumbach5-51/+34
All the supported firmwares have this TLV flag set. Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: remove IWL_UCODE_TLV_CAPA_EXTENDED_BEACONEmmanuel Grumbach1-14/+5
This TLV flag is set for all the supported firmwares. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: deprecate -8.ucode for 3160 / 7260 / 7265Emmanuel Grumbach3-7/+6
This firmware is not supported anymore. Stop loading this firmware - and remove the code that handled older versions. Reviewed-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: mvm: check and report if wake up was due to net detectLuciano Coelho4-12/+94
Query the firmware for scan offload matches when waking up in order to report net detect as the reason for the wake up. This requires a new command API to be implemented. Additionally, remove some net detect command entries that are not valid anymore. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01iwlwifi: move firmware file format definitions to correct headerJohannes Berg3-183/+184
The firmware file-format is described in iwl-fw-file.h, while the internal handling structures and functions are in iwl-fw.h. Fix the separation between the files by moving file format definitions to iwl-fw-file.h. Also add a missing description for a kernel-doc member, and it's not needed to include iwl-fw-file.h again from the code (thanks to Liad Kaufman). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2014-12-01ath10k: simplify rx ring size/fill calculationMichal Kazior2-89/+12
Don't bother with fancy arithmetic and just hardcode the final values. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: prevent pci tx/rx starvationMichal Kazior1-6/+15
In theory it was possible to starve the system if a tx/rx handler could implicitly trigger more tx/rx pci events. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: remove transfer_id from ath10k_hif_cb::tx_completionMichal Kazior4-7/+11
Pass the eid argument via skbuff control buffer. This will make it possible to work with queues of HTC event buffers. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: remove unused callback argument from struct ath10k_hif_cb::rx_completionMichal Kazior3-5/+3
This wasn't used since forever and there are no plans on using it. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: make wmi service bitmap non-debugMichal Kazior4-22/+8
The service bitmap can be used to determine firmware capabilities. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: add sanity checks for service bmap parsingMichal Kazior2-61/+66
This shouldn't really happen but take into account the original service bitmap length when mapping service ids. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: fix wmi svc bitmap dbg printMichal Kazior2-1/+4
The dump print uses sizeof() but since service_map was a mere pointer the dump was too short. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: add pointer constness to tracesMichal Kazior1-14/+17
Traces shouldn't modified passed data. This will make it possible to pass const arguments to traces. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-12-01ath10k: do not limit RTS threshold value to 2347Vivek Natarajan2-6/+1
Increase the rts threshold from the legacy value of 2347 to support higher threshold limit. Signed-off-by: Vivek Natarajan <nataraja@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26cfg80211: clean up beacon loss CQM eventJohannes Berg1-4/+1
Having it as a sub-event for RSSI thresholds is very ugly, but luckily no userspace actually uses the events yet. Move the event to its own function call internally and to its own event attribute in nl80211. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-11-26ath10k: fix station count enforcementMichal Kazior6-21/+78
The number of peers isn't directly translatable to the number of stations because ath10k needs to reserve a few extra peers for special cases like multi-vif concurrency. The previous limit was 126 and 15 stations in AP mode for 10.x and main firmware branches respectively. The limit is now 128 and 16 which was the original intention. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: clean up num_peers lockingMichal Kazior2-6/+4
The var was supposed to be protected by data_lock but it wasn't so in all instances. It's actually not necessary to have a spinlock protected num_peers so drop it. All instances of num_peers are already within conf_mutex sections so use that. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: add missing gotoMichal Kazior1-1/+3
This prevents warning spamming if peer creation fails during sta_state in some cases. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: add memory dump debugfs interfaceYanbo Li3-0/+126
Add mem_val debugfs file for dumping the firmware (target) memory and also for writing to the memory. The firmware memory is accessed through one file which uses position of the file as the firmware memory address. For example, with dd use skip parameter for the address. Beucase target memory width is 32 bits it's strongly recommended to use blocksize divisable with 4 when using this interface. For example, when using dd use bs=4 to set the block size to 4 and remember to divide both count and skip values with four. To read 4 kB chunk from address 0x400000: dd if=mem_value bs=4 count=1024 skip=1048576 | xxd -g1 To write value 0x01020304 to address 0x400400: echo 0x01020304 | xxd -r | dd of=mem_value bs=4 seek=1048832 To read 4 KB chunk of memory and then write back after edit: dd if=mem_value of=tmp.bin bs=4 count=1024 skip=1048576 emacs tmp.bin dd if=tmp.bin of=mem_value bs=4 count=1024 seek=1048576 Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: add register access debugfs interfaceYanbo Li4-0/+154
Debugfs files reg_addr and reg_val are used for reading and writing to the firmware (target) registers. reg_addr contains the address to be accessed, which also needs to be set first, and reg_value is when used for reading and writing the actual value in ASCII. To read a value from the firmware register 0x100000: # echo 0x100000 > reg_addr # cat reg_value 0x00100000:0x000002d3 To write value 0x2400 to address 0x100000: # echo 0x100000 > reg_addr # echo 0x2400 > reg_value # Signed-off-by: Yanbo Li <yanbol@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: fix bug reported by lockdepSujith Manoharan1-2/+2
ath10k_tx_wep_key_work() acquires conf_mutex, so cancelling it when conf_mutex is already taken in ath10k_remove_interface() is incorrect, so move it outside the lock. Snippet from the lockdep report: kernel: ====================================================== kernel: [ INFO: possible circular locking dependency detected ] kernel: 3.18.0-rc5-wl-debug #34 Tainted: G O kernel: ------------------------------------------------------- kernel: hostapd/451 is trying to acquire lock: kernel: ((&arvif->wep_key_work)){+.+...}, at: [<ffffffff810872d5>] flush_work+0x5/0x290 kernel: but task is already holding lock: kernel: (&ar->conf_mutex){+.+.+.}, at: [<ffffffffa0b99f00>] ath10k_remove_interface+0x40/0x290 [ath10k_core] kernel: which lock already depends on the new lock. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: fix locking for WEP keysSujith Manoharan2-0/+6
peer->keys needs to be protected by data_lock since it is also accessed from the WMI path. Both install() and clear() routines for peer keys modify the key contents, so use the data_lock to avoid races. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: fix shared WEPSujith Manoharan3-0/+65
When static keys are used in shared WEP, when a station is associated, message 3 is sent with an encrypted payload. But, for subsequent authentications that are triggered without a deauth, the auth frame is decrypted by the HW. To handle this, check if the WEP keys have already been set for the peer and if so, mark the frame as decrypted. This scenario can happen when a station changes its default TX key and initiates a new authentication sequence. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: don't drop corrupted mgmt framesMichal Kazior2-4/+16
Some firmware revisions don't seem to deilver management frames with FCS error via WMI so narrow down the HTT rule to not drop corrupted management frames. This basically increases number of frames ath10k reports while sniffing. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: fix offchannel cancel failuresMichal Kazior1-2/+2
When mac80211 requests driver to cancel a hw roc the driver must not call the expired() callback or else roc will fail in some cases depending on how things get scheduled. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: make hw roc more reliableMichal Kazior2-0/+7
With P2P concurrency requested hw roc duration time can be very small. Some firmware revisions refuse scan requests with too small channel dwell time. This prevents messages like, e.g. with connected STA vif and performing P2P Find: ath10k_pci 0000:00:05.0: failed to switch to channel for roc scan ieee80211 phy3: failed to start next HW ROC (-110) Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: fix offchan reliabilityMichal Kazior4-10/+31
New firmware revisions don't need peer creation when doing offchannel tx. Earlier revisions would queue and never release frames without a peer. This prevent new firmware revisions from stopping replenishing wmi-htc tx credits and improves reliability of offchannel tx which would sometimes silently fail. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: remove extra_tx_headroomMichal Kazior1-4/+0
Comment was out-of-date. The headroom is no longer necessary because HTT Tx fragment list is stored in dma pool item associated with each sk_buff. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: use configured nss instead of max nssBen Greear1-2/+9
When re-associating a station, the nss was set back to maximum value even if user had configured small number of tx chains. So, pay attention to user's config in this case as well. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-26ath10k: apply chainmask settings to vdev on creationBen Greear1-0/+41
It appears it takes more than just setting the hardware's chainmask to make things work well. Without this patch, a vdev would only use 1x1 rates when chainmask was set to 0x3. Setting the 'nss' (number of spatial streams) on the vdev helps the firmware's rate-control algorithm work properly. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-11-25rtlwifi: Change order in device startupLarry Finger1-10/+10
The existing order of steps when starting the PCI devices works for 2.4G devices, but fails to initialize the 5G section of the RTL8821AE hardware. This patch is needed to fix the regression reported in Bug #88811 (https://bugzilla.kernel.org/show_bug.cgi?id=88811). Reported-by: Valerio Passini <valerio.passini@unicam.it> Tested-by: Valerio Passini <valerio.passini@unicam.it> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Valerio Passini <valerio.passini@unicam.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25rtlwifi: rtl8821ae: Fix 5G detection problemLarry Finger1-2/+3
The changes associated with moving this driver from staging to the regular tree missed one section setting the allowable rates for the 5GHz band. This patch is needed to fix the regression reported in Bug #88811 (https://bugzilla.kernel.org/show_bug.cgi?id=88811). Reported-by: Valerio Passini <valerio.passini@unicam.it> Tested-by: Valerio Passini <valerio.passini@unicam.it> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Valerio Passini <valerio.passini@unicam.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25mwifiex: add Tx status support for ACTION framesAmitkumar Karwar7-11/+41
ACK status (0/1) for ACTION frames is informed to cfg80211. We will extend existing logic used for EAPOL frames. The cfg80211 API is different here. Also, we need to explicitly free cloned skb. Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25mwifiex: add Tx status support for EAPOL packetsAmitkumar Karwar12-4/+127
Firmware notifies the driver through event if EAPOL data packet has been acked or not. We will inform this status to userspace listening on a socket. Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25mwifiex: skip delay main work logic for USB interface.Amitkumar Karwar1-6/+10
We had introduced delay main work logic to avoid processing interrupts when Rx pending packet count reaches high threshold. interrupt processing is restarted later when packet count reduces lower threashold. This helped to reduce unnecessary overhead and improve throughput for SD and PCIe chipsets. As there are no interrupts for USB, we will skip this logic for USB chipsets. Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25mwifiex: fix scan problem on big endian platformsAmitkumar Karwar1-1/+1
This patch adds missing endian conversion for beacon size while processing scan response. Reported-by: Daniel Mosquera <daniel.mosquera@ctag.com> Tested-by: Daniel Mosquera <daniel.mosquera@ctag.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-11-25mwifiex: fix sparse warningAmitkumar Karwar1-1/+1
This patch fixes following sparse warnings: drivers/net/wireless/mwifiex/util.c:152:19: warning: cast from restricted __le16 drivers/net/wireless/mwifiex/util.c:152:19: warning: restricted __le16 degrades to integer Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>