]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
12 years agoath9k: flush bt profile whenever it is requested
Rajkumar Manoharan [Wed, 12 Sep 2012 13:29:21 +0000 (18:59 +0530)]
ath9k: flush bt profile whenever it is requested

Before processing BT profiles or status messages, check whether
it is requested to flush BT profile. Otherwise it might increase
number of BT profiles that affects the WLAN performance. Also
flush the profiles when MCI is recovering from broken rx. After
flushing BT profiles, query BT topology to refetch them.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix ar9462 selfgen chainmask
Rajkumar Manoharan [Wed, 12 Sep 2012 13:29:20 +0000 (18:59 +0530)]
ath9k_hw: fix ar9462 selfgen chainmask

When the 9462 is operating in 2G mode and MCI is enabled then
reduce the selfgen chain mask to chain 1. Otherwise poor performance
was reported at short range at Rx side when COEX is enabled.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: move 2g5g switch before nfcal start
Rajkumar Manoharan [Wed, 12 Sep 2012 13:29:19 +0000 (18:59 +0530)]
ath9k_hw: move 2g5g switch before nfcal start

During fast channel change, perform 2g5g_switch before starting
noisefloor calibration to avoid nfload timeout.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Enable SGI correctly
Sujith Manoharan [Wed, 12 Sep 2012 09:29:58 +0000 (14:59 +0530)]
ath9k: Enable SGI correctly

Set the driver specific SGI flag based on the station's
HT capabilities, otherwise rate control uses the wrong rate.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth...
John W. Linville [Mon, 24 Sep 2012 18:39:16 +0000 (14:39 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next

12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 24 Sep 2012 18:37:36 +0000 (14:37 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Mon, 24 Sep 2012 18:34:40 +0000 (14:34 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

12 years agoBluetooth: Add support for BCM20702A0 [04ca, 2003]
Jaroslav Resler [Tue, 11 Sep 2012 09:25:32 +0000 (17:25 +0800)]
Bluetooth: Add support for BCM20702A0 [04ca, 2003]

Add another vendor specific ID for BCM20702A0.

output of usb-devices:
T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=02 Dev#=  4 Spd=12   MxCh= 0
D:  Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=2003 Rev= 1.12
S:  Manufacturer=Broadcom Corp
S:  Product=BCM20702A0
S:  SerialNumber=446D57861623
C:* #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=84(I) Atr=02(Bulk) MxPS=  32 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  32 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)

Signed-off-by: Cho, Yu-Chen <acho@suse.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Add USB_VENDOR_AND_INTERFACE_INFO() for Broadcom/Foxconn
Gustavo Padovan [Wed, 15 Aug 2012 04:38:11 +0000 (01:38 -0300)]
Bluetooth: Add USB_VENDOR_AND_INTERFACE_INFO() for Broadcom/Foxconn

Foxconn devices has a vendor specific class of device, we will match them
differently now.

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Update management interface revision
Johan Hedberg [Thu, 6 Sep 2012 15:39:27 +0000 (18:39 +0300)]
Bluetooth: Update management interface revision

For each kernel release where commands or events are added to the
management interface, the revision field should be increment by one.

The increment should only happen once per kernel release and not
for every command/event that gets added. The revision value is for
informational purposes only, but this simple policy would make any
future debugging a lot simple.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: mgmt: Implement support for passkey notification
Johan Hedberg [Thu, 6 Sep 2012 15:39:26 +0000 (18:39 +0300)]
Bluetooth: mgmt: Implement support for passkey notification

This patch adds support for Secure Simple Pairing with devices that have
KeyboardOnly as their IO capability. Such devices will cause a passkey
notification on our side and optionally also keypress notifications.
Without this patch some keyboards cannot be paired using the mgmt
interface.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Cc: stable@vger.kernel.org
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: btuart_cs.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:48 +0000 (17:24 +0200)]
Bluetooth: btuart_cs.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: hci_vhci.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:47 +0000 (17:24 +0200)]
Bluetooth: hci_vhci.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: hci_ll.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:42 +0000 (17:24 +0200)]
Bluetooth: hci_ll.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: hci_ldisc.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:39 +0000 (17:24 +0200)]
Bluetooth: hci_ldisc.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: bluecard_cs.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:40 +0000 (17:24 +0200)]
Bluetooth: bluecard_cs.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agomac80211: allow re-open the blocked peer link in mesh
Chun-Yeow Yeoh [Fri, 14 Sep 2012 06:18:31 +0000 (14:18 +0800)]
mac80211: allow re-open the blocked peer link in mesh

Peer link which is blocked using the "iw mesh0 station
set <MAC addr> plink_action block" is previously not able
to re-open using "iw mesh0 station set <MAC addr>
plink_action open". This patch is intended to solve this.

If the station plink state remains at OPN_SNT once open,
try block and open again should solve this problem.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: change locking around ieee80211_recalc_smps
Johannes Berg [Tue, 11 Sep 2012 08:17:11 +0000 (10:17 +0200)]
mac80211: change locking around ieee80211_recalc_smps

Make the function acquire the necessary mutex itself
to simplify the callers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: handle power constraint/country IE better
Johannes Berg [Wed, 5 Sep 2012 11:41:37 +0000 (13:41 +0200)]
mac80211: handle power constraint/country IE better

Currently, mac80211 uses the power constraint IE, and reduces
the regulatory max TX power by it. This can cause issues if
the AP is advertising a large power constraint value matching
a high TX power in its country IE, for example in this case:

...
Country: US  Environment: Indoor/Outdoor
    ...
    Channels [157 - 157] @ 30 dBm
    ...
Power constraint: 13 dB
...

What happened here is that our local regulatory TX power is
15 dBm, and gets reduced by 13 dB so we end up with only
2 dBm effective TX power, which is way too low.

Instead, handle the country IE/power constraint IE combined
and restrict our TX power to the max of the regulatory power
and the maximum power advertised by the AP, in this case
17 dBm (= 30 dBm - 13 dB).

Also print a message when this happens to let the user know
and help us debug issues with it.

Reported-by: Carl A. Cook <CACook@quantum-equities.com>
Tested-by: Carl A. Cook <CACook@quantum-equities.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agortlwifi: Remove EXPERIMENTAL as pre-requisite for the drivers
Larry Finger [Tue, 11 Sep 2012 21:04:36 +0000 (16:04 -0500)]
rtlwifi: Remove EXPERIMENTAL as pre-requisite for the drivers

All of the rtlwifi-family of drivers have been in the kernel since 3.1
or earlier. The dependence on EXPERIMENTAL can be removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: add e-scan support.
Hante Meuleman [Tue, 11 Sep 2012 19:18:52 +0000 (21:18 +0200)]
brcmfmac: add e-scan support.

This patch adds e-scan support (currently i-scan is in use). E-scan
is a more powerful and memory efficient method for scanning. E-scan
will be the default scan method and eventually, i-scan support will
be removed. The scan methods do not make any difference to the end-user.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
12 years agobrcmfmac: avoid using local usb data.
Hante Meuleman [Tue, 11 Sep 2012 19:18:51 +0000 (21:18 +0200)]
brcmfmac: avoid using local usb data.

This patch removes usage of some of the local data in the usb
host interface driver. This is a step in the preperation to
support multiple USB devices.

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>
12 years agobrcmfmac: refill buffers on rx protocol error.
Hante Meuleman [Tue, 11 Sep 2012 19:18:50 +0000 (21:18 +0200)]
brcmfmac: refill buffers on rx protocol error.

This patch fixes a bug where rx buffer does not get refilled if the
packet received has an rx protocol error.

Reviewed-by: Arend Van Spriel <arend@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>
12 years agobrcmfmac: Clean up scan related code.
Hante Meuleman [Tue, 11 Sep 2012 19:18:49 +0000 (21:18 +0200)]
brcmfmac: Clean up scan related code.

Clean up scan related code in preparation of a new scan mechanism (e-scan)
which will follow in a separate patch.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agobrcmfmac: Add tx flow control on net if queue for USB.
Hante Meuleman [Tue, 11 Sep 2012 19:18:48 +0000 (21:18 +0200)]
brcmfmac: Add tx flow control on net if queue for USB.

Enable tx flow control for USB host interface.

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>
12 years agobrcmfmac: Add extra data support to firmware event queueing.
Hante Meuleman [Tue, 11 Sep 2012 19:18:47 +0000 (21:18 +0200)]
brcmfmac: Add extra data support to firmware event queueing.

Firmware events can contain extra data. This patch adds support to
copy this data when it exists.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agobrcmfmac: Stop all net if queues on tx flow halt.
Hante Meuleman [Tue, 11 Sep 2012 19:18:46 +0000 (21:18 +0200)]
brcmfmac: Stop all net if queues on tx flow halt.

When tx flow is to be blocked due to host interface throttle then
all net if queues should be stopped.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agolibertas: set mac control synchronously during init
Daniel Drake [Tue, 11 Sep 2012 15:38:11 +0000 (11:38 -0400)]
libertas: set mac control synchronously during init

CMD_MAC_CONTROL is currently sent async to the firmware, and is sent
from the lbs_setup_firmware() path during device init.

This means that device init can complete with commands pending, and
the if_sdio driver will sometimes power down the device (after init)
with this command still pending.

This was causing an occasional spurious command timeout after init,
leading to a device reset.

Fix this by making CMD_MAC_CONTROL synchronous when called from the
lbs_setup_firmware() path.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Choose correct LED pin for AR9565
Sujith Manoharan [Tue, 11 Sep 2012 05:34:00 +0000 (11:04 +0530)]
ath9k: Choose correct LED pin for AR9565

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Rename antenna diversity macros
Sujith Manoharan [Tue, 11 Sep 2012 05:16:38 +0000 (10:46 +0530)]
ath9k_hw: Rename antenna diversity macros

The register macros for antenna diversity are common for
AR9462 and AR9565, rename them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Handle gentimer termination properly
Sujith Manoharan [Tue, 11 Sep 2012 05:16:24 +0000 (10:46 +0530)]
ath9k_hw: Handle gentimer termination properly

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: separate TxPD processing routine for AP
Avinash Patil [Tue, 11 Sep 2012 01:30:49 +0000 (18:30 -0700)]
mwifiex: separate TxPD processing routine for AP

This patch adds separate tx packet descriptor routine for AP
interface. This function fills bss_type, bss_num, wmm packet
delay information etc for TxPD going on AP interface.

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>
12 years agomwifiex: disable WOW by default
Bing Zhao [Tue, 11 Sep 2012 01:30:48 +0000 (18:30 -0700)]
mwifiex: disable WOW by default

Some platforms do not support WOW. Let's change the default wakeup
criteria to 0.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: support custom world regulatory domain
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:47 +0000 (18:30 -0700)]
mwifiex: support custom world regulatory domain

country 00 (world regulatory domain) doesn't define channels
52 - 64 and 100 - 140. Add these channels to our custom world
regulatory domain.

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>
12 years agomwifiex: do not hint regulatory domain with f/w country code
Bing Zhao [Tue, 11 Sep 2012 01:30:46 +0000 (18:30 -0700)]
mwifiex: do not hint regulatory domain with f/w country code

We will use world regulatory domain (country 00) as default
when driver is loaded. Later after a successful association
cfg80211 will change the regulatory domain to a specific country
if the AP has advertised country IE.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: use country ie of requested AP while associating
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:45 +0000 (18:30 -0700)]
mwifiex: use country ie of requested AP while associating

AP's country ie is parsed and 11d information is updated in firmware
while associating. Previous mwifiex_send_domain_info_cmd_fw() call in
association path is not necessary now. Hence it is removed in this
patch.

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>
12 years agomwifiex: update adapter->bss_prio_tbl[j].bss_prio_cur correctly
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:44 +0000 (18:30 -0700)]
mwifiex: update adapter->bss_prio_tbl[j].bss_prio_cur correctly

"adapter->bss_prio_tbl[j].bss_prio_head" points to linked list of
interfaces with priority 'j'. "bss_prio_tbl[j].bss_prio_cur" is
supposed to point to next interface every time the routine for
dequeuing the packet is called. This ensures that each interface
gets fair chance.

Currently we have AP and station interfaces with priority '0'.
Therefore "adapter->bss_prio_tbl[0].bss_prio_cur" should
alternately point to AP and station nodes. Since "bss_prio_cur"
is not correctly updated, for each packet picked for AP, two
packets are picked for station interface.

This patch fixes the problem by correctly updating "bss_prio_cur".

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>
12 years agomwifiex: have same priority for AP and station traffic
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:43 +0000 (18:30 -0700)]
mwifiex: have same priority for AP and station traffic

Currently AP interface has higher priority over station. Hence
separate entries are created in "adapter->bss_prio_tbl" for these
interfaces and station packet is dequeued only if there is not
packet in queue for AP. It is observed that ping for station
interface doesn't work if heavy traffic is running on AP.

The problem is fixed by having same priority for both the
interfaces. This patch also removes an extra initialisation
for "priv->bss_priority".

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>
12 years agomwifiex: remove AMSDU_AGGR_CTRL command response handler
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:42 +0000 (18:30 -0700)]
mwifiex: remove AMSDU_AGGR_CTRL command response handler

HostCmd_CMD_AMSDU_AGGR_CTRL is never called with GET action.
So the code in mwifiex_ret_amsdu_aggr_ctrl() becomes redundant.

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>
12 years agomwifiex: remove 11N_CFG command response handler
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:41 +0000 (18:30 -0700)]
mwifiex: remove 11N_CFG command response handler

HostCmd_CMD_11N_CFG is never called with GET action. So the code in
mwifiex_ret_11n_cfg() becomes redundant.

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>
12 years agomwifiex: remove get operation code for SUBSCRIBE EVENT command
Amitkumar Karwar [Tue, 11 Sep 2012 01:30:40 +0000 (18:30 -0700)]
mwifiex: remove get operation code for SUBSCRIBE EVENT command

We don't send this command with GET action. Redundant code in
mwifiex_ret_subsc_evt() is removed in this patch.

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>
12 years agoath9k_hw: add 8 points for 5G temp slop
Rajkumar Manoharan [Mon, 10 Sep 2012 11:35:11 +0000 (17:05 +0530)]
ath9k_hw: add 8 points for 5G temp slop

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: use peak detection for 5GHz
Rajkumar Manoharan [Mon, 10 Sep 2012 11:35:10 +0000 (17:05 +0530)]
ath9k_hw: use peak detection for 5GHz

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Wait BT calibration to complete
Rajkumar Manoharan [Mon, 10 Sep 2012 11:35:09 +0000 (17:05 +0530)]
ath9k_hw: Wait BT calibration to complete

Whenever BT calibration requested, WLAN has to wait for the
calibration to be completed. But right now we defer the waiting
which might cause BT calibration to fail. Fix that.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agorndis_wlan: remove pointless check from rndis_scan()
Wei Yongjun [Mon, 10 Sep 2012 07:21:59 +0000 (15:21 +0800)]
rndis_wlan: remove pointless check from rndis_scan()

In rndis_scan(), 'request' is actually always valid pointer and
the !request check is unneeded, so remove it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add PCI ID for AR9565
Sujith Manoharan [Mon, 10 Sep 2012 03:50:39 +0000 (09:20 +0530)]
ath9k: Add PCI ID for AR9565

Enable AR9565.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Program correct PLL value for AR9565
Sujith Manoharan [Mon, 10 Sep 2012 03:50:29 +0000 (09:20 +0530)]
ath9k_hw: Program correct PLL value for AR9565

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix spur mitigation for AR9565
Sujith Manoharan [Mon, 10 Sep 2012 03:50:20 +0000 (09:20 +0530)]
ath9k_hw: Fix spur mitigation for AR9565

Exclude CCK spur mitigation, freq 2437 for OFDM and
add AR9565-specific logic.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Set correct max streams for AR9565
Sujith Manoharan [Mon, 10 Sep 2012 03:50:12 +0000 (09:20 +0530)]
ath9k: Set correct max streams for AR9565

Also, set the correct chainmask.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add AR9565 HW support
Sujith Manoharan [Mon, 10 Sep 2012 03:50:03 +0000 (09:20 +0530)]
ath9k_hw: Add AR9565 HW support

Various parts of the code require AR9565 checks,
this patch adds them.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add AR9565 initvals
Sujith Manoharan [Mon, 10 Sep 2012 03:49:54 +0000 (09:19 +0530)]
ath9k_hw: Add AR9565 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add version/revision macros for AR9565
Sujith Manoharan [Tue, 11 Sep 2012 14:39:18 +0000 (20:09 +0530)]
ath9k_hw: Add version/revision macros for AR9565

And recognize the device in the init path.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agop54: fix off-by-one null pointer bug in p54_tx_80211
Christian Lamparter [Fri, 7 Sep 2012 23:28:42 +0000 (01:28 +0200)]
p54: fix off-by-one null pointer bug in p54_tx_80211

This patch fixes a regression which was introduced in:
"mac80211: move TX station pointer and restructure TX"

IP: p54_tx_80211+0x21/0x513 [p54common]
Oops: 0000 [#1] SMP
Modules linked in: p54usb p54common [...]
Pid: 13394, comm: hostapd 3.6.0-rc4-wl+
RIP: 0010:p54_tx_80211+0x21/0x513
RSP: 0018:...  EFLAGS: 00010292
[...]
Process hostapd
Stack:
[...]
Call Trace:
p54_bss_info_changed+0x204/0x21e [p54common]
ieee80211_del_station+0x16/0x32 [mac80211]
ieee80211_start_ap+0x10f/0x157 [mac80211]
nl80211_start_ap+0x315/0x361 [cfg80211]

p54_tx_80211 function is called as part of the
beacon update. The caller p54_bss_info_changed
has to supply a valid tx control struct, or
the control->sta will lead to a null pointer
dereference.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agodrivers/net/wireless/ath/ath9k/ar9003_mac.c: removes unnecessary semicolon
Peter Senna Tschudin [Fri, 7 Sep 2012 15:24:41 +0000 (17:24 +0200)]
drivers/net/wireless/ath/ath9k/ar9003_mac.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add Generic hardware timer interrupt in debugfs
Mohammed Shafi Shajakhan [Fri, 7 Sep 2012 10:24:13 +0000 (15:54 +0530)]
ath9k: Add Generic hardware timer interrupt in debugfs

Having generic hardware timer interrupt in debugfs
would come handy when we are debugging 3 WIRE
BTCOEX issues.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Read and configure thermocal for AR9462
Rajkumar Manoharan [Fri, 7 Sep 2012 06:45:16 +0000 (12:15 +0530)]
ath9k_hw: Read and configure thermocal for AR9462

Read and configure thermometer calibration results read from
OTP card.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Read and apply thermometer settings from EEPROM
Rajkumar Manoharan [Fri, 7 Sep 2012 06:45:15 +0000 (12:15 +0530)]
ath9k_hw: Read and apply thermometer settings from EEPROM

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agodrivers/net/wireless/rtlwifi/rtl8192de/phy.c: removes unnecessary semicolon
Peter Senna Tschudin [Thu, 6 Sep 2012 16:09:17 +0000 (18:09 +0200)]
drivers/net/wireless/rtlwifi/rtl8192de/phy.c: removes unnecessary semicolon

removes unnecessary semicolon

Found by Coccinelle: http://coccinelle.lip6.fr/

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: at76c50x: eliminate hex2str()
Andy Shevchenko [Wed, 5 Sep 2012 08:52:32 +0000 (11:52 +0300)]
wireless: at76c50x: eliminate hex2str()

The hex2str() is substituted by '%*phD' specificator.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Cancel BTCOEX related work before disabling BTCOEX
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:39 +0000 (19:33 +0530)]
ath9k_htc: Cancel BTCOEX related work before disabling BTCOEX

Before disabling BTCOEX in the h/w cancel all BTCOEX related
works. This is similar to the commit in ath9k(c32cdbd8)
ath9k: Stop the BTCOEX timers before disabling BTCOEX

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Add a modparam to enable BTCOEX rather than default
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:38 +0000 (19:33 +0530)]
ath9k_htc: Add a modparam to enable BTCOEX rather than default

Enable BTCOEX for WB193(which seems to be the only supported
ath9k_htc BTCOEX chipset)only when it is enabled via modparam,
rather than enabling it by default.

Cc: Vivek Natarajan <nataraja@qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: minor cleanup in ath9k_htc_add_station
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:37 +0000 (19:33 +0530)]
ath9k_htc: minor cleanup in ath9k_htc_add_station

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Cleanup add/change_interface callbacks
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:36 +0000 (19:33 +0530)]
ath9k: Cleanup add/change_interface callbacks

*Remove all the checks that will be handled by cfg80211
based on the interface combination advertised. For instance,
driver supports at the maximum 8 beaconing interface, while
we advertise maximum 8 beaconing interface in the interface
combination support.

*cfg80211 will take care of not allowing
us to add an interface that is not supported by the
driver, further if the change_interface changes the
old interface to a beaconing interface while we had
reached the max limit of 8 beaconing interface, again
cfg80211 takes care of this stuff!
So remove all these checks.

*Beautify placing PS wrappers in the appropriate
position.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Remove an obselete function declaration
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:35 +0000 (19:33 +0530)]
ath9k: Remove an obselete function declaration

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Make use of ath_stop_ani wrapper
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:34 +0000 (19:33 +0530)]
ath9k: Make use of ath_stop_ani wrapper

Additionally it has a neat debug message informing us
that we are stopping the ANI algorithm.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix BTCOEX timer triggering comparision
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:33 +0000 (19:33 +0530)]
ath9k: Fix BTCOEX timer triggering comparision

Its more correct to convert btcoex_period to 'us' while
comparing with btcoex_no_stomp which is in 'us'.
Did not find any functionality issues being fixed,
as the generic hardware timer triggers are usually
refreshed with the newer duty cycle.

Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix invalid MCI GPM index access/caching
Mohammed Shafi Shajakhan [Tue, 4 Sep 2012 14:03:32 +0000 (19:33 +0530)]
ath9k_hw: Fix invalid MCI GPM index access/caching

There is a possibility that AR_MCI_GPM_1 register can
return 0xdeadbeef and this results in caching of invalid
GPM index in ar9003_mci_is_gpm_valid. Ensure we
have appropriate checks to avoid this.

Cc: xijin luo <xijin@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: Remove bogus memcpy in ai_detach
Andi Kleen [Mon, 3 Sep 2012 19:13:35 +0000 (21:13 +0200)]
brcm80211: Remove bogus memcpy in ai_detach

gcc 4.8 warns for this memcpy. While the copy size is correct, the whole
copy seems to be a nop because the destination is never used, and
there's no need to use memcpy to copy pointers anyways. And the
type of the pointer was wrong, but at least those are always the same.

Just remove it.

/backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c: In function 'ai_detach':
/backup/lsrc/git/linux-lto-2.6/drivers/net/wireless/brcm80211/brcmsmac/aiutils.c:539:32: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'struct si_pub **' as the destination; expected 'struct si_pub *' or an explicit length [-Wsizeof-pointer-memaccess]
  memcpy(&si_local, &sih, sizeof(struct si_pub **));
                                ^

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agozd1211rw: enable support for MFP
Jussi Kivilinna [Sun, 2 Sep 2012 18:10:44 +0000 (21:10 +0300)]
zd1211rw: enable support for MFP

zd1211rw lacks hardware encryption, so enabling 802.11w is only matter of
enabling IEEE80211_HW_MFP_CAPABLE flag.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: add MediaTek/RaLink Rt3352 WiSoC
Daniel Golle [Sun, 9 Sep 2012 11:24:39 +0000 (14:24 +0300)]
rt2x00: add MediaTek/RaLink Rt3352 WiSoC

Support for the RT3352 WiSoC was developed for and tested with the ALL5002
devboard running OpenWrt. For now, this supports only devices with internal
TXALC. Corrections were made according to the remarks of Stanislaw Gruszka and
Gertjan van Wingerde, thank you guys for reviewing!

Signed-off-by: Daniel Golle <dgolle@allnet.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove unneeded CONFIG_PM ifdef
Johannes Berg [Fri, 7 Sep 2012 15:25:27 +0000 (17:25 +0200)]
mac80211: remove unneeded CONFIG_PM ifdef

The functions are only called if CONFIG_PM is set
as the callers are under an ifdef, so there's no
need to also define no-op functions.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: load firmware in chunks
Johannes Berg [Mon, 10 Sep 2012 09:50:18 +0000 (11:50 +0200)]
iwlwifi: load firmware in chunks

Instead of allocating one big chunk of DMA-coherent
memory for the firmware and keeping it around, only
vmalloc() the firmware and copy it into a single
page of DMA-coherent memory for the upload.

The advantage is that we don't need DMA memory for
the firmware image that is stored while the driver
is operating, we only need it while uploading.

This will make it easier for the driver to work if
the system has fragmented memory.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: don't access the HW when it is not available
Emmanuel Grumbach [Sun, 9 Sep 2012 13:58:07 +0000 (16:58 +0300)]
iwlwifi: don't access the HW when it is not available

When we kill the radio with the RF kill button we could access
the HW after having stopped the APM which would result in the
warning below.

The flow goes like this:
* RF kill
iwlwifi notifies the stack which stops the driver
fw sends CARD_STATE_NOTIFICATION
* iwl_trans_pcie_stop_device stops the APM
* the tasklet runs and calls to iwl_rx_handle
* iwl_rx_handle calls iwl_rx_queue_restock
* iwl_rx_queue_restock tries to access the HW...

[255908.543823] ------------[ cut here ]------------
[255908.543843] WARNING: at drivers/net/wireless/iwlwifi/iwl-io.c:150 iwl_grab_nic_access+0x79/0xb0 [iwlwifi]()
[255908.543849] Hardware name: Latitude E6410
[255908.543852] Timeout waiting for hardware access (CSR_GP_CNTRL 0x000003d8)
[255908.543856] Modules linked in: iwlmvm iwlwifi mac80211 [...]
[255908.543935] Pid: 0, comm: swapper Tainted: G        W   3.1.0 #1
[255908.543939] Call Trace:
[255908.543950]  [<c1046e42>] warn_slowpath_common+0x72/0xa0
[255908.543980]  [<c1046f13>] warn_slowpath_fmt+0x33/0x40
[255908.543992]  [<fa4bb3b9>] iwl_grab_nic_access+0x79/0xb0 [iwlwifi]
[255908.544004]  [<fa4bb9eb>] iwl_write_direct32+0x2b/0xa0 [iwlwifi]
[255908.544018]  [<fa4c0ff9>] iwl_rx_queue_update_write_ptr+0x89/0x1d0 [iwlwifi]
[255908.544054]  [<fa4c1250>] iwlagn_rx_queue_restock+0x110/0x140 [iwlwifi]
[255908.544067]  [<fa4c234d>] iwl_irq_tasklet+0x82d/0xf40 [iwlwifi]
[255908.544096]  [<c104e11e>] tasklet_action+0xbe/0x100
[255908.544102]  [<c104d91e>] __do_softirq+0xae/0x1f0
[255908.544227] ---[ end trace d150f49345d85009 ]---

Prevent this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: some clean up in transport layer
Emmanuel Grumbach [Sun, 9 Sep 2012 13:39:18 +0000 (16:39 +0300)]
iwlwifi: some clean up in transport layer

Remove outdated iwlagn prefix to a few functions and fix comments
that were not accurate.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: fix indentation in iwl_load_given_ucode
Johannes Berg [Sun, 9 Sep 2012 18:59:17 +0000 (20:59 +0200)]
iwlwifi: fix indentation in iwl_load_given_ucode

There's a block of code that's indented too
far, move it out to where it should be.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: stop interrupts before stopping device
David Spinadel [Sun, 12 Aug 2012 05:14:04 +0000 (08:14 +0300)]
iwlwifi: stop interrupts before stopping device

If an RX interrupt is signalled after or during apm_stop
we may try to access the peripherals which are already
down. Prevent this by disabling interrupts first.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: don't reset interupts after disabling
David Spinadel [Wed, 8 Aug 2012 12:17:26 +0000 (15:17 +0300)]
iwlwifi: don't reset interupts after disabling

iwl_disable_interupts() already resets the register, no
need to do it again.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: validate skb->dev in the tx status path
Felix Fietkau [Sat, 8 Sep 2012 09:58:30 +0000 (11:58 +0200)]
mac80211: validate skb->dev in the tx status path

skb->dev might contain a stale reference to a device that was already
deleted, and using it unchecked can lead to invalid pointer accesses.
Since this is only used for nl80211 tx, iterate over active interfaces
to find a match for skb->dev, and discard the tx status if the device
is gone.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: use call_rcu() on sta deletion
Eliad Peller [Sun, 9 Sep 2012 11:43:51 +0000 (14:43 +0300)]
mac80211: use call_rcu() on sta deletion

mac80211 calls synchronize_rcu() on sta deletion,
which increase the roaming time significantly.

Convert it into a call_rcu() mechanism, in order
to avoid blocking. Since some of the cleanup
functions might sleep, schedule from the call_rcu
callback a new work that will do the actual cleanup.

In order to make sure the cleanup occurs before
the interface went down, flush local->workqueue
on ieee80211_do_stop().

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: add key flag for management keys
Johannes Berg [Tue, 4 Sep 2012 15:08:23 +0000 (17:08 +0200)]
mac80211: add key flag for management keys

Mark keys that might be used to receive management
frames so drivers can fall back on software crypto
for them if they don't support hardware offload.
As the new flag is only set correctly for RX keys
and the existing IEEE80211_KEY_FLAG_SW_MGMT flag
can only affect TX, also rename the latter to
IEEE80211_KEY_FLAG_SW_MGMT_TX.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoBluetooth: AMP: Add Read Data Block Size to amp_init
Andrei Emeltchenko [Thu, 6 Sep 2012 12:05:46 +0000 (15:05 +0300)]
Bluetooth: AMP: Add Read Data Block Size to amp_init

Add Read Data Block Size HCI cmd to AMP initialization, then it
makes possible to send data.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: debug: Print refcnt for hci_dev
Andrei Emeltchenko [Thu, 6 Sep 2012 12:05:45 +0000 (15:05 +0300)]
Bluetooth: debug: Print refcnt for hci_dev

Add debug output for HCI kref.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: trivial: Remove empty line
Andrei Emeltchenko [Thu, 6 Sep 2012 12:05:44 +0000 (15:05 +0300)]
Bluetooth: trivial: Remove empty line

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: trivial: Make hci_chan_del return void
Andrei Emeltchenko [Thu, 6 Sep 2012 12:05:43 +0000 (15:05 +0300)]
Bluetooth: trivial: Make hci_chan_del return void

Return code is not needed in hci_chan_del

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Remove unneeded zero init
Andrei Emeltchenko [Fri, 31 Aug 2012 13:39:28 +0000 (16:39 +0300)]
Bluetooth: Remove unneeded zero init

hdev is allocated with kzalloc so zero initialization is not needed.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: btmrvl: remove pointless conditional before kfree_skb()
Wei Yongjun [Tue, 28 Aug 2012 13:12:48 +0000 (21:12 +0800)]
Bluetooth: btmrvl: remove pointless conditional before kfree_skb()

Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agoBluetooth: Use module_platform_driver() in btwilink.c file
Sachin Kamat [Tue, 7 Aug 2012 05:07:45 +0000 (10:37 +0530)]
Bluetooth: Use module_platform_driver() in btwilink.c file

module_platform_driver() makes the code simpler by eliminating module_init
and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
12 years agort2x00: rt2800 - Make probe_hw function common between PCI and USB.
Gertjan van Wingerde [Mon, 3 Sep 2012 01:25:51 +0000 (03:25 +0200)]
rt2x00: rt2800 - Make probe_hw function common between PCI and USB.

Refactor the probe_hw code so that more code can be shared between
rt2800pci and rt2800usb.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Unify GPIO register field namings
Gertjan van Wingerde [Fri, 31 Aug 2012 17:22:13 +0000 (19:22 +0200)]
rt2x00: Unify GPIO register field namings

The various rt2x00 drivers use different methods to name the different
GPIO register fields indicating the GPIO pin value and the fields
indicating the direction.
Start using a unified naming scheme for the GPIO register fields:
- <csr>_VAL<x> for fields indicating the GPIO pin value.
- <csr>_DIR<x> for fields indicating the GPIO pin direction.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo Van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Align GPIO register definitions with the datasheets.
Gertjan van Wingerde [Fri, 31 Aug 2012 17:22:12 +0000 (19:22 +0200)]
rt2x00: Align GPIO register definitions with the datasheets.

Ensure that all active GPIO pins are included in the GPIO register
definitions, nothing more and nothing less.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo Van Doorn <ivdoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Fri, 7 Sep 2012 19:07:55 +0000 (15:07 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

12 years agortlwifi: Update header file
Larry Finger [Fri, 31 Aug 2012 20:39:01 +0000 (15:39 -0500)]
rtlwifi: Update header file

The latest version of the vendor driver for the rtlwifi family
includes many changes. This patch incorporates the difference
in the main header file.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: Remove sparse warnings
Larry Finger [Fri, 31 Aug 2012 20:39:00 +0000 (15:39 -0500)]
rtlwifi: rtl8192c: rtl8192ce: rtl8192cu: rtl8192se: Remove sparse warnings

The rtlwifi family of drivers has the following sparse errors:

  CHECK   drivers/net/wireless/rtlwifi/usb.c
drivers/net/wireless/rtlwifi/usb.c:122:17: warning: cast to restricted __le32
  CHECK   drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c:1157:13: warning: context imbalance in 'rtl92c_dm_refresh_rate_adaptive_mask' - different lock contexts for basic block
  CHECK   drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c:1909:30: warning: cast to restricted __le32
  CHECK   drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c:345:1: warning: symbol 'rtl92ce_pci_ids' was not declared. Should it be static?
  CHECK   drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c:494:9: warning: cast from restricted __le16
  CHECK   drivers/net/wireless/rtlwifi/rtl8192se/fw.c
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:490:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:490:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:494:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:494:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:499:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:499:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:510:25: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:510:25: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:607:9: warning: cast to restricted __le16
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:607:9: warning: cast to restricted __le16
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:650:9: warning: cast to restricted __le16
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:650:9: warning: cast to restricted __le16
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:652:9: warning: cast to restricted __le16
drivers/net/wireless/rtlwifi/rtl8192se/fw.c:652:9: warning: cast to restricted __le16
  CHECK   drivers/net/wireless/rtlwifi/rtl8192se/trx.c
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:758:9: warning: cast from restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:788:17: warning: cast from restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:804:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:804:17: warning: cast to restricted __le32
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:807:17: warning: cast from restricted __le32

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: rtl8192c: rtl8192de: Fix typo in cursta_connectctate
Larry Finger [Fri, 31 Aug 2012 20:38:59 +0000 (15:38 -0500)]
rtlwifi: rtl8192c: rtl8192de: Fix typo in cursta_connectctate

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: store mwifiex_ds_misc_subsc_evt in mwifiex_private
Jeff Disher [Fri, 31 Aug 2012 01:20:55 +0000 (18:20 -0700)]
mwifiex: store mwifiex_ds_misc_subsc_evt in mwifiex_private

Since mwifiex_ds_misc_subsc_evt is used in an asynchronous case,
store the structure in the long-lived mwifiex_private instead of
on the calling stack.

This fixes a problem where the response of the asynchronous
operation would corrupt a stack frame potentially in use by
a different thread.

Signed-off-by: Jeff Disher <disher@chromium.org>
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Jeff Disher <disher@chromium.org>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: add callback for nl80211 testmode command
Arend van Spriel [Thu, 30 Aug 2012 17:43:02 +0000 (19:43 +0200)]
brcmfmac: add callback for nl80211 testmode command

This change adds callback for nl80211 testmode, which can be used
for testing and debugging purposes with driver and firmware.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: Add 43143 USB support.
Hante Meuleman [Thu, 30 Aug 2012 17:43:01 +0000 (19:43 +0200)]
brcmfmac: Add 43143 USB support.

Added usb device id to list of supported devices. 43143 is a new
802.11n single stream device.

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>
12 years agobrcmfmac: Add 43242 USB support.
Hante Meuleman [Thu, 30 Aug 2012 17:43:00 +0000 (19:43 +0200)]
brcmfmac: Add 43242 USB support.

Added usb device id to list of supported devices. 43242 is the new
802.11n 2x2 MIMO device.

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>
12 years agobrcmfmac: add BCM43241 sdio interface driver support
Franky Lin [Thu, 30 Aug 2012 17:42:59 +0000 (19:42 +0200)]
brcmfmac: add BCM43241 sdio interface driver support

BCM43241 is an 11abg and 2x2 11n Wifi/BT/FM combo chip that
supports 40MHz channel width. This patch intends to enable
the driver support for the chip through SDIO bus interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: prevent possible race condition on usb rx control.
Hante Meuleman [Thu, 30 Aug 2012 17:42:58 +0000 (19:42 +0200)]
brcmfmac: prevent possible race condition on usb rx control.

brcmf_usb_tx_ctlpkt sends message using brcmf_usb_send_ctl then
clears boolean and waits for boolean to be set (by another
thread). This can result in situation where flag gets cleared
while result was already received. First clearing the flag and
then sending the data will prevent this.

Reviewed-by: Arend Van Spriel (arend@broadcom.com)
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>