]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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

11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 years agoath9k: Fix TX filter usage
Sujith Manoharan [Wed, 29 Aug 2012 03:50:42 +0000 (09:20 +0530)]
ath9k: Fix TX filter usage

The TX filter bit for a station would be set by the HW
when a frame is not acked. A frame would be completed with
ATH9K_TXERR_FILT status only when the corresponding filter bit
for the destination station is already set.

Currently, un-acknowledged  packets are added to the pending queue
and retried, but the "clear_dest_mask" bit in the descriptor is
set only when the TX status has been ATH9K_TXERR_FILT. This results
in packet loss and the log shows:

wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746071
wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746076
wlan0: dropped TX filtered frame, queue_len=0 PS=0 @4309746377
...
...

This issue can be resolved by making sure that the destination
mask is cleared when the packet is being retried and the earlier
TX status is ATH9K_TXERR_XRETRY.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192c: remove pointless conditional before kfree_skb()
Wei Yongjun [Tue, 28 Aug 2012 13:12:00 +0000 (21:12 +0800)]
rtlwifi: rtl8192c: remove pointless conditional before kfree_skb()

Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192de: remove pointless conditional before kfree_skb()
Wei Yongjun [Tue, 28 Aug 2012 13:11:34 +0000 (21:11 +0800)]
rtlwifi: rtl8192de: remove pointless conditional before kfree_skb()

Remove pointless conditional before kfree_skb().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: make use of is_zero_ether_addr()
Bing Zhao [Tue, 28 Aug 2012 03:32:54 +0000 (20:32 -0700)]
mwifiex: make use of is_zero_ether_addr()

Use is_zero_ether_addr() instead of directly using memcmp() to
determine if the ethernet address is all zeros.

Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: parse rate info for AP
Avinash Patil [Tue, 28 Aug 2012 03:32:53 +0000 (20:32 -0700)]
mwifiex: parse rate info for AP

This patch adds support for parsing rates from cfg80211_ap_settings
of start_ap handler. This in turn adds support for 11a and 11b phy
configurations.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: don't disable wait_q_enabled flag
Amitkumar Karwar [Tue, 28 Aug 2012 03:32:52 +0000 (20:32 -0700)]
mwifiex: don't disable wait_q_enabled flag

We should not disable "cmd_node->wait_q_enabled" flag here before
calling mwifiex_insert_cmd_to_free_q() because we want to wake up
the thread waiting for command completion inside this function.

The wait_q_enabled flag will be disabled internally upon command
completion.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: release semaphore acquired for internal scan operation
Amitkumar Karwar [Tue, 28 Aug 2012 03:32:51 +0000 (20:32 -0700)]
mwifiex: release semaphore acquired for internal scan operation

If "iw connect" command is fired for station interface, when
heavy traffic is running on AP interface, internal scan operation
performed before actual association is aborted. In this case we
missed to release semaphore.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoairo: remove duplicated include from airo.c
Wei Yongjun [Sun, 26 Aug 2012 01:55:20 +0000 (09:55 +0800)]
airo: remove duplicated include from airo.c

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowl18xx: remove duplicated include from main.c
Wei Yongjun [Sun, 26 Aug 2012 01:45:21 +0000 (09:45 +0800)]
wl18xx: remove duplicated include from main.c

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowl3501_cs: use is_broadcast_ether_addr() instead of memcmp()
Wei Yongjun [Sun, 26 Aug 2012 01:24:21 +0000 (09:24 +0800)]
wl3501_cs: use is_broadcast_ether_addr() instead of memcmp()

Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: use is_broadcast_ether_addr() instead of memcmp()
Wei Yongjun [Sun, 26 Aug 2012 00:54:41 +0000 (08:54 +0800)]
wireless: use is_broadcast_ether_addr() instead of memcmp()

Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: small optimization
Mohammed Shafi Shajakhan [Fri, 24 Aug 2012 10:57:06 +0000 (16:27 +0530)]
ath9k_hw: small optimization

Assign the MCI BT state locally, rather than unnecessarily calling
ar9003_mci_state and updating it.

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: use is_zero_ether_addr() instead of memcmp()
Wei Yongjun [Fri, 24 Aug 2012 05:27:10 +0000 (13:27 +0800)]
mwifiex: use is_zero_ether_addr() instead of memcmp()

Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: use is_broadcast_ether_addr() instead of memcmp()
Wei Yongjun [Fri, 24 Aug 2012 05:25:30 +0000 (13:25 +0800)]
mwifiex: use is_broadcast_ether_addr() instead of memcmp()

Using is_broadcast_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is broadcast
address.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoairo: use is_zero_ether_addr() and is_broadcast_ether_addr()
Wei Yongjun [Thu, 23 Aug 2012 07:17:09 +0000 (15:17 +0800)]
airo: use is_zero_ether_addr() and is_broadcast_ether_addr()

Using is_zero_ether_addr() and is_broadcast_ether_addr() instead of
directly use memcmp() to determine if the ethernet address is all zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agodrivers/net: use is_zero_ether_addr() instead of memcmp()
Wei Yongjun [Thu, 23 Aug 2012 07:16:44 +0000 (15:16 +0800)]
drivers/net: use is_zero_ether_addr() instead of memcmp()

Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoorinoco: use is_zero_ether_addr() instead of memcmp()
Wei Yongjun [Thu, 23 Aug 2012 06:55:02 +0000 (14:55 +0800)]
orinoco: use is_zero_ether_addr() instead of memcmp()

Using is_zero_ether_addr() instead of directly use
memcmp() to determine if the ethernet address is all
zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoipw2200: use is_zero_ether_addr() and is_broadcast_ether_addr()
Wei Yongjun [Thu, 23 Aug 2012 06:54:05 +0000 (14:54 +0800)]
ipw2200: use is_zero_ether_addr() and is_broadcast_ether_addr()

Using is_zero_ether_addr() and is_broadcast_ether_addr() instead of
directly use memcmp() to determine if the ethernet address is all zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoipw2100: use is_zero_ether_addr() and is_broadcast_ether_addr()
Wei Yongjun [Thu, 23 Aug 2012 06:53:24 +0000 (14:53 +0800)]
ipw2100: use is_zero_ether_addr() and is_broadcast_ether_addr()

Using is_zero_ether_addr() and is_broadcast_ether_addr() instead of
directly use memcmp() to determine if the ethernet address is all zeros.

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless: ath9k-htc: only load firmware in need
Ming Lei [Tue, 21 Aug 2012 08:04:27 +0000 (16:04 +0800)]
wireless: ath9k-htc: only load firmware in need

It is not necessary to hold the firmware memory during the whole
driver lifetime, and obviously it does waste memory. Suppose there
are 4 ath9k-htc usb dongles working, kernel has to consume about
4*50KBytes RAM to cache firmware for all dongles. After applying the
patch, kernel only caches one single firmware image in RAM for
all ath9k-htc devices just during system suspend/resume cycle.

When system is ready for loading firmware, ath9k-htc can request
the loading from usersapce. During system resume, ath9k-htc still
can load the firmware which was cached in kernel memory before
system suspend.

Cc: ath9k-devel@lists.ath9k.org
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>
Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Cc: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: don't leak memory for PCIE, MIPS, GBIT cores
Saul St. John [Thu, 16 Aug 2012 20:42:30 +0000 (15:42 -0500)]
bcma: don't leak memory for PCIE, MIPS, GBIT cores

bcma_scan_bus allocates a bcma_core for each core found on the bus, but the
memory for cores handled by the bcma driver itself was not being freed when
the bus was unregistered. This patch adds special handling for the PCIE,
MIPS, and GBIT COMMON cores, to ensure that their memory allocation is
freed as well.

Note that this patch doesn't address the memory allocated for the CC core,
as that was corrected in my previous patch "bcma: register cc core driver,
device."

Cc: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Saul St. John <saul.stjohn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 7 Sep 2012 18:50:15 +0000 (14:50 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 7 Sep 2012 18:49:46 +0000 (14:49 -0400)]
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next

11 years agomac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS
Antonio Quartulli [Fri, 7 Sep 2012 11:28:53 +0000 (13:28 +0200)]
mac80211: reply to AUTH with DEAUTH if sta allocation fails in IBSS

Whenever a host gets an AUTH frame it first allocates a new
station and then replies with another AUTH frame. However,
if sta allocations fails the host should send a DEAUTH frame
instead to tell the other end that something went wrong.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
[reword commit message a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: move ieee80211_send_deauth_disassoc outside mlme code
Antonio Quartulli [Fri, 7 Sep 2012 11:28:52 +0000 (13:28 +0200)]
mac80211: move ieee80211_send_deauth_disassoc outside mlme code

Move ieee80211_send_deauth_disassoc() to util.c to make it
available for the rest of the mac80211 code.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
[reword commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agonet/mac80211/scan.c: removes unnecessary semicolon
Peter Senna Tschudin [Thu, 6 Sep 2012 16:09:16 +0000 (18:09 +0200)]
net/mac80211/scan.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: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: refactor set_channel_type
Michal Kazior [Tue, 26 Jun 2012 12:37:21 +0000 (14:37 +0200)]
mac80211: refactor set_channel_type

Split functionality for further reuse.

Will prevent code duplication when channel context
channel_type merging is introduced.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: use synchronize_net() on key destroying
Eliad Peller [Wed, 5 Sep 2012 17:23:56 +0000 (20:23 +0300)]
mac80211: use synchronize_net() on key destroying

__ieee80211_key_destroy() calls synchronize_rcu() in
order to sync the tx path before destroying the key.

However, synching the tx path can be done with
synchronize_net() as well, which is usually faster
(the timing might be important for roaming scenarios).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>