Arik Nemtsov [Tue, 22 Feb 2011 22:22:30 +0000 (00:22 +0200)]
wl12xx: AP-mode - count free FW TX blocks per link
Count the number of FW TX blocks allocated per link. We add blocks to a
link counter when allocated for a TX descriptor. We remove blocks
according to counters in fw_status indicating the number of freed blocks
in FW. These counters are polled after each IRQ.
Arik Nemtsov [Tue, 22 Feb 2011 22:22:28 +0000 (00:22 +0200)]
wl12xx: AP-mode - support HW based link PS monitoring
When operating in AP mode the wl1271 hardware filters out null-data
packets as well as management packets. This makes it impossible for
mac80211 to monitor the PS mode by using the PM bit of incoming frames.
Disable mac80211 automatic link PS-mode handling by supporting
IEEE80211_HW_AP_LINK_PS in HW flags.
Arik Nemtsov [Tue, 22 Feb 2011 22:22:27 +0000 (00:22 +0200)]
wl12xx: report invalid TX rate when returning non-TX-ed skbs
Report a TX rate idx of -1 and count 0 when returning untransmitted
skbs to mac80211 using ieee80211_tx_status(). Otherwise mac80211
tries to use the returned (essentially garbage) status.
Arik Nemtsov [Tue, 22 Feb 2011 22:22:26 +0000 (00:22 +0200)]
wl12xx: AP-mode - TX queue per link in AC
When operating in AP-mode we require a per link tx-queue.
This allows us to implement HW assisted PS mode for links,
as well as regulate per-link FW TX blocks consumption.
Split each link into ACs to support future QoS for AP-mode.
AC queues are emptied in priority and per-link queues are
scheduled in a simple round-robin fashion.
Arik Nemtsov [Tue, 22 Feb 2011 22:22:25 +0000 (00:22 +0200)]
wl12xx: AP-mode - fix race condition on sta connection
If a sta starts transmitting immediately after authentication, sometimes
the FW deauthenticates it. Fix this by marking the sta "in-connection"
in FW before sending the autentication response.
The "in-connection" entry is automatically removed when connection
succeeds or after a timeout.
Arik Nemtsov [Tue, 22 Feb 2011 22:22:24 +0000 (00:22 +0200)]
wl12xx: fix potential race condition with TX queue watermark
Check the conditions for the high/low TX queue watermarks when the
spin-lock is taken. This prevents race conditions as tx_queue_count and
the flag checked are only modified when the spin-lock is taken.
The following race was in mind:
- Queues are almost full and wl1271_op_tx() will stop the queues, but it
doesn't get the spin-lock yet.
- (on another CPU) tx_work_locked() dequeues 15 skbs from this queue and
tx_queue_count is updated to reflect this
- wl1271_op_tx() does not check tx_queue_count after taking the
spin-lock and incorrectly stops the queue.
Eliad Peller [Wed, 2 Feb 2011 09:20:05 +0000 (11:20 +0200)]
wl12xx: declare support for IEEE80211_HW_REPORTS_TX_ACK_STATUS
The wl12xx fw supports ack status reporting for tx frames, so
add the IEEE80211_HW_REPORTS_TX_ACK_STATUS flag to our supported
features.
Since we do the rate control in the fw, we'll probably want
to adjust the STA_LOST_PKT_THRESHOLD heuristics in the future, to
account for retransmissions as well.
Gery Kahn [Tue, 1 Feb 2011 09:03:08 +0000 (03:03 -0600)]
wl12xx: update PLT initialization for new firmware
In revision > 6.1.3.0.0 the firmware expects memory configuration command
as part of boot. This was missing if driver boots in PLT mode.
The patch adds the memory configuration command, which fixes PLT commands
tx continuous and rx statistics.
Sujith Manoharan [Mon, 21 Feb 2011 11:37:12 +0000 (17:07 +0530)]
ath9k_hw: Fix power on reset
Commit "ath9k_hw: add an extra delay when reseting AR_RTC_RESET"
added an extra udelay to the reset routine. As the required
delay is already present, remove this.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
RA-Shiang Tu [Sun, 20 Feb 2011 12:57:46 +0000 (13:57 +0100)]
rt2x00: Add support for RT5390 chip
Add new RT5390 chip support
Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Shiang Tu [Sun, 20 Feb 2011 12:57:22 +0000 (13:57 +0100)]
rt2x00: Add/Modify the GPIO register definition
Revise/Add GPIO register related definitions
Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Shiang Tu [Sun, 20 Feb 2011 12:56:54 +0000 (13:56 +0100)]
rt2x00: Add/Modify protection related register definitions
Make the definition of protection related registers more precisely
Signed-off-by: Shiang Tu <shiang_tu@ralinktech.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sun, 20 Feb 2011 12:56:26 +0000 (13:56 +0100)]
rt2x00: Remove superfluos empty line
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sun, 20 Feb 2011 12:56:07 +0000 (13:56 +0100)]
Revert "rt2x00 : avoid timestamp for monitor injected frame."
This reverts commit e81e0aef32bfa7f593b14479b9c7eaa7196798ac "rt2x00 : avoid
timestamp for monitor injected frame." as it breaks proper timestamp insertion
into probe responses injected by hostapd for example.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Benoit PAPILLAULT <benoit.papillault@free.fr> Cc: Alban Browaeys <prahal@yahoo.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa [Sun, 20 Feb 2011 12:55:46 +0000 (13:55 +0100)]
rt2x00: Minor optimization for devices with RTS/CTS offload
Only devices that don't have RTS/CTS offload need to check for
IEEE80211_TX_RC_USE_RTS_CTS and IEEE80211_TX_RC_USE_CTS_PROTECT.
By swapping both conditions we keep the same number of needed conditionals
for devices without RTS/CTS offload but save one conditional on devices
with RTS/CTS offload.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
RA-Jay Hung [Sun, 20 Feb 2011 12:55:25 +0000 (13:55 +0100)]
rt2x00: Fix rt2800 txpower setting to correct value
TX_PWR_CFG_* setting need to consider below cases
-compesate 20M/40M tx power delta for 2.4/5GHZ band
-limit maximum EIRP tx power to power_level of
regulatory requirement
Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
RA-Jay Hung [Sun, 20 Feb 2011 12:54:52 +0000 (13:54 +0100)]
rt2x00: Add antenna setting for RT3070/RT3090/RT3390 with RX antenna diversity support
For RT3070/RT3090/RT3390 with RX antenna diversity support, we must select
default antenna using gpio control way even if we do not turn on
antenna diversity feature.
Seperate the meaning of TX/RX chain and antenna. Some chips use
2x2 TX/RX chain but may have 3 RX antennas or 1x1 TX/RX chain
but may have 2 RX antennas to do antenna diversity.
Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:47 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine trx
Add routine rtlwifi/rtl8192cu/trx.c. This routine differs from the rtl8192ce
file of the same name.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:42 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine table
Add rtlwifi/rtl8192cu/table.c. These tables are different than the ones used
in rtl8192ce.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:37 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine rf
Add rtlwifi/rtl8192cu/rf.c. This routine is distinct from the one in
rtl8192ce with the same name.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:32 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine phy
Add the routine rtlwifi/rtl8192cu/phy.c. Most of the code is included from
rtlwifi/rtl8192c/phy_common.c.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:27 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine mac
Add the routine rtlwifi/rtl8192cu/hw.c.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:22 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routine hw
Add the routine rtlwifi/rtl8192cu/hw.c. This one is distinct from the
routine of the same name in rtl8192ce.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:17 +0000 (16:29 -0600)]
rtlwifi: rtl8192cu: Add routines dm, fw, led and sw
Add the rtlwifi/rtl8192cu routines for dm.c, fw.c, led.c and sw.c.
Where possible, these routines use the corresponding code in rtl8192ce.
Signed-off-by: George <george0505@realtek.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 19 Feb 2011 22:29:07 +0000 (16:29 -0600)]
rtlwifi: Modify wifi.h for rtl8192cu
Further merge of parameters needed for rtl8192cu. In addition,
some changes needed for rtl8192se and rtl8192de are included
and additional Hungarian notation is removed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
George [Sat, 19 Feb 2011 22:29:02 +0000 (16:29 -0600)]
rtlwifi: Add headers for rtl8187cu
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 [Sat, 19 Feb 2011 22:28:52 +0000 (16:28 -0600)]
rtlwifi: Make changes in rtlwifi/rtl8192ce/def.h to support rtl8192cu
This change modifies rtlwifi/rtl8192ce/def.h to handle rtl8192cu. In
addition, a couple of routines needed for both drivers are converted
to be inline.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>