GitHub/LineageOS/android_kernel_motorola_exynos9610.git
12 years agomac80211: add sta_state callback
Johannes Berg [Fri, 20 Jan 2012 12:55:21 +0000 (13:55 +0100)]
mac80211: add sta_state callback

(based on Eliad's patch)

Add a callback to notify the low-level driver whenever
the state of a station changes. The driver is only
notified when the station is actually in the mac80211
hash table, not for pre-insert state transitions.

To allow the driver to replace sta_add/remove calls
with this, call extra transitions with the NOTEXIST
state.

This callback can fail, so we need to be careful in
handling it when a station is inserted, particularly
in the IBSS case where we still keep the station entry
around for mac80211 purposes.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add NOTEXIST station state
Johannes Berg [Fri, 20 Jan 2012 12:55:20 +0000 (13:55 +0100)]
mac80211: add NOTEXIST station state

This will be used by drivers later if they
need to have stations inserted all the time,
in mac80211 has no purpose, is never used
and sta_state starts out in NONE.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: dont program keys for stations not uploaded
Johannes Berg [Fri, 20 Jan 2012 12:55:19 +0000 (13:55 +0100)]
mac80211: dont program keys for stations not uploaded

If a station couldn't be uploaded to the driver but
is still kept (only in IBSS mode) we still shouldn't
try to program the keys for it into hardware; fix
this bug by skipping the key upload in this case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: simplify AP_VLAN handling
Johannes Berg [Fri, 20 Jan 2012 12:55:18 +0000 (13:55 +0100)]
mac80211: simplify AP_VLAN handling

Setting keys and updating TKIP keys must use the
BSS sdata (not AP_VLAN), so we translate. Move
the translation into driver-ops wrappers instead
of having it inline in the code to simplify the
normal code flow.

The same can be done for sta_add/remove which
already does the translation in the wrapper.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: move managed mode station state modification
Johannes Berg [Fri, 20 Jan 2012 12:55:17 +0000 (13:55 +0100)]
mac80211: move managed mode station state modification

Move the station state modification right before insert,
this just makes the current code more readable (you can
tell that it's before insertion looking at a single
screenful of code) right now, but some upcoming changes
will require this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 6 Feb 2012 19:45:53 +0000 (14:45 -0500)]
Merge branch 'wireless-next' of git://git./linux/kernel/git/iwlwifi/iwlwifi

12 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath6kl
John W. Linville [Mon, 6 Feb 2012 19:45:07 +0000 (14:45 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl

12 years agoiwlwifi: range check to testmode direct reg access
Amit Beka [Wed, 25 Jan 2012 07:19:24 +0000 (09:19 +0200)]
iwlwifi: range check to testmode direct reg access

Added a check on the direct register access.
Checks that the address is in the lower ragnge (0x0-0x2000),
which belongs to CSR, HBUS and FH registers.

Signed-off-by: Amit Beka <amit.beka@intel.com>
Signed-off-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: release IRQ in error path
Johannes Berg [Mon, 30 Jan 2012 02:36:01 +0000 (18:36 -0800)]
iwlwifi: release IRQ in error path

smatch correctly complains:
iwl-trans-pcie.c +1528 iwl_trans_pcie_start_hw(50) warn: 'trans->irq' was not released on error

Fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move all ucode routines to iwl-ucode.c
Don Fry [Thu, 26 Jan 2012 00:18:52 +0000 (16:18 -0800)]
iwlwifi: move all ucode routines to iwl-ucode.c

The routines dealing with the ucode are spread through several files.
Move them all to the same file and create a iwl-ucode.h file with the
ucode file definitions.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move bcast_sta_id init to common routine
Don Fry [Wed, 25 Jan 2012 23:26:34 +0000 (15:26 -0800)]
iwlwifi: move bcast_sta_id init to common routine

There is nothing device specific in the initialization of the
bcast_sta_id so move it to the common inititalization routine.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: clarify comment
Don Fry [Fri, 27 Jan 2012 21:15:54 +0000 (13:15 -0800)]
iwlwifi: clarify comment

change a comment to be a little more clear

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: debug print in tx_queue_set_status is more clear
Emmanuel Grumbach [Thu, 19 Jan 2012 06:27:03 +0000 (08:27 +0200)]
iwlwifi: debug print in tx_queue_set_status is more clear

The message was misleading when a queue is deactivated. The fifo
number is irrelevant then, so don't print it.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: stop_hw replace enable_rfkill_int
Emmanuel Grumbach [Mon, 9 Jan 2012 14:35:08 +0000 (16:35 +0200)]
iwlwifi: stop_hw replace enable_rfkill_int

This trans_ops->stop_hw leaves the RFKILL interrupt enabled,
we can call that one instead of enable_rfkill_int. By that,
we reduce the numbers of acceesses to the NIC from the upper
layers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move hw_rev to transport layer
Emmanuel Grumbach [Mon, 9 Jan 2012 14:23:00 +0000 (16:23 +0200)]
iwlwifi: move hw_rev to transport layer

The HW revision is now read by the transport layer in its allocation.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill bus_get_hw_id
Emmanuel Grumbach [Sun, 8 Jan 2012 19:19:45 +0000 (21:19 +0200)]
iwlwifi: kill bus_get_hw_id

Get this information from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill bus_get_hw_id_string
Emmanuel Grumbach [Sun, 8 Jan 2012 19:19:45 +0000 (21:19 +0200)]
iwlwifi: kill bus_get_hw_id_string

Get this information from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill bus_is_pm_supported
Emmanuel Grumbach [Sun, 8 Jan 2012 19:19:45 +0000 (21:19 +0200)]
iwlwifi: kill bus_is_pm_supported

Get this information from the transport layer which is now in charge
of the APM too.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: kill bus_apm_config
Emmanuel Grumbach [Sun, 8 Jan 2012 19:12:22 +0000 (21:12 +0200)]
iwlwifi: kill bus_apm_config

This handler was called from the transport layer only. Merge it
to the transport's apm_init.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: consolidate the start_device flow
Emmanuel Grumbach [Sun, 8 Jan 2012 14:33:58 +0000 (16:33 +0200)]
iwlwifi: consolidate the start_device flow

Now there is only one transport function that launch a specific fw:
trans_ops->start_fw. This one replaces trans_ops->start_device and
trans_ops->kick_nic. The code that actually loads the fw to the
device has been moved to the transport specific code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move the RF kill logic from iwl_probe to transport
Emmanuel Grumbach [Sun, 8 Jan 2012 11:48:21 +0000 (13:48 +0200)]
iwlwifi: move the RF kill logic from iwl_probe to transport

This is another clean up of the proble flow.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: introduce trans_ops->stop_hw
Emmanuel Grumbach [Sun, 8 Jan 2012 11:37:59 +0000 (13:37 +0200)]
iwlwifi: introduce trans_ops->stop_hw

This handler stops the HW and puts it in low power state.
It will allow to clean up the flows in the upper layers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move apm_init to start_hw
Emmanuel Grumbach [Sun, 8 Jan 2012 11:24:57 +0000 (13:24 +0200)]
iwlwifi: move apm_init to start_hw

This is transport related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move prepare_card_hw to start_hw
Emmanuel Grumbach [Sun, 8 Jan 2012 11:24:57 +0000 (13:24 +0200)]
iwlwifi: move prepare_card_hw to start_hw

Kill the trans_ops->prepare_card_hw which is now useless.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: rename trans_ops->request_irq to trans_ops->start_hw
Emmanuel Grumbach [Sun, 8 Jan 2012 11:22:16 +0000 (13:22 +0200)]
iwlwifi: rename trans_ops->request_irq to trans_ops->start_hw

This handler will become thicker, reflect its real role now.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: don't use the bus for ucode fw_desc any more
Emmanuel Grumbach [Tue, 3 Jan 2012 14:28:12 +0000 (16:28 +0200)]
iwlwifi: don't use the bus for ucode fw_desc any more

This is transport related

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: remove the pointer to dev from the bus layer
Emmanuel Grumbach [Wed, 4 Jan 2012 12:23:20 +0000 (14:23 +0200)]
iwlwifi: remove the pointer to dev from the bus layer

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: give trans to all the read / write functions
Emmanuel Grumbach [Tue, 3 Jan 2012 14:56:15 +0000 (16:56 +0200)]
iwlwifi: give trans to all the read / write functions

From now on, the transport layer in charge of providing access to the
device. So change all the driver to give a pointer to the transport
to all the low level functions that actually access the device.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: the read / write register ops move to transport
Emmanuel Grumbach [Tue, 3 Jan 2012 11:48:07 +0000 (13:48 +0200)]
iwlwifi: the read / write register ops move to transport

Most of the accesses to the registers are done from the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move the bus configuration to transport
Emmanuel Grumbach [Thu, 2 Feb 2012 22:33:08 +0000 (14:33 -0800)]
iwlwifi: move the bus configuration to transport

All the bus configuration is now done in the transport
allocation fucntion.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: allocate the transport from the bus layer
Emmanuel Grumbach [Thu, 2 Feb 2012 22:16:59 +0000 (14:16 -0800)]
iwlwifi: allocate the transport from the bus layer

Change the way we alloc the transport on the way.
Since the transport is allocated from a bus specific area, we can
give the bus specific parameters (i.e. pci_dev for PCI) to the
transport. This will be useful when the bus layer will be killed.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: move the shrd memory from priv
Emmanuel Grumbach [Thu, 2 Feb 2012 22:08:57 +0000 (14:08 -0800)]
iwlwifi: move the shrd memory from priv

Allocating the shrd area dynamically will allow more agility
while revamping the flows.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: separate the APM from the EEPROM
Emmanuel Grumbach [Wed, 4 Jan 2012 14:57:09 +0000 (16:57 +0200)]
iwlwifi: separate the APM from the EEPROM

There is no link between the two. Ensure that the NIC is on outside
the code of the EEPROM handling.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: Connect IDI transport to driver.
Gregory Greenman [Tue, 10 Jan 2012 17:22:56 +0000 (19:22 +0200)]
iwlwifi: Connect IDI transport to driver.

This patch connects IDI transport to driver. It does so
by using a number of ifdefs at this stage.
IDI is a new transport that is under development.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add fw_alive to transport layer API, kill tx_start
Emmanuel Grumbach [Mon, 2 Jan 2012 14:10:08 +0000 (16:10 +0200)]
iwlwifi: add fw_alive to transport layer API, kill tx_start

Define a new handler in the transport layer API: fw_alive.
Move iwl_reset_ict to this new handler, and move the content
of tx_start to this handler.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
Wey-Yi Guy [Thu, 2 Feb 2012 21:38:27 +0000 (13:38 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into wireless-next

12 years agoath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct...
Chilam Ng [Wed, 1 Feb 2012 09:03:37 +0000 (01:03 -0800)]
ath6kl: initialize the 'nominal_phy' field in the 'wmi_create_pstream_cmd' struct for create_qos command

The nominal_phy field is uninitialized. Initialize it to min_phy_rate for
create_qos.

kvalo: simplified the equation as checkpatch complained for a too long line

Signed-off-by: Chilam Ng <chilamng@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: fix compiler warning in ath6kl_init_hw_params()
Kalle Valo [Tue, 31 Jan 2012 19:26:22 +0000 (21:26 +0200)]
ath6kl: fix compiler warning in ath6kl_init_hw_params()

Both Luis and John reported that they see a compiler warning:

drivers/net/wireless/ath/ath6kl/init.c: In function 'ath6kl_init_hw_params':
drivers/net/wireless/ath/ath6kl/init.c:1377:26: warning: ‘hw’
may be used uninitialized in this function

Oddly enough I have never seen it. But AFAICT the code is correct and
hw is not used uninitalized so add uninitialized_var() to inform that to
the compiler.

Reported-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Fix typo in cfg80211.c
Masanari Iida [Tue, 31 Jan 2012 14:32:55 +0000 (23:32 +0900)]
ath6kl: Fix typo in cfg80211.c

Correct spelling "spported" to "supported" in
drivers/net/wireless/ath/ath6kl/cfg80211.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Wed, 1 Feb 2012 15:48:50 +0000 (10:48 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

12 years agoath6kl: Workaround to support Deep Sleep with MSM.
Santosh Sajjan [Mon, 30 Jan 2012 20:02:26 +0000 (22:02 +0200)]
ath6kl: Workaround to support Deep Sleep with MSM.

Set the host pm flag MMC_PM_WAKE_SDIO_IRQ to allow host
to disable the sdc2_clk and sdc2_h_clk,so that the MSM device
enter into TCXO shutdown.

Signed-off-by: Santosh Sajjan <ssajjan@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agortlwifi: Convert to asynchronous firmware load
Larry Finger [Mon, 30 Jan 2012 15:54:49 +0000 (09:54 -0600)]
rtlwifi: Convert to asynchronous firmware load

This patch addresses a kernel bugzilla report and two recent mail threads.

The kernel bugzilla report is https://bugzilla.kernel.org/show_bug.cgi?id=42632,
which reports a udev timeout on boot.

The first mail thread, which was on LKML (http://lkml.indiana.edu/hypermail/
linux/kernel/1112.3/00965.html) was for a WARNING that occurs after a
suspend/resume cycle for rtl8192cu.

The scond mail thread (http://marc.info/?l=linux-wireless&m=132655490826766&w=2)
concerned changes in udev that break drivers that delay while firmware is loaded
on modprobe.

This patch converts all rtlwifi-based drivers to use the asynchronous firmware
loading mechanism. Drivers rtl8192ce, rtl8192cu and rtl8192de share a common
callback routine. Driver rtl8192se needs different handling of the firmware,
thus it has its own code.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Print the correct channel mode
Sujith Manoharan [Mon, 30 Jan 2012 08:51:42 +0000 (14:21 +0530)]
ath9k: Print the correct channel mode

channelFlags doesn't contain the operating HT mode.
Use IS_CHAN_HT40 to determine if the current channel is
in HT40 mode.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: Load firmware asynchronously
Sujith Manoharan [Mon, 30 Jan 2012 08:47:18 +0000 (14:17 +0530)]
ath9k_htc: Load firmware asynchronously

This patch modifies ath9k_htc to load the needed
firmware in an asynchronous manner, fixing timeouts
that were introduced with the new udev changes.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMAINTAINERS: update b43(legacy) mailing list
Rafał Miłecki [Sun, 29 Jan 2012 10:59:42 +0000 (11:59 +0100)]
MAINTAINERS: update b43(legacy) mailing list

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: always restrict scan dwell in P2P
Johannes Berg [Sat, 28 Jan 2012 16:30:52 +0000 (08:30 -0800)]
iwlwifi: always restrict scan dwell in P2P

Whenever the PAN (P2P) context is active, it
has timers in the uCode that prevent sleep,
so scanning can't be out of channel for more
than the beacon interval programmed into the
device.

Before this patch, a full scan including any
passive channels when P2P was active would
stall forever because it wouldn't find time
to execute the passive requests (for default
beacon intervals of 100 TU.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: add option to disalbe LED
Wey-Yi Guy [Sat, 28 Jan 2012 16:30:51 +0000 (08:30 -0800)]
iwlwifi: add option to disalbe LED

Led has no use for some platform.
Add additional module parameter option to disable LED

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix uCode event tracing
Johannes Berg [Sat, 28 Jan 2012 16:30:50 +0000 (08:30 -0800)]
iwlwifi: fix uCode event tracing

Fix multiple bugs in event tracing:

1) If you enable uCode tracing with the device down,
   it will still attempt to access the device and
   continuously log "MAC is in deep sleep!" errors.
   Fix this by only starting logging when the device
   is actually alive.

2) Now you can set the flag when the device is down,
   but logging doesn't happen when you bring it up.
   To fix that, start logging when the device comes
   alive. This means we don't log before -- we could
   do that but I don't need it right now.

3) For some reason we read the error instead of the
   event log -- use the right pointer.

4) Optimise SRAM reading of event log header.

5) Fix reading write pointer == capacity, which can
   happen due to racy SRAM access

6) Most importantly: fix an error where we would try
   to read WAY too many events (like 2^32-300) when
   we read the wrap counter before it is updated by
   the uCode -- this does happen in practice and will
   cause the driver to hang the machine.

7) Finally, change the timer to 10ms instead of 100ms
   as 100ms is too slow to capture all data with a
   normal event log and with 100ms the log will wrap
   multiple times before we have a chance to read it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix typo
Wey-Yi Guy [Sat, 28 Jan 2012 16:30:49 +0000 (08:30 -0800)]
iwlwifi: fix typo

Fix few places of typo

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Move num_sta_ps counter decrement after synchronize_rcu
Helmut Schaa [Fri, 27 Jan 2012 10:02:53 +0000 (11:02 +0100)]
mac80211: Move num_sta_ps counter decrement after synchronize_rcu

Unted the assumption that the sta struct is still accessible before the
synchronize_rcu call we should move the num_sta_ps counter decrement
after synchronize_rcu to avoid incorrect decrements if num_sta_ps.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add support for mcs masks
Simon Wunderlich [Sat, 28 Jan 2012 16:25:33 +0000 (17:25 +0100)]
mac80211: add support for mcs masks

* Handle MCS masks set by the user.
* Match rates provided by the rate control algorithm to the mask set,
  also in HT mode, and switch back to legacy mode if necessary.
* add debugfs files to observate the rate selection

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211: add support for mcs masks
Simon Wunderlich [Sat, 28 Jan 2012 16:25:32 +0000 (17:25 +0100)]
nl80211: add support for mcs masks

Allow to set mcs masks through nl80211. We also allow to set MCS
rates but no legacy rates (and vice versa).

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agortlwifi: Move pr_fmt macros to a single location
Larry Finger [Fri, 27 Jan 2012 19:59:25 +0000 (13:59 -0600)]
rtlwifi: Move pr_fmt macros to a single location

Although the rtlwifi family of devices contains 11 copies of the pr_fmt
macro, the macro is not defined for all routines that need it. By moving
the macro to wifi.h, a single copy is available for all routines.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix incorrect num_sta_ps decrement in ap_sta_ps_end
Helmut Schaa [Mon, 30 Jan 2012 14:18:00 +0000 (15:18 +0100)]
mac80211: Fix incorrect num_sta_ps decrement in ap_sta_ps_end

If the driver blocked this specific STA with the help of
ieee80211_sta_block_awake we won't clear WLAN_STA_PS_STA later but
still decrement num_sta_ps. Hence, the next data frame from this
STA will trigger ap_sta_ps_end again and also decrement num_sta_ps
again leading to an incorrect num_sta_ps counter.

This can result in problems with powersaving clients not waking up
from PS because the TIM calculation might be skipped due to the
incorrect num_sta_ps counter.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroy
Helmut Schaa [Fri, 27 Jan 2012 10:02:51 +0000 (11:02 +0100)]
mac80211: Fix incorrect num_sta_ps decrement in __sta_info_destroy

When WLAN_STA_PS_DRIVER is set by ieee80211_sta_block_awake the
num_sta_ps counter is not incremented. Hence, we shouldn't decrement
it in __sta_info_destroy if only WLAN_STA_PS_DRIVER is set. This
could result in an incorrect num_sta_ps counter leading to strange side
effects with associated powersaving clients.

Fix this by only decrementing num_sta_ps when WLAN_STA_PS_STA was set
before.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: station state transition error handling
Johannes Berg [Thu, 12 Jan 2012 08:31:10 +0000 (09:31 +0100)]
mac80211: station state transition error handling

In the future, when we start notifying drivers,
state transitions could potentially fail. To make
it easier to distinguish between programming bugs
and driver failures:
 * rename sta_info_move_state() to
   sta_info_pre_move_state() which can only be
   called before the station is inserted (and
   check this with a new station flag).
 * rename sta_info_move_state_checked() to just
   plain sta_info_move_state(), as it will be
   the regular function that can fail for more
   than just one reason (bad transition or an
   error from the driver)

This makes the programming model easier -- one of
the functions can only be called before insertion
and can't fail, the other can fail.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoRevert "mac80211: Do not scan for IBSS merge with a fixed BSSID."
John W. Linville [Mon, 30 Jan 2012 20:28:11 +0000 (15:28 -0500)]
Revert "mac80211: Do not scan for IBSS merge with a fixed BSSID."

This reverts commit f1e3be1561c43b6bbe2426e34849fb1486dc313b.

Johannes Berg <johannes@sipsolutions.net> thinks that this patch is
incorrect.  I'll defer to his judgment.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath6kl: Return a proper error code when not in connected state
Raja Mani [Mon, 30 Jan 2012 11:43:12 +0000 (17:13 +0530)]
ath6kl: Return a proper error code when not in connected state

Error code ENOTCONN is more suitable than EINVAL to report
when the driver is not in connected state in ath6kl_wow_suspend().

I found this during code review.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Wait for host sleep mode cmd processed event during WOW suspend
Raja Mani [Mon, 30 Jan 2012 11:43:11 +0000 (17:13 +0530)]
ath6kl: Wait for host sleep mode cmd processed event during WOW suspend

For every WMI_SET_HOST_SLEEP_MODE_CMDID command (send from the host),
the firmware sends WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID as
an acknowledgement to the host.

In order to being sync with the firmware, the host has to wait for
WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENT event before going to
the suspend state. This patch ensures ath6kl_wow_suspend() waits
until it gets this event after sending set host sleep mode command.

This patch adds,
 * New command WMI_SET_HOST_SLEEP_MODE_CMD_PROCESSED_EVENTID in
   WMI event table.
 * New WMI function ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
   to process the event.
 * New flag HOST_SLEEP_MODE_CMD_PROCESSED in VIF flags to record
   the arrival of the event.

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Configure WOW patterns while going to wow_suspend
Raja Mani [Mon, 30 Jan 2012 11:43:10 +0000 (17:13 +0530)]
ath6kl: Configure WOW patterns while going to wow_suspend

First preference is given to the user configured WOW patterns.
If the user doesn't configure any patterns (for ex, via iw command),
the default patterns will be configured based on the current mode
(vif->nw_type) while going to WOW suspend.

Summary of changes:

  * ath6kl_wow_ap() is added to configure the below default
    patterns when the system enters into WOW suspend in AP mode.
      + Unicast IP, EAPOL-like and ARP packet pattern
      + ARP packet pattern
      + mDNS/SSDP/LLMNR pattern
      + DHCP broadcast pattern

 * ath6kl_wow_sta() is added to configure the below default
   patterns when the system enters into WOW suspend in STA mode.
      + Unicast packet pattern
      + mDNS/SSDP/LLMNR pattern

  * Move the user provided WOW patterns configuration code
    from ath6kl_wow_suspend() to a separate function called
    ath6kl_wow_usr().

  * Two argument variable's ('filter' and 'mask) data type in
    ath6kl_wmi_add_wow_pattern_cmd() are changed from 'u8 *' to
    'const u8 *'. This is needed to make all pattern and mask
    arrays to be 'static const u8' in the caller function.

  * New conditional check is added to make sure user
    configured pattern count is within the limit (WOW_MAX_FILTERS_PER_LIST).

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend
Raja Mani [Mon, 30 Jan 2012 11:43:09 +0000 (17:13 +0530)]
ath6kl: Re-architect suspend mode handling in ath6kl_sdio_suspend

Using this patch, the user can bypass existing auto
suspend mode selection logic and force ath6kl to enter
into the suspend mode what he/she wants.

If the user doesn't choose any suspend mode while doing
insmod of the driver, auto suspend mode selection logic
will kick in and choose suspend mode based on the host
SDIO controller capability.

Generic module parameter is required to specify suspend
mode including Deep Sleep and WOW while doing insmod.
Renaming existing mod param variable suspend_cutpower
would be sufficient to meet this requirement.

New module parameter suspend_mode can take any one of
the below suspend state,
   1. cut power
   2. deep sleep
   3. wow

Signed-off-by: Raja Mani <rmani@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: Fix kernel panic during rx aggregation
Vasanthakumar Thiagarajan [Thu, 26 Jan 2012 07:47:18 +0000 (13:17 +0530)]
ath6kl: Fix kernel panic during rx aggregation

"ath6kl: Define a structure for connection specific aggregation information"
introduces this. In aggr_conn_init(), vif->aggr_cntxt is assigned to
aggr_conn->aggr_info, but vif->aggr_cntxt is not initialized at this
point, this would end up accessing an invalid pointer in aggregation
receive path. Fix this by passing the correct aggr_info to aggr_conn_init().
The panic trace would look like.

[<ffffffff8159e02e>] panic+0xa1/0x1c6
[<ffffffff8103773d>] ? kmsg_dump+0xfd/0x160
[<ffffffff815a2f6a>] oops_end+0xea/0xf0
[<ffffffff8102b95d>] no_context+0x11d/0x2d0
[<ffffffff8102bc5d>] __bad_area_nosemaphore+0x14d/0x230
[<ffffffff815a5c4d>] ? do_page_fault+0x30d/0x520
[<ffffffff8102bd53>] bad_area_nosemaphore+0x13/0x20
[<ffffffff815a5cfd>] do_page_fault+0x3bd/0x520
[<ffffffff8108bd60>] ? __lock_acquire+0x320/0x1680
[<ffffffff812e3a9d>] ? trace_hardirqs_off_thunk+0x3a/0x3c
[<ffffffff815a2385>] page_fault+0x25/0x30
[<ffffffffa0487a5f>] ? aggr_slice_amsdu+0xdf/0x170 [ath6kl_core]
[<ffffffffa0487bac>] aggr_deque_frms+0xbc/0x190 [ath6kl_core]
[<ffffffffa0488404>] ath6kl_rx+0x3e4/0xae0 [ath6kl_core]
[<ffffffffa047ae77>] ath6kl_htc_rxmsg_pending_handler+0x8b7/0xf10 [ath6kl_core]
[<ffffffffa00c82f0>] ? mmc_do_release_host+0x70/0x90 [mmc_core]
[<ffffffffa00c833a>] ? mmc_release_host+0x2a/0x50 [mmc_core]
[<ffffffffa04865c0>] ? ath6kl_alloc_amsdu_rxbuf+0x140/0x140 [ath6kl_core]
[<ffffffffa0477772>] ath6kl_hif_intr_bh_handler+0x362/0x510 [ath6kl_core]
[<ffffffffa01f1000>] ath6kl_sdio_irq_handler+0x60/0xb0 [ath6kl_sdio]
[<ffffffffa00d30bc>] sdio_irq_thread+0xec/0x320 [mmc_core]
[<ffffffffa00d2fd0>] ? sdio_claim_irq+0x220/0x220 [mmc_core]
[<ffffffffa00d2fd0>] ? sdio_claim_irq+0x220/0x220 [mmc_core]
[<ffffffff8105b21e>] kthread+0xbe/0xd0
[<ffffffff815ab574>] kernel_thread_helper+0x4/0x10
[<ffffffff815a2174>] ? retint_restore_args+0x13/0x13
[<ffffffff8105b160>] ? __init_kthread_worker+0x70/0x70
[<ffffffff815ab570>] ? gs_change+0x13/0x13

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath6kl: fix testmode when fw-2.bin or fw-3.bin is used
Kalle Valo [Tue, 24 Jan 2012 11:50:16 +0000 (13:50 +0200)]
ath6kl: fix testmode when fw-2.bin or fw-3.bin is used

Testmode (TCMD and ART) was not enabled when fw-2.bin or fw-3.bin files
were available, fix that by fetching testmode file just after the
board file but before rest of the firmware files are fetched.

I also added testmode field to struct ath6kl and moved the module parameter
to core.c. Now all module parameters are grouped in one place.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
12 years agoath9k: use WARN_ON_ONCE in ath_rc_get_highest_rix
John W. Linville [Mon, 30 Jan 2012 15:53:55 +0000 (10:53 -0500)]
ath9k: use WARN_ON_ONCE in ath_rc_get_highest_rix

The device seems to survive the issue, so no need to flood the logs
about it...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: always restrict scan dwell in P2P
Johannes Berg [Fri, 20 Jan 2012 13:39:19 +0000 (14:39 +0100)]
iwlwifi: always restrict scan dwell in P2P

Whenever the PAN (P2P) context is active, it
has timers in the uCode that prevent sleep,
so scanning can't be out of channel for more
than the beacon interval programmed into the
device.

Before this patch, a full scan including any
passive channels when P2P was active would
stall forever because it wouldn't find time
to execute the passive requests (for default
beacon intervals of 100 TU.)

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: add option to disalbe LED
Wey-Yi Guy [Thu, 19 Jan 2012 20:16:46 +0000 (12:16 -0800)]
iwlwifi: add option to disalbe LED

Led has no use for some platform.
Add additional module parameter option to disable LED

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: fix uCode event tracing
Johannes Berg [Fri, 13 Jan 2012 10:56:11 +0000 (11:56 +0100)]
iwlwifi: fix uCode event tracing

Fix multiple bugs in event tracing:

1) If you enable uCode tracing with the device down,
   it will still attempt to access the device and
   continuously log "MAC is in deep sleep!" errors.
   Fix this by only starting logging when the device
   is actually alive.

2) Now you can set the flag when the device is down,
   but logging doesn't happen when you bring it up.
   To fix that, start logging when the device comes
   alive. This means we don't log before -- we could
   do that but I don't need it right now.

3) For some reason we read the error instead of the
   event log -- use the right pointer.

4) Optimise SRAM reading of event log header.

5) Fix reading write pointer == capacity, which can
   happen due to racy SRAM access

6) Most importantly: fix an error where we would try
   to read WAY too many events (like 2^32-300) when
   we read the wrap counter before it is updated by
   the uCode -- this does happen in practice and will
   cause the driver to hang the machine.

7) Finally, change the timer to 10ms instead of 100ms
   as 100ms is too slow to capture all data with a
   normal event log and with 100ms the log will wrap
   multiple times before we have a chance to read it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoiwlwifi: fix typo
Wey-Yi Guy [Fri, 6 Jan 2012 23:47:59 +0000 (15:47 -0800)]
iwlwifi: fix typo

Fix few places of typo

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
Wey-Yi Guy [Sat, 28 Jan 2012 16:07:03 +0000 (08:07 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into wireless-next

12 years agomwl8k: Configuring correct MAC address in broadcast key
Yogesh Ashok Powar [Fri, 27 Jan 2012 10:38:27 +0000 (16:08 +0530)]
mwl8k: Configuring correct MAC address in broadcast key

While configuring the broadcast key in the hardware, in
multi-BSS environment, BSSes other than first were
incorrectly configured with the MAC address of first
BSS. Fixing it with correct MAC addresses.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Do not scan for IBSS merge with a fixed BSSID.
Nicolas Cavallari [Thu, 26 Jan 2012 12:36:34 +0000 (13:36 +0100)]
mac80211: Do not scan for IBSS merge with a fixed BSSID.

Currently, when we are on an IBSS network with no active station,
we would scan for other BSSID, even if fixed_bssid is on,  due to
a bug in ibss.c,  where fixed_channel would be checked instead of
fixed_bssid.  This would trigger useless scans where scan results
would not be used anyway.

This patch also reverts commit 39d02a7d90602d4557ee05db2a157a4e0,
which assumed that the ifibss->fixed_channel check was legitimate
to disable single-channel scans.  IBSS single-channel scan should
now be fixed.

Signed-off-by: Nicolas Cavallari <cavallar@lri.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: send null packet on active (psm) reconfiguration
Eliad Peller [Thu, 26 Jan 2012 11:36:05 +0000 (13:36 +0200)]
mac80211: send null packet on active (psm) reconfiguration

The sta might be in psm against the ap (e.g. because
this was the before a hw restart), so we explicitly
send a null packet in order to make sure it'll
sync against the ap (and get out of psm).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonfc: NULL vs zero in nci_activate_target()
Dan Carpenter [Thu, 26 Jan 2012 06:13:31 +0000 (09:13 +0300)]
nfc: NULL vs zero in nci_activate_target()

This is a pointer so it should be NULL instead of zero.  Sparse
complains about this stuff:
net/nfc/nci/core.c:447:37: warning: Using plain integer as NULL pointer

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomwifiex: update BSS parameters in dump_station_info()
Amitkumar Karwar [Wed, 25 Jan 2012 04:50:25 +0000 (20:50 -0800)]
mwifiex: update BSS parameters in dump_station_info()

This enables user to check beacon interval, DTIM period, short slot
time and short preamble information using "iw dev mlan0 link" command
when station is in connected state.

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>
12 years agomwifiex: pass priv pointer instead of adapter
Avinash Patil [Wed, 25 Jan 2012 04:50:24 +0000 (20:50 -0800)]
mwifiex: pass priv pointer instead of adapter

Pass mwifiex_private pointer directly to wmm_add_buf_txqueue()
instead of passing adapter and then deriving priv again in
mwifiex_get_priv_by_id(). This reduces a 'for' loop in TX path.

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 agort2800usb: remove PWR_PIN_CFG=0x3 during init
Stanislaw Gruszka [Tue, 24 Jan 2012 13:09:09 +0000 (14:09 +0100)]
rt2800usb: remove PWR_PIN_CFG=0x3 during init

This seems to be only needed as workaround for hardware problem on
PCI devices.

Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: zero MAC_SYS_CTRL bits during BBP and MAC reset
Stanislaw Gruszka [Tue, 24 Jan 2012 13:09:08 +0000 (14:09 +0100)]
rt2800: zero MAC_SYS_CTRL bits during BBP and MAC reset

Zero all other bits than RESET_CSR and RESET_BBP when want to do the
reset, that the vendor driver behaviour.

Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800: disable DMA after firmware load
Stanislaw Gruszka [Tue, 24 Jan 2012 13:09:07 +0000 (14:09 +0100)]
rt2800: disable DMA after firmware load

We can receive frames just after firmware load with current code, so
disable DMA just after firmware is loaded, not before.

Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800usb: initialize H2M_INT_SRC register
Stanislaw Gruszka [Tue, 24 Jan 2012 13:09:06 +0000 (14:09 +0100)]
rt2800usb: initialize H2M_INT_SRC register

Ralink USB driver initialize H2M_INT_SRC to 0 after firmware load, and
never touch this register later. It is not touched at all by Ralink PCI
driver.

Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agokernel-doc: fix new warnings in cfg80211.h
Randy Dunlap [Sat, 21 Jan 2012 19:03:00 +0000 (11:03 -0800)]
kernel-doc: fix new warnings in cfg80211.h

Fix new kernel-doc warnings:

Warning(include/net/cfg80211.h:1165): No description found for parameter 'channel_type'
Warning(include/net/cfg80211.h:2090): No description found for parameter 'probe_resp_offload'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocarl9170: allow users to lower output power level
Christian Lamparter [Sat, 21 Jan 2012 15:59:10 +0000 (16:59 +0100)]
carl9170: allow users to lower output power level

This patch implements a simple way of reducing the
output power of the device by a configurable upper
limit.

Requested-by: Harshal Chhaya <harshal@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years ago{nl,cfg,mac}80211: Add support of setting non-forwarding entity in Mesh
Chun-Yeow Yeoh [Fri, 20 Jan 2012 17:02:16 +0000 (01:02 +0800)]
{nl,cfg,mac}80211: Add support of setting non-forwarding entity in Mesh

A mesh node that joins the mesh network is by default a forwarding entity. This patch allows
the mesh node to set as non-forwarding entity. Whenever dot11MeshForwarding is set to 0, the
mesh node can prevent itself from forwarding the traffic which is not destined to him.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: fix a few -Wshadow warnings
Johannes Berg [Fri, 20 Jan 2012 12:52:37 +0000 (13:52 +0100)]
cfg80211: fix a few -Wshadow warnings

It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix a few -Wshadow warnings
Johannes Berg [Fri, 20 Jan 2012 12:52:36 +0000 (13:52 +0100)]
mac80211: fix a few -Wshadow warnings

It seems that -Wshadow is no longer default in
sparse runs, but let's fix the warnings anyway.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: make CQM RSSI support per virtual interface
Johannes Berg [Thu, 19 Jan 2012 08:29:58 +0000 (09:29 +0100)]
mac80211: make CQM RSSI support per virtual interface

Similar to the previous beacon filtering patch,
make CQM RSSI support depend on the flags that
the driver set for virtual interfaces.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: make beacon filtering per virtual interface
Johannes Berg [Thu, 19 Jan 2012 08:29:57 +0000 (09:29 +0100)]
mac80211: make beacon filtering per virtual interface

Due to firmware limitations, we may not be able to
support beacon filtering on all virtual interfaces.
To allow this in mac80211, introduce per-interface
driver capability flags that the driver sets when
an interface is added.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoorinoco_usb: remove version definition
John W. Linville [Tue, 24 Jan 2012 20:03:04 +0000 (15:03 -0500)]
orinoco_usb: remove version definition

Avoids this:

  CC [M]  drivers/net/wireless/orinoco/orinoco_usb.o
drivers/net/wireless/orinoco/orinoco_usb.c:1759:13: warning: ‘version’ defined but not used

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath5k: use bool type for no_hw_rfkill_switch module parameter
John W. Linville [Tue, 24 Jan 2012 19:58:47 +0000 (14:58 -0500)]
ath5k: use bool type for no_hw_rfkill_switch module parameter

Avoids this:

  CC [M]  drivers/net/wireless/ath/ath5k/base.o
drivers/net/wireless/ath/ath5k/base.c: In function ‘__check_no_hw_rfkill_switch’:
drivers/net/wireless/ath/ath5k/base.c:85:1: warning: return from incompatible pointer type

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: fix PCI-E transport "inta" race
Johannes Berg [Thu, 19 Jan 2012 16:20:57 +0000 (08:20 -0800)]
iwlwifi: fix PCI-E transport "inta" race

When an interrupt comes in, we read the reason
bits and collect them into "trans_pcie->inta".
This happens with the spinlock held. However,
there's a bug resetting this variable -- that
happens after the spinlock has been released.
This means that it is possible for interrupts
to be missed if the reset happens after some
other interrupt reasons were already added to
the variable.

I found this by code inspection, looking for a
reason that we sometimes see random commands
time out. It seems possible that this causes
such behaviour, but I can't say for sure right
now since it happens extremely infrequently on
my test systems.

Cc: stable@vger.kernel.org [3.2]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: set bss_conf.idle when vif is connected
Eliad Peller [Wed, 11 Jan 2012 11:11:50 +0000 (13:11 +0200)]
mac80211: set bss_conf.idle when vif is connected

__ieee80211_recalc_idle() iterates through the vifs,
sets bss_conf.idle = true if they are disconnected,
and increases "count" if they are not (which later
gets evaluated in order to determine whether the
device is idle).

However, the loop doesn't set bss_conf.idle = false
(along with increasing "count"), causing the device
idle state and the vif idle state to get out of sync
in some cases.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: update oper_channel on ibss join
Eliad Peller [Tue, 10 Jan 2012 13:19:54 +0000 (15:19 +0200)]
mac80211: update oper_channel on ibss join

Commit 13c40c5 ("mac80211: Add HT operation modes for IBSS") broke
ibss operation by mistakenly removing the local->oper_channel
update (causing ibss to start on the wrong channel). fix it.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_htc: claim support for IBSS RSN
Antonio Quartulli [Tue, 17 Jan 2012 22:13:30 +0000 (23:13 +0100)]
ath9k_htc: claim support for IBSS RSN

Skip group keys configuration in hardware in order to make IBSS RSN work.
Keys will be managed using software.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add NCI multiple targets support
Ilan Elias [Wed, 18 Jan 2012 11:16:14 +0000 (13:16 +0200)]
NFC: Add NCI multiple targets support

Add the ability to select between multiple targets in NCI.
If only one target is found, it will be auto-activated.
If more than one target is found, then DISCOVER_NTF will be
generated for each target, and the host should select one by
calling DISCOVER_SELECT_CMD. Then, the target will be activated.
If the activation fails, GENERIC_ERROR_NTF is generated.

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: NFC core layer should not set the target_idx
Ilan Elias [Wed, 18 Jan 2012 11:16:13 +0000 (13:16 +0200)]
NFC: NFC core layer should not set the target_idx

The NFC core layer should not set the target_idx.
Instead, the driver layer (e.g. NCI, PN533) should set the
target_idx, so that it will be able to identify the target
when its I/F (e.g. activate_target) is called.
This is required in order to support multiple targets.
Note that currently supported drivers (PN533 and NCI) don't
use the target_idx in their implementation.

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Clearly separate NCI states from flags
Ilan Elias [Wed, 18 Jan 2012 11:16:12 +0000 (13:16 +0200)]
NFC: Clearly separate NCI states from flags

Make a clear separation between NCI states and flags.
This is required in order to support more NCI states (e.g.
for multiple targets support).

Signed-off-by: Ilan Elias <ilane@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: in IBSS use the Auth frame to trigger STA reinsertion
Antonio Quartulli [Tue, 17 Jan 2012 23:10:44 +0000 (00:10 +0100)]
mac80211: in IBSS use the Auth frame to trigger STA reinsertion

In case of a node re-joining the cell the sta_info structure belonging to it is
first destroyed and then reinserted. In this way its internal state is reset.

The joining operation is recognised thank the Auth frame being received.

This operation is helpful in case of a node being rebooted that is joining the
ad-hoc cell again, before its purge timeout on other nodes expires.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add a 2-way Authentication challenge to IBSS mode
Antonio Quartulli [Tue, 17 Jan 2012 23:10:43 +0000 (00:10 +0100)]
mac80211: add a 2-way Authentication challenge to IBSS mode

In IBSS mode, whenever a new station is added a 2-way authentication challenge
is performed. Actually this event can be used to recognise a new station joining
the cell even if its sta_info entry is already in the list.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Free sk_buff if nfcwilink_send fails
Ilan Elias [Tue, 17 Jan 2012 12:11:33 +0000 (14:11 +0200)]
NFC: Free sk_buff if nfcwilink_send fails

Free sk_buff if nfcwilink_send fails.

Signed-off-by: Ilan Elias <ilane@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Download TI NFC init script
Ilan Elias [Tue, 17 Jan 2012 12:11:32 +0000 (14:11 +0200)]
NFC: Download TI NFC init script

Download TI NFC init script during nfcwilink open operation,
after the NFC channel is registered with TI shared transport.
TI NFC init script is written in BTS format.
First, read the chip version via a special vendor specific command.
Second, we request the relevant BTS file from the user space, and
then send the BTS commands to the chip.

Signed-off-by: Ilan Elias <ilane@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoNFC: Add endian annotations to nfcwilink driver
Ilan Elias [Tue, 17 Jan 2012 12:11:31 +0000 (14:11 +0200)]
NFC: Add endian annotations to nfcwilink driver

Add endian annotations to TI nfcwilink driver.

Signed-off-by: Ilan Elias <ilane@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>