aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2014-05-29brcmfmac: reduce log level for invalid scheduled scan requestArend van Spriel1-1/+1
When a regular scan does not return any networks user-space does request a scheduled scan without any matchset or ssid. This can not be handled by the firmware so we return -EINVAL. However, as this request is done let us not add an error message to the log. Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Daniel (Deognyoun) Kim <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29wcn36xx: Use kmemdup instead of kmalloc + memcpyBenoit Taine1-2/+1
This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/memdup.cocci Signed-off-by: Benoit Taine <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29mwifiex: use time_after()Manuel Schölling1-1/+1
To be future-proof and for better readability the time comparisons are modified to use time_after() instead of plain, error-prone math. Signed-off-by: Manuel Schölling <[email protected]> Acked-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29at76c50x-usb: Make WEP encryption working.Andrea Merello2-13/+52
Currently the driver uses HW encryption. Whenever mac80211 calls the set_key() callback the driver restarts the whole HW configuration procedure, in order to set (also) the new WEP key. However, by doing this, it causes the card to loose association information, and the HW becomes unable to communicate with the BSS. This patch adds support for sending another HW command, that sets only the wep key, instead of resetting all. Mac80211 key-set requests are thus handled via this new command. Tested on my at76c503 Signed-off-by: John W. Linville <[email protected]>
2014-05-29at76c50x-usb: Don't perform DMA from stack memoryAndrea Merello1-31/+56
Loading the driver with DMA debugging enabled makes the kernel to complain about the ehci driver trying to perform DMA from memory from the stack. [ 9848.229514] WARNING: CPU: 1 PID: 627 at lib/dma-debug.c:1153 check_for_stack+0xa4/0xf0() [ 9848.237678] ehci-pci 0000:00:04.1: DMA-API: device driver maps memory fromstack [addr=ffff88006c80da01] This is due to at76c50x-usb driver passing buffers allocated on the stack to the USB layer, that attempts DMA. This occurs is several places. This patch fixes the problem by allocating those buffers via kmalloc. Since this adds some kfree() before leaving a couple of functions, I caught the occasion to clean-up the exit path on error. Signed-off-by: Andrea Merello <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29ath9k: avoid passing buffers to the hardware during flushFelix Fietkau1-11/+13
The commit "ath9k: fix possible hang on flush" changed the receive code to always link rx descriptors of processed frames, even when flushing. In some cases, this leads to flushed rx buffers being passed to the hardware while rx is already stopped. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29ath9k: simplify DFS pulse interval debug printingZefir Kurtisi3-5/+3
Make DFS pulse interval calculation independent from CONFIG_ATH9K_DEBUGFS. Signed-off-by: Zefir Kurtisi <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-29rsi: avoid format string leak to thread nameKees Cook1-1/+1
Since the rsi_create_kthread interface does not include any format string arguments, make sure that the resulting thread name can never accidentally process the name as a format string. Signed-off-by: Kees Cook <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-27Merge branch 'master' of ↵John W. Linville169-2297/+3823
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
2014-05-27Merge branch 'master' of ↵John W. Linville1-1/+4
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2014-05-27ath10k: abort incomplete scatter-gather pci tx properlyMichal Kazior3-6/+40
This prevents leaving incomplete scatter-gather transfer on CE rings which can lead firmware to crash. Reported-By: Avery Pennarun <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: protect src_ring state with ce_lock in tx_sg()Michal Kazior1-3/+7
It was possible to read invalid state of CE ring buffer indexes. This could lead to scatter-gather transfer failure in mid-way and crash firmware later by leaving garbage data on the ring. Reported-By: Avery Pennarun <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: ensure rx-frag ignores rssiBen Greear1-0/+1
It seems ath10k firmware gives us no way to know the rssi for rx-fragments. Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: dont configure bssid for ap modeMichal Kazior1-1/+6
FW creates self-peer for AP internally. This prevents ath10k from trying to create explicit self-peer during hw recovery and thus prevents a timeout and a warning during teardown: ath10k: removing stale peer $AP_BSSID from vdev_id 0 Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: protect wep tx key setupMichal Kazior1-2/+10
All configuration sequences should be protected with conf_mutex to avoid concurrent/conflicting requests. This should make sure that wep tx key setup is not performed while hw is restarted (at least). Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: drain tx before restarting hwMichal Kazior1-9/+22
This makes sure no further tx requests are submitted to HTT before driver teardown. This should prevent invalid pointer/NULL dereference on htt tx pool in ath10k_htt_tx() in some cases of heavy traffic. kvalo: remove the WARN_ON() if conf_mutex is held Reported-By: Ben Greear <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: perform hw restart lazilyMichal Kazior2-19/+20
This reduces risk of races and prepares for more hw restart fixes. It also makes sense to perform teardown after mac80211 starts its restart routine as it guarantees it has stopped itself by then (including tx queues). Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-27ath10k: clean up start() callbackMichal Kazior1-11/+23
This fixes failpath when override AC pdev param setup fails and makes other pdev params setting fail as well. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-26ath10k: make core registering asyncMichal Kazior2-12/+33
If ath10k was built into the kernel it could stall booting for 120 seconds by default (60 seconds for each firmware API variant) waiting for firmware files before userspace was ready or filesystems mounted. Fix this by making the core registering asynchronous. This also shoves off about 1 second from boot time on most systems since the driver is now mostly initialized in a worker and modprobe takes very little time to complete. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-26ath10k: remove unnecessary tasklet_kill()Michal Kazior1-2/+0
The tasklet is already guaranteed to be killed on the teardown path. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-26ath10k: relocate core create/destroy functionsMichal Kazior1-64/+64
This will avoid unnecessary forward declaration of any kind in the future. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-26ath10k: fix protected flag strippingMichal Kazior1-9/+24
This prevents protected flag being stripped from undecrypted raw sniffed frames when monitor interface is active. Reported-by: Chun-Yeow Yeoh <[email protected]> Tested-by: Chun-Yeow Yeoh <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-24Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller10-58/+61
Conflicts: drivers/net/bonding/bond_alb.c drivers/net/ethernet/altera/altera_msgdma.c drivers/net/ethernet/altera/altera_sgdma.c net/ipv6/xfrm6_output.c Several cases of overlapping changes. The xfrm6_output.c has a bug fix which overlaps the renaming of skb->local_df to skb->ignore_df. In the Altera TSE driver cases, the register access cleanups in net-next overlapped with bug fixes done in net. Similarly a bug fix to send ALB packets in the bonding driver using the right source address overlaps with cleanups in net-next. Signed-off-by: David S. Miller <[email protected]>
2014-05-23ath9k/ath10k: remove unnecessary channel_switch_beacon callbacksLuciano Coelho2-18/+0
The channel_switch_beacon callback is optional, so it doesn't have to be defined if it's not going to do anything useful with it. Both ath9k and ath10k define the callback and just returns. This commit removes them. Cc: Michal Kazior <[email protected]> Signed-off-by: Luciano Coelho <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-23ath10k: fix ath10k_bmi_read32 macroFrederic Danis1-1/+2
tmp may be used uninitialized if ath10k_bmi_read_memory() returns an error. Signed-off-by: Frederic Danis <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-23ath10k: prevent hif_stop being called twiceMichal Kazior1-0/+3
Recently there was a bug discovered that involved hif_stop() being called twice that ended up with a double free_irq() call but it only manifested with multiple MSI interrupts mapping. Catch this kind of a problem early in driver regardless of interrupt mapping. Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-23ath10k: fix core start sequenceMichal Kazior8-107/+76
It was possible to call hif_stop() 2 times through ath10k_htc_connect_init() timeout failpath which could lead to double free_irq() kernel splat for multiple MSI interrupt case. Re-order init sequence to avoid this problem. The HTC stop shouldn't stop HIF implicitly since it doesn't implicitly start it. Since the re-ordering required some functions to be split/removed/renamed rename a few functions to make more sense while at it. Reported-By: Ben Greear <[email protected]> Signed-off-by: Michal Kazior <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-22mwifiex: use 'const' qualifier for 2nd arg of mwifiex_tdls_add_ht_operJohn W. Linville1-1/+1
Fixes the following warning: CC drivers/net/wireless/mwifiex/tdls.o drivers/net/wireless/mwifiex/tdls.c: In function ‘mwifiex_prep_tdls_encap_data’: drivers/net/wireless/mwifiex/tdls.c:475:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by default] ret = mwifiex_tdls_add_ht_oper(priv, peer, 1, skb); ^ drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’ mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac, ^ drivers/net/wireless/mwifiex/tdls.c:481:4: warning: passing argument 2 of ‘mwifiex_tdls_add_ht_oper’ discards ‘const’ qualifier from pointer target type [enabled by default] ret = mwifiex_tdls_add_ht_oper(priv, peer, 0, skb); ^ drivers/net/wireless/mwifiex/tdls.c:190:1: note: expected ‘u8 *’ but argument is of type ‘const u8 *’ mwifiex_tdls_add_ht_oper(struct mwifiex_private *priv, u8 *mac, ^ Signed-off-by: John W. Linville <[email protected]>
2014-05-22ath9k: fix sleep timer during suspendRajkumar Manoharan1-0/+1
On idle state, sleep timer is scheduled to put the chip into fullsleep. But during suspend, this timer is scheduled after the chip is moved to fullsleep forcibily. This is causing below unnecessary error messages in kernel log during suspend. ath: phy2: timeout (100000 us) on reg 0x806c: 0xdeadbeef & 0x01f00000 != 0x00000000 ath: phy2: RX failed to go idle in 10 ms RXSM=0xdeadbeef ath: phy2: DMA failed to stop in 10 ms AR_CR=0xdeadbeef AR_DIAG_SW=0xdeadbeef DMADBG_7=0xdeadbeef Reported-by: Arkh4mKn1ght <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22ath9k: Handle multiple keys while setting tx filtersRajkumar Manoharan2-11/+45
The keycache index is used to abort transmission for given station when it goes to sleep state. But the commit "ath9k_hw: Abort transmission for sleeping station" is not handling multi-key station. Fix that. Cc: Felix Fietkau <[email protected]> Signed-off-by: Rajkumar Manoharan <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22mwifiex: update seq number correctly for packets from TDLS peerAvinash Patil2-3/+16
This patch adds handling of updating rx sequence number for packets received from TDLS peer. Current implementation of mwifiex_queueing_ra_based assumes station would always receive packets from AP which is not true in case of TDLS. Fix this by adding this case. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22mwifiex: set TDLS flags for AMSDU packetsAvinash Patil1-0/+7
This patch fixes an issue where AMSDU packets for TDLS link would flow over infra link. This happened because we were missing setting TDLS flag in TxPD on AMSDU packets. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22mwifiex: delete TDLS link upon Teardown eventAvinash Patil1-1/+5
If userspace application does not take care of TDLS teardown event, TDLS link would be present in driver database and thus driver would send such packets on direct link while peer has already severed link causing data traffic failure. Disable TDLS link upon teardown event so as to ensure this does not happen. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22mwifiex: silence TDLS link delete failure for nonexistent linkAvinash Patil1-6/+12
If TDLS link delete command fails because of non-existent peer or TDLS peer is absent from driver's entry, it means link was already deleted. In such case print debug messages with lower severity. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22mwifiex: avoid TDLS check for packets destined to APAvinash Patil1-1/+1
In station role if TDLS is supported, we traverse TDLS peer list to see if packet's destination address matches with TDLS peer. Packets destined to AP are not sent over TDLS link and hence avoid this list traversal for such packets. Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Bing Zhao <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22ath9k: fix build error with disabled debugZefir Kurtisi1-0/+2
DFS pulse interval printing is only available when CONFIG_ATH9K_DEBUGFS is set. Signed-off-by: Zefir Kurtisi <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22b43: N-PHY: add missing calib values for radio 0x2026 rev 11Rafał Miłecki1-0/+918
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22b43: fix list of 5 GHz channels for 802.11n cardsRafał Miłecki1-12/+22
Broadcom hardware uses a bit tricky hw_value-s for 5 GHz channels, values 184-228 are used for 4920-5140 MHz center frequencies. Normally you expect channels 7-16 (e.g. 5060 MHz is channel 12, not 212). We never meant to register hw_value 228 with freq 6140 MHz (5000 + 228 * 5). Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22b43: fix typo in define name for 2 GHz channels (s/CHAN4G/CHAN2G/)Rafał Miłecki1-16/+16
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22libertas: fix return value when processing invalid packetDan Williams1-3/+5
Nothing actually uses the return value yet, but we might as well make it correct, like process_rxed_802_11_packet() does for the same case. Also ensure that if monitor mode is enabled (and thus process_rxed_802_11_packet() is called) that the debugging enter/leave functions are balanced. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22rt2x00: Endless loop on hub port power downRichard Genoud1-0/+6
I've met an endless (or at least very long) loop if I power down the usb port on witch a usb wifi key is plugged. (Ok, it's not very smart to power down a usb port when a usb key is in used... but still, I think that should not lead to an endless loop). I have a lot of: ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0438 with error -71 (-71==-EPROTO) How to reproduce: - plug an usb wifi key - ip link set wlan0 up - hub-ctrl -b usb_bus -d usb_device -P usb_port -p 0 hub-ctrl source: https://github.com/codazoda/hub-ctrl.c/blob/master/hub-ctrl.c The following patch prevents the endless loop, but I'm really not sure that The Right Way To Do It (R) Signed-off-by: Richard Genoud <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22carl9170: fix leaks at failure path in carl9170_usb_probe()Alexey Khoroshilov1-1/+7
carl9170_usb_probe() does not handle request_firmware_nowait() failure that leads to several leaks in this case. The patch adds all required deallocations. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2014-05-22Merge branch 'for-john' of ↵John W. Linville10-191/+158
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2014-05-22Merge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-nextJohn W. Linville22-82/+85
2014-05-22Merge branch 'for-john' of ↵John W. Linville1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
2014-05-22ath10k: support get/set antenna configurations.Ben Greear2-0/+86
Verified that target's tx/rx chain register is set appropriately, and that the tx rate goes down as number of chains decrease, but I did not actually try to verify antenna ceased to transmit when disabled. kvalo: move ar->supp_*_chainmask initialisation to ath10k_mac_register() Signed-off-by: Ben Greear <[email protected]> Signed-off-by: Avery Pennarun <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2014-05-22iwlwifi: mvm: remove vif argument from power_update_macArik Nemtsov6-17/+17
The power update function looks at all current vifs to determine the power policy. It doesn't use the current vif. Instead the value was overwritten and used internally. Signed-off-by: Arik Nemtsov <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-05-22iwlwifi: mvm: make iwl_mvm_update_beacon_abort staticEmmanuel Grumbach2-53/+52
Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-05-22iwlwifi: mvm: remove debugfs hook for reduced tx powerEmmanuel Grumbach4-47/+5
This was not used is unlikely to be used, just kill it. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>
2014-05-22iwlwifi: mvm: disable reduced Tx power when not applicableEmmanuel Grumbach1-1/+5
I forgot to disable the reduced Tx power in a few paths. Reviewed-by: Johannes Berg <[email protected]> Signed-off-by: Emmanuel Grumbach <[email protected]>