summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
AgeCommit message (Collapse)AuthorFilesLines
2013-01-11mwifiex: update config_bands during infra associationAmitkumar Karwar2-14/+15
Currently "adapter->config_bands" is updated during infra association only if channel is provided by user in "iw connect" command. config_bands is used while preparing association request to calculate supported rates by intersecting our rates with the rates advertised by AP. There is corner case in which we include zero rates in supported rates TLV based on previous IBSS network history, which leads to association failure. This patch fixes the problem by correctly updating config_bands. Cc: "3.7.y" <stable@vger.kernel.org> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k: add spectral scan featureSimon Wunderlich10-1/+653
Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips are supported for now. The spectral scan is triggered by configuring a mode through a debugfs control file. Samples can be gathered via another relay debugfs file. Essentially, to try it out: echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl iw dev wlan0 scan cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl This feature is still experimental. The special "chanscan" mode is used to perform spectral scan while mac80211 is scanning for channels. To allow this, sw_scan_start/complete() ops have been added. The patch contains code snippets and information from Zefir Kurtisi and information provided by Adrian Chadd and Felix Fietkau. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Fix radio programming for AR9550Sujith Manoharan1-14/+17
For AR9550, program the synth value based on the ref. clock. The logic for AR9550 is similar to AR9330, but keep the code separate since changes for AR9330 are required - which would be done later. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Add TempCompensation feature for AR9550Sujith Manoharan2-30/+100
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Update initvals for QCA955xSujith Manoharan1-66/+66
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09mwl8k: Wake up queues in mwl8k_startNishant Sarmukadam1-0/+2
If queues are stopped in mwl8k_stop, these should be started in mwl8k_start Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09mwl8k: Delete ampdu streams with state AMPDU_STREAM_NEW in sta removeYogesh Ashok Powar1-1/+24
When a station deauths, we do not delete the streams with state AMPDU_STREAM_NEW and these remain created forever. Fix this issue by removing such streams in the driver Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09mwl8k: Disable tx_wait completionNishant Sarmukadam1-0/+1
Whenever TX ring is drained, priv->tx_wait still points to a valid completion. Making sure that it points to NULL before returning from the mwl8k_tx_wait_empty check. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Use helper routines to simplify ar9003_hw_init_cal()Sujith Manoharan2-38/+55
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Fix MCI init for AGC calibrationSujith Manoharan1-8/+11
When AGC calibration is to be done, a GPM message with the payload, MCI_GPM_WLAN_CAL_REQ has to be sent. Currently this falls within the IQ-CAL code block which is incorrect. Fix this by using a separate variable to decide when IQ-CAL is to be done separately and call ar9003_mci_init_cal_req correctly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09ath9k_hw: Do not enable IQ-CAL for half/quarter ratesSujith Manoharan1-7/+6
IQ calibration doesn't complete and times out for half/quarter rates, so skip it correctly. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-09Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-nextJohn W. Linville1-25/+65
2013-01-09Merge branch 'master' of ↵John W. Linville27-39/+6278
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
2013-01-08remove init of dev->perm_addr in driversJiri Pirko3-3/+0
perm_addr is initialized correctly in register_netdevice() so to init it in drivers is no longer needed. Signed-off-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-01-07mwifiex: use map/unmap APIs in TX and RX to reduce memcpyAvinash Patil5-55/+193
This patch is an enhacement to mwifiex_pcie driver to use map/unmap PCI memory APIs. This reduces one memcpy each in TX path and RX path, and enhances throughput. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: flush TX ring for PCIe after disconnect or bss stopAvinash Patil4-0/+48
This patch adds handler to clean PCIe TX rings after disconnect or bss stop is called for PCIe based mwifiex driver. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: use pci_alloc/free_consistent APIs for PCIeAvinash Patil4-154/+235
This patch uses pci_alloc_consistent and pci_free_consistent APIs for mwifiex_pcie driver. Consistent DMA memory is allocated for TX, RX and event rings. Command buffer and command response buffer also uses map/unmap memory APIs to download commands and get command responses. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: add init_fw_port handler for PCIe interfaceAvinash Patil3-2/+25
This patch adds support for init_fw_port handler for PCIe interface, which resets RXBD read pointer for PCIe. This fixes issue where RX doesn't work until some TX from driver happens. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: access interrupt status only while holding lockAvinash Patil1-13/+12
This patch fixes a bug for few instances where PCIe interrupt status variable is accessed without holding spin lock. This can result into missing interrupts. Fix this by copying interrupt status to a local variable and then using it for calling specific routine. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07ath9k_hw: Fix calibration for AR9340Sujith Manoharan1-1/+1
TX_IQ_ON_AGC_CAL should not be enabled for AR9340. TX-IQ calibration is run as part of AGC calibration only for AR9485, AR9462 and AR9565. For the others (AR9300, AR9330, AR9340), TX-IQ cal is done independent of AGC-cal. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: bump firmware API to 3Yogesh Ashok Powar1-1/+1
New firmware is required to support a) Add support for additional ampdu streams b) Handle corresponding watchdog events to destroy ampdu streams Bumping firmware API version by one. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: Handle watchdog event with highest prioriryYogesh Ashok Powar1-0/+19
Currently, command path waits till all the tx host queues are empty. Whenever watchdog event is raised, firmware expects driver to destroy ampdu queues immediately. This requires corresponding commands i.e. mwl8k_cmd_get_watchdog_bitmap and mwl8k_destroy_ba to be sent without waiting for the tx queues to be completely empty. Use "watchdog_event_pending" to ensure the above mentioned two commands are sent down immediately. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: Handle Watchdog events for the new ampdu streamsYogesh Ashok Powar1-12/+32
With more ampdu streams, we need to handle watchdog events for the new ampdu streams. Handle these events appropriately. Earlier mwl8k_cmd_get_watchdog_bitmap used to return only one stream index and hence bitwise operations on the return value were not required. Now the function returns a bitmap with different bits are mapped with different stream indices. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: changing mwl8k_destroy_ba prototypeYogesh Ashok Powar1-6/+8
Currently, mwl8k_ampdu_stream is passed as one of the argument to the function mwl8k_destroy_ba. Instead of this pass only the stream index. This will be helpful during watchdog event handling when bitmap of stream indices are received. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: Enable support to support additional ampdu streamsYogesh Ashok Powar1-4/+27
Currently, we have 2 ampdu streams that can be created simultaneously. Firmware is capable of supporting additional streams. Add support to use these streams. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: set ack policy to normalYogesh Ashok Powar1-0/+4
Set ACK policy to NORMAL when its not going to be an AMPDU packet. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwl8k: Remove redundant txq_idxYogesh Ashok Powar1-4/+2
Ampdu stream index can be derived from stream->idx. So we no longer need stream->txq_idx, hence removing it. Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07ath9k_hw: Remove TEMP_COMP_CALSujith Manoharan2-18/+3
This is not enabled for any chip and is unused. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07ath9k_hw: Enable calibration types in init_cal_settingsSujith Manoharan2-13/+11
Doing this in ath9k_hw_fill_cap_info() is odd and it's cleaner to do this in the init function for calibration. Also, setup the supported calibration type in init_cal_settings. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: parse WMM IEs from hostapd for mwifiex APAvinash Patil6-7/+75
This patch adds support for parsing WMM IEs from hostapd and setting them to FW via sys configure command. Patch also sets wiphy flag to advertise AP uAPSD support. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07mwifiex: use correct htcapinfo for HT20 ibss networkAmitkumar Karwar2-1/+13
It is observed that same htcapinfo ie is included in beacon for HT20, HT40+ and HT40- ibss networks. This patch makes sure that we will not advertise 40Mhz flags while creating/joining ibss network in HT20 mode. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07wireless: mwifiex: remove unreachable pathsSasha Levin1-27/+3
We know 'firmware' is non-NULL from the beginning of mwifiex_prog_fw_w_helper, remove all !firmware paths from the rest of the function. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07p54pci: don't return zero on failure paths in p54p_probe()Alexey Khoroshilov1-2/+5
If pci_set_dma_mask() or pci_set_consistent_dma_mask() fails in p54p_probe(), it breaks off initialization, deallocates all resources, but returns zero. Similar issue is if check for returned value of pci_resource_len() fails. The patch implements proper error code propagation. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: Update init code routines from interface up.Hante Meuleman2-24/+15
On interface up dongle gets inialized. Move UP command to common routine and update these common init routines using ifp. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: Removing obsolete variables and inline functions.Hante Meuleman2-26/+0
Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: Return correct error on netdev xmit.Hante Meuleman1-10/+12
Netdev xmit routine brcfm_netdev_start_xmit was defined incorrectly and used wrong return codes. Always eat the packet and return ok. Remove drvr_up check since it is not relevant. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: Remove unused caching dongle error.Hante Meuleman2-23/+2
CDC errors are retained. However, it is never used so it can be removed. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: remove unnecessary curly braces in dhd_attach()Arend van Spriel1-2/+1
Stumbled into a curly braces used for if statement with only one conditional statement. Removing them. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: cleanup netdev transmit callbackArend van Spriel1-9/+13
The header of the ethernet packet is processed conditionally, but the check is wrong as it checks skb length is at least ETH_ALEN. It should check it is at least sizeof struct ethhdr instead. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: remove unused event related definitionsArend van Spriel1-7/+0
The driver had some global definitions in dhd.h to map event identifiers to event names. With redesign of firmware event processing this has all moved to fweh module so these definitions can be removed. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: Use dedicated trace level for CDC.Hante Meuleman3-25/+24
CDC debug is partly done with TRACE and partly with CTL, however CDC hardly ever needs debugging. Use dedicated level CDC and replace TRACE and CTL in dhd_cdc with that. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: remove brcmf_proto_hdrpull() from bus interfaceArend van Spriel6-43/+29
The use of the function brcmf_proto_hdrpull() is moved to the common part of the driver and consequently it can be removed from the bus interface. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: remove rx helper function from bus interfaceArend van Spriel4-16/+13
The bus interface provided a wrapper function to pass a single packet to the common driver part filling a skb queue with one packet. For clarity the caller now sets up the skb queue and call the rx bus interface function. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: define pr_fmt in one placeArend van Spriel9-16/+4
Several source files (but not all) define the pr_fmt() macro in exactly the same way. Instead this commit defines it in a header file so driver logging is consistent. Cc: Joe Perches <joe@perches.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: assure USB dongle firmware is reset upon module unloadArend van Spriel4-1/+27
Upon unloading the brcmfmac module the USB firmware should be reset as the device remains powered. The reset assures a known device state when a new brcmfmac driver load is being done. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: removed deprecated set_bitrate_mask supportHante Meuleman1-62/+0
Set bitrate_mask is not desired anymore. The firmware will determine the correct rates to be used. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmfmac: do not reconfigure refill rx on 0-length packet.Hante Meuleman1-1/+5
When USB device gets removed rx complete comes with 0-length packets. Do not refill those packets. In some rare cases it can cause infinite loop. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmsmac: remove dead codePiotr Haber2-6/+2
Dead code after AMPDU restructure. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmsmac: allow user-space setting of interface addressArend van Spriel2-4/+4
The interface address of the wireless device is determined by the permanent address stored in the device. This patch allows it to be overridden from user-space. Reported-by: Maximilian Engelhardt <maxi@daemonizer.de> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-01-07brcmsmac: use perimeter lock in add_interface() callbackArend van Spriel1-0/+2
All callbacks that access driver functions should do that under perimeter lock protection. The add_interface() callback was lacking this lock. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>