GitHub/moto-9609/android_kernel_motorola_exynos9610.git
12 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Fri, 22 Jun 2012 18:41:57 +0000 (14:41 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Fri, 22 Jun 2012 18:40:38 +0000 (14:40 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

12 years agoMerge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
John W. Linville [Fri, 22 Jun 2012 18:39:53 +0000 (14:39 -0400)]
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next

12 years agoMerge branch 'wl12xx-next' into for-linville
Luciano Coelho [Thu, 21 Jun 2012 14:31:46 +0000 (17:31 +0300)]
Merge branch 'wl12xx-next' into for-linville

Conflicts:
drivers/net/wireless/ti/wl18xx/main.c

12 years agowl18xx: use %zu for size_t arguments in printk calls
Luciano Coelho [Thu, 21 Jun 2012 12:33:10 +0000 (15:33 +0300)]
wl18xx: use %zu for size_t arguments in printk calls

After 934b9d1e (wl18xx: avoid some -Wformat warnings) there was still
a warning with (at least) ARM gcc version 4.4.1:

drivers/net/wireless/ti/wl18xx/main.c: In function 'wl18xx_conf_init':
drivers/net/wireless/ti/wl18xx/main.c:1026: warning: format '%ld' expects type 'long int', but argument 2 has type 'unsigned int'

Fix this by using %zu for the both formats, since the fw->size and the
macro (derived from sizeof()) are size_t.

Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl18xx: split siso40 HT cap between 2Ghz and 5Ghz
Arik Nemtsov [Wed, 13 Jun 2012 16:09:26 +0000 (19:09 +0300)]
wl18xx: split siso40 HT cap between 2Ghz and 5Ghz

Remove the cap IEEE80211_HT_CAP_DSSSCCK40 from the 5Ghz variant of
the siso40 HT capabilities. It is meaningless in 5Ghz.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl18xx: sane defaults for HT capabilities
Arik Nemtsov [Wed, 13 Jun 2012 16:09:25 +0000 (19:09 +0300)]
wl18xx: sane defaults for HT capabilities

Introduce a default set of HT capabilities that are set according to the
number of antennas on the board. Move the HT setting code down to allow
the number of antennas to be set (and optionally overridden) before it.

Remove the "mimo" HT option, since the default mode now enables MIMO is
possible.

Use this opportunity to add a helper function for setting HT
capabilities and reduce the volume of the code a bit.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl18xx: explicitly remove the 5Ghz MIMO HT cap
Arik Nemtsov [Wed, 13 Jun 2012 16:09:24 +0000 (19:09 +0300)]
wl18xx: explicitly remove the 5Ghz MIMO HT cap

The 18xx chip does not support MIMO in 5Ghz. Use the siso20 HT cap as
fallback in 5Ghz when "mimo" is requested.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: read FW logs from FW memory on watchdog recovery
Igal Chernobelsky [Mon, 18 Jun 2012 08:05:39 +0000 (11:05 +0300)]
wlcore: read FW logs from FW memory on watchdog recovery

FW uses a few memory blocks as a buffer to accumulate FW logs before
transmitting them to the host over SDIO. When FW WatchDog recovery
occurs, the last FW traces are still pending in the buffer. Driver is
to read these FW traces whether log mode is continuous or on demand.

FW memory blocks allocated for the log buffer are handled as a link list:
the first 4 bytes in each memory block contain FW address to the next block.
The end of list condition depends on FW log mode:
- on demand: the list is cyclic, the next address is equal to the first address
- continuous: the address is  equal to 0x2000000

Log data resides inside FW memory block with offset depending on
logger mode:
- on demand:  4 bytes (address of the next memory block)
- continuous: 4 bytes and Rx Descriptor structure size

Described FW logger API is backward compatible with previous FW versions.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: do not report noise level in get survey op
Yoni Divinsky [Wed, 13 Jun 2012 15:56:54 +0000 (18:56 +0300)]
wlcore: do not report noise level in get survey op

The get survey op expects the low level driver to report
the noise level for a a given channel.

The noise calculated in wlcore is (rssi-snr/2), but since
the snr reported by the FW is a derivative from the rssi
this calculation is useless, and should not be reported
to the user space.

Reporting incorrect noise, results in the wpa_supplicant
miscalculating the roaming candidate priority, thus causing
a situation where an AP with a lower rssi level would be
chosen over a better AP.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl18xx: set Tx align quirk for PG2
Arik Nemtsov [Mon, 11 Jun 2012 07:41:08 +0000 (10:41 +0300)]
wl18xx: set Tx align quirk for PG2

Before patch b5d6d9b (wlcore/wl12xx/wl18xx: don't use TX align quirk
for wl127x), this was automatically set for all platforms. As this
should now be set explicitly, set it for PG2 as well.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowl18xx: increase Rx descriptors for PG2
Arik Nemtsov [Sun, 10 Jun 2012 19:57:30 +0000 (22:57 +0300)]
wl18xx: increase Rx descriptors for PG2

New PG2 firmwares have additional Rx descriptors.

Add a module parameter to manually set the number of Rx descriptors for
older versions (PG1). We cannot discriminate based on chip-id, since
this value must be set on probe.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: reconfigure sleep_auth when removing interfaces
Arik Nemtsov [Sun, 10 Jun 2012 16:10:45 +0000 (19:10 +0300)]
wlcore: reconfigure sleep_auth when removing interfaces

The sleep_auth value of the last interface to be set up prevailed when
an interface was removed. Take care of this by correctly configuring the
value according to the remaining STA/AP interfaces.

Take this opportunity to refactor the sleep_auth setting code for better
readability.

[Small style fix. -- Luca]

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: allow setting sleep_auth before interface init
Arik Nemtsov [Sun, 10 Jun 2012 14:09:22 +0000 (17:09 +0300)]
wlcore: allow setting sleep_auth before interface init

Hold a value for sta_sleep_auth that is amenable to change by debugfs.
When detecting a legal value in this variable on interface init, use it
as an override value for sleep_auth.

This makes debugging more intuitive using the debugfs value.

Increment the conf version since we added an element to the conf
structure.

Note: An AP going up will always set sleep_auth to PSM_CAM.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agowlcore: add a debugfs entry to allow changing the sleep mode by hand
Luciano Coelho [Tue, 28 Feb 2012 17:13:28 +0000 (19:13 +0200)]
wlcore: add a debugfs entry to allow changing the sleep mode by hand

For FW debugging purposes, we may need to change the sleep mode
(aka. sleep_auth) by hand, and set it to the mode we want.  To allow
this, a debugfs entry is added.

Now we store the sleep_auth value that has been set and use that
instead of the quirk to decide whether we should enter ELP or not.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
12 years agowlcore: suppress error message on Rx BA session removal
Arik Nemtsov [Wed, 6 Jun 2012 07:48:56 +0000 (10:48 +0300)]
wlcore: suppress error message on Rx BA session removal

The ampdu_action() function is called on the reconfig() path to remove
existing Rx BA sessions. Since these don't exist for the low level
driver, we output an error message. Turn the message into a debug
message for now, until the mac80211 reconfig flow is changed.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
12 years agoiwlwifi: limit mac_change_interface to BSS context
Johannes Berg [Wed, 20 Jun 2012 09:47:42 +0000 (11:47 +0200)]
iwlwifi: limit mac_change_interface to BSS context

Currently when mac80211 asks to change the interface
type, we will accept it for both the BSS and PAN
contexts. This is not terribly complicated today,
but with the addition of the P2P Device abstraction
the PAN context handling will get more complex, so
restrict mac_change_interface to the BSS context.

Also fix a small locking issue and use is_active
instead of the vif pointer to check if the other
context is activated, guarding exclusive interface
types on the BSS context (IBSS) against the PAN
context being used for something else.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: increase scan timeout
Johannes Berg [Wed, 20 Jun 2012 14:24:59 +0000 (16:24 +0200)]
iwlwifi: increase scan timeout

When the first interface is active, then scanning
on it or the second interface can take a little
longer than 7s (I observed around 8s.) Bump the
timeout to 15s to avoid aborting a scan that is
still running, just taking more time.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: fix radio reset scan dwell vs. quiet time
Johannes Berg [Wed, 20 Jun 2012 19:25:15 +0000 (21:25 +0200)]
iwlwifi: fix radio reset scan dwell vs. quiet time

My previous commit to shorten the radio reset time
caused issues as the firmware checks the active
dwell time against the quiet time, asserting that
the dwell is >= quiet time. This isn't really
needed in case of passive scanning like here, but
of course we need to pass that check.

To fix this, override the quiet time to be the
same as the radio reset dwell time.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agortlwifi: rtl8192se: Fix gcc 4.7.x warning
Larry Finger [Wed, 20 Jun 2012 16:47:26 +0000 (11:47 -0500)]
rtlwifi: rtl8192se: Fix gcc 4.7.x warning

With gcc 4.7.x, the following warning is issued as the routine that sets
the array has the possibility of not initializing the values:

  CC [M]  drivers/net/wireless/rtlwifi/rtl8192se/phy.o
drivers/net/wireless/rtlwifi/rtl8192se/phy.c: In function ‘rtl92s_phy_set_txpower’:
drivers/net/wireless/rtlwifi/rtl8192se/phy.c:1268:23: warning: ‘ofdmpowerLevel[0]’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: do not sampling on ani timer when chip is in sleep
Rajkumar Manoharan [Tue, 19 Jun 2012 09:20:28 +0000 (14:50 +0530)]
ath9k: do not sampling on ani timer when chip is in sleep

The baseband and cycle counters are being sampled during ani
processing for debugging purpose. Whenever the ani is postponded
due to sleep state, taking samples on that time is of no use and
also unneccesarily waking up the chip might increase the power
consumption on idle associated state. Hence moving debug function
within powersave block.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix LNA control on WLAN sleep
Rajkumar Manoharan [Mon, 18 Jun 2012 13:32:40 +0000 (19:02 +0530)]
ath9k_hw: fix LNA control on WLAN sleep

When WLAN enter full sleep mode, WLAN HW should send out a LNA_TAKE
message for BT to take control of the shared LNA. Otherwise BT traffic
is completely stopped whenever the wlan interface is moved full sleep
mode.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: update ar9462 dac_async_fifo initval
Rajkumar Manoharan [Mon, 18 Jun 2012 13:32:39 +0000 (19:02 +0530)]
ath9k_hw: update ar9462 dac_async_fifo initval

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix mci_is_enabled utility
Rajkumar Manoharan [Mon, 18 Jun 2012 13:32:38 +0000 (19:02 +0530)]
ath9k: fix mci_is_enabled utility

During driver stop, btcoex is disabled and also btcoex_hw.enabled
is set to false. Afterwards mci_is_enabled returns false so that
BT is not gaining SPDT control on WLAN sleep. Fix that.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix BT mute at hw init
Rajkumar Manoharan [Mon, 18 Jun 2012 13:32:37 +0000 (19:02 +0530)]
ath9k_hw: fix BT mute at hw init

WLAN driver initialization is muting BT which is terminating
the ongoing BT traffic. The reason to mute BT is to avoid any
incoming MCI messages from BT when MCI reset is in progress that
could corrupt WLAN MCI RX state machine. But we should not
dedicate radio completely to WLAN in driver init itself. So this
patch removes the wlan weightage changes from mute BT to retain
BT connection.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix incorrect profile type manupulation
Bala Shanmugam [Mon, 18 Jun 2012 06:06:58 +0000 (11:36 +0530)]
ath9k: fix incorrect profile type manupulation

Two MCI interrupts are generated while adding A2DP and headset profiles
with different types and same connection handle. While disconnecting,
only one MCI interrupt is generated with last added profile type value
for both profiles.

While adding second profile type decrement first one.

Signed-off-by: Bala Shanmugam <bkamatch@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl1251: send filters to firmware as they are set
Grazvydas Ignotas [Sat, 16 Jun 2012 19:31:50 +0000 (22:31 +0300)]
wl1251: send filters to firmware as they are set

Firmware supports changing filters using ACX_RX_CFG command,
so use it in .configure_filter callback. Firmware also supports
probe request filtering, so add it too along the way.
This will also re-enable BSSID filter which is now removed by
join command while associating.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl1251: fix filtering support
Grazvydas Ignotas [Sat, 16 Jun 2012 19:31:49 +0000 (22:31 +0300)]
wl1251: fix filtering support

This driver has a hack in cmd.c which effectively disables all filtering.
This seems to be triggering a firmware bug where it stops reporting any
rx packets after random time on some routers, which is eliminated (or at
least appears much more rarely) when filtering is on.
I have found that only BSSID filter needs to be disabled for association
to work, so disable only that instead of all filtering.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowl1251: remove unused filter_work
Grazvydas Ignotas [Sat, 16 Jun 2012 19:31:48 +0000 (22:31 +0300)]
wl1251: remove unused filter_work

filter_work is never used, remove it.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use current regulatory domain when checking whether OFDM is allowed
Seth Forshee [Sat, 16 Jun 2012 12:47:56 +0000 (07:47 -0500)]
brcm80211: smac: use current regulatory domain when checking whether OFDM is allowed

The brcmsmac internal regulatory data is being used to determine whether
OFDM should be allowed, and this is only done once during
initialization. To be effective this needs to be checked against
mac80211's regulatory rules for the current channel.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: don't validate channels against internal regulatory data
Seth Forshee [Sat, 16 Jun 2012 12:47:55 +0000 (07:47 -0500)]
brcm80211: smac: don't validate channels against internal regulatory data

The core regulatory support will disable channels not allowed by
regulatory rules, so brcmsmac doesn't need to check whether or not the
requested channel is permitted by regulatory.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: use mac80211 channel data for tx power limits
Seth Forshee [Sat, 16 Jun 2012 12:47:54 +0000 (07:47 -0500)]
brcm80211: smac: use mac80211 channel data for tx power limits

Currently the limits from the internal X2 domain are used, regardless
of what regulatory rules are in effect. Instead use the power limits set
by the higher-level regulatory support.

The rules for the MIMO power limits are still always derived from the
world domain, pending guidance from Broadcom as to how these need to be
handled. This will be fixed later, but using the limits from the world
domain works for now.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: enable/disable radio on regulatory updates
Seth Forshee [Sat, 16 Jun 2012 12:47:53 +0000 (07:47 -0500)]
brcm80211: smac: enable/disable radio on regulatory updates

Currently the radio disable state is only updated during initialization,
and it's only checked against the internal world domain. This is
unnecessary, as there are always valid channels against this domain.
Instead, check whether any channels are enabled in the regulatory
notifier and update the radio state accordingly.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: inform mac80211 of the X2 regulatory domain
Seth Forshee [Sat, 16 Jun 2012 12:47:52 +0000 (07:47 -0500)]
brcm80211: smac: inform mac80211 of the X2 regulatory domain

brcmsmac implements enforcement of regulatory constraints internally,
using a Broadcom-specific world roaming domain named X2. Besides being
duplication of functionality this can also conflict with mac80211's
regulatory implementation, as mac80211 is unaware of the X2 domain and
thus might apply a more restrictive domain.

This patch is the first step in making brcmsmac cooperate with
mac80211's regulatory support. X2 is registered as a custom domain with
mac80211, so that at least both implementations will be enforcing the
same set of constraints. The internal enforcement of rules is kept for
now; this will be converted over to relying on mac80211 regulatory
enforcement in later patches.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: clean up channel.c
Seth Forshee [Sat, 16 Jun 2012 12:47:51 +0000 (07:47 -0500)]
brcm80211: smac: clean up channel.c

Much of the code is either unsed or never put to any useful purpose.
Remove this code in advance of reworking the driver's regulatory
support.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: remove unused code for 40MHz channels
Seth Forshee [Sat, 16 Jun 2012 12:47:50 +0000 (07:47 -0500)]
brcm80211: smac: remove unused code for 40MHz channels

This code has been kept around in anticipation of adding support for
40MHz channels, but subsequent patches to better integrate with mac80211
regulatory support will render it completely broken. Therefore we should
go ahead and remove it.

Keep these changes separate from other cleanup patches in order to make
it easier to resurrect 40MHz channel support at some point in the
future.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: always set channel specified by mac80211
Seth Forshee [Sat, 16 Jun 2012 12:47:49 +0000 (07:47 -0500)]
brcm80211: smac: always set channel specified by mac80211

In some situations brcmsmac is choosing a channel internally. This makes
it difficult at times to know what channel to use for enforcing
regulatory constraints, so instead always use the channel from the
mac80211 configuration.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: smac: don't set up tx power limits during initialization
Seth Forshee [Sat, 16 Jun 2012 12:47:48 +0000 (07:47 -0500)]
brcm80211: smac: don't set up tx power limits during initialization

This code is unnecessary, and in fact it's never executed because the
interface is never up when brcms_c_channels_commit() is called. Removing
it helps simplify the implementation of proper regulatory support.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: support for WEP in AP mode
Avinash Patil [Fri, 15 Jun 2012 19:21:55 +0000 (12:21 -0700)]
mwifiex: support for WEP in AP mode

This patch adds support for WEP open/shared encryption in AP mode.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: separate uAP WPA/WPA2 parsing from other BSS parameters
Avinash Patil [Fri, 15 Jun 2012 19:21:54 +0000 (12:21 -0700)]
mwifiex: separate uAP WPA/WPA2 parsing from other BSS parameters

To enhance readability, create a separate function for parsing
WPA/WPA2 related parameters from cfg80211_ap_settings.
There is no functional change in this patch.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: set HT capability based on cfg80211_ap_settings
Avinash Patil [Fri, 15 Jun 2012 19:21:53 +0000 (12:21 -0700)]
mwifiex: set HT capability based on cfg80211_ap_settings

Parse HT IE from cfg80211 and set HT capabilities accordingly
to FW. If HT IE is missing, 11n would be disabled in FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: set channel via start_ap handler for AP interface
Avinash Patil [Fri, 15 Jun 2012 19:21:51 +0000 (12:21 -0700)]
mwifiex: set channel via start_ap handler for AP interface

This patch adds functionality to set channel info received from
cfg80211_ap_settings in start_ap handler.

Since set_channel cfg80211 handler has been removed and we need
not explicitely call mwifiex_uap_set_channel(); hence this
function definition is also removed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: rtl818x: rtl8180 add devices ids
Xose Vazquez Perez [Fri, 15 Jun 2012 15:27:05 +0000 (17:27 +0200)]
wireless: rtl818x: rtl8180 add devices ids

from windows driver:
0x1186, 0x3301 D-Link Air DWL-510 Wireless PCI Adapter
0x1432, 0x7106 LevelOne WPC-0101 11Mbps Wireless PCMCIA CardBus Adapter

Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up ANI OFDM trigger handling
Felix Fietkau [Fri, 15 Jun 2012 13:25:27 +0000 (15:25 +0200)]
ath9k_hw: clean up ANI OFDM trigger handling

Adjust ah->config.ofdm_trig_{high,low} when setting noise immunity values
to simplify threshold checks in ath9k_hw_ani_monitor

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix setting lower noise immunity values
Felix Fietkau [Fri, 15 Jun 2012 13:25:26 +0000 (15:25 +0200)]
ath9k_hw: fix setting lower noise immunity values

Commit af1e8a6f "ath9k: reset noiseimmunity level to default" was supposed
to ensure that the default noise immunity level is above the INI
values, however it prevents setting lower noise immunity values altogether.
Fix this by moving the checks to the right function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove MIB interrupt support
Felix Fietkau [Fri, 15 Jun 2012 13:25:25 +0000 (15:25 +0200)]
ath9k: remove MIB interrupt support

The new ANI implementation does not need it

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up defines and variables from the ANI implementation split
Felix Fietkau [Fri, 15 Jun 2012 13:25:24 +0000 (15:25 +0200)]
ath9k_hw: clean up defines and variables from the ANI implementation split

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove the old ANI implementation
Felix Fietkau [Fri, 15 Jun 2012 13:25:23 +0000 (15:25 +0200)]
ath9k_hw: remove the old ANI implementation

It was found to be buggy on a variety of chipsets from AR913x to AR928x.
The new version (which was introduced along with AR93xx support) is more
reliable in preventing connectivity dropouts and also fixes MIB interrupt
storm issues.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up / fix ANI mode checks related to beacon RSSI
Felix Fietkau [Fri, 15 Jun 2012 13:25:22 +0000 (15:25 +0200)]
ath9k_hw: clean up / fix ANI mode checks related to beacon RSSI

Beacon RSSI is only meaningful in station mode - in ad-hoc mode it
fluctuates, depending on which peer last sent a beacon, and in other
modes it is not set at all.
Fix places in ANI where the beacon RSSI is used to limit their use
to station mode only.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove confusing logic inversion in an ANI variable
Felix Fietkau [Fri, 15 Jun 2012 13:25:21 +0000 (15:25 +0200)]
ath9k_hw: remove confusing logic inversion in an ANI variable

Code using this had already triggered smatch complaints, so remove it before
it gets fixed the wrong way.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix OFDM weak signal detection handling
Felix Fietkau [Fri, 15 Jun 2012 13:25:20 +0000 (15:25 +0200)]
ath9k_hw: fix OFDM weak signal detection handling

Commit "ath9k_hw: improve ANI processing and rx desensitizing parameters"
was unifying some code related to overriding OFDM weak signal detection,
but seems to have gotten some of the original intent wrong, probably
because of a misnamed variable.

The beacon RSSI is only valid in station mode, and the main reason to check
it in ath9k_hw_set_ofdm_nil is to make sure that OFDM weak signal detection
stays enabled if the RSSI is low, even when the OFDM noise immunity entry
is supposed to disable it.

The above commit removed the mode checks and changed the code so that
OFDM weak signal detection would only be changed if the rssi is high, which
is wrong for everything but client mode.

This patch restores the old behavior in a simplified form.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove aniState->noiseFloor
Felix Fietkau [Fri, 15 Jun 2012 13:25:19 +0000 (15:25 +0200)]
ath9k_hw: remove aniState->noiseFloor

I don't know why somebody decided to keep a cached copy of beacon rssi in a
variable called 'noiseFloor', but the caching is unnecessary and the variable
name is confusing, so let's just get rid of it entirely.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.
Jeongdo Son [Thu, 14 Jun 2012 17:28:01 +0000 (02:28 +0900)]
rt2x00: Add support for BUFFALO WLI-UC-GNM2 to rt2800usb.

This is a RT3070 based device.

Signed-off-by: Jeongdo Son <sohn9086@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcm80211: add mailing list address for brcm80211 drivers
Arend van Spriel [Thu, 14 Jun 2012 12:16:27 +0000 (14:16 +0200)]
brcm80211: add mailing list address for brcm80211 drivers

Added the mailing list address brcm80211-dev-list@broadcom.com
which can be used to report issues and in bug reports.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobrcmfmac: introduce checkdied debugfs functionality
Arend van Spriel [Thu, 14 Jun 2012 10:16:57 +0000 (12:16 +0200)]
brcmfmac: introduce checkdied debugfs functionality

The checkdied functionality provides useful information for analyzing
firmware crashes. By exposing this information to a debugfs file users
can easily provide its content in bug reports. The functionality is
available only when CONFIG_BRCMDBG is selected.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00 : RT3290 chip support v4
Woody Hung [Wed, 13 Jun 2012 07:01:16 +0000 (15:01 +0800)]
rt2x00 : RT3290 chip support v4

This patch support the new chipset rt3290 wifi implementation in rt2x00.
It initailize the related mac, bbp and rf register in startup phase.
And this patch modify the efuse read/write method for the different efuse data offset of rt3290.

Signed-off-by: Woody Hung <Woody.Hung@mediatek.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Wed, 20 Jun 2012 18:40:26 +0000 (14:40 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Wed, 20 Jun 2012 18:35:31 +0000 (14:35 -0400)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agomac80211: fix double-start of remain-on-channel
Johannes Berg [Wed, 20 Jun 2012 18:11:33 +0000 (20:11 +0200)]
mac80211: fix double-start of remain-on-channel

When a remain-on-channel item is deleted, we remove it
from the list and then start the next item. However,
if it wasn't actually the first item then calling
ieee80211_start_next_roc() is wrong as it will start
the first item -- even if that was already started.

Fix the two places that do this and add a warning to
prevent the problem from reoccurring.

Reported-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: Allow userspace to register for auth frames in IBSS
Will Hawkins [Tue, 19 Jun 2012 21:59:14 +0000 (17:59 -0400)]
mac80211: Allow userspace to register for auth frames in IBSS

Set the necessary flags to allow user space applications
to register for authentication frames on IBSS interfaces.
This is useful for situations where userspace applications
want to control key negotiation between stations.

Signed-off-by: Will Hawkins <hawkinsw@opentechinstitute.org>
[reword commit message a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: send auth in IBSS only if userspace isn't handling it
Will Hawkins [Tue, 19 Jun 2012 21:59:13 +0000 (17:59 -0400)]
mac80211: send auth in IBSS only if userspace isn't handling it

Check the auth frame registration count before sending
"open system" authentication messages when a new station
registers on a particular IBSS network. This stops us
from sending out multiple authentication messages with
different authentication algorithms.

Signed-off-by: Will Hawkins <hawkinsw@opentechinstitute.org>
[reword commit message a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: Track auth frame registrations on IBSS ifaces
Will Hawkins [Wed, 20 Jun 2012 15:51:14 +0000 (11:51 -0400)]
mac80211: Track auth frame registrations on IBSS ifaces

Track userspace registrations for authentication
frames received on an IBSS interface. This field
will be used to decide whether or not to send
"open system" authentication frames when a new
station joins an adhoc network.

Signed-off-by: Will Hawkins <hawkinsw@opentechinstitute.org>
[redesign the code flow a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: fix cleanup if driver suspend callback fails
Eyal Shapira [Wed, 20 Jun 2012 10:10:14 +0000 (13:10 +0300)]
mac80211: fix cleanup if driver suspend callback fails

In case the driver suspend callback fails, mac80211 is left
with stopped queues which prevents any further traffic as well
as all STAs are left marked with WLAN_STA_BLOCK_BA which will
cause any further ADDBA requests to be declined. Fix it by
undoing both before returning from __iee80211_suspend.

Reported-by: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: save wmm_acm per sdata
Yoni Divinsky [Wed, 20 Jun 2012 12:39:13 +0000 (15:39 +0300)]
mac80211: save wmm_acm per sdata

Save and configure the wmm_acm per sdata, rather than
per hardware.

If wmm_acm is saved per hardware when running two
interfaces simultaneously on the same hardware one
interface's wmm policy will be affected by the other
interface.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: use the correct capability info in ieee80211_set_associated()
Luciano Coelho [Wed, 20 Jun 2012 14:23:24 +0000 (17:23 +0300)]
mac80211: use the correct capability info in ieee80211_set_associated()

If an AP is beaconing with different capabilities than the one we get
in the associate response, we were still using the capabilities
received in the beacons.  One example is when the AP is beaconing with
the short slot bit set to zero and then we try to connect to it with
long slot.  In this case, we would keep using long slot until the next
beacon was received.

Fix this by using the correct capability value when calling
ieee80211_handle_bss_capability().  We were using cbss->capability,
but we should use the bss_conf->assoc_capability instead.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: fix regression in multi-vif AP start
Felix Fietkau [Tue, 19 Jun 2012 00:50:57 +0000 (02:50 +0200)]
cfg80211: fix regression in multi-vif AP start

Commit "cfg80211: provide channel to start_ap function" assumes that the
channel is always passed to the NL80211_CMD_START_AP command, however
in case of multi-BSSID, hostapd only passes the channel for the first vif.
This makes starting beaconing on secondary vifs fail with -EINVAL.

Fix this by storing the channel provided to .start_ap in wdev->preset_chan
and picking the first AP vif's channel for secondary vifs if not provided.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl80211: use __cfg80211_rdev_from_attrs for testmode
Johannes Berg [Fri, 15 Jun 2012 12:23:16 +0000 (14:23 +0200)]
nl80211: use __cfg80211_rdev_from_attrs for testmode

To fix the testmode cross-namespace access problem,
use __cfg80211_rdev_from_attrs() to get the device
instead of open-coding similar functionality.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl80211: change __cfg80211_rdev_from_info
Johannes Berg [Fri, 15 Jun 2012 12:18:32 +0000 (14:18 +0200)]
nl80211: change __cfg80211_rdev_from_info

Change the function to __cfg80211_rdev_from_attrs
to take attributes instead of the info struct to
make it usable from dump callbacks for testmode.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl80211: fix netns separation
Johannes Berg [Fri, 15 Jun 2012 12:14:22 +0000 (14:14 +0200)]
nl80211: fix netns separation

There are currently a few ways to "escape"
the network namespace and access a wiphy
that belongs to another namespace. Add a
netns argument to the relevant functions
to fix this.

One remaining issue with testmode will be
fixed in a follow-up patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agonl80211: refactor __cfg80211_rdev_from_info
Johannes Berg [Fri, 15 Jun 2012 12:09:58 +0000 (14:09 +0200)]
nl80211: refactor __cfg80211_rdev_from_info

Refactor the function to make it easier to
extend.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agocfg80211: make some functions static
Johannes Berg [Fri, 15 Jun 2012 11:32:49 +0000 (13:32 +0200)]
cfg80211: make some functions static

Some of the functions to retrieve a device can
be static as they're used only in nl80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: initialize sta pointer to avoid false-positive warning
Luciano Coelho [Mon, 18 Jun 2012 12:52:51 +0000 (15:52 +0300)]
mac80211: initialize sta pointer to avoid false-positive warning

Some compilers (eg. gcc 4.4.1 for ARM) report a false positive warning
in mlme.c:

net/mac80211/mlme.c: In function 'ieee80211_prep_connection':
net/mac80211/mlme.c:3035: warning: 'sta' may be used uninitialized in this function

This is a false positive because the place where 'sta' is used is
inside an if with the same condition of where it is set:

[...]
        if (!have_sta) {
                sta = sta_info_alloc(sdata, cbss->bssid, GFP_KERNEL);
                if (!sta)
                        return -ENOMEM;
        }
[...]
        if (!have_sta) {
[...]
                sta->sta.supp_rates[cbss->channel->band] = rates;
[...]

For some reason the compiler doesn't understand this and warns.

While this is not a problem in the code itself, we can avoid polluting
the build logs with false positives by setting sta to NULL on
declaration and checking for sta instead of !have_sta in the second if.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: cleanup offchannel_ps_enable argument
Rajkumar Manoharan [Mon, 18 Jun 2012 13:33:52 +0000 (19:03 +0530)]
mac80211: cleanup offchannel_ps_enable argument

The 'tell_ap' argument is always true. So that remove it
and simplify the function.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: remove sku field from hw_params
Johannes Berg [Tue, 19 Jun 2012 06:42:08 +0000 (08:42 +0200)]
iwlwifi: remove sku field from hw_params

Now that the eeprom parsing code overrides the sku
field directly with 11n_disable parameters, there's
no longer a need to keep a copy of this field.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: use minimal time for radio reset scan
Johannes Berg [Mon, 18 Jun 2012 08:17:12 +0000 (10:17 +0200)]
iwlwifi: use minimal time for radio reset scan

The effect of using a short single-channel scan
to reset the radio is that scanning a channel
that isn't in use needs to re-tune the radio.
This means that the dwell time is irrelevant,
so use a shorter time.

While at it, clean up the code for this a bit.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: fix 11n_disable EEPROM refactoring regression
Johannes Berg [Tue, 19 Jun 2012 06:32:49 +0000 (08:32 +0200)]
iwlwifi: fix 11n_disable EEPROM refactoring regression

My commit 26a7ca9a71a ("iwlwifi: refactor EEPROM reading/parsing")
broke the 11n_disable module parameter's BIT(0) to disable all HT
operation (using the other bits to disable aggregation only was
unaffected). Restore this by overriding the SKU when parsing the
EEPROM if the module parameter is set.

Reported-by: Matthijs Kooijman <matthijs@stdin.nl>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: fix and improve mesh RANN processing
Chun-Yeow Yeoh [Fri, 15 Jun 2012 02:20:02 +0000 (10:20 +0800)]
mac80211: fix and improve mesh RANN processing

This patch fixes the problem of dropping RANN element if the TTL
is 1. If the received RANN element TTL is 1 or greater than 1, the
RANN is processed. However, forwarding of received RANN element
with TTL 1 or less is prohibited according to the standard. This
is previously reported by Monthadar Al Jaberi.

Besides, this patch also avoid the processing of unicast PREQ
generation if the RANN element does not meet the acceptance
criteria mentioned in Sec. 13.10.12.4.2 of IEEE Std. 802.11-2012.

Reported-by: Monthadar Al Jaberi <monthadar@gmail.com>
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: set only VO as a U-APSD enabled AC
Arik Nemtsov [Mon, 18 Jun 2012 07:43:50 +0000 (10:43 +0300)]
mac80211: set only VO as a U-APSD enabled AC

Some APs experience problems when working with U-APSD. Decrease the
probability of that happening by using legacy mode for all ACs but VO.

The AP that caused us troubles was a Cisco 4410N. It ignores our
setting, and always treats non-VO ACs as legacy.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: stop Rx during HW reconfig
Arik Nemtsov [Wed, 6 Jun 2012 08:25:02 +0000 (11:25 +0300)]
mac80211: stop Rx during HW reconfig

While HW reconfig is in progress, drop all incoming Rx. This prevents
incoming packets from changing the internal state of the driver or
calling callbacks of the low level driver while it is in inconsistent
state.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: fix the assignment of mesh element TTL
Chun-Yeow Yeoh [Thu, 14 Jun 2012 16:23:53 +0000 (00:23 +0800)]
mac80211: fix the assignment of mesh element TTL

This patch fixes the wrong assignment of mesh element TTL.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years ago{nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationInterval
Chun-Yeow Yeoh [Wed, 13 Jun 2012 18:06:10 +0000 (02:06 +0800)]
{nl,cfg,mac}80211: implement dot11MeshHWMPconfirmationInterval

As defined in section 13.10.9.3 Case D (802.11-2012), this
control variable is used to limit the mesh STA to send only
one PREQ to a root mesh STA within this interval of time
(in TUs). The default value for this variable is set to
2000 TUs. However, for current implementation, the maximum
configurable of dot11MeshHWMPconfirmationInterval is
restricted by dot11MeshHWMPactivePathTimeout.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[line-break commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: invoke the timer only with correct dot11MeshHWMPRootMode value
Chun-Yeow Yeoh [Wed, 13 Jun 2012 18:06:09 +0000 (02:06 +0800)]
mac80211: invoke the timer only with correct dot11MeshHWMPRootMode value

mesh_path_root_timer is invoked once the dot11MeshHWMPRootMode
is larger than 1. This patch also adds the backward compatible
to the previous setting on dot11MeshHWMPRootMode. If the user
configures as follow, it will still trigger the proactive RANN
with Gate Announcement.

iw mesh0 set mesh_param mesh_hwmp_rootmode 1
iw mesh0 set mesh_param mesh_gate_announcements 1

similar to the following setting:

iw mesh0 set mesh_param mesh_hwmp_rootmode 4
iw mesh0 set mesh_param mesh_gate_announcements 1

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[line-break commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agomac80211: implement the proactive PREP generation
Chun-Yeow Yeoh [Sat, 16 Jun 2012 18:27:40 +0000 (02:27 +0800)]
mac80211: implement the proactive PREP generation

Generate the proactive PREP element in Proactive PREQ mode as
defined in Sec. 13.10.10.3 (Case D) of IEEE Std. 802.11-2012.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: delay ROC if doing internal reset scan
Johannes Berg [Thu, 14 Jun 2012 19:22:17 +0000 (21:22 +0200)]
iwlwifi: delay ROC if doing internal reset scan

When the device is doing an internal radio reset
scan, ROC can be rejected to the supplicant with
busy status which confuses it.

One option would be to queue the ROC and handle
it later, but since the radio reset scan is very
quick we can just wait for it to finish instead.

Also add a warning since we shouldn't run into
the case of having a scan active when requesting
a ROC in any other case since mac80211 will not
scan while ROC or ROC while scanning.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: disable early power Off reset for all NICs
Emmanuel Grumbach [Sun, 17 Jun 2012 12:42:37 +0000 (15:42 +0300)]
iwlwifi: disable early power Off reset for all NICs

This feature needs to be disabled for all NICs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: protect use_ict with irq_lock
Emmanuel Grumbach [Thu, 14 Jun 2012 11:23:02 +0000 (14:23 +0300)]
iwlwifi: protect use_ict with irq_lock

This variable was accessed without taking the lock.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: don't disable interrupt while starting tx
Emmanuel Grumbach [Thu, 14 Jun 2012 09:27:56 +0000 (12:27 +0300)]
iwlwifi: don't disable interrupt while starting tx

This is really not needed, we already have a lock inside
the accesses to the prph.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: don't disable interrupt in iwl_abort_notification_waits
Emmanuel Grumbach [Sun, 17 Jun 2012 13:12:42 +0000 (16:12 +0300)]
iwlwifi: don't disable interrupt in iwl_abort_notification_waits

This is not needed since notif_wait_lock is never accessed
from IRQ.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: disable BH before the call to iwl_op_mode_nic_error
Emmanuel Grumbach [Sun, 17 Jun 2012 13:04:25 +0000 (16:04 +0300)]
iwlwifi: disable BH before the call to iwl_op_mode_nic_error

This is required by the op_mode API.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: comment context requirements of the op_mode
Emmanuel Grumbach [Sun, 17 Jun 2012 13:00:22 +0000 (16:00 +0300)]
iwlwifi: comment context requirements of the op_mode

A few op_mode of the op_mode API functions have requirements
on the running context of the caller. Document that.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: print the scratch of all the buffers stuck in a queue
Emmanuel Grumbach [Wed, 13 Jun 2012 11:16:40 +0000 (14:16 +0300)]
iwlwifi: print the scratch of all the buffers stuck in a queue

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: check that we have enough bits to track the TX queues
Emmanuel Grumbach [Wed, 13 Jun 2012 16:37:06 +0000 (19:37 +0300)]
iwlwifi: check that we have enough bits to track the TX queues

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoiwlwifi: unlock on error path
Dan Carpenter [Thu, 14 Jun 2012 18:35:26 +0000 (21:35 +0300)]
iwlwifi: unlock on error path

We introduced a lock here in ff1ffb850b ("iwlwifi: fix dynamic
loading").  But we missed an error path which needs an unlock.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge remote branch 'wireless-next/master' into ath6kl-next
Kalle Valo [Thu, 14 Jun 2012 11:20:18 +0000 (14:20 +0300)]
Merge remote branch 'wireless-next/master' into ath6kl-next

Conflicts:
drivers/net/wireless/ath/ath6kl/cfg80211.c

12 years agoath6kl: fix fw capability parsing
Thomas Pedersen [Mon, 11 Jun 2012 20:36:12 +0000 (13:36 -0700)]
ath6kl: fix fw capability parsing

This patch fixes a bug where no capabilites are parsed when the number
of firmware capability bits translate into fewer bytes than the host has
knowledge of. Instead just process number of capability bytes as
reported by the firmware.

Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agomac80211: implement the proactive PREQ generation
Chun-Yeow Yeoh [Wed, 13 Jun 2012 18:06:07 +0000 (02:06 +0800)]
mac80211: implement the proactive PREQ generation

Generate the proactive PREQ element as defined in
Sec. 13.10.9.3 (Case C) of IEEE Std. 802.11-2012
based on the selection of dot11MeshHWMPRootMode as follow:
dot11MeshHWMPRootMode (2) is proactivePREQnoPREP
dot11MeshHWMPRootMode (3) is proactivePREQwithPREP

The proactive PREQ is generated based on the interval
defined by dot11MeshHWMProotInterval.

With this change, proactive RANN element is now generated
if the dot11MeshHWMPRootMode is set to (4) instead of (1).

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[line-break commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years ago{nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToR...
Chun-Yeow Yeoh [Wed, 13 Jun 2012 18:06:06 +0000 (02:06 +0800)]
{nl,cfg,mac}80211: implement dot11MeshHWMProotInterval and dot11MeshHWMPactivePathToRootTimeout

Add the mesh configuration parameters dot11MeshHWMProotInterval
and dot11MeshHWMPactivePathToRootTimeout to be used by
proactive PREQ mechanism.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
[line-break commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 13 Jun 2012 19:35:35 +0000 (15:35 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
drivers/net/wireless/ath/ath9k/main.c
net/bluetooth/hci_event.c

12 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 13 Jun 2012 19:12:07 +0000 (15:12 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

12 years agowlcore: declare interface combinations
Eliad Peller [Wed, 13 Jun 2012 17:29:16 +0000 (20:29 +0300)]
wlcore: declare interface combinations

Advertise to the stack that the wlcore driver
supports multiple interfaces for a single device.
This is required in order to be able to run
multirole with mac80211.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>