platform/kernel/linux-3.10.git
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
Wey-Yi Guy [Fri, 2 Dec 2011 16:20:01 +0000 (08:20 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into wireless-next

12 years agoath9k_hw: add default chainmask for AR9462
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 15:40:52 +0000 (21:10 +0530)]
ath9k_hw: add default chainmask for AR9462

the default tx/rx chainmask for AR9462 is 0x3.
this patch helps to assign 0x3 rather than 0x7 for
AR9462 with the help of fix_chainmask module if something
goes wrong in reading tx/rx chain mask from OTP/EEPROM
card(though its very unlikely)

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix TX IQ calibration for AR9003
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 15:31:31 +0000 (21:01 +0530)]
ath9k_hw: Fix TX IQ calibration for AR9003

only for AR9485 (or) later chipsets TxIQ calibration
runs as part of AGC calibration. without this patch
TX IQ cal completion i.e. ar9003_hw_tx_iq_cal_run won't be executed
for AR9003

Reviewed-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: pn533: Staticise pn533_data_exchange()
Axel Lin [Wed, 30 Nov 2011 10:18:06 +0000 (18:18 +0800)]
NFC: pn533: Staticise pn533_data_exchange()

It is not used outside this driver so no need to make the symbol global.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: small memory leak on error
Dan Carpenter [Wed, 30 Nov 2011 08:49:38 +0000 (11:49 +0300)]
brcm80211: fmac: small memory leak on error

We should free "bus_if" here, it's a small leak but it makes the static
checkers happy.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: minor cleanup
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 08:48:38 +0000 (14:18 +0530)]
ath9k: minor cleanup

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix a typo
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:29 +0000 (10:41 +0530)]
ath9k: fix a typo

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: MCI state machine based on MCI interrupt
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:28 +0000 (10:41 +0530)]
ath9k: MCI state machine based on MCI interrupt

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add MCI related changes in chip reset
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:27 +0000 (10:41 +0530)]
ath9k_hw: Add MCI related changes in chip reset

here we check for BT state and if BT calibration has started,
give 25ms for BT Calibration to finish. we also take care of 2G/5G
switch and LNA transfer incase WLAN is operating in 5G. in case the BT
state is awake when we do WLAN calibration re-calibrate and we reset
the message exchange between WLAN and BT. BT is given preference when
simultaneous CAL request happens. calibration for WLAN/BT is done
assuming that the other co-existing module is in awake state, if not
we continue to do calibration while if the other module's state changes
we need to do restart the calibration handshake

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add support for MCI WLAN calibration
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:26 +0000 (10:41 +0530)]
ath9k_hw: Add support for MCI WLAN calibration

WLAN communicates with BT for its calibration by sending WLAN_CAL_REQ,
waits for BT_CAL_GRANT. This is done with the help of GPM messages.
also WLAN_CAL_DONE messages is sent once WLAN calibration is done.

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: MCI related changes in set_reset_reg
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:25 +0000 (10:41 +0530)]
ath9k_hw: MCI related changes in set_reset_reg

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: MCI related changes in chip management
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:24 +0000 (10:41 +0530)]
ath9k_hw: MCI related changes in chip management

send halt BT GPM if the chip is in network sleep and BT state
is awake

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add functions to allocate/free buffers for MCI
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:23 +0000 (10:41 +0530)]
ath9k: Add functions to allocate/free buffers for MCI

required buffers and dma allocation is done for GPM and SCHED
messages

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: add MCI specific definitions and structures
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:22 +0000 (10:41 +0530)]
ath9k: add MCI specific definitions and structures

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: check for MCI interrupt in get_isr
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:21 +0000 (10:41 +0530)]
ath9k_hw: check for MCI interrupt in get_isr

check for the condition of MCI interrupt being triggered and
appropriately obtain the values of MCI_INTERRUPT_RX_MSG_RAW and
MCI_INTERRUPT_RAW

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: check for asynchronous MCI interrupt pending
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:20 +0000 (10:41 +0530)]
ath9k_hw: check for asynchronous MCI interrupt pending

MCI interrupt is an asynchronous one, so take care of it by having a
check in ath9k_hw_intrpend, which actually decides whether the interrupt
is really for the driver from ath_isr

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: take care of enabling MCI interrupts
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:19 +0000 (10:41 +0530)]
ath9k_hw: take care of enabling MCI interrupts

enable MCI interrupt when ath9k_hw_enable_interrupts is called,
like during the completion of chip_reset before which the interrupts
are disabled

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Add MCI interrupt to interrupt mask
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:18 +0000 (10:41 +0530)]
ath9k: Add MCI interrupt to interrupt mask

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add MCI h/w code and state machine
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:17 +0000 (10:41 +0530)]
ath9k_hw: Add MCI h/w code and state machine

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: initialize MCI parameters
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:16 +0000 (10:41 +0530)]
ath9k_hw: initialize MCI parameters

these parameter will be utilized and modified in the MCI hardware codes
state machine

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add MCI h/w specific structure
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:15 +0000 (10:41 +0530)]
ath9k_hw: Add MCI h/w specific structure

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add GPIO output MUX related macros
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:14 +0000 (10:41 +0530)]
ath9k_hw: add GPIO output MUX related macros

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add definitions to support MCI h/w code
Mohammed Shafi Shajakhan [Wed, 30 Nov 2011 05:11:13 +0000 (10:41 +0530)]
ath9k_hw: add definitions to support MCI h/w code

these definitions will be used by MCI state machine and the corresponding
hardware code

Cc: Wilson Tsao <wtsao@qca.qualcomm.com>
Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonfc: Remove function tracer like entry messages
Joe Perches [Tue, 29 Nov 2011 19:37:35 +0000 (11:37 -0800)]
nfc: Remove function tracer like entry messages

Logging messages that mimic function tracer enter/exit
aren't necessary.  Just remove them.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonfc: Remove unused nfc_printk and nfc_<level> macros
Joe Perches [Tue, 29 Nov 2011 19:37:34 +0000 (11:37 -0800)]
nfc: Remove unused nfc_printk and nfc_<level> macros

All uses have been removed, so killing what's not necessary.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonfc: Convert nfc_dbg to pr_debug
Joe Perches [Tue, 29 Nov 2011 19:37:33 +0000 (11:37 -0800)]
nfc: Convert nfc_dbg to pr_debug

Using the standard debugging mechanisms is better than
subsystem specific ones when the subsystem doesn't use
a specific struct.

Coalesce long formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonfc: Use standard logging styles
Joe Perches [Tue, 29 Nov 2011 19:37:32 +0000 (11:37 -0800)]
nfc: Use standard logging styles

Using the normal logging styles is preferred over
subsystem specific styles when the subsystem does
not take a specific struct.

Convert nfc_<level> specific messages to pr_<level>
Add newlines to uses.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoprism54: remove private driver ioctls
Luis R. Rodriguez [Tue, 29 Nov 2011 17:40:16 +0000 (12:40 -0500)]
prism54: remove private driver ioctls

As of hostap_0_7_1~358 the CONFIG_DRIVER_PRISM54
was removed from upstream wpa_supplicant/hostapd so
lets just kill the useless old prism54 private ioctl
crap.

Cc: Jouni Malinen <j@w1.fi>
Cc: David Miller <davem@davemloft.net>
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: change the default antenna settings based on diversity
Mohammed Shafi Shajakhan [Tue, 29 Nov 2011 15:00:35 +0000 (20:30 +0530)]
ath9k: change the default antenna settings based on diversity

change the AR_DEF_ANTENNA register settings i.e setting default antenna
setting only for antenna diversity enabled chipsets. no point in
doing this for MIMO chipsets

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix LED GPIO pin for AR9462
Mohammed Shafi Shajakhan [Tue, 29 Nov 2011 14:36:15 +0000 (20:06 +0530)]
ath9k: Fix LED GPIO pin for AR9462

GPIO pin 4 is assigned AR9462 chipsets LED.
while GPIO pin 0 worked for obselete AR9462 chipsets though
they are meant for EEPROM as per Russell

Cc: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: Russell Hu <rhu@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove unused function declaration
Mohammed Shafi Shajakhan [Tue, 29 Nov 2011 13:51:53 +0000 (19:21 +0530)]
mac80211: remove unused function declaration

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: revert on-channel work optimisations
Johannes Berg [Tue, 29 Nov 2011 09:20:02 +0000 (10:20 +0100)]
mac80211: revert on-channel work optimisations

The on-channel work optimisations have caused a
number of issues, and the code is unfortunately
very complex and almost impossible to follow.
Instead of attempting to put in more workarounds
let's just remove those optimisations, we can
work on them again later, after we change the
whole auth/assoc design.

This should fix rate_control_send_low() warnings,
see RH bug 731365.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: fix usage of set tx power
Luis R. Rodriguez [Mon, 28 Nov 2011 21:38:50 +0000 (16:38 -0500)]
mwifiex: fix usage of set tx power

mBm is passed but dBm was assumed...

Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: avoid code duplication on set tx power
Luis R. Rodriguez [Mon, 28 Nov 2011 21:38:49 +0000 (16:38 -0500)]
brcm80211: avoid code duplication on set tx power

Both cases are doing the same so treat the switch cases
for both as an "or".

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fix usage of set tx power
Luis R. Rodriguez [Mon, 28 Nov 2011 21:38:48 +0000 (16:38 -0500)]
brcm80211: fix usage of set tx power

mBm is passed but dBm was assumed...

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: clarify set tx power mBm documentation
Luis R. Rodriguez [Mon, 28 Nov 2011 21:38:46 +0000 (16:38 -0500)]
cfg80211: clarify set tx power mBm documentation

Tons of drivers missed that we use mBm and not dBm...

Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonet: rfkill: convert net/rfkill/* to use module_platform_driver()
Axel Lin [Mon, 28 Nov 2011 09:15:04 +0000 (17:15 +0800)]
net: rfkill: convert net/rfkill/* to use module_platform_driver()

This patch converts the drivers in net/rfkill/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Antonio Ospite <ospite@studenti.unina.it>
Cc: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: help to debug AGG SM inconsistencies
Emmanuel Grumbach [Fri, 25 Nov 2011 19:11:48 +0000 (11:11 -0800)]
iwlwifi: help to debug AGG SM inconsistencies

Add more data when inconsistencies occur in the AGG state machine.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: show the configuration option
Wey-Yi Guy [Fri, 25 Nov 2011 19:11:47 +0000 (11:11 -0800)]
iwlwifi: show the configuration option

Not sure it is the best way to do it, but many times we want to know what the
configuration options were enabled for the compiled driver.
Let's just log the options during load time; so there were be no confusion.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: show command string for REPLY_D3_CONFIG
Wey-Yi Guy [Fri, 25 Nov 2011 19:11:46 +0000 (11:11 -0800)]
iwlwifi: show command string for REPLY_D3_CONFIG

missing the string, add it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: allow up to uCode API 6 for 6000 devices
Johannes Berg [Fri, 25 Nov 2011 19:11:45 +0000 (11:11 -0800)]
iwlagn: allow up to uCode API 6 for 6000 devices

Since the uCode hasn't been released (yet?),
warn only if using older than API 4, but load
anything up to API 6.

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>
12 years agoiwlagn: dynamically allocate & reflect calibration data
Johannes Berg [Fri, 25 Nov 2011 19:11:44 +0000 (11:11 -0800)]
iwlagn: dynamically allocate & reflect calibration data

This makes handling the calibration data more generic
and no longer requires updating IWL_CALIB_MAX when a
new uCode comes with more calibration packets. Since
we just copy the data back, there's also no need for
understanding which calibration we received -- we can
just reflect it back to the runtime uCode.

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>
12 years agoiwlagn: remove calibration knowledge
Johannes Berg [Fri, 25 Nov 2011 19:11:43 +0000 (11:11 -0800)]
iwlagn: remove calibration knowledge

The init microcode knows very well which calibrations
are required and sends us results for those that are.
Consequently, we can just send all of those to the RT
uCode again.

The problem with having the driver know about this is
that it is a uCode feature, not a hardware feature so
the config is completely unsuitable.

The only thing we need to check is whether the device
needs crystal calibration or not, add a new parameter
to the configuration for that.

This makes new uCode work on 6000 series devices.

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>
12 years agoiwlwifi: add tm commands for indirect register access
Hsu, Kenny [Fri, 25 Nov 2011 19:11:42 +0000 (11:11 -0800)]
iwlwifi: add tm commands for indirect register access

Create new testmode commands to suppot indirect access
of peripheral register.
- IWL_TM_CMD_APP2DEV_INDIRECT_REG_READ32
- IWL_TM_CMD_APP2DEV_INDIRECT_REG_WRITE32

Meanwhile, add affix "DIRECT" into original register access
commands for better discrimination with new commands.
- IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32
- IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE32
- IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8

Signed-off-by: Kenny Hsu <kenny.hsu@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Optimize ath5k_cw_validate
Nick Kossifidis [Fri, 25 Nov 2011 18:40:31 +0000 (20:40 +0200)]
ath5k: Optimize ath5k_cw_validate

Optimize ath5k_cw_validate by using the classic (X & (X - 1)) == 0
check to see if a number is power of 2.

v2: Use functions from log2.h instead

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Renumber hw queue ids
Nick Kossifidis [Fri, 25 Nov 2011 18:40:30 +0000 (20:40 +0200)]
ath5k: Renumber hw queue ids

According to documentation higher DCUs have higher priority and should
be used for beacons and CAB traffic. More specifically DCU 9 should be
used for beacons and DCU 8 for CAB traffic, I assumed DCU 7 should be
OK for UAPSD traffic.

Note that DCU 8 and 9 are special because they can only be mapped to a single
QCU each but since we use a 1:1 mapping between QCUs and DCUs anyway we don't
have to change much.

P.S. I also did a few related cleanups on qcu.c and ath5k.h

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: ath5k_ani_period_restart only touches struct ath5k_ani_state
Nick Kossifidis [Fri, 25 Nov 2011 18:40:29 +0000 (20:40 +0200)]
ath5k: ath5k_ani_period_restart only touches struct ath5k_ani_state

No need to take ath5k_hw as an argument.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: MRR support and 2GHz radio override belong in ah_capabilities
Nick Kossifidis [Fri, 25 Nov 2011 18:40:28 +0000 (20:40 +0200)]
ath5k: MRR support and 2GHz radio override belong in ah_capabilities

MRR support and 2GHz radio override belong in ah_capabilities and we
should use them (e.g. so far  we used to set mrr descriptor without
checking if MRR support is enabled + we checked for MRR support 2
times, one by trying to set up an MRR descriptor and another one based
on MAC version).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Add a module parameter to disable hw rf kill switch
Nick Kossifidis [Fri, 25 Nov 2011 18:40:27 +0000 (20:40 +0200)]
ath5k: Add a module parameter to disable hw rf kill switch

Add a module parameter to disable hw rf kill switch (GPIO interrupt) because
in some cases when the card doesn't come with the laptop, EEPROM configuration
doesn't match laptop's configuration and rf kill interrupt always fires up and
disables hw. I thought of moving this to debugfs and make it per-card but
this way it's easier for users and distros to handle.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: We always do full calibration on AR5210
Nick Kossifidis [Fri, 25 Nov 2011 18:40:26 +0000 (20:40 +0200)]
ath5k: We always do full calibration on AR5210

There is no short calibration on AR5210, make sure we treat it always
as full calibration.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Cleanups v2 + add kerneldoc on all hw functions
Nick Kossifidis [Fri, 25 Nov 2011 18:40:25 +0000 (20:40 +0200)]
ath5k: Cleanups v2 + add kerneldoc on all hw functions

No functional changes

Add kernel doc for all ath5k_hw_* functions and strcucts. Also do some cleanup,
rename ath5k_hw_init_beacon to ath5k_hw_init_beacon_timers, remove an unused
variable from ath5k_hw_pcu_init and a few obsolete macros, mostly related to XR.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Use usleep_range where possible
Nick Kossifidis [Fri, 25 Nov 2011 18:40:24 +0000 (20:40 +0200)]
ath5k: Use usleep_range where possible

Use usleep_range where possible to reduce busy waits

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Calibration re-work
Nick Kossifidis [Fri, 25 Nov 2011 18:40:23 +0000 (20:40 +0200)]
ath5k: Calibration re-work

Noise floor calibration does not interfere with traffic and should run more
often as part of our "short calibration". The full calibration is not the
noise floor calibration but the AGC + Gain_F (on RF5111 and RF5112) calibration
and should run less often because it does interfere with traffic.

So

Short calibration -> I/Q & NF Calibration
Long calibration -> Short + AGC + Gain_F

This patch was for some time on my pub/ dir on www.kernel.org and has been tested
by a few people and me. I think it's O.K. to go in.

I also changed ah_calibration to ah_iq_cal_needed to make more sense.

v2 Use a workqueue instead of a tasklet for calibration

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Cleanups v1
Nick Kossifidis [Fri, 25 Nov 2011 18:40:22 +0000 (20:40 +0200)]
ath5k: Cleanups v1

No functional changes, just a few comments/documentation/cleanup

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Add TXNOFRM to INT_TX_ALL
Nick Kossifidis [Fri, 25 Nov 2011 18:40:21 +0000 (20:40 +0200)]
ath5k: Add TXNOFRM to INT_TX_ALL

Add TXNOFRM to INT_TX_ALL since it's a TX interrupt too.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: Switch from read-and-clear to write-to-clear method when handling PISR/SISR...
Nick Kossifidis [Fri, 25 Nov 2011 18:40:20 +0000 (20:40 +0200)]
ath5k: Switch from read-and-clear to write-to-clear method when handling PISR/SISR registers

Since card has 12 tx queues and we want to keep track of the interrupts
per queue we can't fit all these interrupt bits on a single register.
So we have 5 registers, the primary interrupt status register (PISR) and
the 4 secondary interupt status registers (SISRs).

In order to be able to read them all at once (atomic operation) Atheros
introduced the Read-And-Clear registers to make things easier. So when
reading RAC_PISR register, hw does a read on PISR and all SISRs, returns
the value of PISR, copies all SISR values to their shadow copies (RAC_SISRx)
and clears PISR and SISRs. This saves us from reading PISR/SISRs in a sequence.

So far we 've used this approach and MadWiFi/Windows driver etc also used it
for years.

It turns out this operation is not atomic after all (at least not on all cards)
That means it's possible to loose some interrupts because they came after the
copy step and hw cleared them on the clean step !

That's probably the reason we got missed beacons, got stuck queues etc and
couldn't figure out what was going on.

With this patch we switch from RaC operation to an alternative method (that
makes more sense IMHO anyway, I just chose to be on the safe side so far).
Instead of reading RAC registers, we read the normal PISR/SISR registers and
clear any bits we got by writing them back on the register. This will clear only
the bits we got on our read step and leave any new bits unaffected (at least
that's what docs say). So if any new interrupts come up we won't miss it.

I've tested this with an AR5213 and an AR2425 and it seems O.K.

Many thanks to Adrian Chadd for debuging this and reviewing the patch !

v2: Make sure we don't clear PISR bits that map to SISR generated interrupts
(added a comment on the code for this)

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: remove tracing config symbol
Johannes Berg [Fri, 25 Nov 2011 12:31:53 +0000 (13:31 +0100)]
mac80211: remove tracing config symbol

There's little point in this config symbol, if
tracing is disabled the overhead is negligible
and if you think it's too bad you can always
turn off tracing completely.

Also remove the part where we don't have sparse
check the tracing code -- it seems that it can
now deal with it (or the code changed).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: clean up rx_h_mesh_fwding
Thomas Pedersen [Fri, 25 Nov 2011 01:15:26 +0000 (17:15 -0800)]
mac80211: clean up rx_h_mesh_fwding

Lose about two levels of unnecessary indentation.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: don't initiate path discovery when forwarding frame with unknown DA
Thomas Pedersen [Fri, 25 Nov 2011 01:15:25 +0000 (17:15 -0800)]
mac80211: don't initiate path discovery when forwarding frame with unknown DA

We used to initiate a path discovery when receiving a frame for which
there is no forwarding information. To cut down on PREQ spam, just send
a (gated) PERR in response.

Also separate path discovery logic from nexthop querying. This patch
means we no longer queue frames when forwarding, so kill the PERR TX
stuff in discard_frame().

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years ago{nl,cfg,mac}80211: implement dot11MeshHWMPperrMinInterval
Thomas Pedersen [Fri, 25 Nov 2011 01:15:24 +0000 (17:15 -0800)]
{nl,cfg,mac}80211: implement dot11MeshHWMPperrMinInterval

As per 802.11mb 13.9.11.3

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix forwarded mesh frame queue mapping
Thomas Pedersen [Fri, 25 Nov 2011 01:15:23 +0000 (17:15 -0800)]
mac80211: fix forwarded mesh frame queue mapping

We can't rely on ieee80211_select_queue() to do its job at this point
since the skb->protocol is not yet known. Instead, factor out and reuse
the queue mapping logic for injected frames.

Also, to mitigate congestion, forwarded frames should be dropped if the
outgoing queue was stopped.  This was not correctly implemented as we
were not checking the right queue.  Furthermore, we were dropping frames
that had arrived to their destination if that queue was stopped.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix switched HWMP frame addresses
Thomas Pedersen [Fri, 25 Nov 2011 01:15:22 +0000 (17:15 -0800)]
mac80211: fix switched HWMP frame addresses

HWMP originator and target addresses were switched on the air but also
on reception, which is why path selection still worked.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: failed forwarded mesh frame addressing
Thomas Pedersen [Fri, 25 Nov 2011 01:15:21 +0000 (17:15 -0800)]
mac80211: failed forwarded mesh frame addressing

Don't write the TA until next hop is actually known, since we might need
the original TA for sending a PERR. Previously we would send a PERR to
ourself if path resolution for a forwarded frame failed.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years ago{nl,cfg,mac}80211: Allow Setting Multicast Rate in Mesh
Chun-Yeow Yeoh [Fri, 25 Nov 2011 01:15:20 +0000 (17:15 -0800)]
{nl,cfg,mac}80211: Allow Setting Multicast Rate in Mesh

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agohostap_cs: add ID for Canon K30225
Veli-Pekka Peltola [Thu, 24 Nov 2011 19:35:28 +0000 (21:35 +0200)]
hostap_cs: add ID for Canon K30225

Signed-off-by: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Make __check_htcap_disable static.
Ben Greear [Thu, 24 Nov 2011 19:15:21 +0000 (11:15 -0800)]
mac80211: Make __check_htcap_disable static.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: Remove redundant spi driver bus initialization
Lars-Peter Clausen [Thu, 24 Nov 2011 15:29:20 +0000 (16:29 +0100)]
wireless: Remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_driver_register(),
so we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
struct spi_driver _driver = {
.driver = {
- .bus = &spi_bus_type,
},
};
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Dan Williams <dcbw@redhat.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Christian Lamparter <chunkeey@googlemail.com>
Cc: Luciano Coelho <coelho@ti.com>
Cc: libertas-dev@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: call skb_put() before copying the data (trivial)
Eliad Peller [Thu, 24 Nov 2011 14:50:00 +0000 (16:50 +0200)]
mac80211: call skb_put() before copying the data (trivial)

It doesn't have any actual effect here, but we should
skb_put() *before* copying the data.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix TX warning
Johannes Berg [Thu, 24 Nov 2011 13:47:36 +0000 (14:47 +0100)]
mac80211: fix TX warning

Emmanuel reported that my previous patches to enable
handing all fragments to drivers at once triggered
the warning that the SKB queue wasn't empty. This is
happening when we actually queue up some frames and
don't hand them to the driver (queues are stopped).

The reason for it is that my code that splices the
frame(s) over to the pending queue didn't re-init
the local queue, so skb_queue_empty() was false. Fix
this by using the _init versions of the splicing.

Also, convert the warning to WARN_ON_ONCE.

Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Tested-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode
Helmut Schaa [Thu, 24 Nov 2011 08:13:26 +0000 (09:13 +0100)]
rt2x00: Pass BlockAck and BlackAckReq frames to mac80211 in monitor mode

Previously BlockAcks were always dropped by the rt2800 hardware while
BlockAckReqs were always accepted. However, both are only useful on
monitor interfaces at the moment and both are control frames. So
pass them up when mac80211 sets FIF_CONTROL.

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>
12 years agortlwifi: Fix incorrect return of IRQ_HANDLED
Larry Finger [Thu, 24 Nov 2011 03:30:19 +0000 (21:30 -0600)]
rtlwifi: Fix incorrect return of IRQ_HANDLED

The recent discussion regarding an incorrect return of IRQ_HANDLED
from rt2800pci caused me to look at this PCI interrupt routine. I
discovered that changes were needed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: do not pass AP VLAN vif pointers to drivers
Felix Fietkau [Wed, 23 Nov 2011 14:09:49 +0000 (21:09 +0700)]
mac80211: do not pass AP VLAN vif pointers to drivers

This fixes frequent WARN_ONs when using AP VLAN + aggregation, as these vifs
are virtual and not registered with drivers.
Use sta_info_get_bss instead of sta_info_get in aggregation callbacks, so
that these callbacks can find the station entry when called with the AP vif.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: log reason and initiator when rx agg is stopped
Nikolay Martynov [Wed, 23 Nov 2011 02:50:30 +0000 (21:50 -0500)]
mac80211: log reason and initiator when rx agg is stopped

  Add additional debug logging of initiator and reason when rx
aggregation session is stopped

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: trivial: use WLAN_BACK_RECIPIENT instead of hardcoded 0
Nikolay Martynov [Wed, 23 Nov 2011 02:50:29 +0000 (21:50 -0500)]
mac80211: trivial: use WLAN_BACK_RECIPIENT instead of hardcoded 0

  Use WLAN_BACK_RECIPIENT instead of hardcoded 0 for clarity

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: timeout tx agg sessions in way similar to rx agg sessions
Nikolay Martynov [Wed, 23 Nov 2011 02:50:28 +0000 (21:50 -0500)]
mac80211: timeout tx agg sessions in way similar to rx agg sessions

  Currently tx aggregation is not being timed out even if timeout is
specified when aggregation is opened. Tx tid stays active until delba
arrives from recipient (i.e. recipient times out tid when it is
inactive).
  The problem with this approach is that delba can get lost in the air
and tx tid will stay perpetually opened on the originator while closed
on recipient thus all data sent via this tid will be lost.
  This patch implements tx tid timeouting in way very similar to rx tid
timeouting.

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: change function bus_stop parameter
Franky Lin [Wed, 23 Nov 2011 01:21:59 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_stop parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_stop. This is part of the fullmac bus interface
refactoring.

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>
12 years agobrcm80211: fmac: remove function brcmf_bus_get_device
Franky Lin [Wed, 23 Nov 2011 01:21:58 +0000 (17:21 -0800)]
brcm80211: fmac: remove function brcmf_bus_get_device

brcmf_bus_get_device is no longer necessary. Use dongle device pointer
saved in brcmf_pub directly. This is part of the fullmac bus interface
refactoring.

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>
12 years agobrcm80211: fmac: change function bus_init parameter
Franky Lin [Wed, 23 Nov 2011 01:21:57 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_init parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_init. This is part of the fullmac bus interface
refactoring.

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>
12 years agobrcm80211: fmac: change function bus_txdata parameter
Franky Lin [Wed, 23 Nov 2011 01:21:56 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_txdata parameter

Change parameter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_txdata. This is part of the fullmac bus interface
refactoring.

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>
12 years agobrcm80211: fmac: change function bus_txctl parameter
Franky Lin [Wed, 23 Nov 2011 01:21:55 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_txctl parameter

Change paramter to device pointer for bus layer interface function
brcmf_sdbrcm_bus_txctl. This is part of the fullmac bus interface
refactoring.

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>
12 years agobrcm80211: fmac: change function bus_rxctl parameter
Franky Lin [Wed, 23 Nov 2011 01:21:54 +0000 (17:21 -0800)]
brcm80211: fmac: change function bus_rxctl parameter

brcmf_sdbrcm_bus_rxctl acts as an interface function of bus layer.
Change parameter from struct brcmf_sdio to device pointer in order to
provide a more compatible interface for different bus layers. This
is part of the fullmac bus interface refactoring.

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>
12 years agobrcm80211: fmac: stop using brcmf_pub in brcmf_sdbrcm_bus_watchdog
Franky Lin [Wed, 23 Nov 2011 01:21:53 +0000 (17:21 -0800)]
brcm80211: fmac: stop using brcmf_pub in brcmf_sdbrcm_bus_watchdog

structure brcmf_pub contains context for generic layer and should
not be used in brcmf_sdbrcm_bus_watchdog. This patch is part of
fullmac bus interface refactoring.

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>
12 years agobrcm80211: fmac: move busstate to struct brcmf_bus
Franky Lin [Wed, 23 Nov 2011 01:21:52 +0000 (17:21 -0800)]
brcm80211: fmac: move busstate to struct brcmf_bus

busstate keeps track of the bus (USB/SDIO) status and is used by
both generic layer and bus layer. Move it to brcmf_bus helps to clean
up the interface. This patch is part of fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: introduce common bus interface struct brcmf_bus
Franky Lin [Wed, 23 Nov 2011 01:21:51 +0000 (17:21 -0800)]
brcm80211: fmac: introduce common bus interface struct brcmf_bus

struct brcmf_bus will contain function porinter, bus specific
private structure pointer and interface context of generic layer
and bus layer. It will be the only shared structure between generic
and bus layer. This patch is part of fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: rename structure brcmf_bus to brcmf_sdio
Franky Lin [Wed, 23 Nov 2011 01:21:50 +0000 (17:21 -0800)]
brcm80211: fmac: rename structure brcmf_bus to brcmf_sdio

Rename sdio bus structure brcmf_bus to brcmf_sdio for preparation
of USB bus support. This patch is part of the fullmac bus interface
refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: remove unused parameter of brcmf_sdbrcm_probe
Franky Lin [Wed, 23 Nov 2011 01:21:49 +0000 (17:21 -0800)]
brcm80211: fmac: remove unused parameter of brcmf_sdbrcm_probe

bus_no, slot, func and bustype are no longer needed by brcmf_sdbrcm_probe.
This patch removes them.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: remove function brcmf_c_init
Franky Lin [Wed, 23 Nov 2011 01:21:48 +0000 (17:21 -0800)]
brcm80211: fmac: remove function brcmf_c_init

brcmf_c_init only init brcmf_msg_level used for debug. It's no longer
needed as brcmf_msg_level doesn't cause trouble to multiple instances.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: move module init/exit to sdio layer
Franky Lin [Wed, 23 Nov 2011 01:21:47 +0000 (17:21 -0800)]
brcm80211: fmac: move module init/exit to sdio layer

This patch is part of the fullmac bus interface refactoring series.
It moves the module init/exit code to bus layer.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@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>
12 years agobrcm80211: fmac: discard packet received when net device not registered
Franky Lin [Wed, 23 Nov 2011 01:21:46 +0000 (17:21 -0800)]
brcm80211: fmac: discard packet received when net device not registered

A new feature in the dongle firmware requires a handshake during
firmware intialization. The request is sent in event packets which the
host driver is not able to handle before any net device registered.
Discard those packets as the context for handling it is missing.
The initialization handler will be added as part of feature support
code in the future.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: rename wait queue name to match using function
Arend van Spriel [Wed, 23 Nov 2011 01:21:45 +0000 (17:21 -0800)]
brcm80211: fmac: rename wait queue name to match using function

The wait queue request_packet_wait was used in request_chain function
and for sake of consistency it has been renamed to request_chain_wait.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agobrcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()
Arend van Spriel [Wed, 23 Nov 2011 01:21:44 +0000 (17:21 -0800)]
brcm80211: fmac: remove alignment check from brcmf_sdioh_request_buffer()

The check for alignment is not valid anymore and can be removed. The
function is collapsed with brcmf_sdioh_request_packet() as a consequence
because it did not add much functionality 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>
12 years agobrcm80211: smac: added support for mac80211 filter flags
Alwin Beukers [Wed, 23 Nov 2011 01:21:43 +0000 (17:21 -0800)]
brcm80211: smac: added support for mac80211 filter flags

Added support for handling FIF_PROMISC_IN_BSS, FIF_FCSFAIL,
FIF_CONTROL, FIF_OTHER_BSS and FIF_PSPOLL.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: fix channel frequency
Alwin Beukers [Wed, 23 Nov 2011 01:21:42 +0000 (17:21 -0800)]
brcm80211: smac: fix channel frequency

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: change firmware/nvram name to be more generic
Franky Lin [Wed, 23 Nov 2011 01:21:41 +0000 (17:21 -0800)]
brcm80211: fmac: change firmware/nvram name to be more generic

The nvram file contains info for firmware which varies with different
hardware designs. Use more common firmware/nvram file names instead
of those in Linux firmware repository to avoid misunderstanding.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: fmac: simplify the brcmf_sdioh_request_buffer() function
Arend van Spriel [Wed, 23 Nov 2011 01:21:40 +0000 (17:21 -0800)]
brcm80211: fmac: simplify the brcmf_sdioh_request_buffer() function

The function is only called with sk_buff parameter being non-zero so
the prototype does not need to support passing a char buffer any longer.
When the function is called with a NULL sk_buff parameter it returns
-EINVAL now.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agobrcm80211: fmac: remove width parameter from brcmf_sdioh_request_buffer
Arend van Spriel [Wed, 23 Nov 2011 01:21:39 +0000 (17:21 -0800)]
brcm80211: fmac: remove width parameter from brcmf_sdioh_request_buffer

The function brcmf_sdioh_request_buffer() was requiring a parameter in
its prototype that was not used within the function. It has been
removed consequently.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
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>
12 years agobrcm80211: fmac: separate receiving skb chain from other receive path
Arend van Spriel [Wed, 23 Nov 2011 01:21:38 +0000 (17:21 -0800)]
brcm80211: fmac: separate receiving skb chain from other receive path

In the receive path the buffer used to store the receive data from the
device can be a chain of sk_buff. It has been separated to allow the
use of skb queues.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
12 years agobrcm80211: smac: remove skb next pointer usage from the driver
Arend van Spriel [Wed, 23 Nov 2011 01:21:37 +0000 (17:21 -0800)]
brcm80211: smac: remove skb next pointer usage from the driver

In two places the next pointer was used to process a sk_buff chain
but it will always get a single sk_buff so this has been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
12 years agobrcm80211: fmac: cleanup receive path using proper skb_queue functions
Arend van Spriel [Wed, 23 Nov 2011 01:21:36 +0000 (17:21 -0800)]
brcm80211: fmac: cleanup receive path using proper skb_queue functions

In the receive path there was still code using the next pointer to
access all packets in skb_queue. This patch fixes that.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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>
12 years agomac80211: don't indicate probe resp change in IBSS mode
Arik Nemtsov [Tue, 22 Nov 2011 17:33:18 +0000 (19:33 +0200)]
mac80211: don't indicate probe resp change in IBSS mode

Due the a fall-through in the switch statement, the IBSS mode got a
report for AP_RPOBE_RESPONSE change on reconfig. Change this to an AP
only notification.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>