Johannes Berg [Wed, 14 Dec 2011 11:35:30 +0000 (12:35 +0100)]
mac80211: refactor station state transitions
Station entries can have various states, the most
important ones being auth, assoc and authorized.
This patch prepares us for telling the driver about
these states, we don't want to confuse drivers with
strange transitions, so with this we enforce that
they move in the right order between them (back and
forth); some transitions might happen before the
driver even knows about the station, but at least
runtime transitions will be ordered correctly.
As a consequence, IBSS and MESH stations will now
have the ASSOC flag set (so they can transition to
AUTHORIZED), and we can get rid of a special case
in TX processing.
When freeing a station, unwind the state so that
other parts of the code (or drivers later) can rely
on the transitions.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 14 Dec 2011 11:20:29 +0000 (12:20 +0100)]
mac80211: use station mutex in configuration
There's no need to use RCU here, we can just lock
the station mutex instead. This allows the code
to sleep, which is necessary for later patches.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 14 Dec 2011 11:20:28 +0000 (12:20 +0100)]
mac80211: remove duplicate TDLS peer verification
This is already checked in cfg80211, so no need
to repeat the checks here.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 14 Dec 2011 11:20:27 +0000 (12:20 +0100)]
cfg80211: validate nl80211 station handling better
The nl80211 station handling code is a bit messy
and doesn't do a lot of validation. It seems like
this could be an issue for drivers that don't use
mac80211 to validate everything.
As cfg80211 doesn't keep station state, move the
validation of allowing supported_rates to change
for TDLS only in station mode to mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 14 Dec 2011 08:29:15 +0000 (09:29 +0100)]
nl80211: add TDLS peer flag to policy
This was evidently missed in the TDLS patch (
07ba55d7).
Cc: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Thu, 15 Dec 2011 12:58:08 +0000 (14:58 +0200)]
wl12xx: alloc buffer in driver_state_read to prevent compilation warning
When compiling wl12xx for x86, there was a warning complaining about
the size of the buffer we were allocating in the stack:
drivers/net/wireless/wl12xx/debugfs.c: In function 'driver_state_read':
drivers/net/wireless/wl12xx/debugfs.c:380:1: warning: the frame size of 1040 bytes is larger than 1024 bytes
To prevent this, allocate the buffer in the heap instead.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Pontus Fuchs [Wed, 14 Dec 2011 13:32:23 +0000 (14:32 +0100)]
Set wlvif->ps_compl to NULL in before return
wl1271_configure_suspend_sta leaves a stale stack declared
completion in wlvif->ps_compl. Set it to NULL before returning.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[small fix to use wlvif->ps_compl instead of wl->ps_compl]
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Wed, 14 Dec 2011 12:57:58 +0000 (14:57 +0200)]
wl12xx: remove unused firmware version macros
We don't use WL12XX_BA_SUPPORT_FW_COST_VER2_START nor
WL12XX_BA_SUPPORT_FW_COST_VER2_END anymore.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 13 Dec 2011 13:45:54 +0000 (15:45 +0200)]
wl12xx: remove deprecated packet detection threshold config
The ACX_PD_THRESHOLD configuration command is deprecated and should
not be used anymore.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Tue, 13 Dec 2011 13:26:38 +0000 (15:26 +0200)]
wl12xx: use ieee80211_free_txskb()
Use the newly introduced ieee80211_free_txskb() instead
of dev_kfree_skb() for failed tx packets.
Additionally, if the skb is a dummy packet, re-enqueue
it (as the fw expects it) instead of freeing it.
Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 13 Dec 2011 09:39:50 +0000 (11:39 +0200)]
wl12xx: call extended radio parameters for wl127x AP mode
We need to set the extended radio parameters for wl127x only.
Currently, we were only calling this command with wl127x STA mode, but
we should also do it for AP mode.
Move the call to the extended radio paramaters to the common hw_init
and use a single if for the chip type to do everything at once.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 13 Dec 2011 09:39:02 +0000 (11:39 +0200)]
wl12xx: don't write out of bounds when hlid > WL12XX_MAX_LINKS
We should not get an hlid value bigger than WL12XX_MAX_LINKS from
wl1271_rx_handle_data(). We have a WARN_ON in case it happens. But
despite the warning, we would still go ahead and write the hlid bit
into active_hlids (a stack variable). This would cause us to
overwrite other data in the stack.
To avoid this problem, we now skip the write when issuing the warning,
so at least we don't corrupt data.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Pontus Fuchs [Thu, 1 Dec 2011 11:13:44 +0000 (12:13 +0100)]
wl12xx: Restore testmode ABI
Commit
80900d0140a7648587982c8f299830e900e49165 accidently broke
the ABI for testmode commands. Restore the ABI again.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Luciano Coelho <coelho@ti.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:12 +0000 (16:43 +0100)]
NFC: Initial LLCP support
This patch is an initial implementation for the NFC Logical Link Control
protocol. It's also known as NFC peer to peer mode.
This is a basic implementation as it lacks SDP (services Discovery
Protocol), frames aggregation support, and frame rejecion parsing.
Follow up patches will implement those missing features.
This code has been tested against a Nexus S phone implementing LLCP 1.0.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:11 +0000 (16:43 +0100)]
NFC: DEP link hook implementation for pn533
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:10 +0000 (16:43 +0100)]
NFC: Set and get DEP general bytes
Without an API for setting and getting the local and remote general bytes,
drivers won't be able to properly establish a DEP link.
This API also allows them to propagate the remote general bytes they get
from the DEP link establishment up to the LLCP layer.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:09 +0000 (16:43 +0100)]
NFC: Add a DEP link control netlink command
NFC-DEP (Data Exchange Protocol) is an NFC MAC layer.
This command allows to enable and disable the DEP link on to which e.g.
LLCP can run.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:08 +0000 (16:43 +0100)]
NFC: Atomic socket allocation
rawsock_create() is called with preemption disabled, so we should not
sleep.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:07 +0000 (16:43 +0100)]
NFC: Do not take the genl mutex from the netlink release notifier
The netlink notifier is atomic so we must not sleep in that context.
Also we know that Any netlink packets arriving to us will be purged when
the notifier is called, so we don't need to take the mutex.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:06 +0000 (16:43 +0100)]
NFC: Add tx skb allocation routine
This is a factorization of the current rawsock tx skb allocation routine,
as it will be used by the LLCP code.
We also rename nfc_alloc_skb to nfc_alloc_recv_skb for consistency sake.
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Samuel Ortiz [Wed, 14 Dec 2011 15:43:05 +0000 (16:43 +0100)]
NFC: Add function name to the NFC pr_fmt() routine
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Wed, 14 Dec 2011 15:28:41 +0000 (16:28 +0100)]
rt2x00: Make use of ieee80211_free_txskb in tx path
ieee80211_free_txskb should be used when dropping a frame in the device
rx path such that mac80211 knows about this frame being dropped.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Simon Wunderlich [Wed, 14 Dec 2011 12:33:30 +0000 (13:33 +0100)]
mac80211: free skb on error path of ieee80211_ibss_join()
Our new return also created a memleak. The skb should be freed before
returning an error.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Wed, 14 Dec 2011 04:43:17 +0000 (20:43 -0800)]
mwifiex: remove cfg_workqueue
cfg_workqueue was added to notify cfg80211 that scan, connect
or disconnect is done by calling respective completion handlers.
We can avoid use of this workqueue by calling those handlers
from other places.
1) Call connect, disconnect completion handlers in their callback
functions.
ex. Call cfg80211_connect_result() in mwifiex_cfg80211_connect()
2) Call scan completion handler after parsing response of last scan
command in a queue.
After removing the workqueue, variables (assoc_request etc.) and
checks used for mutual exclusion become redundant. Those are also
removed in this patch.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@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>
Johannes Berg [Tue, 13 Dec 2011 16:22:05 +0000 (17:22 +0100)]
nl80211: accept testmode dump with netdev
All nl80211 commands that need only the wiphy
still allow identifying it by giving an interface
index, except, as Kenny pointed out, the testmode
dump support.
Fix this by looking up the wiphy via the ifidx in
this case as well.
Tested-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 14 Dec 2011 19:35:41 +0000 (14:35 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless
Conflicts:
drivers/net/wireless/iwlwifi/iwl-agn.c
Wey-Yi Guy [Wed, 14 Dec 2011 16:22:36 +0000 (08:22 -0800)]
iwlwifi: allow to switch to HT40 if not associated
My previous patch
34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure
HT40 after associated
Fix the case of HT40 after association on specified AP, but it break the
association for some APs and cause not able to establish connection.
We need to address HT40 before and after addociation.
CC: stable@vger.kernel.org #3.0+
Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 14 Dec 2011 16:22:35 +0000 (08:22 -0800)]
iwlwifi: tx_sync only on PAN context
Ted reported that he couldn't connect to some APs
and bisected it to the tx_sync implementation.
Disable it for the BSS context to fix this issue.
Reported-by: Ted Ts'o <tytso@mit.edu>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Wed, 14 Dec 2011 04:43:16 +0000 (20:43 -0800)]
mwifiex: avoid double list_del in command cancel path
Command cancel path cancels the current command and moves
it to free command queue. While doing that it deletes the
command entry from the pending list. This is not correct
as the entry has been already deleted from the pending
list at 'mwifiex_exec_next_cmd'. Fixing it.
Also making sure the stale command pointer is cleaned and
unaccessible for later use.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 14 Dec 2011 14:03:52 +0000 (09:03 -0500)]
b43: avoid calling bcma_* if CONFIG_B43_BCMA is not set
Avoids this:
ERROR: "bcma_chipco_pll_write" [drivers/net/wireless/b43/b43.ko] undefined!
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Tue, 13 Dec 2011 03:56:58 +0000 (19:56 -0800)]
mwifiex: do not advertise custom regulatory domain capability
mwifiex driver no longer supports it's own custom regulatory rules,
but custom regulatory domain capability is still advertised during
wiphy registration by the driver.
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>
Arend van Spriel [Mon, 12 Dec 2011 23:15:12 +0000 (15:15 -0800)]
brcm80211: smac: register with bcma for specific 802.11 core revisions
The brcmsmac driver has been verified on chipsets that were supported
when it was a pci device driver, ie. bcm4313, bcm43224, and bcm43225.
This patch restricts the driver to 802.11 core revisions that are found
in these chipsets.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:11 +0000 (15:15 -0800)]
brcm80211: smac: cleanup buscore handling in aiutils.c
Instead of storing the buscore information now the BCMA core device
is kept for quick reference in si_info structure.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:10 +0000 (15:15 -0800)]
brcm80211: smac: cleanup si_info structure definition
Number of fields are no longer needed as the BCMA provides it
or makes them redundant. These have been removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:09 +0000 (15:15 -0800)]
brcm80211: smac: remove mapped core related function from aiutils.c
In aiutils.c the selected core was maintained by its index number. This
is obsolete using BCMA functions so several functions using that index
have been removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:08 +0000 (15:15 -0800)]
brcm80211: smac: remove ai_switch_core() function
The function ai_switch_core() is no longer needed and its counterpart
ai_restore_core() as well, because interrupts disabling is not needed
anymore.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:07 +0000 (15:15 -0800)]
brcm80211: smac: remove interrupt disable callback functionality
There is no need to interrupt disable/enable functionality any
longer due to BCMA usage assures the correct core is accessed
in any context.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:06 +0000 (15:15 -0800)]
brcm80211: smac: INTROFF/INTRESTORE macros removed
The macros were used to assure that the correct core was accessed in
the ISR, but register access is now done giving the explicit core so
no need to change interrupt state.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:05 +0000 (15:15 -0800)]
brcm80211: smac: remove empty or unused functions from pmu.c
A number of functions in pmu.c are not used or adding no functionality
at all. These have been removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:04 +0000 (15:15 -0800)]
brcm80211: smac: remove register access macro definitions
The register access macros like R_REG/W_REG/etc. are no longer
needed as the driver uses the BCMA provided functions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:03 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in aiutils.c
The code in aiutils.c now uses the BCMA function for control the
registers in the device cores.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:02 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in pmu.c
The code in pmu.c now uses the functions provided by BCMA to
access the core registers.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:01 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access function in srom.c
The code in srom.c now uses the core access function provided by
BCMA so no need to pass __iomem pointer any longer.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:15:00 +0000 (15:15 -0800)]
brcm80211: smac: use bcma core access functions in otp.c
The code in otp.c now uses the bcma core access functions to
read the OTP information from the device.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Mon, 12 Dec 2011 23:14:59 +0000 (15:14 -0800)]
brcm80211: smac: change ai_findcoreidx() to ai_findcore()
Instead of returning the core index the function now returns
the bcma device for the requested core id. This function is
now exposed in the header file.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 12 Dec 2011 22:40:22 +0000 (23:40 +0100)]
b43: N-PHY: update TX power fix
Specs were updated.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 12 Dec 2011 20:38:36 +0000 (21:38 +0100)]
b43: N-PHY: workaround broken auto-increment on BCM43224
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 12 Dec 2011 20:38:35 +0000 (21:38 +0100)]
b43: N-PHY: fix 32-bit reads of tables
The order is different than on older PHYs.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 12 Dec 2011 20:33:12 +0000 (21:33 +0100)]
bcma: extract revision and TX power IDs from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Mon, 12 Dec 2011 13:30:04 +0000 (15:30 +0200)]
mac80211: don't check sdata_running in vif notifier
The ip address of the vif can be set even before the
vif is up. requiring the vif to be up in the vif
notifier makes the notifer ignore this event, which
causes wrong arp filter configuration later on.
Reported-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Mon, 12 Dec 2011 12:10:49 +0000 (14:10 +0200)]
mac80211: configure BSS_CHANGED_ARP_FILTER on reconfiguration
Configure arp filtering on sta reconfiguration.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dmitry TARNYAGIN [Mon, 12 Dec 2011 11:58:43 +0000 (12:58 +0100)]
mac80211: Do not request FIF_BCN_PRBRESP_PROMISC for HW scan.
ieee80211_configure_filter code used local->scanning as a boolean
value when it was a bit mask. Bits SCAN_COMPLETED, SCAN_ABORTED
should not set FIF_BCN_PRBRESP_PROMISC filter.
SCAN_HW_SCANNING should not set FIF_BCN_PRBRESP_PROMISC either,
as there is no explicit filter configuration request from
scan code. If a driver requires FIF_BCN_PRBRESP_PROMISC mode
during HW scanning, it's up to the driver to temporary enable it.
Similar mistake was fixed also in ieee80211_hw_config (power
configuration code).
Verified-by: Vitaly Wool <vitaly.wool@sonyericsson.com>
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Mon, 12 Dec 2011 11:43:24 +0000 (12:43 +0100)]
rtlwifi: merge ips,lps spinlocks into one mutex
With previous patch "rtlwifi: use work for lps" we can now use mutex for
protecting ps mode changing critical sections. This fixes running system
with interrupts disabled for long time.
Merge ips_lock and lps_lock as they seems to protect the same data
structures (accessed in rtl_ps_set_rf_state() function).
Reported-by: Philipp Dreimann <philipp@dreimann.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mike McCormack <mikem@ring3k.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Mon, 12 Dec 2011 11:43:23 +0000 (12:43 +0100)]
rtlwifi: use work for lps
Leaving leisure power save mode can take some time, so it's better to
perform that action in process context with interrupts enabled. This
patch changes lps_leave tasklet to work.
Reported-by: Philipp Dreimann <philipp@dreimann.net>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Mike McCormack <mikem@ring3k.org>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 12:16:51 +0000 (13:16 +0100)]
b43: N-PHY: implement spurious tone avoidance
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:34 +0000 (02:55 +0100)]
b43: N-PHY: finish 2.4GHz 0x2056 radio setup
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:33 +0000 (02:55 +0100)]
b43: N-PHY: determine various PHY params
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:32 +0000 (02:55 +0100)]
b43: N-PHY: add table for antenna software control
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:31 +0000 (02:55 +0100)]
b43: N-PHY: workaround BCM43224 hw bug in writing table id 9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:30 +0000 (02:55 +0100)]
b43: N-PHY: update some init values
Changes were obtained from MMIO dump from 5.100.82.112.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sun, 11 Dec 2011 01:55:29 +0000 (02:55 +0100)]
b43: N-PHY: random trivial fixes for typos, missing writes
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Sat, 10 Dec 2011 21:11:19 +0000 (22:11 +0100)]
ath9k: make two mci related functions static
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 9 Dec 2011 21:16:07 +0000 (22:16 +0100)]
bcma: support for suspend and resume
bcma used to lock up machine without enabling PCI or initializing CC.
Cc: stable@vger.kernel.org
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Avinash Patil [Fri, 9 Dec 2011 04:41:05 +0000 (20:41 -0800)]
mwifiex: wakeup and stop multiple tx queues in net_device
replace single queue function calls with equivalent multiple queue
functions. Wakeup queue and stop queue calls are guarded by spin lock.
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>
Avinash Patil [Fri, 9 Dec 2011 04:41:04 +0000 (20:41 -0800)]
mwifiex: proper cleanup when RX multiport aggregation fails
Free SKBs allocated during multiport aggrgation setup when RX
multiport aggregation fails in the middle. With this handling
freeing SKB in mwifiex_process_int_status() for failure case
is removed.
Also handles single RX transaction failure.
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>
Amitkumar Karwar [Fri, 9 Dec 2011 04:41:03 +0000 (20:41 -0800)]
mwifiex: failure case handling for PCIe events
Event buffers for PCIe interface are allocated during driver
initialisation, and respective physical addresses are sent to FW
in *_PCIE_DESC_DETAILS command so that FW can do DMA. These buffers
will be freed while unloading the driver. Therefore we should not
free them in event handling error path. Also we should skip next
pending events in failure case.
Also fixed 'returning -1 instead of -ENOMEM is sloppy' warnings.
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>
Arend van Spriel [Thu, 8 Dec 2011 23:06:59 +0000 (15:06 -0800)]
brcm80211: smac: use bcma core access functions in nicpci.c
Code in nicpci.c now uses the PCI(E) core as provided by the BCMA
bus driver to configure that core.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:58 +0000 (15:06 -0800)]
brcm80211: smac: use bcma core control functions
BCMA provides functions to control the state of the cores so
using that and remove similar implementation from the driver.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:57 +0000 (15:06 -0800)]
brcm80211: smac: remove unused functions and/or prototypes
Several functions provided by aiutils.c are not used in brcmsmac
driver and have been removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:56 +0000 (15:06 -0800)]
brcm80211: smac: replace ai_corereg() function with ai_cc_reg()
The ai_corereg() function is only used in the driver to safely
access the chipcommon core. The function has been renamed to
ai_cc_reg() removing the need to provide a core index parameter.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:55 +0000 (15:06 -0800)]
brcm80211: smac: remove SI_FAST() macro usage
The use of SI_FAST() macro interferes with the BCMA integration as
it causes BCMA and aiutils.c to get out of sync on what the current
core is. When everything is using BCMA we will try to add SI_FAST
functionality to BCMA to avoid unnecessary core switching.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:54 +0000 (15:06 -0800)]
brcm80211: smac: use bcma functions for register access in phy code
This adds the use of bcma functions to access the registers within
the phy source code.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:53 +0000 (15:06 -0800)]
brcm80211: smac: use bcma function for register access in dma.c
The dma.c source file now uses the register access functions
provided by bcma.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:52 +0000 (15:06 -0800)]
brcm80211: smac: use DMA-API calls for descriptor allocations
Using BCMA hides the specifics about the host interface. The
driver is now using the DMA-API to do dma related calls. BCMA
provides the device object to use in the DMA-API calls.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:51 +0000 (15:06 -0800)]
brcm80211: smac: use bcma core register access functions for 802.11 core
The driver now uses the bcma register access functions to read and
write the registers on the 802.11 core. The dma and phy code need
to be modified next and access to the other cores. That will be done
in coming patches.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:50 +0000 (15:06 -0800)]
brcm80211: smac: remove enumeration rom parsing function
The core enumeration rom is already parsed by the bcma bus driver and
there is no need to repeat the exercise. The ai_scan() function still
exists but is targetted for removal as well.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:49 +0000 (15:06 -0800)]
brcm80211: smac: change ai_attach interface taking a bcma_bus object
The ai_attach now takes a bcma_bus object as its parameter to
obtain all required information needed for chip control.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:48 +0000 (15:06 -0800)]
brcm80211: smac: rename struct si_info field pbus to pcibus
When moving to bcma usage there are two busses in play. The pci bus
connecting the device to the host and the bcma bus connecting the
cores in the device. To distinguish this the attribute pbus has been
renamed to a more explicit name, ie. pcibus.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:47 +0000 (15:06 -0800)]
brcm80211: smac: change attach interfaces in main.c for bcma support
The driver is probed through bcma which provides a device representing
the core. This device is now passed in brcms_c_attach and brcms_b_attach
functions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:46 +0000 (15:06 -0800)]
brcm80211: smac: change from pci device driver to bcma device driver
A new bus driver called "bcma" has been introduced into the kernel tree
which considers the Broadcom AMBA chip interconnect as a bus. Each core in
the chip is a bcma device. This commit changes brcms_mac80211.c into
a bcma device driver.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:45 +0000 (15:06 -0800)]
brcm80211: smac: use inline access functions for struct si_pub fields
Instead of directly accessing the fields in struct si_pub the driver
now uses inline access functions. This is in preparation of the bcma
integration as a lot of information will be provided by bcma module.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:44 +0000 (15:06 -0800)]
brcm80211: smac: move fields from struct si_pub to struct si_info
The structure si_pub contained couple of fields that were only
used internally in aiutils.c. These have been moved to the
si_info structure.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:43 +0000 (15:06 -0800)]
brcm80211: smac: remove unused fields from struct si_pub definition
Several fields from the si_pub structure were not used or only set
once but never checked. These fields have been removed.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:42 +0000 (15:06 -0800)]
bcma: use static keyword for inline function declaration in bcma.h
Just scratching an itch here, but it makes more sense to use the
static keyword if you think about how the compiler treats inline
functions.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Arend van Spriel [Thu, 8 Dec 2011 23:06:41 +0000 (15:06 -0800)]
bcma: add set/mask macros for 16-bit register access
The BCMA header only had definitions for 32-bit register access. Used
those as a template for the 16-bit flavour. Also changed them to inline
functions to be on the safe side. As offset parameter is used twice there
would be a problem when used like this: bcma_set32(core, offset++, val);
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Thu, 8 Dec 2011 23:06:40 +0000 (15:06 -0800)]
brcm80211: fmac: remove drive strength code for unsupported chips
bcm4325 and bcm4336 are not supported by brcmfmac. Remove the
drive strength setting code specific for these chips.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Thu, 8 Dec 2011 23:06:39 +0000 (15:06 -0800)]
brcm80211: fmac: add bcm4330 support
This patch adds support for bcm4330 chip which has a SDIO device
id 0x4330. All basic functionalities of bcm4330 are supported by
brcmfmac after this patch.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Thu, 8 Dec 2011 23:06:38 +0000 (15:06 -0800)]
brcm80211: fmac: fix firmware shared structures version
Some shared structures in fullmac have a wrong combination of
version number and declarations. This patch fixes it by upgrading
them to the latest version. This allows brcmfmac to support new
firmwares with new features.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Franky Lin [Thu, 8 Dec 2011 23:06:37 +0000 (15:06 -0800)]
brcm80211: fmac: save bus interface structure in function 2 device
bus interface was stored in sdio card device. The device pointer
is used as parameter of interface functions between common layer
and bus layer to make the function declaration generic for different
bus type. But the card device is a parent device layer for SDIO
function devices. It doesn't contain all contexts needed by udev.
This patch moves the shared structure to private driver data pointer
of SDIO function 2 device which is more appopriate for net device
and cfg80211 registration.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 8 Dec 2011 18:29:26 +0000 (23:59 +0530)]
cfg80211: notify core hints that helps to restore regd settings
Regulatory updates set by CORE are ignored for custom regulatory cards.
Let us notify the changes to the driver, as some drivers uses core hint
to restore its orig_* reg domain setting.
Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Thu, 8 Dec 2011 18:29:25 +0000 (23:59 +0530)]
ath9k: Reconfigure tx power on regulatory update
Whenever the regulatory got updated by country IE for the world
roaming cards, need to reconfigure the tx power immediately to
increase the power level.
Reviewed-by: Sam Leffler <sleffler@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 8 Dec 2011 18:29:24 +0000 (23:59 +0530)]
ath: optimize processing of CTLs for country IEs for world roaming cards
When we receive a country IE hint and we have a world roaming card
we can optimize output power further by ensuring that we use the
calibrated data for the country by using that country's own CTL data.
That is -- when world roaming and when we process a country IE we
no longer need to use the lowest output power of all CTLs instead
we use an optimized CTL output power for that specific country.
We accomplish this by copying the regulatory data prior on init
and restoring it when cfg80211 tells us it gets a core hint. Core
hints are only sent on init and when it wants to restore reguulatory
settings. We take advantage of this fact and apply the cached
regulatory data when we get a core hint. When we get a country IE
hint though we process the regulatory data as if programmed for
a specific country.
Tested-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Thu, 8 Dec 2011 18:29:23 +0000 (23:59 +0530)]
ath: add a helper for processing reg data on init
This has no functional change. The helper can be used later
for other things like country IE changes and following the CTL
for different countries.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 8 Dec 2011 17:02:22 +0000 (18:02 +0100)]
bcma: extract FEM info from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 8 Dec 2011 17:02:21 +0000 (18:02 +0100)]
ssb: extract FEM info from SPROM
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Dec 2011 12:11:55 +0000 (13:11 +0100)]
mac80211: Make use of ieee80211_is_* functions in tx status path
Use ieee80211_is_data, ieee80211_is_mgmt and ieee80211_is_first_frag
in the tx status path. This makes the code easier to read and allows us
to remove two local variables: frag and type.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 8 Dec 2011 12:11:54 +0000 (13:11 +0100)]
ieee80211: Introduce ieee80211_is_first_frag
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Thu, 8 Dec 2011 09:26:15 +0000 (14:56 +0530)]
mac80211: Purge A-MPDU TX queues before station destructions
When a station leaves suddenly while ampdu traffic to that station is still
running, there is a possibility that the ampdu pending queues are not freed due
to a race condition leading to memory leaks. In '__sta_info_destroy' when we
attempt to destroy the ampdu sessions in 'ieee80211_sta_tear_down_BA_sessions',
the driver calls 'ieee80211_stop_tx_ba_cb_irqsafe' to delete the ampdu
structures (tid_tx) and splice the pending queues and this job gets queued in
sdata workqueue. However, the sta entry can get destroyed before the above work
gets scheduled and hence the race.
Purging the queues and freeing the tid_tx to avoid the leak. The better solution
would be to fix the race, but that can be taken up in a separate patch.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vasanthakumar Thiagarajan [Thu, 8 Dec 2011 08:58:47 +0000 (14:28 +0530)]
cfg80211: Fix race in bss timeout
It is quite possible to run into a race in bss timeout where
the drivers see the bss entry just before notifying cfg80211
of a roaming event but it got timed out by the time rdev->event_work
got scehduled from cfg80211_wq. This would result in the following
WARN-ON() along with the failure to notify the user space of
the roaming. The other situation which is happening with ath6kl
that runs into issue is when the driver reports roam to same AP
event where the AP bss entry already got expired. To fix this,
move cfg80211_get_bss() from __cfg80211_roamed() to cfg80211_roamed().
[158645.538384] WARNING: at net/wireless/sme.c:586
__cfg80211_roamed+0xc2/0x1b1()
[158645.538810] Call Trace:
[158645.538838] [<
c1033527>] warn_slowpath_common+0x65/0x7a
[158645.538917] [<
c14cfacf>] ? __cfg80211_roamed+0xc2/0x1b1
[158645.538946] [<
c103354b>] warn_slowpath_null+0xf/0x13
[158645.539055] [<
c14cfacf>] __cfg80211_roamed+0xc2/0x1b1
[158645.539086] [<
c14beb5b>] cfg80211_process_rdev_events+0x153/0x1cc
[158645.539166] [<
c14bd57b>] cfg80211_event_work+0x26/0x36
[158645.539195] [<
c10482ae>] process_one_work+0x219/0x38b
[158645.539273] [<
c14bd555>] ? wiphy_new+0x419/0x419
[158645.539301] [<
c10486cb>] worker_thread+0xf6/0x1bf
[158645.539379] [<
c10485d5>] ? rescuer_thread+0x1b5/0x1b5
[158645.539407] [<
c104b3e2>] kthread+0x62/0x67
[158645.539484] [<
c104b380>] ? __init_kthread_worker+0x42/0x42
[158645.539514] [<
c151309a>] kernel_thread_helper+0x6/0xd
Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Thu, 8 Dec 2011 06:49:03 +0000 (09:49 +0300)]
mac80211: unlock on error path in ieee80211_ibss_join()
We recently introduced a new return here but it needs an unlock first.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>