When op_flush() is called with no drop (drop=false), the driver
tries to tx as many frames as possible in about 100ms on every
hw queue. During this time period frames from sw queue are also
scheduled on to respective hw queue.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Randy Dunlap [Sat, 19 Feb 2011 01:25:36 +0000 (17:25 -0800)]
wl12xx: fix sdio_test kconfig/build errors
The wl12xx sdio_test code uses wl12xx_get_platform_data, which is
only present when WL12*_SDIO is enabled, so make WL12XX_SDIO_TEST
depend on WL12XX_SDIO so that the needed interface will be present.
sdio_test.c:(.devinit.text+0x13178): undefined reference to `wl12xx_get_platform_data'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Luciano Coelho <luciano.coelho@nokia.com> Cc: Roger Quadros <roger.quadros@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wojciech Dubowik [Fri, 18 Feb 2011 12:06:42 +0000 (13:06 +0100)]
ath5k: Enable AR2315 chipset recognition
Enable recognition of AR2315 chipsets in ath5k driver.
Reported-by: Simon Morgenthaler <s.morgenthaler@students.unibe.ch> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vivek Natarajan [Fri, 18 Feb 2011 10:39:51 +0000 (16:09 +0530)]
ath9k_htc: Fix a compilation warning.
Initialize caldata to avoid compilation warning.
CC [M] drivers/net/wireless/ath/ath9k/htc_drv_main.o
drivers/net/wireless/ath/ath9k/htc_drv_main.c: In function ‘ath9k_htc_config’:
drivers/net/wireless/ath/ath9k/htc_drv_main.c:172: warning: ‘caldata’ may be used uninitialized in this function
drivers/net/wireless/ath/ath9k/htc_drv_main.c:172: note: ‘caldata’ was declared here
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Wed, 16 Feb 2011 07:46:58 +0000 (08:46 +0100)]
mac80211: fix 2.4 GHz 40 MHz disabling
The module parameter ieee80211_disable_40mhz_24ghz
was meant to allow disabling 40 MHz operation in
the 2.4 GHz band by default. However, it is buggy
as implemented because while it advertises to the
AP that the device doesn't support 40 MHz, it will
itself still use 40 MHz configurations.
To fix this, clear the 40 MHz bits from the sband
completely instead of overriding where used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Henry Ptasinski [Fri, 18 Feb 2011 05:29:01 +0000 (21:29 -0800)]
wireless-next-2.6: brcm80211: fix compile issue
Commit 59eb21a65047 "cfg80211: Extend channel to frequency mapping for 802.11j"
changed the definition of the ieee80211_channel_to_frequency; so fix its
usage in brcmfmac.
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me> Reviewed-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 15 Feb 2011 15:37:06 +0000 (09:37 -0600)]
p54: Fix compile warning
If any of the p54-based drivers are built with CONFIG_P54_LEDS not
defined, the following warning is generated:
CC [M] drivers/net/wireless/p54/main.o
drivers/net/wireless/p54/main.c: In function ‘p54_register_common’:
drivers/net/wireless/p54/main.c:614:21: warning: unused variable ‘priv’
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bob Copeland [Tue, 15 Feb 2011 14:19:28 +0000 (09:19 -0500)]
ath5k: move external function definitions to a header file
Johannes pointed out the mess of external function prototypes in the
mac80211-ops.c file. Woe to anyone who changes these functions...
Signed-off-by: Bob Copeland <me@bobcopeland.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Michael Büsch [Mon, 14 Feb 2011 23:21:50 +0000 (00:21 +0100)]
ssb: Make ssb_wait_bit multi-bit safe
ssb_wait_bit was designed for only one-bit bitmasks.
People start using it for multi-bit bitmasks. Make the "set" case
is safe for this. The "unset" case is already safe.
This does not change behavior of the current code.
Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Correct channel setting function must be used for AR2317.
When I tested ahb patch on bullet2 all seemed to work fine,
but it couldn't connect another host (using ibss for example).
During an analysis I observed that it's transmitting on another
channel. I looked into madwifi code and understood that
the problem is in channel setting function. So atheros RF2317 not
fully handled in the current ath5k version and must be patched.
Signed-off-by: Nikolay Ledovskikh <nledovskikh@gmail.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
taken two RT35XX EDIMAX from DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: fix conn_mon_timer running after disassociate
Low level driver could pass rx frames to us after disassociate, what
can lead to run conn_mon_timer by ieee80211_sta_rx_notify(). That
is obviously wrong, but nothing happens until we unload modules and
resources are used after free. If kernel debugging is enabled following
warning could be observed:
Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Claudio Takahasi [Wed, 16 Feb 2011 22:44:53 +0000 (20:44 -0200)]
Bluetooth: Send LE Connection Update Command
If the new connection update parameter are accepted, the LE master
host sends the LE Connection Update Command to its controller informing
the new requested parameters.
Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Ville Tervo [Wed, 16 Feb 2011 14:32:41 +0000 (16:32 +0200)]
Bluetooth: Use proper timer for hci command timout
Use proper timer instead of hci command flow control to timeout
failed hci commands. Otherwise stack ends up sending commands
when flow control is used to block new commands.
2010-09-01 18:29:41.592132 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:16:CF:E1:C7:D7 mode 2 clkoffset 0x0000
2010-09-01 18:29:41.592681 > HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 0
2010-09-01 18:29:51.022033 < HCI Command: Remote Name Request Cancel (0x01|0x001a) plen 6
bdaddr 00:16:CF:E1:C7:D7
Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Implements L2CAP Connection Parameter Update Response defined in
the Bluetooth Core Specification, Volume 3, Part A, section 4.21.
Address the LE Connection Parameter Procedure initiated by the slave.
Connection Interval Minimum and Maximum have the same range: 6 to
3200. Time = N * 1.25ms. Minimum shall be less or equal to Maximum.
The Slave Latency field shall have a value in the range of 0 to
((connSupervisionTimeout / connIntervalMax) - 1). Latency field shall
be less than 500. connSupervisionTimeout = Timeout Multiplier * 10 ms.
Multiplier field shall have a value in the range of 10 to 3200.
Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Claudio Takahasi [Fri, 11 Feb 2011 21:28:54 +0000 (19:28 -0200)]
Bluetooth: Add LE signaling commands handling
This patch splits the L2CAP command handling function in order to
have a clear separation between the commands related to BR/EDR and
LE. Commands and responses in the LE signaling channel are not being
handled yet, command reject is sent to all received requests. Bluetooth
Core Specification, Volume 3, Part A, section 4 defines the signaling
packets formats and allowed commands/responses over the LE signaling
channel.
Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Ville Tervo [Fri, 11 Feb 2011 01:38:47 +0000 (22:38 -0300)]
Bluetooth: Add LE connect support
Bluetooth V4.0 adds support for Low Energy (LE) connections.
Specification introduces new set of hci commands to control LE
connection. This patch adds logic to create, cancel and disconnect
LE connections.
Signed-off-by: Ville Tervo <ville.tervo@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
The DMA latency issue is observed only in Intel pinetrail platforms
but in the driver we had a default PM-QOS value of 55. This caused
unnecessary power consumption and battery drain in other platforms.
Remove the pm-qos thing in the driver code and address the throughput
issue in Intel pinetrail platfroms in user space using any one of
the scripts in below links:
Commit: "p54: enhance rssi->dBm database import"
changed the way how the driver deals with the
rssical data. A new data format was necessary
and hence this patch.
NOTE: (for users with a custom eeprom binary)
I spent some time updating p54tools to support
the new format too: => (git available from)
http://git.kernel.org/?p=linux/kernel/git/chr/p54tools.git
It now comes with a simplistic script "n800_rssi2v2.sh"
which can be used to automate the conversion.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch fixes several shortcomings of the
previous implementation. Features of the
rewrite include:
* handles undocumented "0x0000" word at the
start of the frequency table.
(Affected some early? DELL 1450 USB devices
and my Symbol 5GHz miniPCI card.)
* supports more than just one reference point
per band. (Also needed for the Symbol card.)
* ships with default values in case the eeprom
data is damaged, absent or unsupported.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:42 +0000 (20:43 +0200)]
zd1211rw: move async iowrite16v up to callers
Writing beacon to device happen through multiple write command calls.
zd_usb_iowrite16v uses synchronous urb call and with multiple write
commands in row causes high CPU usage.
Make asynchronous zd_usb_iowrite16v_async available outside zd_usb.c
and use where possible.
This lower CPU usage from ~10% to ~2% on Intel Atom when running
AP-mode with 100 TU beacon interval.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:32 +0000 (20:43 +0200)]
zd1211rw: use async urb for write command
Writing beacon to device happen through multiple write command calls.
zd_usb_iowrite16v uses synchronous urb call and with multiple write
commands in row causes high CPU usage.
This patch makes zd_usb_iowrite16v use asynchronous urb submit within
zd_usb.c. zd_usb_iowrite16v_async_start is used to initiate writing
multiple commands to device using zd_usb_iowrite16v_async. Each URB
is delayed and submitted to device by next zd_usb_iowrite16v_async
call or by call to zd_usb_iowrite16v_async_end. URBs submitted by
zd_usb_iowrite16v_async have URB_NO_INTERRUPT set and last URB
send by zd_usb_iowrite16v_async_end does not. This lower CPU
usage when doing writes that require multiple URBs.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jussi Kivilinna [Sat, 12 Feb 2011 18:43:23 +0000 (20:43 +0200)]
zd1211rw: correct use of usb_bulk_msg on interrupt endpoints
zd1211rw is using usb_bulk_msg() with usb_sndbulkpipe() on interrupt endpoint.
However usb_bulk_msg() internally corrects this and makes interrupt URB.
It's better to change usb_bulk_msgs in zd1211rw to usb_interrupt_msg for less
confusion.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sat, 12 Feb 2011 13:17:15 +0000 (14:17 +0100)]
mac80211: Remove superfluous if clause
ieee80211_rx_h_check returned RX_DROP_MONITOR in case the if statement
in question was true but the same return value is also used directly
after the if clause. Hence, we can just drop the whole if clause and as
such simplify the code.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: disable beaconing before stopping beacon queue
Beaconing should be disabled before stopping beacon queue.
Not doing so could queue up beacons in hw that causes
failure to stop Tx DMA, due to pending frames in hw
and also unnecessary beacon tasklet schedule.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Seth Forshee [Mon, 14 Feb 2011 14:52:25 +0000 (08:52 -0600)]
rt2x00: Check for errors from skb_pad() calls
Commit 739fd94 ("rt2x00: Pad beacon to multiple of 32 bits")
added calls to skb_pad() without checking the return value,
which could cause problems if any of those calls does happen
to fail. Add checks to prevent this from happening.
Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Bluetooth: Merge L2CAP and SCO modules into bluetooth.ko
Actually doesn't make sense have these modules built separately.
The L2CAP layer is needed by almost all Bluetooth protocols and profiles.
There isn't any real use case without having L2CAP loaded.
SCO is only essential for Audio transfers, but it is so small that we can
have it loaded always in bluetooth.ko without problems.
If you really doesn't want it you can disable SCO in the kernel config.
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vasiliy Kulikov [Mon, 14 Feb 2011 10:54:26 +0000 (13:54 +0300)]
Bluetooth: sco: fix information leak to userspace
struct sco_conninfo has one padding byte in the end. Local variable
cinfo of type sco_conninfo is copied to userspace with this uninizialized
one byte, leading to old stack contents leak.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Vasiliy Kulikov [Mon, 14 Feb 2011 10:54:31 +0000 (13:54 +0300)]
Bluetooth: bnep: fix buffer overflow
Struct ca is copied from userspace. It is not checked whether the "device"
field is NULL terminated. This potentially leads to BUG() inside of
alloc_netdev_mqs() and/or information leak by creating a device with a name
made of contents of kernel stack.
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Larry Finger [Fri, 11 Feb 2011 20:33:58 +0000 (14:33 -0600)]
rtlwifi: rtl8192ce: Refactor rtl8192ce/dm
To reuse as much code as possible when adding additional drivers to the
rtlwifi tree, the common parts of various routines are moved to
drivers/net/wireless/rtlwifi. This patch does that for the version of
dm.{h,c} used by rtl8192ce.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Fri, 11 Feb 2011 20:27:49 +0000 (14:27 -0600)]
rtlwifi: Add usb driver
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: George <george0505@realtek.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Fri, 11 Feb 2011 20:27:46 +0000 (14:27 -0600)]
rtlwifi: Modify core routines
The rtlwifi core needs some changes before inclusion of a driver
for the RTL8192CU USB device.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: <chaoming_li@realsil.com.cn> Signed-off-by: <george0505@realtek.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Combo devices have TX statistics on different place, because
struct statistics_rx_bt and struct statistics_rx have different
size. User proper values on combo devices instead of random data.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Make ack health code easies to read. Compared to previous
code, we do not print debug messages when expected_ack_cnt_delta == 0
and also do check against negative deltas.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
No functional change, make recover from statistics code
easies to read.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Steve Brown [Tue, 8 Feb 2011 00:10:39 +0000 (17:10 -0700)]
ath9k: Remove redundant beacon_interval
The variable appears in both ath_softc and ath_beacon_config.
The struct ath_beacon_config is embedded in ath_softc. The redundant
variable was added by commit id 57c4d7b4c4986037be51476b8e3025d5ba18d8b8.
Signed-off-by: Steve Brown <sbrown@cortland.com> Reviewed-by: Mohammed Shafi <shafi.ath9k@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 7 Feb 2011 21:44:36 +0000 (13:44 -0800)]
mac80211: Allow work items to use existing channel type.
Narrow channel types can function within larger channel types.
So, use existing channel type for work items when possible.
This decreases hardware channel changes significantly when
using non NO_HT channel types on the operating channel.
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 7 Feb 2011 21:44:35 +0000 (13:44 -0800)]
mac80211: Allow scanning on existing channel-type.
Previous code set the channel type to NO_HT, but it
appears that NO_HT packets can be sent on any channel
type, so we do not need to change the channel type
as long as the channel is correct.
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ben Greear [Mon, 7 Feb 2011 21:44:34 +0000 (13:44 -0800)]
mac80211: Properly set work-item channel-type.
Some were indirectly set to NO_HT (zero), but I think
it's better to explicitly set it in case the enum ever
changes. In cfg.c, it seems the channel-type was just
ignored (and thus always set to NO_HT).
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Tue, 8 Feb 2011 16:43:19 +0000 (18:43 +0200)]
mac80211: add missing locking in ieee80211_reconfig
When suspending an associated system, and then resuming,
the station vif is being reconfigured without taking the
sdata->u.mgd.mtx lock, which results in the following warning:
Many users report very low speed problem on 3945 devices,
this patch fixes problem, but only for some of them.
For unknown reason, sometimes after hw scanning, device is not able
to receive frames at high rate. Since plcp health check may request
hw scan to "reset radio", performance problem start to be observable
after update kernel to .35, where plcp check was introduced.
Bug reporter confirmed that removing plcp check fixed problem for him.
Reported-and-tested-by: SilvioTO <silviotoya@yahoo.it> Cc: stable@kernel.org # 2.6.35+ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Eliad Peller [Wed, 2 Feb 2011 07:59:35 +0000 (09:59 +0200)]
wl12xx: move to new firmware (6.1.3.50.49)
This patch adds support for the new wl12xx firmware (Rev 6.1.3.50.49)
Since this fw is not backward compatible with previous fw versions,
a new fw (with different name) is being fetched.
(the patch is big because it contains all the required fw api changes.
splitting it into multiple patches will result in corrupted intermediate
commits)