openwrt/staging/blogic.git
13 years agowl12xx: add BT-coexistance for AP
Arik Nemtsov [Mon, 18 Apr 2011 11:15:20 +0000 (14:15 +0300)]
wl12xx: add BT-coexistance for AP

Initialize AP specific BT coexitance parameters to default values and
enable them in AP mode.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: strict_stroul introduced converted to kstrtoul
Luciano Coelho [Fri, 29 Apr 2011 19:25:28 +0000 (22:25 +0300)]
wl12xx: strict_stroul introduced converted to kstrtoul

One new patch applied added a couple of new strict_strtoul calls.
Converted those to kstroul().

Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: do not set queue_mapping directly
Hauke Mehrtens [Tue, 26 Apr 2011 21:27:44 +0000 (23:27 +0200)]
wl12xx: do not set queue_mapping directly

It is preferred to use the setter that to set queue_mapping directly.
This also helps backporting in compat-wireless.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: discard corrupted packets in RX
Arik Nemtsov [Tue, 26 Apr 2011 20:35:40 +0000 (23:35 +0300)]
wl12xx: discard corrupted packets in RX

When packets arrive with a RX descriptor indicating corruption, discard
them.

In general white-list the RX descriptor status to prevent rouge data
from being sent up.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: implement the tx_frames_pending mac80211 callback
Arik Nemtsov [Tue, 26 Apr 2011 20:35:39 +0000 (23:35 +0300)]
wl12xx: implement the tx_frames_pending mac80211 callback

Frames are considered pending when they reside in the driver TX queue or
already queued in the FW.

This notion of "pending" is appropriate for power save considerations in
STA mode, but not necessarily in other modes (for instance P2P-GO).

[Fixed a sparse warning about missing "static" in a function
declaration -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Enable dynamic memory for 127x
Ido Yariv [Mon, 18 Apr 2011 13:45:10 +0000 (16:45 +0300)]
wl12xx: Enable dynamic memory for 127x

The FW can dynamically manage its internal TX & RX memory pools, moving
blocks from one pool to another when necessary. This can significantly
improve performance. Currently this feature is enabled only for 128x.

Enable dynamic memory for 127x as well. Other parameters in the memory
configuration structure may need to be fine tuned, as the optimal values
for these may change once dynamic memory is enabled.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Restart TX when TX descriptors are available
Ido Yariv [Mon, 18 Apr 2011 13:44:11 +0000 (16:44 +0300)]
wl12xx: Restart TX when TX descriptors are available

The driver stops sending TX packets when either there aren't enough
memory blocks, or it runs out of TX descriptors. The driver continues to
send packets to the FW only when more memory blocks are available.

The FW might free TX descriptors without freeing the corresponding
memory blocks, especially when dynamic memory is enabled. In cases where
memory blocks are not freed at all, the driver will keep waiting for
more memory blocks indefinitely.

Fix this by clearing the WL1271_FLAG_FW_TX_BUSY flag when there are
available TX descriptors.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Modify memory configuration for 128x/AP
Ido Yariv [Mon, 18 Apr 2011 13:40:14 +0000 (16:40 +0300)]
wl12xx: Modify memory configuration for 128x/AP

The 128x/AP firmware does not yet support dynamic memory. Temporarily,
the memory configuration for the 127x was used both for 127x/AP as well
as 128x/AP. Since the two chips don't have the same number of memory
blocks, TP was significantly degraded.

This hasn't been fine tuned yet, but using the base 128x numbers
(without dynamic memory) seems to yield much better results (around 30%
more). Additional fine tuning will be required in the future.

Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: add debugfs entries for dtim_interval and beacon_interval
Eliad Peller [Sun, 17 Apr 2011 08:20:47 +0000 (11:20 +0300)]
wl12xx: add debugfs entries for dtim_interval and beacon_interval

When configuring ACX_WAKE_UP_CONDITIONS (before entering psm), we
tell the firmware to wake up once in N DTIMs/beacons.

Allow control of this value via debugfs (for debugging purposes).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Update Power Save Exit Retries Packets
Shahar Levi [Wed, 13 Apr 2011 11:52:50 +0000 (14:52 +0300)]
wl12xx: Update Power Save Exit Retries Packets

Reducing the retries of sending PS exit packets to the peer AP.
That fix is to avoid sending unrealizable number of PS exit packets
in case of ap lost.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: FM WLAN coexistence
Shahar Levi [Mon, 11 Apr 2011 12:41:46 +0000 (15:41 +0300)]
wl12xx: FM WLAN coexistence

Add support to FM WLAN coexistence (STA only).  Some WiFi harmonics
may interfere with FM operation, to avoid this problem special
coexistence techniques are activated around some FM frequencies.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: configure rates when working in ibss mode
Eliad Peller [Thu, 7 Apr 2011 12:52:05 +0000 (15:52 +0300)]
wl12xx: configure rates when working in ibss mode

When working in ibss mode, we don't configure rate policy per station
(as we use the same link for multiple stations), so currently the
1mb/s rate is being used.

Instead, configure the firmware to use the whole 11b rates by default.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: avoid redundant join on interface reconfiguration
Eliad Peller [Tue, 5 Apr 2011 16:13:28 +0000 (19:13 +0300)]
wl12xx: avoid redundant join on interface reconfiguration

ieee80211_reconfig() sets most of the "changed" flags regardless
of the actual change (e.g. BSS_CHANGED_ASSOC will be set even if
the interface is still not associated). in this case the driver
will issue some unneeded commands.

Since the driver relies solely on the BSS_CHANGED_ASSOC flag,
without checking if there was an actual change, it will end up
issuing unjoin() and dummy_join() commands, although it was
never associated and should just remain idle.

Avoid it by checking the actual state change, in addition to the
"changed" flag.

(there seem to be more redundant configuration commands being
issued, but they shouldn't harm)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: print actual rx packet size (without padding)
Eliad Peller [Tue, 5 Apr 2011 15:21:31 +0000 (18:21 +0300)]
wl12xx: print actual rx packet size (without padding)

When debugging, reduce the padding size from each rx packet, to
get the actual packet size (so comparing it against a cap file
will be easier)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Set correct REF CLK and TCXO CLK values to the FW
Shahar Levi [Sun, 3 Apr 2011 10:54:54 +0000 (13:54 +0300)]
wl12xx: Set correct REF CLK and TCXO CLK values to the FW

Fix mismatch between the REF CLK and TCXO CLK information that is
set in the platform data and the NVS, so we override what comes
from the NVS and replace it with what comes from the platform data.

[Small fix in a comment -- Luca]

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: avoid premature elp entrance
Eliad Peller [Sat, 2 Apr 2011 23:01:59 +0000 (02:01 +0300)]
wl12xx: avoid premature elp entrance

The elp_work is being enqueued on wl1271_ps_elp_sleep, but doesn't get
cancelled on wl1271_ps_elp_wakeup. This might cause immediate entrance
to elp when the wl->mutex is being released, rather than using the delayed
enqueueing optimization.

Cancel elp_work on wakeup request, and add a new WL1271_FLAG_ELP_REQUESTED
flag to further synchronize the elp actions.

[Fixed a couple of typos in some comments -- Luca]

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: sleep instead of wakeup after tx work
Eliad Peller [Mon, 4 Apr 2011 07:38:47 +0000 (10:38 +0300)]
wl12xx: sleep instead of wakeup after tx work

commit d05c806 ("wl12xx: rearrange some ELP wake_up/sleep calls")
introduced a bug in which wl1271_ps_elp_wakeup() was called instead
of wl1271_ps_elp_sleep() after completing the tx work.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agowl12xx: Set End-of-transaction Flag at Wl127x AP Mode
Shahar Levi [Mon, 4 Apr 2011 07:20:39 +0000 (10:20 +0300)]
wl12xx: Set End-of-transaction Flag at Wl127x AP Mode

End-of-transaction flag should be set when working with
wl127x chip on AP mode.

Thanks Ido Yariv <ido@wizery.com> for the guidance with that.

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
13 years agomwl8k: Reducing extra_tx_headroom for tx optimization in AP mode
Yogesh Ashok Powar [Thu, 28 Apr 2011 12:04:48 +0000 (17:34 +0530)]
mwl8k: Reducing extra_tx_headroom for tx optimization in AP mode

The tx_headroom required for mwl8k driver is 32 bytes and it
can use the space for 802.11 header received from mac80211.
mwl8k considers the smallest 802.11 frame (CTS2self of 10
bytes) that can be received from mac80211  to compute the
extra_tx_headroom as 22 (32 - 10) bytes.

When the wireless interface is part of bridge, this
extra_tx_headroom requirement results in a memcpy in
mac80211 (in function pskb_expand_head) for all the data
frames needing L2 forwarding/bridging, when NET_SKB_PAD is
defined as 32. This patch reduces the extra_tx_headroom by
8 bytes so that memcpy of data frames in mac80211 is
avoided in this case.

The resize will be required in driver for frames with 802.11
header size of less than 18 bytes.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Revamp LED management
Sujith Manoharan [Thu, 28 Apr 2011 10:44:05 +0000 (16:14 +0530)]
ath9k_htc: Revamp LED management

Remove all the convoluted hacks in the driver and simplify things
by making use of mac80211's LED triggers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove sync_cmd_mutex
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:33 +0000 (11:51 +0200)]
iwlegacy: remove sync_cmd_mutex

We now use priv->mutex to serialize sync command, remove old
priv->sync_cmd_mutex and add assertion that priv->mutex must be locked.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: more priv->mutex serialization
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:32 +0000 (11:51 +0200)]
iwlegacy: more priv->mutex serialization

Check status bits with mutex taken, because when we wait for mutex
unlock, status can change. Patch should also make remaining sync
commands be send with priv->mutex taken. That will prevent execute
these commands when we are currently reset firmware, what could
possibly cause troubles.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: fix enqueue hcmd race conditions
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:31 +0000 (11:51 +0200)]
iwlegacy: fix enqueue hcmd race conditions

We mark command as huge by using meta->flags from other (non huge) command,
but flags can be possibly overridden, when non huge command is enqueued,
what can lead to:

WARNING: at lib/dma-debug.c:696 dma_debug_device_change+0x1a3/0x1f0()
DMA-API: device driver has pending DMA allocations while released from device [count=1]

To fix introduce additional CMD_MAPPED to mark command as mapped and
serialize iwl_enqueue_hcmd() with iwl_tx_cmd_complete() using
hcmd_lock. Serialization will also fix possible race conditions,
because q->read_ptr, q->write_ptr are modified/used in parallel.

Do not change callback, I did (and fixed) that mistake in iwlagn.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: comment typo fix diable -> disable
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:30 +0000 (11:51 +0200)]
iwlegacy: comment typo fix diable -> disable

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove scan_tx_antennas
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:29 +0000 (11:51 +0200)]
iwlegacy: remove scan_tx_antennas

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unneeded __packed
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:28 +0000 (11:51 +0200)]
iwlegacy: remove unneeded __packed

struct iwl_queue is not part of firmware interface, so __packed is not
needed. Remove it since is may affect performance.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove unneeded disable_hw_scan check
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:27 +0000 (11:51 +0200)]
iwlegacy: remove unneeded disable_hw_scan check

We never set STATUS_SCANNING in softwre scanning mode, disable_hw_scan
check is unneeded. Correct debug message while at it.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: simplify init geos
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:26 +0000 (11:51 +0200)]
iwlegacy: simplify init geos

Don't need to use conditional as ch->band is already assigned to
IEEE80211_BAND_5GHZ or IEEE80211_BAND_2GHZ

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: enable only rfkill interrupt when device is down
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:25 +0000 (11:51 +0200)]
iwlegacy: enable only rfkill interrupt when device is down

Add two below iwlwifi commits to iwlegacy:

commit 554d1d027b19265c4aa3f718b3126d2b86e09a08
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Thu Dec 23 12:38:21 2010 +0100

    iwlagn: enable only rfkill interrupt when device is down

commit 3dd823e6b86407aed1a025041d8f1df77e43a9c8
Author: Don Fry <donald.h.fry@intel.com>
Date:   Sun Feb 6 09:29:45 2011 -0800

    iwlagn: Re-enable RF_KILL interrupt when down

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: remove duplicate initialization in iwl4956_down()
Stanislaw Gruszka [Thu, 28 Apr 2011 09:51:24 +0000 (11:51 +0200)]
iwlegacy: remove duplicate initialization in iwl4956_down()

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix tx power initialization
Stanislaw Gruszka [Thu, 28 Apr 2011 09:12:10 +0000 (11:12 +0200)]
iwlagn: fix tx power initialization

Since

commit f844a709a7d8f8be61a571afc31dfaca9e779621
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Fri Jan 28 16:47:44 2011 +0100

    iwlwifi: do not set tx power when channel is changing

we set device tx power during initialization to priv->tx_power_next,
which itself is initialized to minimum power. That changed
default behaviour of driver. Previously we initialized device to
transmit at maximum available power by default. Patch change again
to previous behaviour and cleanup tx power initialization.

Fortunately this is not critical fix, as mac80211 layer setup
tx power lately to 14dB, hence device does not operate at minimal
transmit power all the time.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Dump modal eeprom header for UB91/94/95
Sujith Manoharan [Thu, 28 Apr 2011 08:58:51 +0000 (14:28 +0530)]
ath9k_htc: Dump modal eeprom header for UB91/94/95

Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k_htc/modal_eeprom

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Dump base eeprom header for UB91/94/95
Sujith Manoharan [Thu, 28 Apr 2011 08:58:33 +0000 (14:28 +0530)]
ath9k_htc: Dump base eeprom header for UB91/94/95

Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k_htc/base_eeprom

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/blueto...
John W. Linville [Fri, 29 Apr 2011 19:28:49 +0000 (15:28 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/padovan/bluetooth-next-2.6

13 years agop54: avoid uninitialized variable warning for freq
John W. Linville [Fri, 29 Apr 2011 19:09:39 +0000 (15:09 -0400)]
p54: avoid uninitialized variable warning for freq

  CC [M]  drivers/net/wireless/p54/eeprom.o
drivers/net/wireless/p54/eeprom.c: In function ‘p54_parse_rssical’:
drivers/net/wireless/p54/eeprom.c:494:8: warning: ‘freq’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwifiex: fix copy-n-paste 'thinko' for tsf_val
John W. Linville [Fri, 29 Apr 2011 19:04:58 +0000 (15:04 -0400)]
mwifiex: fix copy-n-paste 'thinko' for tsf_val

  CC [M]  drivers/net/wireless/mwifiex/join.o
drivers/net/wireless/mwifiex/join.c: In function ‘mwifiex_cmd_802_11_associate’:
drivers/net/wireless/mwifiex/join.c:119:8: warning: ‘tsf_val’ may be used uninitialized in this function
drivers/net/wireless/mwifiex/join.c:103:12: note: ‘tsf_val’ was declared here

Looks like a copy-n-paste error, identical lines are a few lines below
the ones removed, with an actual memcpy to tsf_val in between...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: avoid uninitialized variable warnings in phy_n
John W. Linville [Fri, 29 Apr 2011 18:54:27 +0000 (14:54 -0400)]
b43: avoid uninitialized variable warnings in phy_n

  CC [M]  drivers/net/wireless/b43/phy_n.o
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_set_channel’:
drivers/net/wireless/b43/phy_n.c:3848:47: warning: ‘tabent_r2’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:3849:47: warning: ‘tabent_r3’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c: In function ‘b43_nphy_poll_rssi.clone.14’:
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$7’ may be used uninitialized in this function
drivers/net/wireless/b43/phy_n.c:2270:6: warning: ‘save_regs_phy$8’ may be used uninitialized in this function

FWIW, the usage of these variables is goverened by checks that match
their initializations.  So, I think these are actually false warnings.
Still, I would rather avoid the warning SPAM...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: fix uninitialized var warning for txf2txs
John W. Linville [Fri, 29 Apr 2011 18:35:14 +0000 (14:35 -0400)]
ath5k: fix uninitialized var warning for txf2txs

  CC [M]  drivers/net/wireless/ath/ath5k/reset.o
drivers/net/wireless/ath/ath5k/reset.c: In function ‘ath5k_hw_init_core_clock’:
drivers/net/wireless/ath/ath5k/reset.c:100:51: warning: ‘txf2txs’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:29:04 +0000 (11:29 -0700)]
Bluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt

In some circumstances hci_get_auth_req will return a value different
from the current conn->auth_type. In these cases update conn->auth_type
so that when a user confirm request comes it doesn't falsely trigger
auto-accept.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add store_hint parameter to mgmt_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:03 +0000 (11:29 -0700)]
Bluetooth: Add store_hint parameter to mgmt_new_key

Even for keys that shouldn't be stored some use cases require the
knowledge of a new key having been created so that the conclusion of a
successful pairing can be made. Therefore, always send the mgmt_new_key
event but add a store_hint parameter to it to indicate to user space
whether the key should be stored or not.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Remove old_key_type from mgmt_ev_new_key
Johan Hedberg [Thu, 28 Apr 2011 18:29:02 +0000 (11:29 -0700)]
Bluetooth: Remove old_key_type from mgmt_ev_new_key

User space shouldn't have any need for the old key type so remove it
from the corresponding Management interface event.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix connection key type updating for buggy controllers
Johan Hedberg [Thu, 28 Apr 2011 18:29:01 +0000 (11:29 -0700)]
Bluetooth: Fix connection key type updating for buggy controllers

If a controller generates a changed combination key as its first key the
connection key type will not be correctly set. In these situations make
sure the update the connection key type when such a buggy controller is
detected.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix old_key_type logic for non-persistent keys
Johan Hedberg [Thu, 28 Apr 2011 18:29:00 +0000 (11:29 -0700)]
Bluetooth: Fix old_key_type logic for non-persistent keys

Even if there's no previous key stored the connection might still be
secured with a non-persistent key and in that case the key type in the
hci_conn struct should be checked.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix link key persistent storage criteria
Johan Hedberg [Thu, 28 Apr 2011 18:28:59 +0000 (11:28 -0700)]
Bluetooth: Fix link key persistent storage criteria

Link keys should only be stored if very specific criteria of the
authentication process are fulfilled. This patch essentially copies the
criteria that user space has so far been using to the kernel side so
that the management interface works properly.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix logic in hci_pin_code_request_evt
Johan Hedberg [Thu, 28 Apr 2011 18:28:58 +0000 (11:28 -0700)]
Bluetooth: Fix logic in hci_pin_code_request_evt

The mgmt_ev_pin_code_request event should not be sent to user space if
the request gets rejected by the kernel due to the pairable flag not
being set.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix reason code for pairing rejection
Johan Hedberg [Thu, 28 Apr 2011 18:28:57 +0000 (11:28 -0700)]
Bluetooth: Fix reason code for pairing rejection

"Pairing not allowed" is 0x18 and not 0x16.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add confirm_hint parameter to user confirmation requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:56 +0000 (11:28 -0700)]
Bluetooth: Add confirm_hint parameter to user confirmation requests

When accepting a pairing request which fulfills the SSP auto-accept
criteria we need to push the request all the way to the user for
confirmation. This patch adds a new hint to the user_confirm_request
management event so user space can know when to show a numeric
comparison dialog and when to show a simple yes/no confirmation dialog.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests
Johan Hedberg [Thu, 28 Apr 2011 18:28:55 +0000 (11:28 -0700)]
Bluetooth: Fix HCI_CONN_AUTH_PEND flag for all authentication requests

The HCI_CONN_AUTH_PEND flag should be set whenever requesting
authentication so that multiple pending requests can't occur.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add variable SSP auto-accept delay support
Johan Hedberg [Thu, 28 Apr 2011 18:28:54 +0000 (11:28 -0700)]
Bluetooth: Add variable SSP auto-accept delay support

Some test systems require an arbitrary delay to the auto-accept test
cases for Secure Simple Pairing in order for the tests to pass.
Previously when this was handled in user space it was worked around by
code modifications and recompilation, but now that it's on the kernel
side it's more convenient if there's a debugfs interface for it.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add automated SSP user confirmation responses
Johan Hedberg [Thu, 28 Apr 2011 18:28:53 +0000 (11:28 -0700)]
Bluetooth: Add automated SSP user confirmation responses

This patch adds automated negative and positive (auto-accept) responses
for Secure Simple Pairing user confirmation requests. The responses are
only sent if the HCI_MGMT flag is set in order not to confuse older user
space versions (without management interface support).

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agomwifiex: fix bug in mwifiex_save_curr_bcn()
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:13 +0000 (19:13 -0700)]
mwifiex: fix bug in mwifiex_save_curr_bcn()

Since timestamp in beacon buffer keeps changing all the time,
the memcmp check in mwifiex_save_curr_bcn() is redundant.
Remove that memcmp check and also avoid freeing and allocation
of buffer if required beacon buffer size is same as previous one.

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>
13 years agomwifiex: HT capability information handling
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:12 +0000 (19:13 -0700)]
mwifiex: HT capability information handling

1) Initialise HT capabilities in cfg80211 properly.
2) Cfg80211 stack may modify "sband->ht_cap" to disable
40Mhz operation in 2.4GHz band (after recent patch
"cfg80211: module_param to disable HT40 in 2.4GHz band")
Therefore read "sband->ht_cap" instead of an adapter variable
"hw_dot_11n_dev_cap" to get HT capabilities.

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>
13 years agomwifiex: check firmware capabilities while initialising 5GHz band parameters
Amitkumar Karwar [Thu, 28 Apr 2011 02:13:11 +0000 (19:13 -0700)]
mwifiex: check firmware capabilities while initialising 5GHz band parameters

There are some SD8787 cards which don't support 5GHz band.
Therefore initialise 5GHz band parameters only if hardware
supports the band.

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>
13 years agomwl8k: replace rateinfo bitfields with mask and shift macros
John W. Linville [Wed, 27 Apr 2011 19:04:28 +0000 (15:04 -0400)]
mwl8k: replace rateinfo bitfields with mask and shift macros

AFAICT, this driver is claiming that 24 bits of rate info fit into a
16-bit field in the Tx descriptor.  Anyway, the use of bitfields is
frowned-upon for a variety of well-documented reasons...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: early fix for SPROM core index
Rafał Miłecki [Wed, 27 Apr 2011 16:21:34 +0000 (18:21 +0200)]
ssb: pci: early fix for SPROM core index

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: update PCIe workarounds
Rafał Miłecki [Wed, 27 Apr 2011 15:39:48 +0000 (17:39 +0200)]
ssb: pci: update PCIe workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: pci: separate workarounds
Rafał Miłecki [Wed, 27 Apr 2011 15:39:47 +0000 (17:39 +0200)]
ssb: pci: separate workarounds

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Skip tailroom reservation for full HW-crypto devices
Yogesh Ashok Powar [Wed, 27 Apr 2011 13:10:29 +0000 (18:40 +0530)]
mac80211: Skip tailroom reservation for full HW-crypto devices

In xmit path, devices that do full hardware crypto (including
TKIP MMIC) need no tailroom. For such devices, tailroom
reservation can be skipped if all the keys are programmed into
the hardware (i.e software crypto is not used for any of the
keys) and none of the keys wants software to generate Michael
MIC.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add set_bitrate_mask() callback
Sujith Manoharan [Wed, 27 Apr 2011 11:43:40 +0000 (17:13 +0530)]
ath9k_htc: Add set_bitrate_mask() callback

This callback is used to set the minimum rate for management
frames.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add a new WMI command to set a rate mask
Sujith Manoharan [Wed, 27 Apr 2011 11:43:23 +0000 (17:13 +0530)]
ath9k_htc: Add a new WMI command to set a rate mask

This patch adds WMI_BITRATE_MASK_CMDID which can be
used by the set_bitrate_mask() handler.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Remove unused WMI_AGGR_LIMIT_CMD
Sujith Manoharan [Wed, 27 Apr 2011 11:43:09 +0000 (17:13 +0530)]
ath9k_htc: Remove unused WMI_AGGR_LIMIT_CMD

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Increase credit size for AR7010 devices
Sujith Manoharan [Wed, 27 Apr 2011 11:42:56 +0000 (17:12 +0530)]
ath9k_htc: Increase credit size for AR7010 devices

Bump the firmware version to 1.2

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add new API for rate selection
Sujith Manoharan [Wed, 27 Apr 2011 11:26:51 +0000 (16:56 +0530)]
mac80211: Add new API for rate selection

This patch adds a new API for setting a TX rate mask in
drivers that have rate control in either the firmware or hardware.
This can be used for various purposes, for example, masking out the
11b rates in P2P operation.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: use kernel-doc notation, fix comment style
Randy Dunlap [Tue, 26 Apr 2011 22:25:29 +0000 (15:25 -0700)]
libertas: use kernel-doc notation, fix comment style

Convert all libertas/ files to use kernel-doc notation instead
of whatever it was (doxygen?).

Add or fix function parameters in several places.

Use expected style for multi-line comments in lots of places.

Remove erroneous /** in multiple places.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl12xx: support FW TX inactivity triggers
Arik Nemtsov [Tue, 26 Apr 2011 20:21:51 +0000 (23:21 +0300)]
wl12xx: support FW TX inactivity triggers

In AP mode we register for the MAX_TX_RETRY and INACTIVE_STA events.
Both are reported to the upper layers as a TX failure in the offending
stations.

In STA mode we register only for the MAX_TX_RETRY event. A TX failure is
interpreted as a loss of connection.

Support for IEEE80211_HW_REPORTS_TX_ACK_STATUS has been removed to avoid
the inherent race condition of a mac80211 TX failure counter in addition
to the FW counter.

This patch depends on "mac80211: allow low level driver to report packet
loss"

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Use ps wrappers for btcoex logic.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:55 +0000 (10:39 +0530)]
ath9k: Use ps wrappers for btcoex logic.

Use ps wrappers before accessing hw registers in btcoex.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Enable generic timer interrupt.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:54 +0000 (10:39 +0530)]
ath9k_hw: Enable generic timer interrupt.

Generic timer interrupt was not triggered unless autosleep was
disabled. Since autosleep is enabled in the newer chipsets,
enable generic timer for using with bt coex logic.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add support for btcoexistence in AR9300.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:53 +0000 (10:39 +0530)]
ath9k_hw: Add support for btcoexistence in AR9300.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Move bt_stomp to hw from common.
Vivek Natarajan [Tue, 26 Apr 2011 05:09:52 +0000 (10:39 +0530)]
ath9k_hw: Move bt_stomp to hw from common.

Move bt_stomp to ath9k_hw and add its support for latest chipsets.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: allow low level drivers to report packet loss
Arik Nemtsov [Mon, 18 Apr 2011 11:22:28 +0000 (14:22 +0300)]
mac80211: allow low level drivers to report packet loss

Add API that allows low level drivers to notify mac80211 about TX
packet loss. This is useful when there are FW triggers to notify the
low level driver about these events.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Add secure flag for mgmt_pin_code_req
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:59 +0000 (12:07 +0200)]
Bluetooth: Add secure flag for mgmt_pin_code_req

Extend the mgmt_pin_code_request interface to require secure
pin code (16 digit) for authentication.

This is a kernel part of the secure pin code requirement notification
to user space agent.

Code styling fix by Johan Hedberg.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Respect local MITM req in io_cap reply
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:58 +0000 (12:07 +0200)]
Bluetooth: Respect local MITM req in io_cap reply

If host requires MITM protection notify that to controller in
io capabilities reply even if the remote device requires no bonding.

If it is not respected, host can get an unauthenticated link key while
it expects authenticated one.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Ignore key unauthenticated for high security
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:56 +0000 (12:07 +0200)]
Bluetooth: Ignore key unauthenticated for high security

High security level for pre v2.1 devices requires combination link key
authenticated by at least 16 digit PIN code.

It's also necessary to update key_type and pin_length when the key
exists and is sufficently secured for the connection as there will be
no link key notify event in that case.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Map sec_level to link key requirements
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:55 +0000 (12:07 +0200)]
Bluetooth: Map sec_level to link key requirements

Keep the link key type together with connection and use it to
map security level to link key requirements. Authenticate and/or
encrypt connection if the link is insufficiently secure.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't modify sec_level if auth failed
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:54 +0000 (12:07 +0200)]
Bluetooth: Don't modify sec_level if auth failed

If authentication fails the security level should stay as it was set
before the process has started. Setting BT_SECURITY_LOW can hide real
security level on a link eg. having BT_SECURITY_MEDIUM on the link,
re-authenticate with failure to get BT_SECURITY_HIGH, as  a result we
get BT_SECURITY_LOW on the link while the real security is still medium.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add definitions for link key types
Waldemar Rymarkiewicz [Thu, 28 Apr 2011 10:07:53 +0000 (12:07 +0200)]
Bluetooth: Add definitions for link key types

Introduce the link key types defs and use them instead of magic numbers.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add discovering event to the Management interface
Johan Hedberg [Wed, 27 Apr 2011 14:29:57 +0000 (10:29 -0400)]
Bluetooth: Add discovering event to the Management interface

This patch adds a new event to the Management interface to track when
local adapters are discovering remote devices. For now this only tracks
BR/EDR discovery procedures.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add basic discovery commands to the management interface
Johan Hedberg [Wed, 27 Apr 2011 14:29:56 +0000 (10:29 -0400)]
Bluetooth: Add basic discovery commands to the management interface

This patch adds start_discovery and stop_discovery commands to the
management interface. Right now their implementation is fairly
simplistic and the parameters are fixed to what user space has
defaulted to so far.
This is the very initial phase for discovery implementation into
the kernel. Next steps include name resolution, LE scanning and
bdaddr type handling.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Don't export l2cap_sock_ops
Gustavo F. Padovan [Wed, 27 Apr 2011 21:40:39 +0000 (18:40 -0300)]
Bluetooth: Don't export l2cap_sock_ops

l2cap_sk_ops can be static, it's not used outside l2cap_sock.c

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fix memory leak with L2CAP channels
Gustavo F. Padovan [Mon, 25 Apr 2011 18:10:41 +0000 (15:10 -0300)]
Bluetooth: Fix memory leak with L2CAP channels

A new l2cap_chan_free() is added to free the channels.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move conn to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 23:23:55 +0000 (20:23 -0300)]
Bluetooth: Move conn to struct l2cap_chan

There is no need to the socket deal directly with the channel, most of the
time it cares about the channel only.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more vars to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 22:50:45 +0000 (19:50 -0300)]
Bluetooth: Move more vars to struct l2cap_chan

In this commit, psm, scid and dcid.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more channel info to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 20:20:49 +0000 (17:20 -0300)]
Bluetooth: Move more channel info to struct l2cap_chan

In this commit, omtu, imtu, flush_to, mode and sport. It also remove the
pi var from l2cap_sock_sendmsg().

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move more vars to struct l2cap_chan
Gustavo F. Padovan [Wed, 13 Apr 2011 18:57:03 +0000 (15:57 -0300)]
Bluetooth: Move more vars to struct l2cap_chan

In this commit all ERTM and Streaming Mode specific vars.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move some more elements to struct l2cap_chan
Gustavo F. Padovan [Tue, 12 Apr 2011 21:31:57 +0000 (18:31 -0300)]
Bluetooth: Move some more elements to struct l2cap_chan

In this commit sec_level, force_reliable, role_switch and flushable.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Rename l2cap_do_connect() to l2cap_chan_connect()
Gustavo F. Padovan [Tue, 12 Apr 2011 21:17:14 +0000 (18:17 -0300)]
Bluetooth: Rename l2cap_do_connect() to l2cap_chan_connect()

l2cap_chan_connect() is a much better name and reflects what this
functions is doing (or will do once socket dependence is removed from the
core).

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Move conf_state to struct l2cap_chan
Gustavo F. Padovan [Tue, 12 Apr 2011 21:15:09 +0000 (18:15 -0300)]
Bluetooth: Move conf_state to struct l2cap_chan

First move of elements depending on user data.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Refactor L2CAP channel allocation
Gustavo F. Padovan [Fri, 8 Apr 2011 18:40:02 +0000 (15:40 -0300)]
Bluetooth: Refactor L2CAP channel allocation

If the allocation happens at l2cap_sock_create() will be able to use the
struct l2cap_chan to store channel info that comes from the user via
setsockopt.

Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agocfg80211: fix regresion on reg user timeout
Luis R. Rodriguez [Tue, 26 Apr 2011 01:35:48 +0000 (18:35 -0700)]
cfg80211: fix regresion on reg user timeout

The patch "cfg80211: add a timer for invalid user reg hints"
introduced a regression for the case where a secondary identical
regulatory hint from a user is sent. What would happen is the
second hint would schedule delayed work in to catch a timeout
but since we are never processing it given that the hint was already
applied we'd always hit the timeout and and restore regulatory
settings back to world regulatory domain. This is fixed by simply
avoiding sheduling work if the hint was already applied.

Tested-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: rtl8192cu: Fix most sparse warnings
Larry Finger [Mon, 25 Apr 2011 18:23:20 +0000 (13:23 -0500)]
rtlwifi: rtl8192ce: rtl8192cu: Fix most sparse warnings

Fix most sparse warnings in rtlwifi, rtl8192ce and rtl8192cu drivers.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify rtl8192cu for...
Chaoming_Li [Mon, 25 Apr 2011 17:54:05 +0000 (12:54 -0500)]
rtlwifi: rtl8192ce: Change rtl8192ce routines phy and trx and modify rtl8192cu for addition of rtl8192se and rtl8192de

Change rtl8192ce routines phy and trx for addition of RTL8192SE and RTL8192DE.
In addition, make necessary modifications to rtl8192cu. This patch also
removes the temporary patches needed to enable intermediate steps to build
without error.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Change phy and rc routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:54:00 +0000 (12:54 -0500)]
rtlwifi: rtl8192ce: Change phy and rc routines for addition of rtl8192se and rtl8192de

Change rtl8192ce routines phy and rc for addition of RTL8192SE and
RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Change sw and LED routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:55 +0000 (12:53 -0500)]
rtlwifi: rtl8192ce: Change sw and LED routines for addition of rtl8192se and rtl8192de

Change rtl8192ce sw and LED routines for addition of RTL8192SE and
RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192ce: Change hw routine for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:50 +0000 (12:53 -0500)]
rtlwifi: rtl8192ce: Change hw routine for addition of rtl8192se and rtl8192de

Change rtl8192ce hw routine for addition of RTL8192SE and RTL8192DE.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192c-common: Change common PHY routines for addition of rtl8192se and...
Chaoming_Li [Mon, 25 Apr 2011 17:53:45 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Change common PHY routines for addition of rtl8192se and rtl8192de

Change common PHY routines for addition of RTL8192SE and RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se...
Chaoming_Li [Mon, 25 Apr 2011 17:53:40 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de

Change common firmware routines for addition of RTL8192SE and
RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: rtl8192c-common: Convert common dynamic management routines for addition...
Chaoming_Li [Mon, 25 Apr 2011 17:53:35 +0000 (12:53 -0500)]
rtlwifi: rtl8192c-common: Convert common dynamic management routines for addition of rtl8192se and rtl8192de

Convert common dynamic management routines for addition of RTL8192SE
and RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Convert usb routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:29 +0000 (12:53 -0500)]
rtlwifi: Convert usb routines for addition of rtl8192se and rtl8192de

Convert usb routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:24 +0000 (12:53 -0500)]
rtlwifi: Convert regulatory domain routines for addition of rtl8192se and rtl8192de

Convert regulatory domain  routines for addition of RTL8192SE and
RTL8192DE code.

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Convert rc routines for addition of rtl8192se and rtl8192de
Chaoming_Li [Mon, 25 Apr 2011 17:53:19 +0000 (12:53 -0500)]
rtlwifi: Convert rc routines for addition of rtl8192se and rtl8192de

Convert rc routines for addition of RTL8192SE and RTL8192DE code

Signed-off-by: Chaoming_Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>