aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2017-06-01qtnfmac: remove duplicated assignment to macColin Ian King1-1/+1
mac is being assigned twice, remove redundant 2nd assignment. Detected by CoverityScan, CID#1437554 ("Incorrect expression") Signed-off-by: Colin Ian King <[email protected]> Acked-by: Sergey Matyukevich <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-06-01brcmfmac: fix alignment configuration on host using 64-bit DMAArend Van Spriel1-1/+1
For SDIO the alignment requirement for transfers from device to host is configured in firmware. This configuration is limited to minimum of 4-byte alignment. However, this is not correct for platforms using 64-bit DMA when the minimum alignment should be 8 bytes. This issue appeared when the ALIGNMENT definition was set according the DMA configuration. The configuration in firmware was not using that macro defintion, but a hardcoded value of 4. Hence the driver reported alignment failures for data coming from the device and causing transfers to fail. Fixes: 6e84ab604bde ("brcmfmac: properly align buffers on certain platforms Reported-by: Hans de Goede <[email protected]> Tested-by: Hans de Goede <[email protected]> Reviewed-by: Hante Meuleman <[email protected]> Reviewed-by: Pieter-Paul Giesberts <[email protected]> Reviewed-by: Franky Lin <[email protected]> Signed-off-by: Arend van Spriel <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31mwifiex: check next packet length for usb tx aggregationXinming Hu3-12/+12
The next packet length will be used by interface driver, to check if the next packet still could be aggregated. Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31mwifiex: usb: add timer to flush aggregation packetsXinming Hu2-79/+193
Aggregation will wait for next packet until limit aggr size/number reach. Packet might be drop and also packet dequeue will be stop in some cases. This patch add timer to flush packets in aggregation list to avoid long time waiting. Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31mwifiex: usb: transmit aggregation packetsXinming Hu7-53/+382
Instead of using 4KB packet buffer for data transfer, new chipset have more device memory. This patch try to aggregation packets in an 16KB buffer. In this way, totally usb transaction cost will be reduced. Thoughput test on usb 2.0 show both TCP TX and UPD TX promote ~40M, from ~240M to ~280M. This feature is default disabled, and can be enabled by module parameter, like: insmod mwifiex.ko aggr_ctrl=1 Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31mwifiex: usb: kill urb before free its memoryXinming Hu1-0/+1
we have observed host system hang when device firmware crash, stack trace show it was an use-after-free case: previous submitted urb will be holding in usbcore, and given back to device driver when device disconnected, while the urb have been freed in usb device disconnect handler. This patch kill the holding urb before free its memory. Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31mwifiex: use variable interface header lengthXinming Hu9-37/+38
Usb tx aggregation feature will utilize 4-bytes bus interface header, otherwise it will be set to zero in default case. Signed-off-by: Xinming Hu <[email protected]> Signed-off-by: Cathy Luo <[email protected]> Signed-off-by: Ganapathi Bhat <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-31ath10k: go back to using dma_alloc_coherent() for firmware scratch memoryAdrian Chadd1-25/+10
This reverts commit b057886524be ("ath10k: do not use coherent memory for allocated device memory chunks") in 2015 which converted this allocation from dma_map_coherent() to kzalloc() / dma_map_single(). The current problem manifests when using later model NICs with larger (>700KiB) scratch spaces in memory. Although the kzalloc call succeeds, the software IOMMU TLB code (via dma_map_single()) panics because it can't find 700KiB of linear physmem bounce buffers for DMA. Now, this is a bit of a silly failure mode for the dma map API, but it's what we currently have to play with. In these cases, doing kzalloc() works fine, but the dma_map_single() call fails. After chatting with Linus briefly about this, it indeed should be using dma_alloc_coherent() for doing larger device memory allocation that requires some kind of physical address mapping. You're not supposed to be using kzalloc and dma_map_* calls for large memory regions, and I'm guessing not for long-held mappings either. Typically dma mappings should be temporary for DMA, not long held like these. Now, since hopefully the major annoying underlying problem has also been addressed (ie, ath10k is no longer tears down all of these allocations and reallocates them every time the vdevs are brought down) fragmentation should stop being such a touchy issue. If it is though, using dma_alloc_coherent() use gets us access to the CMB APIs too relatively easily and ideally we would be allocating memory early in boot for exactly these reasons. Signed-off-by: Adrian Chadd <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24qtnfmac: introduce new FullMAC driver for Quantenna chipsetsIgor Mitsyanko32-0/+8477
This patch adds support for new FullMAC WiFi driver for Quantenna QSR10G chipsets. QSR10G (aka Pearl) is Quantenna's 8x8, 160M, 11ac offering. QSR10G supports 2 simultaneous WMACs - one 5G and one 2G. 5G WMAC supports 160M, 8x8 configuration. FW supports up to 8 concurrent virtual interfaces on each WMAC. Patch introduces 2 new drivers: - qtnfmac.ko for interfacing with kernel wireless core - qtnfmac_pearl_pcie.ko for interfacing with hardware over PCIe interface Signed-off-by: Dmitrii Lebed <[email protected]> Signed-off-by: Sergei Maksimenko <[email protected]> Signed-off-by: Sergey Matyukevich <[email protected]> Signed-off-by: Bindu Therthala <[email protected]> Signed-off-by: Huizhao Wang <[email protected]> Signed-off-by: Kamlesh Rath <[email protected]> Signed-off-by: Avinash Patil <[email protected]> Signed-off-by: Igor Mitsyanko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: initialize bt_disabled to falseDan Carpenter1-1/+1
We only want to disable this if bt_disable_cnt is >= 2. Fixes: f66509e3d7c2 ("rtlwifi: btcoex: Remove 23b 1ant configuration parameter") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Larry Finger <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: turn off ps and tdma mechanism when concurrent modeYan-Hsuan Chuang2-28/+91
When wifi is under concurrent mode, we can not distinguish if it is the real PS or just a fake one by sending null data, so we turn it off in case of miracast scenario. Signed-off-by: Yan-Hsuan Chuang <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: fine tune for bt_sco_hid busyPing-Ke Shih1-1/+1
Fine tune the parameters in case of act_bt_sco_hid_only_busy. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: fine tune for wifi not connectedPing-Ke Shih1-14/+23
Fine tune the parameters in cases of scan, assoc and auth when wifi isn't connected. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: fine tune for wifi connectedPing-Ke Shih2-37/+79
Fine tune the parameters in cases of bt_acl_busy and scan when wifi is connected. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: coex table fine tunePing-Ke Shih1-6/+50
Set register settings for coex table fine tune. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Add coex_table_type to logPing-Ke Shih2-0/+6
Display coex_table_type in log. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: remove verbose log from periodic functionPing-Ke Shih1-33/+0
Simplify the debug trace log. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: check more cases when bt is queingPing-Ke Shih2-18/+40
If bt is queing, we need to set the packet priority properly. Originally we only consider if wifi was connected or not, but now we also consider if bt is under abnormal scan or wifi is scanning, roaming or linking, and set the coex table. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: define wifi in high priority task.Ping-Ke Shih2-0/+16
Add the definition of wifi in high priority task for bt inquiry. According to driver's notifications, btc will knows whether wifi is in high priority tasks or not. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Special packets statistic in notificationPing-Ke Shih2-1/+27
Count and log special packets of DHCP, EAPOL and ARP, and check whether the interface is in 4-way handshake. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Revise media status notify to fix no scan result ↵Ping-Ke Shih1-2/+37
issue Force antenna setup for no scan result issue Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: fine tune connect notifyPing-Ke Shih1-1/+16
When association starts, force antenna setup for no scan result issue. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Add rf status notificationPing-Ke Shih3-0/+42
If driver announce wifi RF status is off, btc can switch antenna to BT. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Setup register for BT WHCK testPing-Ke Shih2-0/+26
If BT is under WHCK, we enter a special mode. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: parse more BT information from C2HPing-Ke Shih2-12/+91
BT FW provide more BT status as clues, thus we also display them in coex log to help debug in field. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Add power_on_settingPing-Ke Shih2-0/+70
This change is highly related to init_hwconfig that was decomposed into two parts for better program flow. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: add wifi_only argument to init_hwconfigPing-Ke Shih2-59/+47
In case of wifi_only, we can simply switch antenna to wifi. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: adjust wifi duration for bt a2dpPing-Ke Shih2-82/+246
The larger the bt a2dp bit pool is, the more time bt needs to receive them. If we do not adjust the wifi duration, the voice quality will be low. Hence we reduce the time that wifi holds, to improve the a2dp service. If the bt is slave, it may receive a packet at any time, so we need to mark them as high priority packets in case of packet loss Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: need these information when scanPing-Ke Shih2-2/+29
Log the scan procedure, and update ap_num for future usage when scan done. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rtlwifi: btcoex: 23b 1ant: Switch antenna to wifi or BT.Ping-Ke Shih2-131/+198
Since wifi and BT share the same physical antenna, we should switch antenna to fit every situation. Signed-off-by: Ping-Ke Shih <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Yan-Hsuan Chuang <[email protected]> Cc: Birming Chiu <[email protected]> Cc: Shaofu <[email protected]> Cc: Steven Ting <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: Add device ID for Epson WN7512BEPTom Gaudasinski1-0/+2
Make Epson WN7512BEP work by adding its device-id to rt2800usb. Device contains a Ralink RT3071L, registers as vendor Accton/Arcadyan. Signed-off-by: Tom Gaudasinski <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2x00_desc_read return typeArnd Bergmann9-87/+83
This is a semi-automated conversion to change rt2x00_desc_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2x00_desc_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\<_rt2x00_desc_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt* Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2800_eeprom_read return typeArnd Bergmann1-97/+97
This is a semi-automated conversion to change rt2800_eeprom_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2800_eeprom_read\(_from_array\|\)\>(.*, .*\), &\(.*\));:\3 = \1);:' drivers/net/wireless/ralink/rt2x00/rt2800lib.c Some manual tweaking was required here to work around the line wraps. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2x00_eeprom_read return typeArnd Bergmann7-68/+62
This is a semi-automated conversion to change rt2x00_eeprom_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2x00_eeprom_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:= _\(rt2x00_eeprom_read\):= \1:' drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2*_bbp_read return typeArnd Bergmann6-160/+119
This is a semi-automated conversion to change *_bbp_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt.*_bbp_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\<rt.*_bbp_dcoc_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:= _\(rt.*_bbp_read\):\1:' drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2800_register_read return typeArnd Bergmann2-162/+151
This is a semi-automated conversion to change rt2800_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2800_register_read(.*, .*\), &\(.*\));:\2 = \1);:' \ 's:\(rt2800_register_read_lock(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt2800lib.c The function itself was modified manually along with the one remaining multi-line caller that was not covered automatically and the indirect reference. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2x00usb_register_read return typeArnd Bergmann5-148/+118
This is a semi-automated conversion to change rt2x00usb_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2x00usb_register_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\<rt2500usb_register_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(\<rt2500usb_register_read_lock\>(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/* Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2x00mmio_register_read return typeArnd Bergmann8-259/+252
This is a semi-automated conversion to change rt2x00mmio_register_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2x00mmio_register_read(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:_rt2x00mmio_register_read:rt2x00mmio_register_read:' \ drivers/net/wireless/ralink/rt2x00/*.c The function itself was modified manually along with the one remaining caller that was not covered automatically. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2x00_rf_read return typeArnd Bergmann7-25/+18
This is a semi-automated conversion to change rt2x00_rf_read() to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(\<rt2x00_rf_read\>(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt* Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: convert rt2800_rfcsr_read return typeArnd Bergmann1-164/+158
With CONFIG_KASAN enabled and gcc-7, we get a warning about rather high stack usage (with a private patch set I have to turn on this warning, which I intend to get into the next kernel release): wireless/ralink/rt2x00/rt2800lib.c: In function 'rt2800_bw_filter_calibration': wireless/ralink/rt2x00/rt2800lib.c:7990:1: error: the frame size of 2144 bytes is larger than 1536 bytes [-Werror=frame-larger-than=] The problem is that KASAN inserts a redzone around each local variable that gets passed by reference, and the newly added function has a lot of them. This is a semi-automated conversion to change rt2800_rfcsr_read to return the register contents instead of passing them by value, resulting in much better object code. The majority of the patch was done using: sed -i 's:\(rt2800_rfcsr_read(.*, .*\), &\(.*\));:\2 = \1);:' \ -i 's:\(rt2800_rfcsr_read_bank(.*, .*\), &\(.*\));:\2 = \1);:' \ drivers/net/wireless/ralink/rt2x00/rt2800lib.c Fixes: 41977e86c984 ("rt2x00: add support for MT7620") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rt2x00: change function pointers for register accessorsArnd Bergmann15-44/+157
This prepares the driver for changing all the 'read' register accessors to return the value instead of passing it by reference. Since a lot of them are used in callbacks, this takes care of the callbacks first, adding a couple of helpers that will be removed again one at a time. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24libertas: Remove function entry/exit debuggingKees Cook13-502/+24
In at least one place, the enter/exit debugging was not being correctly matched. Based on mailing list feedback, it was desired to drop all of these in favor of using ftrace instead. Suggested-by: Joe Perches <[email protected]> Suggested-by: Kalle Valo <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24libertas: Avoid reading past end of bufferKees Cook1-16/+10
Using memcpy() from a string that is shorter than the length copied means the destination buffer is being filled with arbitrary data from the kernel rodata segment. Instead, redefine the stat strings to be ETH_GSTRING_LEN sizes, like other drivers. This lets us use a single memcpy that does not leak rodata contents. Additionally adjust indentation to keep checkpatch.pl happy. This was found with the future CONFIG_FORTIFY_SOURCE feature. Cc: Daniel Micay <[email protected]> Signed-off-by: Kees Cook <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24iwlegacy: warn when enabling power saveStanislaw Gruszka2-0/+3
iwlegacy firmware can crash when power save is configured. PS was allowed in "dbdac2b iwlegacy: properly enable power saving" with belive that user who enable PS is aware of that and can relate firmware crahes with PS. However some distributions seems to enable PS without user intervention, so warn about that. Signed-off-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24wlcore: fix 64K page supportArnd Bergmann1-3/+3
In the stable linux-3.16 branch, I ran into a warning in the wlcore driver: drivers/net/wireless/ti/wlcore/spi.c: In function 'wl12xx_spi_raw_write': drivers/net/wireless/ti/wlcore/spi.c:315:1: error: the frame size of 12848 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] Newer kernels no longer show the warning, but the bug is still there, as the allocation is based on the CPU page size rather than the actual capabilities of the hardware. This replaces the PAGE_SIZE macro with the SZ_4K macro, i.e. 4096 bytes per buffer. Cc: [email protected] Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rsi: rsi_91x_core: Use time_after time comparisonKarim Eshapa1-1/+1
Use time_after kernel macro for time comparison. Signed-off-by: Karim Eshapa <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rsi: Remove old firmware loading methodPrameela Rani Garnepudi6-323/+3
The older firmware loading method is not usable by any Redpine chipset. Hence removing that part of the code. Older firmware image with rsi_91x.fw name is deprecated Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rsi: Add new firmware loading methodPrameela Rani Garnepudi5-10/+635
The older firmware loading method has been deprecated and not in use for any chipets. New method is introduced which works based on soft boot loader. In this method, complete RAM image and FLASH image are present in the flash. Before loading the functional firmware, host issues boot loader commands to verify whether firmware to load is different from the current functional firmware. If not, firmware upgrade progresses and boot loader will switch to the new functional firmware. "rs9113_wlan_qspi.rps" is the firmware filename used in this patch. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rsi: Add new host interface operationsPrameela Rani Garnepudi5-2/+254
Host interface opearation master_reg_read, master_reg_write and load_data_master_write are added. These functions are needed for the new firmware loading method. As part of this, the function master_access_msword is moved from rsi_91x_sdio_ops.c to rsi_91x_sdio.c. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
2017-05-24rsi: Add host interface operations as separate structure.Prameela Rani Garnepudi4-14/+40
Host interface operations are currently function pointers in rsi_hw structure. As more host interface operations are going to be introduced, separate structure is added for these for convenience. Signed-off-by: Prameela Rani Garnepudi <[email protected]> Signed-off-by: Amitkumar Karwar <[email protected]> Signed-off-by: Kalle Valo <[email protected]>