deliverable/linux.git
11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
John W. Linville [Mon, 19 Nov 2012 19:37:43 +0000 (14:37 -0500)] 
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211

11 years agoath9k: Fix BTCOEX debugfs file usage
Sujith Manoharan [Mon, 19 Nov 2012 08:54:46 +0000 (14:24 +0530)] 
ath9k: Fix BTCOEX debugfs file usage

The debugfs file for dumping btcoex parameters unconditionally
assumes a MCI-based device. This will not work for older btcoex
chips. Fix this by branching out the routine into separate
functions.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix regression in device reset
Sujith Manoharan [Sat, 17 Nov 2012 15:50:50 +0000 (21:20 +0530)] 
ath9k_hw: Fix regression in device reset

Commit "ath9k: improve suspend/resume reliability" broke ath9k_htc
and bringing up the device would hang indefinitely. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomac80211: make remain_on_channel() op pass vif param
Eliad Peller [Mon, 19 Nov 2012 15:05:09 +0000 (17:05 +0200)] 
mac80211: make remain_on_channel() op pass vif param

Drivers (e.g. wl12xx) might need to know the vif
to roc on (mainly in order to configure the
rx filters correctly).

Add the vif to the op params, and update the current
users (iwlwifi) to use the new api.

Signed-off-by: Eliad Peller <eliad@wizery.com>
[fix hwsim]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: Add TDLS event to allow drivers to request operations
Jouni Malinen [Fri, 16 Nov 2012 20:49:57 +0000 (22:49 +0200)] 
cfg80211: Add TDLS event to allow drivers to request operations

The NL80211_CMD_TDLS_OPER command was previously used only for userspace
request for the kernel code to perform TDLS operations. However, there
are also cases where the driver may need to request operations from
userspace, e.g., when using security on the AP path. Add a new cfg80211
function for generating a TDLS operation event for drivers to request a
new link to be set up (NL80211_TDLS_SETUP) or an existing link to be
torn down (NL80211_TDLS_TEARDOWN). Drivers can optionally use these
events, e.g., based on noticing data traffic being sent to a peer
station that is seen with good signal strength.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: support radiotap vendor namespace RX data
Johannes Berg [Fri, 16 Nov 2012 09:09:08 +0000 (10:09 +0100)] 
mac80211: support radiotap vendor namespace RX data

In some cases, in particular for experimentation, it
can be useful to be able to add vendor namespace data
to received frames in addition to the normal radiotap
data.

Allow doing this through mac80211 by adding fields to
the RX status descriptor that describe the data while
the data itself is prepended to the frame.

Also add some example code to hwsim, but don't enable
it because it doesn't use a proper OUI identifier.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: introduce IEEE80211_NUM_TIDS and use it
Johannes Berg [Wed, 14 Nov 2012 22:22:21 +0000 (23:22 +0100)] 
mac80211: introduce IEEE80211_NUM_TIDS and use it

Introduce IEEE80211_NUM_TIDS in the generic 802.11
header file and use it in place of STA_TID_NUM and
NUM_RX_DATA_QUEUES which are both really the number
of TIDs.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: use CMAC_PN_LEN
Johannes Berg [Wed, 14 Nov 2012 22:15:11 +0000 (23:15 +0100)] 
mac80211: use CMAC_PN_LEN

Instead of hardcoding its value (6), use the constant.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c
Sachin Kamat [Mon, 19 Nov 2012 11:45:40 +0000 (17:15 +0530)] 
iwlwifi: Remove duplicate inclusion of iwl-trans.h in pcie/drv.c

iwl-trans.h was included twice.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: update the RB_TIMEOUT to 0x11
Emmanuel Grumbach [Sun, 18 Nov 2012 11:16:58 +0000 (13:16 +0200)] 
iwlwifi: update the RB_TIMEOUT to 0x11

This will allow to reduce slightly the number of interrupts
without sacrificing too much the latency in the Rx path.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: make iwl_pcie_rxq_inc_wr_ptr static
Emmanuel Grumbach [Sun, 18 Nov 2012 11:16:14 +0000 (13:16 +0200)] 
iwlwifi: make iwl_pcie_rxq_inc_wr_ptr static

It is not used outside pcie/rx.c.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: more cleanup in pcie/rx.c
Emmanuel Grumbach [Sun, 18 Nov 2012 11:14:51 +0000 (13:14 +0200)] 
iwlwifi: more cleanup in pcie/rx.c

Really trivial clean up.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: make iwl_queue_used return bool
Emmanuel Grumbach [Wed, 14 Nov 2012 21:38:08 +0000 (23:38 +0200)] 
iwlwifi: make iwl_queue_used return bool

Also, prefer the if(!X) notation over if(X == 0).

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: disallow MFP with software crypto
Johannes Berg [Thu, 15 Nov 2012 10:35:57 +0000 (11:35 +0100)] 
iwlwifi: disallow MFP with software crypto

When software crypto is enabled, it isn't safe
to enable MFP since the firmware interprets some
management packets, and with MFP it would do so
without proper validation.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: merge 2 functions in reclaim flow
Emmanuel Grumbach [Wed, 14 Nov 2012 21:32:57 +0000 (23:32 +0200)] 
iwlwifi: merge 2 functions in reclaim flow

One one just a wrapper of the second, squash them.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/tx.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)] 
iwlwifi: continue clean up - pcie/tx.c

Rename static functions. Function moved from trans.c to
tx.c. A few could be made static, others had to be exported.

Functions that implement the transport API are prefixed by
iwl_trans_pcie_, the others by iwl_pcie_.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/trans.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)] 
iwlwifi: continue clean up - pcie/trans.c

Functions that implement the transport API are prefixed by
iwl_trans_pcie_, the others by iwl_pcie_.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: continue clean up - pcie/rx.c
Emmanuel Grumbach [Wed, 14 Nov 2012 12:44:18 +0000 (14:44 +0200)] 
iwlwifi: continue clean up - pcie/rx.c

Rename static functions. Function moved from trans.c to
rx.c. A few could be made static, others had to be exported.
Also, don't use rxb or rxbuf, but rb which stands for receive
buffer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: init the replenish work in rx_init
Emmanuel Grumbach [Wed, 14 Nov 2012 12:28:50 +0000 (14:28 +0200)] 
iwlwifi: init the replenish work in rx_init

This is its natural place

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: rename functions in transport layer
Emmanuel Grumbach [Wed, 14 Nov 2012 10:39:52 +0000 (12:39 +0200)] 
iwlwifi: rename functions in transport layer

1) s/tx_queue/txq
for the sake of consistency.

2) s/rx_queue/rxq
for the sake of consistency.

3) Make all functions begin with iwl_pcie_
iwl_queue_init and iwl_queue_space are an exception
since they are not PCIE specific although they are in
pcie subdir.

4) s/trans_pcie_get_cmd_string/get_cmd_string
it is much shorter and used in debug prints which
are long lines.

5) s/iwl_bg_rx_replenish/iwl_pcie_rx_replenish_work
this better emphasizes that it is a work

6) remove invalid kernelDOC markers

pcie/tx.c and pcie/trans.c still needs to be cleaned up.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: add comments for the PCIe transport statuses
Emmanuel Grumbach [Wed, 14 Nov 2012 10:32:50 +0000 (12:32 +0200)] 
iwlwifi: add comments for the PCIe transport statuses

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: check add_chanctx callback before use in ieee80211_reconfig
Arend van Spriel [Mon, 19 Nov 2012 11:01:05 +0000 (12:01 +0100)] 
mac80211: check add_chanctx callback before use in ieee80211_reconfig

During testing our mac80211 driver a fatal error occurred which was
signalled to mac80211. Upon performing the reconfiguration of the
device a WARN_ON was triggered. This warning checked the return value
of drv_add_chanctx(). However, this returns -EOPNOTSUPP when the
driver does not provide the callback. As the callback is optional
better check it is defined before calling drv_add_chanctx().

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoBluetooth: Fix updating advertising state flags and data
Johan Hedberg [Thu, 8 Nov 2012 00:23:01 +0000 (01:23 +0100)] 
Bluetooth: Fix updating advertising state flags and data

This patch adds a callback for the HCI_LE_Set_Advertise_Enable command.
The callback is responsible for updating the HCI_LE_PERIPHERAL flag
updating as well as updating the advertising data flags field to
indicate undirected connectable advertising.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Add support for setting LE advertising data
Johan Hedberg [Thu, 8 Nov 2012 00:23:00 +0000 (01:23 +0100)] 
Bluetooth: Add support for setting LE advertising data

This patch adds support for setting basing LE advertising data. The
three elements supported for now are the advertising flags, the TX power
and the friendly name.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoBluetooth: Use proper invalid value for tx_power
Johan Hedberg [Thu, 8 Nov 2012 00:22:59 +0000 (01:22 +0100)] 
Bluetooth: Use proper invalid value for tx_power

The core specification defines 127 as the "not available" value (well,
"reserved" for BR/EDR and "not available" for LE - but essentially the
same). Therefore, instead of testing for 0 (which is in fact a valid
value) we should be using this invalid value to test if the tx_power is
available.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoiwlwifi: don't WARN when a non empty queue is disabled
Emmanuel Grumbach [Mon, 15 Oct 2012 15:57:36 +0000 (17:57 +0200)] 
iwlwifi: don't WARN when a non empty queue is disabled

This can happen when we shut down suddenly an interface.

Cc: stable@vger.kernel.org
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agowireless: add back sysfs directory
Johannes Berg [Fri, 16 Nov 2012 19:46:19 +0000 (20:46 +0100)] 
wireless: add back sysfs directory

commit 35b2a113cb0298d4f9a1263338b456094a414057 broke (at least)
Fedora's networking scripts, they check for the existence of the
wireless directory. As the files aren't used, add the directory
back and not the files. Also do it for both drivers based on the
old wireless extensions and cfg80211, regardless of whether the
compat code for wext is built into cfg80211 or not.

Cc: stable@vger.kernel.org [3.6]
Reported-by: Dave Airlie <airlied@gmail.com>
Reported-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomwifiex: report error to MMC core if we cannot suspend
Bing Zhao [Thu, 15 Nov 2012 23:58:48 +0000 (15:58 -0800)] 
mwifiex: report error to MMC core if we cannot suspend

When host_sleep_config command fails we should return error to
MMC core to indicate the failure for our device.

The misspelled variable is also removed as it's redundant.

Cc: "3.0+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: fix system hang issue in cmd timeout error case
Bing Zhao [Thu, 15 Nov 2012 23:58:47 +0000 (15:58 -0800)] 
mwifiex: fix system hang issue in cmd timeout error case

Reported by Tim Shepard:
I was seeing sporadic failures (wedgeups), and the majority of those
failures I saw printed the printouts in mwifiex_cmd_timeout_func with
cmd = 0xe5 which is CMD_802_11_HS_CFG_ENH.  When this happens, two
minutes later I get notified that the rtcwake thread is blocked, like
this:
      INFO: task rtcwake:3495 blocked for more than 120 seconds.

To get the hung thread unblocked we wake up the cmd wait queue and
cancel the ioctl.

Cc: "3.4+" <stable@vger.kernel.org>
Reported-by: Tim Shepard <shep@laptop.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192cu: Add new USB ID
Albert Pool [Tue, 30 Oct 2012 19:58:06 +0000 (20:58 +0100)] 
rtlwifi: rtl8192cu: Add new USB ID

This is an ISY IWL 2000. Probably a clone of Belkin F7D1102 050d:1102.
Its FCC ID is the same.

Signed-off-by: Albert Pool <albertpool@solcon.nl>
Cc: stable@vger.kernel.org
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Program filter coefficients correctly
Sujith Manoharan [Tue, 13 Nov 2012 06:03:53 +0000 (11:33 +0530)] 
ath9k_hw: Program filter coefficients correctly

2484 Mhz (Japan) usage requires filter coefficients to
be programmed in the CCK TX FIR registers. This is required
for AR9331, AR9485 and AR9462. Fix this and also remove
a few useless macros and a duplicate variable.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agolib80211: hide Kconfig symbol
Johannes Berg [Thu, 15 Nov 2012 23:06:20 +0000 (00:06 +0100)] 
lib80211: hide Kconfig symbol

There's no need to ask the user about lib80211
since it will be selected by drivers requiring
it, hide it from Kconfig.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: don't select lib80211
Johannes Berg [Thu, 15 Nov 2012 23:05:20 +0000 (00:05 +0100)] 
mwifiex: don't select lib80211

The driver doesn't use any lib80211 symbols
so it shouldn't select it in Kconfig.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: use eth_zero_addr() to assign zero address
Wei Yongjun [Thu, 15 Nov 2012 13:24:57 +0000 (21:24 +0800)] 
rtlwifi: use eth_zero_addr() to assign zero address

Using eth_zero_addr() to assign zero address insetad of
memset() or an inefficient copy from a static array.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agonet/wireless: ipw2x00: remove unreachable code
Stanislav Yakovlev [Thu, 15 Nov 2012 03:07:47 +0000 (03:07 +0000)] 
net/wireless: ipw2x00: remove unreachable code

Remove unnecessary if statements because libipw_set_geo always
returns success.  Also change function's return value from int
to void.

Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: code cleanup
Hante Meuleman [Thu, 15 Nov 2012 02:46:23 +0000 (18:46 -0800)] 
brcmfmac: code cleanup

Removing obsolete functions and prototypes. Moving (and renaming)
defines to place with similar definitions. Removing unnecessary
includes.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: limit hex dump on fwil.
Hante Meuleman [Thu, 15 Nov 2012 02:46:22 +0000 (18:46 -0800)] 
brcmfmac: limit hex dump on fwil.

When debug is turned on for fwil then the whole data buffer is
dumped. In some cases this gives excessive amount of debug. With
this patch the dumps are limited to 64 bytes.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: sdio module load fix.
Hante Meuleman [Thu, 15 Nov 2012 02:46:21 +0000 (18:46 -0800)] 
brcmfmac: sdio module load fix.

On sdio module unload followed by load (without removing the
device) the access window should be moved back to enumeration
space. Force this by removing initialisation of sbwad during
probe.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: avoid usage of func->card->dev in sdio probe.
Hante Meuleman [Thu, 15 Nov 2012 02:46:20 +0000 (18:46 -0800)] 
brcmfmac: avoid usage of func->card->dev in sdio probe.

brcmf_ops_sdio_probe used the private_date func->card->dev to
store device data of brcmfmac sdio. This is not a good place to
store the data. Use dev of func and use func->card->sdio_func
to group the functions the driver is using.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: sdio unload fix.
Hante Meuleman [Thu, 15 Nov 2012 02:46:19 +0000 (18:46 -0800)] 
brcmfmac: sdio unload fix.

on sdio remove the bus_if should be configured for close, so
new data from higher layers will be blocked. Also the access
to bus_if in the watchdog should be checked for null pointer
access on sdio remove.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Handle mmc exceptions during init correct.
Hante Meuleman [Thu, 15 Nov 2012 02:46:18 +0000 (18:46 -0800)] 
brcmfmac: Handle mmc exceptions during init correct.

when brcmf_sdbrcm_probe_attach results in error then cleanup
will result in null pointer access. In brcmf_sdbrcm_release and
in brcmf_ops_sdio_remove. This patch fixes order of init and
de-init.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: Any error should result in failure of probe.
Hante Meuleman [Thu, 15 Nov 2012 02:46:17 +0000 (18:46 -0800)] 
brcmfmac: Any error should result in failure of probe.

In brcmf_sdbrcm_probe only error ELINK is seen as error. However
brcmf_bus_start can return many more error codes and all should
result in failed init of driver.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: restructure handling of IF event
Arend van Spriel [Thu, 15 Nov 2012 02:46:16 +0000 (18:46 -0800)] 
brcmfmac: restructure handling of IF event

The IF event need special care. It can be either an ADD, DEL, or
CHANGE. For an ADD we need to call brcmf_add_if() before the
event handler call. Upon a DEL we need to call brcmf_del_if()
after the event handler call. CHANGE does not require special
attention.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: ignore IF event if it is a add for ifidx 0
Arend van Spriel [Thu, 15 Nov 2012 02:46:15 +0000 (18:46 -0800)] 
brcmfmac: ignore IF event if it is a add for ifidx 0

Firmware fires IF event to add the primary interface but that
is already created in the driver.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix wrong usage of unaligned include file
Arend van Spriel [Thu, 15 Nov 2012 02:46:14 +0000 (18:46 -0800)] 
brcmfmac: fix wrong usage of unaligned include file

Replaced <linux/unaligned/access_ok.h> by <asm/unaligned.h>
to make it work on ARM and other architectures.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix NULL pointer access in brcmf_fweh_detach()
Hante Meuleman [Thu, 15 Nov 2012 02:46:13 +0000 (18:46 -0800)] 
brcmfmac: fix NULL pointer access in brcmf_fweh_detach()

brcmf_fweh_detach can be called while ifp is already NULL, due to
init error. Fix NULL pointer access by checking ifp.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove mac address validation from brcmf_net_attach()
Arend van Spriel [Thu, 15 Nov 2012 02:46:12 +0000 (18:46 -0800)] 
brcmfmac: remove mac address validation from brcmf_net_attach()

The mac_addr field in ifp object is always valid so no need to
validate.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: change mac address parameter in brcmf_add_if()
Arend van Spriel [Thu, 15 Nov 2012 02:46:11 +0000 (18:46 -0800)] 
brcmfmac: change mac address parameter in brcmf_add_if()

The function brcmf_add_if() is called with mac address set to NULL
for the primary interface. When handling IF ADD events the firmware
provides a address mask in the event to derive its mac address from
the primary mac address. Rename the parameter and use it as a mask.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: correct handling IF firmware event
Arend van Spriel [Thu, 15 Nov 2012 02:46:10 +0000 (18:46 -0800)] 
brcmfmac: correct handling IF firmware event

Testing revealed the IF ADD event contains the interface
index of the new interface. This would result in a NULL
pointer access when handling the event.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix for multiple netdevice interface support
Arend van Spriel [Thu, 15 Nov 2012 02:46:09 +0000 (18:46 -0800)] 
brcmfmac: fix for multiple netdevice interface support

virtual netdevice interface like P2P client and GO need
different callbacks for .open and .down. This patch adds
those.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: change parameter in brcmf_add_if() function
Arend van Spriel [Thu, 15 Nov 2012 02:46:08 +0000 (18:46 -0800)] 
brcmfmac: change parameter in brcmf_add_if() function

The brcmf_add_if() function had a struct device as parameter
to accomodate the bus specific code to use this function. The
driver has been reworked so the bus specific code does not need
this function. Better replace the parameter with a more specific
driver object, ie. struct brcmf_pub.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: usb suspend/resume.
Hante Meuleman [Thu, 15 Nov 2012 02:46:07 +0000 (18:46 -0800)] 
brcmfmac: usb suspend/resume.

Add support for usb suspend/resume.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: cleanup of usb firmware download routines
Hante Meuleman [Thu, 15 Nov 2012 02:46:06 +0000 (18:46 -0800)] 
brcmfmac: cleanup of usb firmware download routines

Clean code related to firmware download routines. Remove obsolete
delay and increase delay after reset command.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: rework firmware event handling code
Arend van Spriel [Thu, 15 Nov 2012 02:46:05 +0000 (18:46 -0800)] 
brcmfmac: rework firmware event handling code

Handling of firmware event has been reworked into a seperate
code file. The change is needed as firmware event can be received
in interrupt context. Decoupling of the event handling has been
lowered to allow event processing to sleep.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath5k: precedence error in ath5k_hw_nic_wakeup()
Dan Carpenter [Wed, 14 Nov 2012 08:23:07 +0000 (11:23 +0300)] 
ath5k: precedence error in ath5k_hw_nic_wakeup()

'|' has higher precedence than ?:.  Since AR5K_PHY_TURBO_MODE is 0x1 and
"AR5K_PHY_TURBO_MODE | (ah->ah_radio == AR5K_RF2425)" is true then we
always set turbo to zero.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath5k: Use module_platform_driver macro for ahb.c
Syam Sidhardhan [Tue, 13 Nov 2012 15:39:50 +0000 (21:09 +0530)] 
ath5k: Use module_platform_driver macro for ahb.c

Simplify the code by make use of module_platform_driver macro.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: Remove unused workaround
Sujith Manoharan [Mon, 12 Nov 2012 05:26:44 +0000 (10:56 +0530)] 
ath9k: Remove unused workaround

The workaround for ASPM/L0s is needed only for AR9485 1.0,
which was never sold and is not supported by ath9k.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Update AR9485 initvals
Sujith Manoharan [Mon, 12 Nov 2012 05:26:43 +0000 (10:56 +0530)] 
ath9k_hw: Update AR9485 initvals

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k_hw: Fix wrong peak detector DC offset
Rajkumar Manoharan [Fri, 9 Nov 2012 09:21:30 +0000 (14:51 +0530)] 
ath9k_hw: Fix wrong peak detector DC offset

An issue is reported in AR9462 & AR9565 that NF_cal_not_done is
not observed when HW peak detector calibration is disabled. At that
state, the HW is stuck at NF calibration which prevents tx output.
The root cause is wrong peak detector offset calibrated by HW. To
resolve this issue, peak detector calibration is done manually by SW
for AR9462 and AR9565.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Send BASTREAM firmware commands per vif
Yogesh Ashok Powar [Thu, 8 Nov 2012 13:40:44 +0000 (19:10 +0530)] 
mwl8k: Send BASTREAM firmware commands per vif

The firmware supports 8 macid's corresponding to 8 BSS that can be
created in an MBSS environment. Currently, BASTREAM commands were always
sent with macid 0. This macid is used to configure the hardware ampdu
registers with appropriate BSS address in an MBSS environment.
This mac address is used by the hardware for various ampdu related requirements
e.g. source address in BAR generation, BA interpretation e.t.c.
Using invalid macid results in this mac address not getting appropriately
configured in the hardware which results in issues during ampdu traffic.

Fix this by sending the BASTREAM commands with appropriate macid.

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>
11 years agossb: fix SPROM offset
Piotr Haber [Thu, 8 Nov 2012 08:47:27 +0000 (09:47 +0100)] 
ssb: fix SPROM offset

Offset for temperature compensation
values is wrong in ssb SPROMv8 map.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Piotr Haber <phaber@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoath9k: [DFS] add pulse width tolerance for ETSI
Zefir Kurtisi [Wed, 31 Oct 2012 11:23:01 +0000 (12:23 +0100)] 
ath9k: [DFS] add pulse width tolerance for ETSI

Add 5% width tolerance for radar patterns defined by ETSI.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Fri, 16 Nov 2012 19:08:14 +0000 (14:08 -0500)] 
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 16 Nov 2012 19:07:54 +0000 (14:07 -0500)] 
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

Conflicts:
drivers/net/wireless/iwlwifi/pcie/trans.c

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Fri, 16 Nov 2012 18:59:51 +0000 (13:59 -0500)] 
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

11 years agoath6kl: support NL80211_USER_REG_HINT_CELL_BASE events
Kalle Valo [Thu, 15 Nov 2012 14:34:56 +0000 (16:34 +0200)] 
ath6kl: support NL80211_USER_REG_HINT_CELL_BASE events

As ath6kl firmware can't do intersections the driver should only listen
to regdom changes from cellular base stations, all other requests need to
be refused.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agomwl8k: Set packet timestamp to 0 when life time expiry is not used
Nishant Sarmukadam [Tue, 6 Nov 2012 13:53:15 +0000 (19:23 +0530)] 
mwl8k: Set packet timestamp to 0 when life time expiry is not used

Set tx packet timestamp to 0 in following scenarios:-
- All packets in STA mode
- Mgmt packets in AP mode
- Eapol packets in AP mode

In STA mode, this field is unused in the firmware. In AP
mode, we should not be expiring mgmt and eapol frames.
Setting timestamp to 0 will ensure that.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Do not expire eapol frames
Nishant Sarmukadam [Tue, 6 Nov 2012 13:53:01 +0000 (19:23 +0530)] 
mwl8k: Do not expire eapol frames

This can cause issues when clients try to connect when the
traffic is heavy

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: Unmap the pci DMA address in xmit error path
Nishant Sarmukadam [Tue, 6 Nov 2012 13:52:48 +0000 (19:22 +0530)] 
mwl8k: Unmap the pci DMA address in xmit error path

We should unmap the DMA address in the error path, else it
causes resource leaks. Fix this.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: recheck if station still has valid rates
Yogesh Ashok Powar [Tue, 6 Nov 2012 13:52:35 +0000 (19:22 +0530)] 
mwl8k: recheck if station still has valid rates

We have 6.5 Mbps is minimum rate of the link
as the criterion for creation of BA.

Although we check this before creating the BA
stream, by the time amdpu_action is called from
the workqueue, the link can get affected in the
meantime.
Hence, add an additional check in amdpu_action.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwl8k: defining interface combinations
Yogesh Ashok Powar [Tue, 6 Nov 2012 13:52:16 +0000 (19:22 +0530)] 
mwl8k: defining interface combinations

AP mode support upto 8 interfaces.
Defining it using iface_combinations

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: process RX packets in SDIO IRQ thread directly
Bing Zhao [Tue, 6 Nov 2012 00:59:15 +0000 (16:59 -0800)] 
mwifiex: process RX packets in SDIO IRQ thread directly

ksdioirqd has higher priority than kworker. Process RX packets
in SDIO IRQ thread (ksdioirqd/mmcX) directly instead of deferring
the work to kworker to avoid the extra latency.
This improves TCP throughput 15~20% on an ARM platform with SDIO
2.0 controller.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use struct brcmf_if parameter in firmware event callbacks
Arend van Spriel [Tue, 6 Nov 2012 00:22:32 +0000 (16:22 -0800)] 
brcmfmac: use struct brcmf_if parameter in firmware event callbacks

Firmware events are passed to wl_cfg80211 module associated with
the primary net device. With virtual interface support events can
be received for different interfaces, ie. struct brcmf_if instances.
Pass it in the event to determine appropriate net device associated
with the event.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: add dedicated USB log level.
Hante Meuleman [Tue, 6 Nov 2012 00:22:31 +0000 (16:22 -0800)] 
brcmfmac: add dedicated USB log level.

Add USB log level and update and add log messages in usb module.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: on halting driver check before release or free.
Hante Meuleman [Tue, 6 Nov 2012 00:22:30 +0000 (16:22 -0800)] 
brcmfmac: on halting driver check before release or free.

brcmf_netdev_stop shall first check bus_if status before bringing
down cfg80211. brcmf_detach shall first check if driver is
allocated.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: check bus state to be data before sending data.
Hante Meuleman [Tue, 6 Nov 2012 00:22:29 +0000 (16:22 -0800)] 
brcmfmac: check bus state to be data before sending data.

brcmf_netdev_start_xmit and brcmf_fil_cmd_data are checking
bus state for down. These functions should check for data
state.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: return immediately error for out of range key_idx.
Hante Meuleman [Tue, 6 Nov 2012 00:22:28 +0000 (16:22 -0800)] 
brcmfmac: return immediately error for out of range key_idx.

when brcmf_cfg80211_del_key was called with out of range key index
then firmware would return error. Checking was added to
brcmf_cfg80211_del_key to immediately return error.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix build regression
Arend van Spriel [Tue, 6 Nov 2012 00:22:27 +0000 (16:22 -0800)] 
brcmfmac: fix build regression

This fixes a build regression for x86_64 target that showed up
in 3.7-rc1 due to:

commit 1a87334239757b69eb9885979c32bbf871b3ec88
Author: Hante Meuleman <meuleman@broadcom.com>
Date:   Thu Sep 27 14:17:54 2012 +0200

    brcmfmac: add hostap supoort.

Reported-by: Yuanhan Liu <yuanhan.liu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Hante Meuleman <meuleman@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>
11 years agobrcmfmac: change return type of brcmf_sdio_hdparser
Franky Lin [Tue, 6 Nov 2012 00:22:26 +0000 (16:22 -0800)] 
brcmfmac: change return type of brcmf_sdio_hdparser

Use int instead of bool as the return type of function
brcmf_sdio_hdparser to explicitly describe error returns.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove brcmf_sdbrcm_wait_for_event
Franky Lin [Tue, 6 Nov 2012 00:22:25 +0000 (16:22 -0800)] 
brcmfmac: remove brcmf_sdbrcm_wait_for_event

brcmf_sdbrcm_wait_for_event is now a one line function and only
used by brcmf_sdbrcm_bus_txctl. Intergrate the function call
wait_event_interruptible_timeout into brcmf_sdbrcm_bus_txctl.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: protect consecutive SDIO access with sdio_claim_host
Franky Lin [Tue, 6 Nov 2012 00:22:24 +0000 (16:22 -0800)] 
brcmfmac: protect consecutive SDIO access with sdio_claim_host

Semaphore sdsem is used to protect consecutive memory access
through SDIO bus. Same functionality is provided by sdio_claim_host/
sdio_release_host interface as well. Replace sdsem with
sdio_claim_host.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: decrease the range of SDIO access lock
Franky Lin [Tue, 6 Nov 2012 00:22:23 +0000 (16:22 -0800)] 
brcmfmac: decrease the range of SDIO access lock

Semaphore sdsem which protects consecutive SDIO bus access is used
to lock down unnecessary wide range. Decrease the locking range
provides the capability of parallel processing.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use dynamically allocated control frame buffer
Franky Lin [Tue, 6 Nov 2012 00:22:22 +0000 (16:22 -0800)] 
brcmfmac: use dynamically allocated control frame buffer

Rxbuf in SDIO interface is used in normal frame and control frame
read. Use dynamically allocated buffer in control frame read path
for post processing to avoid conflicts.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix NULL pointer access in brcmf_create_iovar()
Arend van Spriel [Tue, 6 Nov 2012 00:22:21 +0000 (16:22 -0800)] 
brcmfmac: fix NULL pointer access in brcmf_create_iovar()

The function brcmf_fil_bsscfg_data_get() calls brcmf_create_iovar()
with data pointer set to NULL, which caused a NULL pointer access.
As it should be possible to provide data in message towards the
firmware, it should just pass the data buffer instead.

Reviewed-by: Hante Meuleman <meuleman@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>
11 years agobrcmfmac: remove obsolete function brcmf_c_mkiovar
Hante Meuleman [Tue, 6 Nov 2012 00:22:20 +0000 (16:22 -0800)] 
brcmfmac: remove obsolete function brcmf_c_mkiovar

the refactored firmware interface layer made this function obsolete.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove obsolete variable from brcmf_cfg80211_start_ap()
Arend van Spriel [Tue, 6 Nov 2012 00:22:19 +0000 (16:22 -0800)] 
brcmfmac: remove obsolete variable from brcmf_cfg80211_start_ap()

The function brcmf_cfg80211_start_ap() had some variables declared
that were not used or not needed any longer. This patch removes
those variables.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: change parameter of brcmf_set_management_ie()
Arend van Spriel [Tue, 6 Nov 2012 00:22:18 +0000 (16:22 -0800)] 
brcmfmac: change parameter of brcmf_set_management_ie()

The function brcmf_set_management_ie() operates on virtual
interface data and brcmf_cfg80211_vif structure provides
all information needed for interfacing with firmware. As
this function will also be needed for interface without
an associated net device it makes sense to provide the vif
instead of deriving it from the net device.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: fix pkt_filter sizeof calculation.
Hante Meuleman [Tue, 6 Nov 2012 00:22:17 +0000 (16:22 -0800)] 
brcmfmac: fix pkt_filter sizeof calculation.

sizeof calculation in setting pkt_filter was incorrect. This
patch fixes that and removes related defines which have become
obsolete.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use wait_event_timeout for 8021x pending count
Hante Meuleman [Tue, 6 Nov 2012 00:22:16 +0000 (16:22 -0800)] 
brcmfmac: use wait_event_timeout for 8021x pending count

brcmf_netdev_wait_pend8021x was polling to see if 8021x data was
already sent. Code was replaced using wait_event_timeout.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: handle exceptions in brcmf_bus_start correct.
Hante Meuleman [Tue, 6 Nov 2012 00:22:15 +0000 (16:22 -0800)] 
brcmfmac: handle exceptions in brcmf_bus_start correct.

On exception during brcmf_bus_start the netdev should be freed,
if already allocated.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: use fwil for netdev callbacks.
Hante Meuleman [Tue, 6 Nov 2012 00:22:14 +0000 (16:22 -0800)] 
brcmfmac: use fwil for netdev callbacks.

Change setting up multicast, mac address and offloading to use the
refactored firmware interface layer. Remove obsolete brcmf_proto_dcmd
function.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove obsolete i-scan and clean up related code.
Hante Meuleman [Tue, 6 Nov 2012 00:22:13 +0000 (16:22 -0800)] 
brcmfmac: remove obsolete i-scan and clean up related code.

e-scan has become the default scanning method. This patch removes
the i-scan related code and cleans up e-scan related code to be
always enabled.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: make pointer type constant in brcmf_set_management_ie()
Arend van Spriel [Tue, 6 Nov 2012 00:22:12 +0000 (16:22 -0800)] 
brcmfmac: make pointer type constant in brcmf_set_management_ie()

The vendor ie buffer passed to brcmf_set_management_ie() is not modified
and the caller always provided a constant buffer, which needed a cast.
Better making the buffer parameter of the function constant so the
casts can be removed.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: restrict error condition in brcmf_inform_bss()
Arend van Spriel [Tue, 6 Nov 2012 00:22:11 +0000 (16:22 -0800)] 
brcmfmac: restrict error condition in brcmf_inform_bss()

The function brcmf_inform_bss() validates the version received
from the device, before processing the individual bss entries.
This error condition is only applicable when the list contains
entries. A specific scan, ie. for a specific ssid, can result
in a scan completion without finding any bss entries. No need
to flag it as an error in the log when this happens.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: simplify if-else condition in brcmf_cfg80211_escan()
Arend van Spriel [Tue, 6 Nov 2012 00:22:10 +0000 (16:22 -0800)] 
brcmfmac: simplify if-else condition in brcmf_cfg80211_escan()

Code flow was:
err = foo();
if (!err)
return err;
else
goto exit;
return 0;

Changed it to just to exit label if err is non-zero.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobrcmfmac: remove obsolete structure ap_info
Arend van Spriel [Tue, 6 Nov 2012 00:22:09 +0000 (16:22 -0800)] 
brcmfmac: remove obsolete structure ap_info

The data stored in ap_info structure is no longer used so remove
it from the driver.

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>
11 years agoar5523: Don't dereference sta if NULL
Pontus Fuchs [Mon, 5 Nov 2012 20:17:51 +0000 (21:17 +0100)] 
ar5523: Don't dereference sta if NULL

A missing else caused a potential NULL dereference.

Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoar5523: Fix sparse endianness warnings
Pontus Fuchs [Mon, 5 Nov 2012 20:17:50 +0000 (21:17 +0100)] 
ar5523: Fix sparse endianness warnings

__be32 variables where used a little careless leading to sparse warnings.
Treat them a little more gentle.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agodrivers/net/wireless/ath/ath6kl/hif.c: drop if around WARN_ON
Julia Lawall [Sat, 3 Nov 2012 20:30:25 +0000 (21:30 +0100)] 
drivers/net/wireless/ath/ath6kl/hif.c: drop if around WARN_ON

Just use WARN_ON rather than an if containing only WARN_ON(1).

A simplified version of the semantic patch that makes this transformation
is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e;
@@
- if (e) WARN_ON(1);
+ WARN_ON(e);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoWireless: rt2x00: Add device id for Sweex LW323 to rt2800usb.c
Jaume Delclòs [Fri, 2 Nov 2012 22:35:20 +0000 (23:35 +0100)] 
Wireless: rt2x00: Add device id for Sweex LW323 to rt2800usb.c

This patch adds detection for the Sweex LW323 USB wireless network card
in the rt2x00 driver (just one line in rt2800usb.c).
It applies to linux-3.7-rc3.

Signed-off-by: Jaume Delclòs <jaume@delclos.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This page took 0.060044 seconds and 5 git commands to generate.