Yogesh Ashok Powar [Fri, 30 Dec 2011 11:05:27 +0000 (16:35 +0530)]
mwl8k: Recover from firmware crash
In case of firmware crash, reload the firmware and reconfigure it
by triggering ieee80211_hw_restart; mac80211 utility function.
V2 Addressed following comments from Lennert:
- Stop the queues during reload
- Removed atomic_t declaration for hw_restart
- Extend the firmware reload support for sta firmware as well
- Other misc changes
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>
Yogesh Ashok Powar [Fri, 30 Dec 2011 11:04:25 +0000 (16:34 +0530)]
mac80211: Call driver commands after drv_start in mac80211 restart code
Ideally, hardware/firmware initialization is complete after the
drv_start routine. In mac80211 restart code (ieee80211_reconfig),
defer calling the driver commands i.e. setup fragmentation
threshold, rts threshold and coverage class till drv_start
routine is called.
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
v2: Removed extra blank line added.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Wed, 28 Dec 2011 13:39:54 +0000 (19:09 +0530)]
ath9k: tx queue enable is read only for EDMA chipsets
for EDMA chip AR_Q_TXE (tx enable for each queue) is read only
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:24 +0000 (01:53 +0100)]
rt2x00: Change RF3853 to RF3053.
According to the latest Ralink vendor drivers, this seems to be the real
RF chipset type.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:23 +0000 (01:53 +0100)]
rt2x00: RT3593 is also applicable to USB.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kiciński [Wed, 28 Dec 2011 00:53:22 +0000 (01:53 +0100)]
rt2x00usb: Zero USB padding before sending URB
When USB driver requires padding at the end of frame or URB it will report
this need by increasing return value of get_tx_data_len callback. Common
USB code uses that return value as desired URB length.
Ensure that appropriate part of skb's tailroom exists and is zeroed.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
--
drivers/net/wireless/rt2x00/rt2x00usb.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jakub Kiciński [Wed, 28 Dec 2011 00:53:21 +0000 (01:53 +0100)]
rt2800usb: Let rt2x00usb handle USB padding
Older USB drivers does not append end padding to skb but instead report
it in size of data to be transmitted to HW. rt2800usb should follow that
behaviour. Custom write_tx_data callback which was adding pad to skb
is not be needed any more.
Thanks to this patch frames handed back from rt2800usb to mac80211 will
no longer contain end padding.
Signed-off-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:20 +0000 (01:53 +0100)]
rt2x00: Convert big if-statements to switch-statements.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:19 +0000 (01:53 +0100)]
rt2x00: Whitespace cleanup.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Gertjan van Wingerde [Wed, 28 Dec 2011 00:53:18 +0000 (01:53 +0100)]
rt2x00: Identify rt2800usb chipsets.
According to the latest USB ID database these are all RT2770 / RT2870 / RT307x
devices.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Tue, 27 Dec 2011 20:01:55 +0000 (21:01 +0100)]
carl9170: move checksum and txseq into subfunctions
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 27 Dec 2011 18:22:51 +0000 (12:22 -0600)]
rt2800usb: Move ID out of unknown
Testing on the openSUSE wireless forum has shown that a Linksys
WUSB54GC v3 with USB ID 1737:0077 works with rt2800usb when the ID is
written to /sys/.../new_id. This ID can therefore be moved out of UNKNOWN.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
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>
Mohammed Shafi Shajakhan [Tue, 27 Dec 2011 13:24:07 +0000 (18:54 +0530)]
mac80211: use RCU read locks for sta_info_get
this is being recently introduced by the commit
a85e1d55974646a442d95911e3f7d7a891ea9ac5
Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislav Yakovlev [Mon, 26 Dec 2011 23:31:11 +0000 (18:31 -0500)]
ipw2x00: remove reset_port functionality
Removes reset_port since it isn't used anywhere as suggested by Johannes Berg.
Signed-off-by: Stanislav Yakovlev <stas.yakovlev@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Mon, 26 Dec 2011 05:13:29 +0000 (10:43 +0530)]
mac80211: fix kernel panic in IBSS due to a regression
kernel panic occurs when we create an IBSS mode and leave it for
sometime without any joiner and this is introduced by the
commit
ec2b774e7c91094d8c00de579646f1162b87b01e where we don't
put proper braces for 'list_for_each_entry_safe' and we pass an
invalid 'sta' pointer to __sta_info_destroy
EIP is at __list_add+0xe/0xa0
EAX:
f3b63db4 EBX:
00000000 ECX:
eab88c1c EDX:
00000000
ESI:
00000000 EDI:
00000246 EBP:
f3b63d80 ESP:
f3b63d58
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process kworker/u:2 (pid: 198, ti=
f3b62000 task=
f3afbea0
task.ti=
f3b62000)
Stack:
00000000 00000000 f9ef9821 00000000 00000000 eab88c30
f3b63d80 c017f623
eab88bf0 eab88bf0 f3b63dd0 c066f925 00000000 00000002
00000000 f9ef9821
f3b63da0 c0180a2b eab88c1c eab88c30 00000002 f3afbea0
eab88bf4 f3b63db4
Call Trace:
[<
f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<
c017f623>] ? debug_mutex_add_waiter+0x23/0x60
[<
c066f925>] __mutex_lock_common+0xd5/0x390
[<
f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<
c0180a2b>] ? trace_hardirqs_off+0xb/0x10
[<
c066fd37>] mutex_lock_nested+0x47/0x60
[<
f9ef9821>] ? __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<
f9ef9821>] __ieee80211_stop_tx_ba_session+0x31/0x60
[mac80211]
[<
f9ef8989>] ieee80211_sta_tear_down_BA_sessions+0x39/0x60 [mac80211]
[<
f9ef1a67>] __sta_info_destroy+0x57/0x780 [mac80211]
[<
f9ef2223>] ieee80211_sta_expire+0x93/0xb0 [mac80211]
[<
f9efc8f6>] ieee80211_ibss_work+0x2d6/0x530 [mac80211]
Cc: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Sat, 24 Dec 2011 13:13:28 +0000 (18:43 +0530)]
mac80211: fix scan state machine
when we run high bandwidth UDP traffic and we trigger a scan, the scan
state machine seems to be looping in SUSPEND->RESUME->DECISION->SUSPEND
and SET_CHANNEL seems to be never called as 'tx_empty' is never true
while running UDP traffic. fix this by settting SET_CHANNEL state when
we get into RESUME state.
Cc: Leela Kella <leela@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Fri, 23 Dec 2011 17:39:27 +0000 (18:39 +0100)]
net/rfkill/rfkill-gpio.c: introduce missing kfree
Error handling code following a kmalloc should free the allocated data.
The label fail_alloc already does this for rfkill.
A simplified version of the semantic match that finds the problem is as
follows: (http://coccinelle.lip6.fr)
// <smpl>
@r exists@
local idexpression x;
statement S;
identifier f1;
position p1,p2;
expression *ptr != NULL;
@@
x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
when != if (...) { <+...x...+> }
x->f1
...>
(
return \(0\|<+...x...+>\|ptr\);
|
return@p2 ...;
)
@script:python@
p1 << r.p1;
p2 << r.p2;
@@
print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Fri, 23 Dec 2011 15:57:02 +0000 (21:27 +0530)]
ath9k_hw: increase tx status ring buffer size
AR9003 chips read tx status from ring buffer whose max number of
status descriptor is mininal compared to max number of tx buffers.
On a stress condition, it can be easily overflown which might cause
false tx hung detection. Though increasing number of max status
descriptors consumes more memory, it helps to avoid false positive
chip resets.
Cc: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:50 +0000 (08:13 +0100)]
iwlegacy: 3945: fix hw passive scan on radar channels
Patch fix firmware error on "iw dev wlan0 scan passive" for
hardware scanning (with disable_hw_scan=0 module parameter).
iwl3945 0000:03:00.0: Microcode SW error detected. Restarting 0x82000008.
iwl3945 0000:03:00.0: Loaded firmware version: 15.32.2.9
iwl3945 0000:03:00.0: Start IWL Error Log Dump:
iwl3945 0000:03:00.0: Status: 0x0002A2E4, count: 1
iwl3945 0000:03:00.0: Desc Time asrtPC blink2 ilink1 nmiPC Line
iwl3945 0000:03:00.0: SYSASSERT (0x5)
0041263900 0x13756 0x0031C 0x00000 764
iwl3945 0000:03:00.0: Error Reply type 0x000002FC cmd C_SCAN (0x80) seq 0x443E ser 0x00340000
iwl3945 0000:03:00.0: Command C_SCAN failed: FW Error
iwl3945 0000:03:00.0: Can't stop Rx DMA.
We have disable ability to change passive scanning to active on
particular channel when traffic is detected on that channel. Otherwise
firmware will report error, when we try to do passive scan on radar
channels.
Reported-and-debugged-by: Pedro Francisco <pedrogfrancisco@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:49 +0000 (08:13 +0100)]
iwlegacy: 3945: simplify calculations of retry limit
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:48 +0000 (08:13 +0100)]
iwlegacy: random 3945-rs.c cleanups
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:47 +0000 (08:13 +0100)]
iwlegacy: 4965: remove one il4965_hdl_beacon
We have two such functions.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:46 +0000 (08:13 +0100)]
iwlegacy: 3945: get rid of hw_{set,get}_rate
Remove these helpers, some are not unused at all, one can be
unrolled in place of use.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:45 +0000 (08:13 +0100)]
iwlegacy: 4965: small tx_cmd build cleanup
Get rid of two inline functions related and simplify a bit
rts_retry_limit calculations.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:44 +0000 (08:13 +0100)]
iwlegacy: 4965: toggle tx antenna inline
Make function static and change antenna number inline.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:43 +0000 (08:13 +0100)]
iwlegacy: move some i/o helpers out of inline
This save us about 20k of text size, and should have no impact on
performance as hot paths do not use much I/O.
Before:
text data bss dec hex filename
108512 1784 168 110464 1af80 drivers/net/wireless/iwlegacy/iwl3945.ko
165730 2164 156 168050 29072 drivers/net/wireless/iwlegacy/iwl4965.ko
91942 328 48 92318 1689e drivers/net/wireless/iwlegacy/iwlegacy.ko
After:
text data bss dec hex filename
95556 1784 168 97508 17ce4 drivers/net/wireless/iwlegacy/iwl3945.ko
154853 2164 156 157173 265f5 drivers/net/wireless/iwlegacy/iwl4965.ko
91634 328 48 92010 1676a drivers/net/wireless/iwlegacy/iwlegacy.ko
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Carpenter [Fri, 23 Dec 2011 07:13:42 +0000 (08:13 +0100)]
iwlegacy: off by one in iwl3945_hw_build_tx_cmd_rate()
We use "rate_index" like this:
rate = iwl3945_rates[rate_index].plcp;
The iwl3945_rates[] array has IWL_RATE_COUNT_3945 elements so the
limit here is off by one.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stanislaw Gruszka [Fri, 23 Dec 2011 07:13:41 +0000 (08:13 +0100)]
iwlegacy: remove iwl-sta.c
I forgot to remove this file before.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Thu, 22 Dec 2011 23:48:06 +0000 (01:48 +0200)]
mac80211: always clear SDATA_STATE_OFFCHANNEL flag
If the vif is stopped while it is offchannel (e.g. right
after p2p negotiation) the SDATA_STATE_OFFCHANNEL flag
is never get cleared, resulting in various bad effects
(e.g. GO can't start beaconing).
Fix it by clearing the SDATA_STATE_OFFCHANNEL flag
even if the vif is stopped.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dave Täht [Thu, 22 Dec 2011 20:55:08 +0000 (12:55 -0800)]
wireless: Treat IPv6 diffserv the same as IPv4 for 802.11e
Wireless will select a different hardware queue based on the
top 3 bits of the diffserv field, for ipv4. Extend that queue
selection mechanism to ipv6, and make the calls orthogonal.
Signed-off-by: Dave Täht <dave.taht@bufferbloat.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ilan Elias [Thu, 22 Dec 2011 09:51:54 +0000 (11:51 +0200)]
NFC: Export a new attribute nfcid1 in target info
The nfcid1 is the NFC-A identifier.
It is exported as an attribute of the target info
(returned as a response to NFC_CMD_GET_TARGET).
Signed-off-by: Ilan Elias <ilane@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Thu, 22 Dec 2011 08:36:29 +0000 (09:36 +0100)]
rt2x00: Mark active channel's survey data as "in use"
This is just a cosmetical fix since we only return survey data for the
active channel but it allows iw to show that the survey data is
for the currently used channel.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 22 Dec 2011 00:47:59 +0000 (18:47 -0600)]
b43legacy: Avoid packet losses in the dma worker code
This patch addresses a bug in the dma worker code that keeps draining
packets even when the hardware queues are full. In such cases packets
can not be passed down to the device and are erroneusly dropped by the
code. It is based on commit
bad6919469662b7c92bc6353642aaaa777b36bac,
which fixes the same problem in b43.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 21 Dec 2011 23:47:19 +0000 (00:47 +0100)]
b43: N-PHY: fix typo in TX power fix
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 21 Dec 2011 23:47:18 +0000 (00:47 +0100)]
b43: N-PHY: fix controling RF override
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 21 Dec 2011 23:47:17 +0000 (00:47 +0100)]
b43: N-PHY: update gain ctl workarounds
Specs were updated, now we match wl according to MMIO dumps.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 21 Dec 2011 23:47:16 +0000 (00:47 +0100)]
b43: add lacking boardflags defines
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 21 Dec 2011 17:27:01 +0000 (09:27 -0800)]
ath9k: make ath_mci_duty_cycle static
This fixes this sparse warning:
CHECK drivers/net/wireless/ath/ath9k/mci.c
drivers/net/wireless/ath/ath9k/mci.c:23:4: warning: symbol 'ath_mci_duty_cycle' was not declared. Should it be static?
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Djalal Harouni [Wed, 21 Dec 2011 00:21:47 +0000 (01:21 +0100)]
drivers/iwlwifi: use dma_zalloc_coherent() for DMA allocation
Replace dma_alloc_coherent()+memset() with the new dma_zalloc_coherent()
Signed-off-by: Djalal Harouni <tixxdz@opendz.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 20 Dec 2011 21:45:49 +0000 (22:45 +0100)]
b43: N-PHY: get idle TSSI values
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 20 Dec 2011 21:45:48 +0000 (22:45 +0100)]
b43: N-PHY: fix success condition of running samples
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 20 Dec 2011 21:45:47 +0000 (22:45 +0100)]
b43: N-PHY: move common TX/RX functions
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 20:23:38 +0000 (12:23 -0800)]
cfg80211: relicense reg.c reg.h and genregdb.awk to ISC
Following the tradition we have had with ath5k, ath9k, CRDA,
wireless-regdb I'd like to license this code under the permissive ISC
license for the code sharing purposes with other OSes, it'd sure be nice
to help the landscape in this area. Although I am %82.89 owner of the
regulatory code I have asked every contributor to the regulatory code
and have receieved positive Acked-bys from everyone except two deceased
entities:
o Frans Pop RIP 2010 [0]
- Frans Pop <elendil@planet.nl>
- Frans Pop <fjp@debian.org>
o Nokia RIP February, 11, 2011 [1], [2]
- ext-yuri.ershov@nokia.com
- kalle.valo@nokia.com
Frans Pop's contribution was a simple patch
55f98938, titled,
"wireless: remove trailing space in messages" which just add a \n
to some printk lines. I'm going to treat these additions as
uncopyrightable.
As for the contributions made by employees on behalf of Nokia
my contact point was Petri Karhula <petri.karhula@nokia.com> but
after one month he noted he had not been able to get traction from the
legal department on this request, as such it I proceeded by replacing
their contributions in previous patches.
The end goal is to help a clean rewrite that starts in userspace
that is shared under ISC license which currently is taking place with
the regulatory simulator [3].
[0] http://lists.debian.org/debian-devel/2011/12/msg00263.html
[1] http://press.nokia.com/2011/02/11/nokia-outlines-new-strategy-introduces-new-leadership-operational-structure/
[2] http://NokiaPlanB.com
[3] git://github.com/mcgrof/regsim.git
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Acked-by: Mihai Moldovan <ionic@ionic.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Tony Vroon <tony@linx.net>
Acked-by: Pavel Roskin <proski@gnu.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Acked-by: Pat Erley <pat-lkml@erley.org>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Chris Wright <chrisw@sous-sol.org>
Acked-by: Joe Perches <joe@perches.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: John Gordon <john@devicescape.com>
Acked-by: Simon Barber <protocolmagic@gmail.com>
Acked-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Acked-by: Jiri Benc <jbenc@upir.cz>
Acked-by: Bruno Randolf <br1@einfach.org>
Acked-by: Scott James Remnant <keybuk@google.com>
Acked-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 20:23:37 +0000 (12:23 -0800)]
cfg80211: replace reg.c Nokia commit 269ac5
Nokia hasn't gotten back to me in over 1 month for a relicense
change request. There are only a few changes that they contributed,
so just reverting their changes but replacing with another set.
This change replaces this commit:
commit
269ac5fd2d75b118d76a2291e28796527db2f3f8
Author: Kalle Valo <kalle.valo@nokia.com>
Date: Tue Dec 1 10:47:15 2009 +0200
cfg80211: indent regulatory messages with spaces
The regulatory messages in syslog look weird:
kernel: cfg80211: Regulatory domain: US
kernel: ^I(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
kernel: ^I(
2402000 KHz -
2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
kernel: ^I(
5170000 KHz -
5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
kernel: ^I(
5190000 KHz -
5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
kernel: ^I(
5210000 KHz -
5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
kernel: ^I(
5230000 KHz -
5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
kernel: ^I(
5735000 KHz -
5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
Indent them with four spaces instead of the tab character to get prettier
output.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Acked: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Petri Karhula <petri.karhula@nokia.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 20:23:36 +0000 (12:23 -0800)]
cfg80211: replace reg.c Nokia commit
c4c32294
Nokia hasn't gotten back to me in over 1 month for a relicense
change request. There are only a few changes that they contributed,
so just reverting their changes but replacing with another set.
This change replaces this commit:
commit
c4c322941ce0d7e2b7b8794ad70683123d9cb26a
Author: Yuri Ershov <ext-yuri.ershov@nokia.com>
Date: Tue Jun 29 15:08:08 2010 +0400
cfg80211: Update of regulatory request initiator handling
In some cases there could be possible dereferencing freed pointer. The
update is intended to avoid this issue.
Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Petri Karhula <petri.karhula@nokia.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 18:46:11 +0000 (10:46 -0800)]
ath9k_hw: fix sparse complaint on ar9003_switch_com_spdt_get()
This fixes this sparse complaint:
make C=2 CF="-D__CHECK_ENDIAN__" M=drivers/net/wireless/ath/
CHECK drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: expected restricted __le32 [usertype] val
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: got restricted __le16 [usertype] switchcomspdt
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: warning: incorrect type in assignment (different base types)
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: expected restricted __le32 [usertype] val
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: got restricted __le16 [usertype] switchcomspdt
The eep->modalHeader5G.switchcomspdt is a le16 and we return u16,
so just return le16_to_cpu().
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 18:46:10 +0000 (10:46 -0800)]
ath5k: avoid sparse warnings on tracing
Just skip the sparse checks on tracing.
CHECK drivers/net/wireless/ath/ath5k/base.c
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:19:1: error: incompatible types for operation (<)
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:19:1: left side has type struct ath5k_hw *<noident>
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:19:1: right side has type int
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:37:1: error: incompatible types for operation (<)
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:37:1: left side has type struct ath5k_hw *<noident>
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:37:1: right side has type int
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:63:1: error: incompatible types for operation (<)
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:63:1: left side has type struct ath5k_hw *<noident>
include/trace/../../drivers/net/wireless/ath/ath5k/trace.h:63:1: right side has type int
/home/mcgrof/wireless-testing/arch/x86/include/asm/jump_label.h:16:9: error: bad asm output
/home/mcgrof/wireless-testing/arch/x86/include/asm/jump_label.h:16:9: error: bad asm output
/home/mcgrof/wireless-testing/arch/x86/include/asm/jump_label.h:16:9: error: bad asm output
/home/mcgrof/wireless-testing/arch/x86/include/asm/jump_label.h:16:9: error: bad asm output
CC [M] drivers/net/wireless/ath/ath5k/base.o
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 18:46:09 +0000 (10:46 -0800)]
ath9k: fix tx queue sparse complaint
This fixes this rant from sparse:
CHECK drivers/net/wireless/ath/ath9k/xmit.c
drivers/net/wireless/ath/ath9k/xmit.c:107:13: warning: context imbalance in 'ath_txq_lock' - wrong count at exit
drivers/net/wireless/ath/ath9k/xmit.c:112:13: warning: context imbalance in 'ath_txq_unlock' - unexpected unlock
drivers/net/wireless/ath/ath9k/xmit.c:123:30: warning: context imbalance in 'ath_txq_unlock_complete' - unexpected unlock
CC [M] drivers/net/wireless/ath/ath9k/xmit.
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 18:46:08 +0000 (10:46 -0800)]
ath9k_hw: fix sparse warnings on ar9003_rtt.c
This fixes these sparse warnings:
CHECK drivers/net/wireless/ath/ath9k/ar9003_rtt.c
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:36:6: warning: symbol 'ar9003_hw_rtt_enable' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:41:6: warning: symbol 'ar9003_hw_rtt_disable' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:46:6: warning: symbol 'ar9003_hw_rtt_set_mask' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:52:6: warning: symbol 'ar9003_hw_rtt_force_restore' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:102:6: warning: symbol 'ar9003_hw_rtt_load_hist' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:135:6: warning: symbol 'ar9003_hw_rtt_fill_hist' was not declared. Should it be static?
drivers/net/wireless/ath/ath9k/ar9003_rtt.c:143:6: warning: symbol 'ar9003_hw_rtt_clear_hist' was not declared. Should it be stati
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ilan Elias [Tue, 20 Dec 2011 14:57:41 +0000 (16:57 +0200)]
NFC: Handle error during NCI data exchange
Add support for NCI Interface Error Notification.
When this notification is received and we're during a
data exchange transaction, indicate an error to the NFC
core layer via the data exchange callback.
Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ilan Elias [Tue, 20 Dec 2011 14:57:40 +0000 (16:57 +0200)]
NFC: Update names and structs to NCI spec 1.0 d22
Addition, deletion, and modification of NCI constants.
Changes in NCI commands, responses, and notifications structures.
Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dmitry Shmidt [Mon, 19 Dec 2011 20:32:21 +0000 (12:32 -0800)]
wireless: Protect regdomain change by mutex
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Mon, 19 Dec 2011 10:39:54 +0000 (11:39 +0100)]
mac80211: Remove superfluous ieee80211_rx_h_remove_qos_control
This seems to not serve any purpose anymore, at least all frame
processing afterwards seems to be able to deal with QoS frames. So,
let's save the expensive memmove and just leave the QoS header in the
802.11 frame for further processing.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 2 Jan 2012 21:43:54 +0000 (16:43 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next
Gustavo F. Padovan [Tue, 27 Dec 2011 16:43:41 +0000 (14:43 -0200)]
Bluetooth: Fix a compile warning in RFCOMM
sock and sk were leftover from another change.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Hemant Gupta [Fri, 23 Dec 2011 05:37:24 +0000 (11:07 +0530)]
Bluetooth: Incorrect address while storing LTK.
This patch fixes incorrect address storage while storing
Long Term Key for LE Devices using SMP (Security Manager Protocol).
The address stored should be of remote device and not of source device.
Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 22 Dec 2011 18:35:05 +0000 (16:35 -0200)]
Bluetooth: Don't disable interrupt when locking the queue
We run everything in process context now.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 22 Dec 2011 18:30:27 +0000 (16:30 -0200)]
Bluetooth: remove *_bh usage from hci_dev_list and hci_cb_list
They don't need to disable interrupts anymore, we only run in process
context now.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 22 Dec 2011 18:15:42 +0000 (16:15 -0200)]
Bluetooth: Remove lock from inquiry_cache
It was never used, so removing it.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Thu, 22 Dec 2011 18:56:05 +0000 (16:56 -0200)]
Bluetooth: add debug output to l2cap_ack_timeout()
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Tue, 20 Dec 2011 18:30:44 +0000 (16:30 -0200)]
Bluetooth: Remove l2cap priority from inside RFCOMM.
RFCOMM needs a proper priority mechanism inside itself and not try to use
l2cap priority to fix its own problem.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Jesse Sung [Thu, 22 Dec 2011 02:48:47 +0000 (10:48 +0800)]
Bluetooth: Add support for BCM20702A0 [0a5c:21e3]
Add another vendor specific ID for BCM20702A0.
output of usb-devices:
T: Bus=06 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0a5c ProdID=21e3 Rev=01.12
S: Manufacturer=Broadcom Corp
S: Product=BCM20702A0
S: SerialNumber=
9439E5CBF66C
C: #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=0mA
I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=01 Driver=(none)
I: If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
I: If#= 3 Alt= 0 #EPs= 0 Cls=fe(app. ) Sub=01 Prot=01 Driver=(none)
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Brian Gix [Thu, 22 Dec 2011 00:12:13 +0000 (16:12 -0800)]
Bluetooth: Add SMP to User Passkey and Confirm
Low Energy pairing is performed through the SMP (Security Manager Protocol)
mechanism rather than HCI.
Signed-off-by: Brian Gix <bgix@codeaurora.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Brian Gix [Thu, 22 Dec 2011 00:12:12 +0000 (16:12 -0800)]
Bluetooth: Add MITM mechanism to LE-SMP
To achive Man-In-The-Middle (MITM) level security with Low Energy,
we have to enable User Passkey Comparison. This commit modifies the
hard-coded JUST-WORKS pairing mechanism to support query via the MGMT
interface of Passkey comparison and User Confirmation.
Signed-off-by: Brian Gix <bgix@codeaurora.org>
Acked-by: Marcel Holtmann<marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Ulisses Furquim [Wed, 21 Dec 2011 22:02:36 +0000 (20:02 -0200)]
Bluetooth: Fix deadlocks with sock lock and L2CAP timers locks
When cancelling a delayed work (timer) in L2CAP we can not sleep holding
the sock mutex otherwise we might deadlock with an L2CAP timer handler.
This is possible because RX/TX and L2CAP timers run in different workqueues.
The scenario below illustrates the problem. Thus we are now avoiding to
sleep on the timers locks.
======================================================
[ INFO: possible circular locking dependency detected ]
3.1.0-05270-ga978dc7-dirty #239
-------------------------------------------------------
kworker/1:1/873 is trying to acquire lock:
(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+...}, at: [<
ffffffffa002ceac>] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
but task is already holding lock:
((&(&chan->chan_timer)->work)){+.+...}, at: [<
ffffffff81051a86>] process_one_work+0x126/0x450
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 ((&(&chan->chan_timer)->work)){+.+...}:
[<
ffffffff8106b276>] check_prevs_add+0xf6/0x170
[<
ffffffff8106b903>] validate_chain+0x613/0x790
[<
ffffffff8106dfee>] __lock_acquire+0x4be/0xac0
[<
ffffffff8106ec2d>] lock_acquire+0x8d/0xb0
[<
ffffffff81052a6f>] wait_on_work+0x4f/0x160
[<
ffffffff81052ca3>] __cancel_work_timer+0x73/0x80
[<
ffffffff81052cbd>] cancel_delayed_work_sync+0xd/0x10
[<
ffffffffa002f2ed>] l2cap_chan_connect+0x22d/0x470 [bluetooth]
[<
ffffffffa002fb51>] l2cap_sock_connect+0xb1/0x140 [bluetooth]
[<
ffffffff8130811b>] kernel_connect+0xb/0x10
[<
ffffffffa00cf98a>] rfcomm_session_create+0x12a/0x1c0 [rfcomm]
[<
ffffffffa00cfbe7>] __rfcomm_dlc_open+0x1c7/0x240 [rfcomm]
[<
ffffffffa00d07c2>] rfcomm_dlc_open+0x42/0x70 [rfcomm]
[<
ffffffffa00d3b03>] rfcomm_sock_connect+0x103/0x150 [rfcomm]
[<
ffffffff8130bd7e>] sys_connect+0xae/0xc0
[<
ffffffff813368d2>] compat_sys_socketcall+0xb2/0x220
[<
ffffffff813b2089>] sysenter_dispatch+0x7/0x30
-> #0 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+...}:
[<
ffffffff8106b16d>] check_prev_add+0x6cd/0x6e0
[<
ffffffff8106b276>] check_prevs_add+0xf6/0x170
[<
ffffffff8106b903>] validate_chain+0x613/0x790
[<
ffffffff8106dfee>] __lock_acquire+0x4be/0xac0
[<
ffffffff8106ec2d>] lock_acquire+0x8d/0xb0
[<
ffffffff8130d91a>] lock_sock_nested+0x8a/0xa0
[<
ffffffffa002ceac>] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[<
ffffffff81051ae4>] process_one_work+0x184/0x450
[<
ffffffff8105276e>] worker_thread+0x15e/0x340
[<
ffffffff81057bb6>] kthread+0x96/0xa0
[<
ffffffff813b1ef4>] kernel_thread_helper+0x4/0x10
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock((&(&chan->chan_timer)->work));
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);
lock((&(&chan->chan_timer)->work));
lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP);
*** DEADLOCK ***
2 locks held by kworker/1:1/873:
#0: (events){.+.+.+}, at: [<
ffffffff81051a86>] process_one_work+0x126/0x450
#1: ((&(&chan->chan_timer)->work)){+.+...}, at: [<
ffffffff81051a86>] process_one_work+0x126/0x450
stack backtrace:
Pid: 873, comm: kworker/1:1 Not tainted
3.1.0-05270-ga978dc7-dirty #239
Call Trace:
[<
ffffffff813a0f6e>] print_circular_bug+0xd2/0xe3
[<
ffffffff8106b16d>] check_prev_add+0x6cd/0x6e0
[<
ffffffff8106b276>] check_prevs_add+0xf6/0x170
[<
ffffffff8106b903>] validate_chain+0x613/0x790
[<
ffffffff8106dfee>] __lock_acquire+0x4be/0xac0
[<
ffffffff8130d8f6>] ? lock_sock_nested+0x66/0xa0
[<
ffffffff8106ea30>] ? lock_release_nested+0x100/0x110
[<
ffffffff8130d8f6>] ? lock_sock_nested+0x66/0xa0
[<
ffffffff8106ec2d>] lock_acquire+0x8d/0xb0
[<
ffffffffa002ceac>] ? l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[<
ffffffff8130d91a>] lock_sock_nested+0x8a/0xa0
[<
ffffffffa002ceac>] ? l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[<
ffffffff81051a86>] ? process_one_work+0x126/0x450
[<
ffffffffa002ceac>] l2cap_chan_timeout+0x3c/0xe0 [bluetooth]
[<
ffffffff81051ae4>] process_one_work+0x184/0x450
[<
ffffffff81051a86>] ? process_one_work+0x126/0x450
[<
ffffffffa002ce70>] ? l2cap_security_cfm+0x4e0/0x4e0 [bluetooth]
[<
ffffffff8105276e>] worker_thread+0x15e/0x340
[<
ffffffff81052610>] ? manage_workers+0x110/0x110
[<
ffffffff81057bb6>] kthread+0x96/0xa0
[<
ffffffff813b1ef4>] kernel_thread_helper+0x4/0x10
[<
ffffffff813af69d>] ? retint_restore_args+0xe/0xe
[<
ffffffff81057b20>] ? __init_kthread_worker+0x70/0x70
[<
ffffffff813b1ef0>] ? gs_change+0xb/0xb
Signed-off-by: Ulisses Furquim <ulisses@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Ulisses Furquim [Wed, 21 Dec 2011 12:11:33 +0000 (10:11 -0200)]
Bluetooth: Make HCI call directly into SCO and L2CAP event functions
The struct hci_proto and all related register/unregister and dispatching
code was removed. HCI core code now call directly the SCO and L2CAP
event functions.
Signed-off-by: Ulisses Furquim <ulisses@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Mon, 19 Dec 2011 14:14:18 +0000 (16:14 +0200)]
Bluetooth: Remove magic numbers from le scan cmd
Make code readable by removing magic numbers.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Tue, 20 Dec 2011 19:15:56 +0000 (17:15 -0200)]
Bluetooth: fix bt_accept_dequeue() to work in process context
No local_bh_disable is needed there once we run everything in process
context. The same goes for the replacement of bh_lock_sock() by
lock_sock().
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Helmut Schaa [Wed, 21 Dec 2011 08:11:35 +0000 (09:11 +0100)]
mac80211: Keep skb->piority for relayed frames in AP mode
When mac80211 relays a frame from STA1 to STA2 in AP mode it will get
re-classified in the tx path. Unfortunately the frame protocol field
is always set to ETH_P_8023 while the classification only kicks in
for ETH_P_IP. Hence, a high priority frame from STA1 will be send to
STA2 as best effort.
Instead of running classification on the frame just use the same
priority as STA1 did. Do this by adding 256 to the skb->priority
to allow cfg80211_classify8021d to shortcut frame classification.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Wed, 21 Dec 2011 07:47:22 +0000 (23:47 -0800)]
mwifiex: fix issues in band configuration code
Currently due to following issues in the code even if device is
configured in B only, G only or BG mode using iw bitrates command,
ibss is getting created in BGN mode.
1) mwifiex_channels_to_cfg80211_channel_type() routine gives channel
type as NL80211_CHAN_HT20 for non-HT channel as well, because driver
doesn't store HT information provided by stack for the channel.
This issue is fixed by maintaining channel type information in
'adapter->channel_type'.
2) Band configuration is unnecessarily overwritten with BGN/AN while
setting channel.
This patch makes sure that "adapter->config_bands" correctly gets
modified while setting channel.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Wed, 21 Dec 2011 07:47:21 +0000 (23:47 -0800)]
mwifiex: use IEEE80211_HT_PARAM_CHA_SEC_* macros
Replace driver specific macros with the corresponding
IEEE80211_HT_PARAM_CHA_SEC_* macros defined in ieee80211.h.
Also, rename 'adapter->chan_offset' to 'adapter->sec_chan_offset'
for consistency.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Amitkumar Karwar [Wed, 21 Dec 2011 07:47:20 +0000 (23:47 -0800)]
mwifiex: remove redundant band config code
struct mwifiex_ds_band_cfg and mwifiex_set_radio_band_cfg() routine
are unnecessary. It can be done with simple equivalant code.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Tue, 20 Dec 2011 19:18:48 +0000 (11:18 -0800)]
atheros: force endian checks on atheros wireless drivers
Please NACK nasty patches.
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marek Lindner [Tue, 20 Dec 2011 15:16:52 +0000 (23:16 +0800)]
mac80211: ibss should not purge clients it is not responsible for
The IBSS merge code calls ieee80211_sta_expire() with a relatively
short expire timeout that purges other clients prematurely. The
expire function has to check that only the clients belonging to
the vif in question are purged.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Tue, 20 Dec 2011 06:07:08 +0000 (11:37 +0530)]
mwl8k: Call ieee80211_stop_tx_ba_cb_irqsafe for already deleted BA stream
When stack calls ampdu_action with action = IEEE80211_AMPDU_TX_STOP
for a stream that has already been removed from the driver, call
ieee80211_tx_ba_stop_irqsafe to clear the stream in the stack.
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>
Luis R. Rodriguez [Tue, 20 Dec 2011 03:30:43 +0000 (19:30 -0800)]
ath9k: fix roadkill due to Joe's patch on ath_dbg() changes
Joe changed ath_dbg() to simpify code but while his patch was
being merged dfs.c was born and as such did not get the change
Joe envisioned. This fixes that. Test compiled with:
make allmodconfig
Cc: Joe Perches <joe@perches.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: John W. Linville <linville@tuxdriver.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Mon, 19 Dec 2011 22:00:59 +0000 (14:00 -0800)]
iwlagn: fix (remove) use of PAGE_SIZE
The ICT code erroneously uses PAGE_SIZE. The bug
is that PAGE_SIZE isn't necessarily 4096, so on
such platforms this code will not work correctly
as we'll try to attempt to read an index in the
table that the device never wrote, it always has
4096-byte pages.
Additionally, the manual alignment code here is
unnecessary -- Documentation/DMA-API-HOWTO.txt
states:
The cpu return address and the DMA bus master address are both
guaranteed to be aligned to the smallest PAGE_SIZE order which
is greater than or equal to the requested size. This invariant
exists (for example) to guarantee that if you allocate a chunk
which is smaller than or equal to 64 kilobytes, the extent of the
buffer you receive will not cross a 64K boundary.
Just use appropriate new constants and get rid of
the alignment code.
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Cc: stable@vger.kernel.org
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>
Alan Cox [Mon, 19 Dec 2011 21:07:33 +0000 (21:07 +0000)]
rt2800: Add support for the Fujitsu Stylistic Q550
Just another USB identifier.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Andres Salomon [Mon, 19 Dec 2011 20:22:58 +0000 (12:22 -0800)]
libertas: clean up scan thread handling
The libertas scan thread expects priv->scan_req to be non-NULL. In theory,
it should always be set. In practice, we've seen the following oops:
[ 8363.067444] Unable to handle kernel NULL pointer dereference at virtual address
00000004
[ 8363.067490] pgd =
c0004000
[ 8363.078393] [
00000004] *pgd=
00000000
[ 8363.086711] Internal error: Oops: 17 [#1] PREEMPT
[ 8363.091375] Modules linked in: fuse libertas_sdio libertas psmouse mousedev ov7670 mmp_camera joydev videobuf2_core videobuf2_dma_sg videobuf2_memops [last unloaded: scsi_wait_scan]
[ 8363.107490] CPU: 0 Not tainted (
3.0.0-gf7ccc69 #671)
[ 8363.112799] PC is at lbs_scan_worker+0x108/0x5a4 [libertas]
[ 8363.118326] LR is at 0x0
[ 8363.120836] pc : [<
bf03a854>] lr : [<
00000000>] psr:
60000113
[ 8363.120845] sp :
ee66bf48 ip :
00000000 fp :
00000000
[ 8363.120845] r10:
ee2c2088 r9 :
c04e2efc r8 :
eef97005
[ 8363.132231] r7 :
eee0716f r6 :
ee2c02c0 r5 :
ee2c2088 r4 :
eee07160
[ 8363.137419] r3 :
00000000 r2 :
a0000113 r1 :
00000001 r0 :
eee07160
[ 8363.143896] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 8363.157630] Control:
10c5387d Table:
2e754019 DAC:
00000015
[ 8363.163334] Process kworker/u:1 (pid: 25, stack limit = 0xee66a2f8)
While I've not found a smoking gun, there are two places that raised red flags
for me. The first is in _internal_start_scan, when we queue up a scan; we
first queue the worker, and then set priv->scan_req. There's theoretically
a 50mS delay which should be plenty, but doing things that way just seems
racy (and not in the good way).
The second is in the scan worker thread itself. Depending on the state of
priv->scan_channel, we cancel pending scan runs and then requeue a run in
300mS. We then send the scan command down to the hardware, sleep, and if
we get scan results for all the desired channels, we set priv->scan_req to
NULL. However, it that's happened in less than 300mS, what happens with
the pending scan run?
This patch addresses both of those concerns. With the patch applied, we
have not seen the oops in the past two weeks.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 19 Dec 2011 16:11:54 +0000 (08:11 -0800)]
ath9k: classify DFS debug header further
DFS_DEBUG_H is very generic, instead use something more specific
to ath9k such as ATH9K_DFS_DEBUG_H.
Reported-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Wed, 21 Dec 2011 20:02:18 +0000 (15:02 -0500)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx
Ulisses Furquim [Wed, 21 Dec 2011 03:32:09 +0000 (01:32 -0200)]
Bluetooth: Always compile SCO and L2CAP in Bluetooth Core
The handling of SCO audio links and the L2CAP protocol are essential to
any system with Bluetooth thus are always compiled in from now on.
Signed-off-by: Ulisses Furquim <ulisses@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Ulisses Furquim [Tue, 20 Dec 2011 19:10:51 +0000 (17:10 -0200)]
Bluetooth: Remove global mutex hci_task_lock
The hci_task_lock mutex (previously a lock) was supposed to protect the
register/unregister of HCI protocols against RX/TX tasks. This will not
be needed anymore because SCO and L2CAP will always be compiled.
Moreover, with the recent move of RX/TX to workqueues per device the
global hci_task_lock was causing starvation between different HCI
devices.
Signed-off-by: Ulisses Furquim <ulisses@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Bing Zhao [Wed, 21 Dec 2011 02:19:00 +0000 (18:19 -0800)]
Bluetooth: btusb: fix bInterval for high/super speed isochronous endpoints
For high-speed/super-speed isochronous endpoints, the bInterval
value is used as exponent, 2^(bInterval-1). Luckily we have
usb_fill_int_urb() function that handles it correctly. So we just
call this function to fill in the RX URB.
Cc: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Eyal Shapira [Tue, 20 Dec 2011 12:55:38 +0000 (14:55 +0200)]
wl12xx: mark no sched scan only after FW event
stop sched scan isn't an immediate operation
and we need to wait for PERIODIC_SCAN_COMPLETE_EVENT_ID
after sending a stop before changing internal state
and notifying upper layers.
Not doing this caused problems when canceling an existing sched
scan and immediately requesting to start a new one
with a different configuration as the FW was still
in the middle of the previous sched scan.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eyal Shapira [Tue, 20 Dec 2011 10:04:01 +0000 (12:04 +0200)]
wl12xx: fix sched scan of DFS channels
DFS channels weren't scanned properly because
min/max_duration weren't set for these channels
even though they're required by the FW.
The change sets passive_duration and min/max_duration
for all channels as the FW uses the correct parameters
according to the channel type.
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Mon, 19 Dec 2011 14:31:55 +0000 (16:31 +0200)]
wl12xx: add missing copyright notice
The wl12xx_platform_data.c file did not have a proper copyright
notice.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:45 +0000 (20:25 +0200)]
wl12xx: check the actual vif operstate in wl1271_dev_notify
The current wl1271_dev_notify implementation sets the
new operstate to all associated stations (while only
a specific vif was changed).
Until we'll have a method to get the actual vif from
the given dev, check the current operstate of each vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:44 +0000 (20:25 +0200)]
wl12xx: stop device role on remove_interface
When removing a sta/ibss role, the device role has to
stopped (and disabled) as well.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:43 +0000 (20:25 +0200)]
wl12xx: fix checking of started dev role
dev_role_id only indicates whether the dev role
is enabled, not started (e.g. on IBSS merge,
the device role is enabled, but not started).
Checking for any role in ROC (in order to determine
whether dev role was started) is wrong as well,
especially in multi-vif env.
Check for started dev role only by checking the dev_hlid.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:42 +0000 (20:25 +0200)]
wl12xx: flush packets before stopping dev role
During sta disconnection, a deauth packet is being queued to
the dev role queue. However, the dev role is being stopped
before the packet was sent.
Flush the tx queue before stopping the dev role.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:41 +0000 (20:25 +0200)]
wl12xx: make WL1271_FLAG_IDLE flag per-vif
This flag should be set per-vif, rather than globally.
Rename the flag to indicate IN_USE (rather than IDLE), as
in the default configuration (i.e. flag is clear) the vif
should be idle.
Change all the bit operations (and elp conditions) appropriately.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 18 Dec 2011 18:25:40 +0000 (20:25 +0200)]
wl12xx: remove redundant code from wl1271_op_conf_tx
Since the conf_tx callback passes the vif as param,
we must have been added first (and mac80211 verifies it).
Remove the handling of such case.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Mon, 19 Dec 2011 10:00:03 +0000 (12:00 +0200)]
wl12xx: implement change_interface
Implement the change_interface callback by simply removing the
current vif and adding a new one after updating the vif type.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Gustavo F. Padovan [Tue, 20 Dec 2011 12:57:28 +0000 (10:57 -0200)]
Bluetooth: Rename info_work to info_timer
It makes more sense this way, since info_timer is a timer using delayed
work API.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Tue, 20 Dec 2011 12:57:27 +0000 (10:57 -0200)]
Bluetooth: convert security timer to delayed_work
This one also needs to run in process context
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Gustavo F. Padovan [Tue, 20 Dec 2011 12:57:26 +0000 (10:57 -0200)]
Bluetooth: Move l2cap_{set,clear}_timer to l2cap.h
It is the only place where it is used.
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Mon, 19 Dec 2011 14:31:30 +0000 (16:31 +0200)]
Bluetooth: Clean up magic pointers
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Mon, 19 Dec 2011 14:31:29 +0000 (16:31 +0200)]
Bluetooth: Check for flow control mode
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Andrei Emeltchenko [Mon, 19 Dec 2011 14:31:28 +0000 (16:31 +0200)]
Bluetooth: Initialize default flow control mode
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>