Yogesh Ashok Powar [Wed, 18 May 2011 19:02:03 +0000 (12:02 -0700)]
mwifiex: correct event header length
While decoding received event packet from firmware, 4 bytes
of interface header are already removed unconditionally.
So for handling event only 4 more bytes needs to be pulled.
This is achieved by changing event header length to 4.
Almost all the events, except BA stream related and AMSDU
aggregation control events, do not have the payload in their
event skb. Such events handling depends only on the event ID.
This event ID is the first four bytes of the event skb, which
is copied to a separate variable before pulling the skb header.
Hence event handling worked only for those events that didn't
have payload in event skb.
This patch fixes the broken event path of the events with
payload in their event skb without harming existing working
event path for the events without payload.
Signed-off-by: Yogesh Ashok Powar <yogeshp@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>
Randy Dunlap [Mon, 23 May 2011 00:22:45 +0000 (17:22 -0700)]
wireless: fix fatal kernel-doc error + warning in mac80211.h
Fix new kernel-doc Error and Warning in <net/mac80211.h>:
Error(linux-2.6.39-git5/include/net/mac80211.h:550): cannot understand prototype: 'struct ieee80211_sched_scan_ies '
Warning(linux-2.6.39-git5/include/net/mac80211.h:2289): No description found for parameter 'sta'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Randy Dunlap [Mon, 23 May 2011 00:16:20 +0000 (17:16 -0700)]
wireless: fix cfg80211.h new kernel-doc warnings
Fix new kernel-doc warnings in <net/cfg80211.h>:
Warning(linux-2.6.39-git5/include/net/cfg80211.h:560): No description found for parameter 'bss_param'
Warning(linux-2.6.39-git5/include/net/cfg80211.h:1555): Enum value 'WIPHY_FLAG_SUPPORTS_SCHED_SCAN' not described in enum 'wiphy_flags'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Fri, 20 May 2011 18:56:18 +0000 (11:56 -0700)]
iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabled
Fix compiling error when CONFIG_MAC80211_DEBUGFS is not enabled
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:351: error: 'struct iwl_lq_sta' has no member named 'dbg_fixed_rate'
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:1076: error: 'struct iwl_lq_sta' has no member named 'dbg_fixed_rate'
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Wed, 18 May 2011 12:26:00 +0000 (17:56 +0530)]
ath9k: use PS wakeup before REG_READ
otherwise we will get
deadbeef when the station is in idle state
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Wed, 18 May 2011 08:42:03 +0000 (11:42 +0300)]
nl80211: remove some stack variables in trigger_scan and start_sched_scan
Some stack variables (name *ssid and *channel) are only used to define
the size of the memory block that needs to be allocated for the
request structure in the nl80211_trigger_scan() and
nl80211_start_sched_scan() functions.
This is unnecessary because the sizes of the actual elements in the
structure can be used instead.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Tue, 17 May 2011 23:13:34 +0000 (16:13 -0700)]
mac80211: Don't sleep when growing the mesh path
After commit
1928ecab620907a0953f811316d05f367f3f4dba (mac80211: fix and
simplify mesh locking) mesh table allocation is performed with the
pathtbl_resize_lock taken. Under those conditions one should not sleep.
This patch makes the allocations GFP_ATOMIC to prevent that.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 17 May 2011 19:09:54 +0000 (21:09 +0200)]
ath9k: implement .tx_last_beacon()
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 17:19:39 +0000 (19:19 +0200)]
b43: read PHY info only when needed (for PHY-A)
We risk reading TMSHIGH register twice, but PHY-A are really rare and we
do not support them at the moment.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 16:57:28 +0000 (18:57 +0200)]
b43: separate ssb core reset
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 16:57:27 +0000 (18:57 +0200)]
b43: add helper for finding GPIO device
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 12:00:02 +0000 (14:00 +0200)]
b43: dma: cache translation (routing bits)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 12:00:01 +0000 (14:00 +0200)]
b43: make b43_wireless_init less bus specific
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 17 May 2011 12:00:00 +0000 (14:00 +0200)]
b43: add helpers for block R/W ops
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Tue, 17 May 2011 08:34:12 +0000 (10:34 +0200)]
ath9k: fix ad-hoc nexttbtt calculation
rounding up the delta between last-beacon-tsf and tsf to intval is wrong
and can lead to misconfigured timers which breaks beacon transmission.
Fix this by adding intval and subtracting the offset of the tsf within the
current slot.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 08:06:18 +0000 (13:36 +0530)]
ath9k: Drag the driver to the year 2011
The Times They Are a-Changin'.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Tue, 17 May 2011 07:35:05 +0000 (13:05 +0530)]
ath_hw: Fix bssid mask documentation
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:12:34 +0000 (12:42 +0530)]
ath9k_htc: Fix packet timeout
The WMI tx status event timeout was not aligning with the
TX cleanup timer threshold value. Fix this to handle dropped
packets.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:12:24 +0000 (12:42 +0530)]
ath9k_htc: Change credit limit for UB94/95
Reduce the credit size for UB94/95 to fix target hangs.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:12:14 +0000 (12:42 +0530)]
ath9k_htc: Fix max subframe handling
Commit "ath9k_htc: Fix AMPDU subframe handling" registered the maximum
subframe limit of the driver with mac80211, which was used in ADDBA
negotiation. While technically correct, this causes inter-operability issues
with a few APs. Revert to the older behavior to fix this.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:12:03 +0000 (12:42 +0530)]
ath9k_htc: Fix BSSID calculation
The BSSID/AID has to be set for the first associated station interface.
Subsequent interfaces may move out of assoc/disassoc status, in which
case, the BSSID has to be re-calculated from the available interfaces.
Also, ANI should be enabled or disabled based on the current opmode.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:11:52 +0000 (12:41 +0530)]
ath9k_htc: Fix RX filter calculation
Choose the MY_BEACON filter only in case of a single interface.
Also, set the ATH9K_RX_FILTER_MCAST_BCAST_ALL filter in case
of interfaces.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:11:41 +0000 (12:41 +0530)]
ath9k_htc: Recalculate the BSSID mask on interface
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:11:31 +0000 (12:41 +0530)]
ath9k_htc: Fix station flags
The FW does absolutely nothing with the station flags,
so remove them. But keep the field around since it might
come in handy in the future.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Tue, 17 May 2011 07:11:20 +0000 (12:41 +0530)]
ath9k_htc: Fix mode selection
Remove all the unsupported modes like FH, TURBO etc.
Since this requires a FW update, increase the fw version to 1.3
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Daniel Halperin [Tue, 17 May 2011 04:46:28 +0000 (21:46 -0700)]
iwlwifi: remove unused parameter from iwl_hcmd_queue_reclaim
cmd_index is never used.
Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marc Yang [Tue, 17 May 2011 02:17:53 +0000 (19:17 -0700)]
mwifiex: adjust high/low water marks for tx_pending queue
This is to fix an issue that the throughput of the higher priority
stream gets dropped when a lower priority stream is present.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marc Yang [Tue, 17 May 2011 02:17:52 +0000 (19:17 -0700)]
mwifiex: CPU mips optimization with NO_PKT_PRIO_TID
If we go through the entire for loop in
mwifiex_wmm_get_highest_priolist_ptr() and don't find any packets,
set highest_queued_prio to NO_PKT_PRIO_TID (< LOW_PRIO_TID).
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marc Yang [Tue, 17 May 2011 02:17:51 +0000 (19:17 -0700)]
mwifiex: check mwifiex_wmm_lists_empty() before dequeue
add checks to mwifiex_wmm_process_tx() loop so it doesn't re-enter
mwifiex_dequeue_tx_packet() to find it can't send.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marc Yang [Tue, 17 May 2011 02:17:50 +0000 (19:17 -0700)]
mwifiex: reduce CPU usage by tracking highest_queued_prio
This patch adds highest_queued_prio to track priority of packets as
they are enqueued so that mwifiex_wmm_get_highest_priolist_ptr()
starts checking at the first level where we have packets, instead of
the highest. The function also lowers priority value to the level
where first packet is found.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Marc Yang [Tue, 17 May 2011 02:17:49 +0000 (19:17 -0700)]
mwifiex: reduce CPU usage by tracking tx_pkts_queued
This patch adds tx_pkts_queued to track number of packets being
enqueued & dequeued so that mwifiex_wmm_lists_empty() evaluation
is lightweight.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rhyland Klein [Mon, 16 May 2011 21:41:48 +0000 (14:41 -0700)]
net: rfkill: add generic gpio rfkill driver
This adds a new generic gpio rfkill driver to support rfkill switches
which are controlled by gpios. The driver also supports passing in
data about the clock for the radio, so that when rfkill is blocking,
it can disable the clock.
This driver assumes platform data is passed from the board files to
configure it for specific devices.
Original-patch-by: Anantha Idapalapati <aidapalapati@nvidia.com>
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Mon, 16 May 2011 21:22:00 +0000 (23:22 +0200)]
ath9k: fix ad-hoc mode beacon selection
In ad-hoc mode, beacon timers are configured differently compared to AP
mode, and (depending on the scenario) can vary enough to make the beacon
tasklet not detect slot 0 based on the TSF.
Since staggered beacons are not (and cannot be) used in ad-hoc mode, it
makes more sense to just hardcode slot 0 here, avoiding unnecessary
TSF reads and calculations.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Reported-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jouni Malinen [Mon, 16 May 2011 16:40:15 +0000 (19:40 +0300)]
cfg80211: Use consistent BSS matching between scan and sme
cfg80211 scan code adds separate BSS entries if the same BSS shows up
on multiple channels. However, sme implementation does not use the
frequency when fetching the BSS entry. Fix this by adding channel
information to cfg80211_roamed() and include it in cfg80211_get_bss()
calls.
Please note that drivers using cfg80211_roamed() need to be modified to
fully implement this fix. This commit includes only minimal changes to
avoid compilation issues; it maintains the old (broken) behavior for
most drivers. ath6kl was the only one that I could test, so I updated
it to provide the operating frequency in the roamed event.
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Mon, 16 May 2011 12:53:23 +0000 (18:23 +0530)]
ath9k: Fix power save wrappers in debug ops
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Sat, 14 May 2011 15:15:17 +0000 (10:15 -0500)]
rtlwifi: rtl8192c-common: rtl8192ce: Fix for HT40 regression
The changes that were made to rtl8192ce when rtl8192cu was added broke
HT40. The errors included a typo in rtlwifi, a missing routine in
rtl8192ce and a missing callback of that routine in rtl8192c-common.
This patch fixes the regression reported in Bug #35082.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 14 May 2011 09:56:16 +0000 (11:56 +0200)]
mac80211: annotate and fix RCU in mesh code
This adds proper RCU annotations to the mesh path
table code, and fixes a number of bugs in the code
that I found while checking the sparse warnings I
got as a result of the annotations.
Some things like the changes in mesh_path_add() or
mesh_pathtbl_init() only serve to shut up sparse,
but other changes like the changes surrounding the
for_each_mesh_entry() macro fix real RCU bugs in
the code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 14 May 2011 09:00:52 +0000 (11:00 +0200)]
mac80211: fix and simplify mesh locking
The locking in mesh_{mpath,mpp}_table_grow not only
has an rcu_read_unlock() missing, it's also racy
(though really only technically since it's invoked
from a single function only) since it obtains the
new size of the table without any locking, so two
invocations of the function could attempt the same
resize.
Additionally, it uses synchronize_rcu() which is
rather expensive and can be avoided trivially here.
Modify the functions to only use the table lock
and use call_rcu() instead of synchronize_rcu().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Sat, 14 May 2011 09:04:51 +0000 (11:04 +0200)]
mac80211: add missing rcu_barrier
mac80211 uses call_rcu() with functions that are
defined in the module, so it must use rcu_barrier()
at module exit time.
Luckily, this seems to not be a problem in practice
as module unload and unregistration takes a long
time and probably does multiple synchronize_rcu().
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Sat, 14 May 2011 08:31:46 +0000 (10:31 +0200)]
bcma: add PCI ID of the card found in Thinkpad X120e
Reported-by: Gottfried Haider <gottfried.haider@gmail.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rajkumar Manoharan [Sat, 14 May 2011 04:13:28 +0000 (09:43 +0530)]
mac80211: abort scan_work immediately when the device goes down
As long as no delay is required b/w channel change, scan work
is proceeding without scheduling a new work. In such case, we
can not abort scan work when the card was unplugged. This patch
completes the scanning immediately whenever the device goes down.
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 23:55:23 +0000 (01:55 +0200)]
mac80211: verify IBSS in interface combinations
Drivers shouldn't attempt to advertise support
for more than one IBSS interface since mac80211
doesn't support that. Check and return an error
from ieee80211_register_hw() in that case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Sat, 14 May 2011 00:42:38 +0000 (02:42 +0200)]
carl9170: advertise interface combinations
In order to provide multiple interfaces for a single device,
the driver will be required to advertise all possible
interface configurations to the stack.
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Fri, 13 May 2011 22:04:38 +0000 (00:04 +0200)]
b43: rename b43_wldev's field with ssb_device to sdev
We free name "dev" for something generic (like dev abstraction layer).
Additionaly code is cleaner now, especially magic dev->dev-dev chains.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Fri, 13 May 2011 21:16:07 +0000 (14:16 -0700)]
mac80211: Deactivate mesh path timers when freeing nodes
Mesh paths are deleted via mesh_path_del() which properly
deactivates the timer associated to a mesh path. But if paths were
deleted by mesh_table_free(..., true) timers would not be deactivated.
This fixes this case.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Alexey Dobriyan [Fri, 13 May 2011 21:12:48 +0000 (00:12 +0300)]
airo: correct proc entry creation interfaces
* use proc_mkdir_mode() instead of create_proc_entry(S_IFDIR|...),
export proc_mkdir_mode() for that, oh well.
* don't supply S_IFREG to proc_create_data(), it's unnecessary
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Fri, 13 May 2011 19:47:23 +0000 (21:47 +0200)]
p54usb: add zoom 4410 usbid
Cc: <stable@kernel.org>
Reported-by: Mark Davis <marked86@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Mon, 16 May 2011 18:21:02 +0000 (14:21 -0400)]
Merge branch 'wireless-next-2.6' of git://git./linux/kernel/git/iwlwifi/iwlwifi-2.6
Yogesh Ashok Powar [Fri, 13 May 2011 18:22:32 +0000 (11:22 -0700)]
mwifiex: use ieee80211_amsdu_to_8023s routine
mwifiex was using its own implementation of converting 802.11n
AMSDU to 802.3s. This patch removes mwifiex specific
implementation and uses existing ieee80211_amsdu_to_8023s
routine.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Yogesh Ashok Powar [Fri, 13 May 2011 18:22:31 +0000 (11:22 -0700)]
cfg80211: make stripping of 802.11 header optional from AMSDU
Currently the devices that have already stripped IEEE 802.11
header from the AMSDU SKB can not use ieee80211_amsdu_to_8023s
routine. This patch enhances ieee80211_amsdu_to_8023s() API by
changing mandatory removing of IEEE 802.11 header from AMSDU
to optional.
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Javier Cardona [Fri, 13 May 2011 17:45:43 +0000 (10:45 -0700)]
nl80211: Move peer link state definition to nl80211
These definitions need to be exposed now that we can set the peer link
states via NL80211_ATTR_STA_PLINK_STATE. They were already being
(opaquely) reported by NL80211_STA_INFO_PLINK_STATE.
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:29:42 +0000 (20:59 +0530)]
ath9k: make npending frames check as bool
we are not doing anything by tracking the number of pending frames.
bail out when we first find a pending frame in any one of the 10 queues.
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:01:40 +0000 (20:31 +0530)]
ath9k: make sure main_rssi is positive
some times the rssi control descriptor for the main antenna may be
negative like that of alternate antenna, hence before incrementing
packet counts/rssi of main/alternate antenna make sure both main_rssi
and alt_rssi are positive only. this avoids wrong selection of antenna
due to diversity
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:01:23 +0000 (20:31 +0530)]
ath9k: configure fast_div_bias based on diversity group
configure fast diversity bias based on the antenna diversity group and
based on main/alt LNA configurations. also configure main antenna and
alternate antenna to gain-table 0 for diversity group 2(AR9485)
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:01:09 +0000 (20:31 +0530)]
ath9k: Implement an API to swap main/ALT LNA's
for the diversity group 2(AR9485) we swap the LNA's of main/ALT antenna
based on alternate antenna's rssi average in comparision with main
antenna's rssi, while for AR9285(antenna diversity group 0)we still
follow the older method of looking at the packet count in alternate
antenna
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:00:56 +0000 (20:30 +0530)]
ath9k_hw: define antenna diversity group
AR9285 belongs to diversity group 0 and AR9485 belongs to diversity
group 2. Based on the diversity group we configure certain antenna
diversity paramaters such as lna1_lna2_delta and fast diversity
bias values. For AR9485 we have some gain table parameter which
selects the gain table 0/1 for main and alternate antenna
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:00:41 +0000 (20:30 +0530)]
ath9k_hw: define modules to get/set Antenna diversity paramaters
these are the two important modules that will be called by the antenna
diversity algorithm module in the rx. this will continuosly configure
the hardware based on the current diversity status obtained
from the algorithm
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 15:00:27 +0000 (20:30 +0530)]
ath9k_hw: config diversity based on eeprom contents
* enable LNA-diversity, fast-diversity for AR9485 based on
the value read from EEPROM content
* if antenna diversity/combining is supported, set LNA1 for the main
antenna and LNA2 for the alternate antenna based on the new diversity
algorithm
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 14:59:53 +0000 (20:29 +0530)]
ath9k_hw: define registers/macros to support Antenna diversity
define few registers and macros to configure/enable Antenna diversity
parameters in AR9485
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 14:59:31 +0000 (20:29 +0530)]
ath9k_hw: enable Antenna diversity for AR9485
read antenna diversity and combining information from the EEPROM.
Enable antenna diversity/combining feature only when both LNA
diversity and fast diversity are supported
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Tested-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Mohammed Shafi Shajakhan [Fri, 13 May 2011 14:59:04 +0000 (20:29 +0530)]
ath9k_hw: make antenna diversity modules chip specific
this is necessary to support Antenna diversity and combining in new chip
sets such as AR9485, previously Antenna diversity support is available
only in AR9285
Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Julia Lawall [Fri, 13 May 2011 13:52:10 +0000 (15:52 +0200)]
net/rfkill/core.c: Avoid leaving freed data in a list
The list_for_each_entry loop can fail, in which case the list element is
not removed from the list rfkill_fds. Since this list is not accessed by
the loop, the addition of &data->list into the list is just moved after the
loop.
The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E,E1,E2;
identifier l;
@@
*list_add(&E->l,E1);
... when != E1
when != list_del(&E->l)
when != list_del_init(&E->l)
when != E = E2
*kfree(E);// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 12:15:49 +0000 (14:15 +0200)]
mac80211: sparse RCU annotations
This adds sparse RCU annotations to most of
mac80211, only the mesh code remains to be
done.
Due the the previous patches, the annotations
are pretty simple. The only thing that this
actually changes is removing the RCU usage of
key->sta in debugfs since this pointer isn't
actually an RCU-managed pointer (it only has
a single assignment done before the key even
goes live). As that is otherwise harmless, I
decided to make it part of this patch.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 11:35:40 +0000 (13:35 +0200)]
mac80211: fix TX a-MPDU locking
During my quest to make mac80211 not have any RCU
warnings from sparse, I came across the a-MPDU code
again and it wasn't quite clear why it isn't racy.
So instead of assigning the tid_tx array with just
the spinlock held in ieee80211_start_tx_ba_session
use a separate temporary array protected only by
the spinlock and protect all assignments to the
"live" array by both the spinlock and the mutex so
that other code is easily verified to be correct.
Due to pointer assignment atomicity I don't think
this is a real issue, but I'm not sure, especially
on Alpha the current code might be problematic.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Johannes Berg [Fri, 13 May 2011 08:58:57 +0000 (10:58 +0200)]
cfg80211: advertise possible interface combinations
Add the ability to advertise interface combinations in nl80211.
This allows the driver to indicate what the combinations are
that it supports. "Combinations" of just a single interface are
implicit, as previously. Note that cfg80211 will enforce that
the restrictions are met, but not for all drivers yet (once all
drivers are updated, we can remove the flag and enforce for all).
When no combinations are actually supported, an empty list will
be exported so that userspace can know if the kernel exported
this info or not (although it isn't clear to me what tools using
the info should do if the kernel didn't export it).
Since some interface types are purely virtual/software and don't
fit the restrictions, those are exposed in a new list of pure SW
types, not subject to restrictions. This mainly exists to handle
AP-VLAN and monitor interfaces in mac80211.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stephen Boyd [Thu, 12 May 2011 23:50:05 +0000 (16:50 -0700)]
iwlwifi: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:
In file included from arch/x86/include/asm/uaccess.h:573,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from drivers/net/wireless/iwlwifi/iwl-agn-rs.c:28:
In function 'copy_from_user',
inlined from 'rs_sta_dbgfs_scale_table_write' at
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:3099:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct
presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Stephen Boyd [Thu, 12 May 2011 23:50:04 +0000 (16:50 -0700)]
iwlegacy: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
warning:
In file included from arch/x86/include/asm/uaccess.h:573,
from include/net/checksum.h:25,
from include/linux/skbuff.h:28,
from drivers/net/wireless/iwlegacy/iwl-4965-rs.c:28:
In function 'copy_from_user',
inlined from 'iwl4965_rs_sta_dbgfs_scale_table_write' at
drivers/net/wireless/iwlegacy/iwl-4965-rs.c:2616:
arch/x86/include/asm/uaccess_64.h:65:
warning: call to 'copy_from_user_overflow' declared with
attribute warning: copy_from_user() buffer size is not provably
correct
presumably due to buf_size being signed causing GCC to fail to
see that buf_size can't become negative.
Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
John W. Linville [Fri, 13 May 2011 19:18:35 +0000 (15:18 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx
John W. Linville [Fri, 13 May 2011 13:23:47 +0000 (09:23 -0400)]
ssb: fix pcicore build breakage
drivers/ssb/main.c:1336: error: 'SSB_PCICORE_BCAST_ADDR' undeclared (first use in this function)
drivers/ssb/main.c:1337: error: 'SSB_PCICORE_BCAST_DATA' undeclared (first use in this function)
drivers/ssb/main.c:1349: error: 'struct ssb_pcicore' has no member named 'dev'
Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Wey-Yi Guy [Wed, 11 May 2011 15:33:55 +0000 (08:33 -0700)]
iwlagn: remove unused old_assoc parameter
old_assoc not used, remove it
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Wed, 11 May 2011 15:17:20 +0000 (08:17 -0700)]
iwlagn: change default beacon interval
When the PAN context is active, but unused, it
may still block scans that take more dwell time
than its beacon interval (which is odd). Work
around this problem by using a default beacon
interval of 200 so scans will fit between.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Wed, 11 May 2011 10:29:25 +0000 (03:29 -0700)]
iwlagn: remove set but unused vars
gcc is warning that a few variables in rate
scaling are set but never otherwise used.
This pointed out a few simplifications.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Sat, 7 May 2011 00:06:44 +0000 (17:06 -0700)]
iwlagn: alwasy send RXON with disassociate falge before associate
Before send the RXON command with associated flag set, always do disassociate
first to make sure uCode is in the correct state.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Sat, 7 May 2011 00:06:43 +0000 (17:06 -0700)]
iwlagn: clear STATUS_HCMD_ACTIVE bit if fail enqueue
If fail to enqueue host command, clear the STATUS_hcmD_ACTIVE bit
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Wed, 4 May 2011 01:05:13 +0000 (18:05 -0700)]
iwlagn: add testmode set fixed rate command
Add support in testmode for setting fixed rate
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Wed, 4 May 2011 01:05:12 +0000 (18:05 -0700)]
iwlagn: add eeprom command to testmode
Add the capability to dump eeprom through testmode request
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Fri, 6 May 2011 17:21:28 +0000 (10:21 -0700)]
iwlagn: add testmode trace command
Adding testmode trace/debug capability
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Wey-Yi Guy [Wed, 4 May 2011 23:56:52 +0000 (16:56 -0700)]
iwlagn: more ucode error log info
No functional changes, just logging more information when uCode crash, also
change change the format.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Fri, 13 May 2011 18:57:40 +0000 (11:57 -0700)]
iwlagn: support multiple TBs per command
The current "huge" command handling is a bit
confusing, and very limited since only one
command may be huge at a time. Additionally,
we often copy data around quite pointlessly
since we could instead map the existing scan
buffer for example and use it directly.
This patch makes that possible. The first
change is that multiple buffers may be given
to each command (this change was prepared
earlier so callsites don't need to change).
Each of those can be mapped attached to a TB
in the TFD, and the command header can use a
TB (the first one) in the TFD as well.
Doing this allows getting rid of huge commands
in favour of mapping existing buffers. The
beacon transmission is also optimised to not
copy the SKB at all but use multiple TBs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Wed, 4 May 2011 14:50:48 +0000 (07:50 -0700)]
iwlagn: remove unused pad argument
The pad argument to iwlagn_txq_free_tfd
isn't used, remove it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Wed, 4 May 2011 14:50:44 +0000 (07:50 -0700)]
iwlagn: clean up TXQ indirection
All of these functions no longer need to be
accessed indirectly since they're shared in
all AGN devices.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Johannes Berg [Wed, 4 May 2011 14:50:38 +0000 (07:50 -0700)]
iwlagn: prepare for multi-TB commands
In a subsequent patch, I want to make commands use
multiple TBs in a TFD. This is a simple change to
prepare the data structures for this, with as of
now still just a single TB supported.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Eliad Peller [Fri, 13 May 2011 08:57:13 +0000 (11:57 +0300)]
wl12xx: enter/exit psm on wowlan suspend/resume
When operating as station, enter psm before suspending
the device into wowlan state.
Add a new completion event to signal when psm was entered
successfully.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Fri, 13 May 2011 08:57:12 +0000 (11:57 +0300)]
wl12xx_sdio: declare support for NL80211_WOW_TRIGGER_ANYTHING trigger
Since wowlan requires the ability to stay awake while the host
is suspended, declare support for NL80211_WOW_TRIGGER_ANYTHING
if the MMC_PM_KEEP_POWER capability is being supported.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Fri, 13 May 2011 08:57:11 +0000 (11:57 +0300)]
wl12xx: prevent scheduling while suspending (WoW enabled)
When WoW is enabled, the interface will stay up and the chip will
be powered on, so we have to flush/cancel any remaining work, and
prevent the irq handler from scheduling a new work until the system
is resumed.
Add 2 new flags:
* WL1271_FLAG_SUSPENDED - the system is (about to be) suspended.
* WL1271_FLAG_PENDING_WORK - there is a pending irq work which
should be scheduled when the system is being resumed.
In order to wake-up the system while getting an irq, we initialize
the device as wakeup device, and calling pm_wakeup_event() upon
getting the interrupt (while the system is about to be suspended)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Fri, 13 May 2011 08:57:10 +0000 (11:57 +0300)]
wl12xx_sdio: set MMC_PM_KEEP_POWER flag on suspend
if a wow trigger was configured, set the MMC_PM_KEEP_POWER flag
on suspend, so our power will be kept while the system is suspended.
We needed to set this flag on each suspend attempt (when we want
to keep power)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Fri, 13 May 2011 08:57:09 +0000 (11:57 +0300)]
wl12xx: declare suspend/resume callbacks (for wowlan)
Additionally, add wow_enabled field to wl, to indicate
whether wowlan was configured.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Fri, 13 May 2011 08:57:08 +0000 (11:57 +0300)]
wl12xx_sdio: set interrupt as wake_up interrupt
set the sdio interrupt as wake_up interrupt, so we will be able
to wake up the suspended system (Wake-On-Wireless)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 12 May 2011 13:50:41 +0000 (16:50 +0300)]
wl12xx: remove unused flag WL1271_FLAG_IDLE_REQUESTED
This flag is not used anymore, remove it from the list.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Thu, 12 May 2011 14:07:55 +0000 (17:07 +0300)]
wl12xx: prevent sched_scan when not idle or not in station mode
The current firmware only supports scheduled scan in station mode and
when idle. To prevent the firmware from crashing, return -EOPNOTSUPP
when sched_scan start is called in an invalid state.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 10 May 2011 11:47:45 +0000 (14:47 +0300)]
wl12xx: export scheduled scan state in debugfs
Add the sched_scanning value to the driver_status debugfs entry.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 10 May 2011 11:46:02 +0000 (14:46 +0300)]
wl12xx: implement scheduled scan driver operations and reporting
This patch adds the mac80211 operations for scheduled scan and the
scheduled scan results reporting.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 10 May 2011 11:38:59 +0000 (14:38 +0300)]
wl12xx: add scheduled scan structures and commands
Add firmware command structures, definitions and code to to configure,
start and stop scheduled scans.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 10 May 2011 11:28:27 +0000 (14:28 +0300)]
wl12xx: listen to scheduled scan events
Subscribe and listen to PERIODIC_SCAN_REPORT_EVENT_ID and
PERIODIC_SCAN_COMPLETE_EVENT_ID in preparation for the scheduled scan
implementation.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Luciano Coelho [Tue, 10 May 2011 11:06:31 +0000 (14:06 +0300)]
wl12xx: add configuration values for scheduled scan
Add the structures and values for driver-configured scheduled scan
parameters.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Shahar Levi [Wed, 11 May 2011 09:12:56 +0000 (12:12 +0300)]
wl12xx: add IEEE80211_HW_SPECTRUM_MGMT bit to the hw flags
Set the spectrum management bit in the hw flags so that mac80211 will
set the WLAN_CAPABILITY_SPECTRUM_MGMT bit in association requests
(which in practice means that we support 802.11h spectrum management).
[Reworded the commit log -- Luca.]
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Shahar Levi [Wed, 11 May 2011 08:14:22 +0000 (11:14 +0300)]
wl12xx: Don't filter beacons that include changed HT IEs
This patch adds a beacon filter rule to pass up the beacons that
contain changed HT information elements. These beacons need to be
passed to mac80211 so that it can act on such changes.
[Reworded commit log -- Luca.]
Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Eliad Peller [Sun, 1 May 2011 06:56:45 +0000 (09:56 +0300)]
wl12xx: simplify wl1271_ssid_set()
Simplify wl1271_ssid_set by re-using cfg80211_find_ie instead of
reimplementing it.
Additionally, add a length check to prevent a potential buffer overflow.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Johannes Berg [Thu, 12 May 2011 11:38:50 +0000 (13:38 +0200)]
mac80211: mesh: move some code to make it static
There's no need to have table functions in one
file and all users in another, move the functions
to the right file and make them static. Also move
a static variable to the beginning of the file to
make it easier to find.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luciano Coelho [Thu, 12 May 2011 13:28:29 +0000 (16:28 +0300)]
cfg80211/mac80211: avoid bounce back mac->cfg->mac on sched_scan_stopped
When sched_scan_stopped was called by the driver, mac80211 calls
cfg80211, which in turn was calling mac80211 back with a flag
"driver_initiated". This flag was used so that mac80211 would do the
necessary cleanup but would not call the driver. This was enough to
prevent the bounce back between the driver and mac80211, but not
between mac80211 and cfg80211.
To fix this, we now do the cleanup in mac80211 before calling
cfg80211. To help with locking issues, the workqueue was moved from
cfg80211 to mac80211.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>