Commit Graph

5077 Commits (030645aceb3d9f10b1c3d2231c50f5a8bb3a9667)

Author SHA1 Message Date
Jussi Kivilinna 030645aceb rndis_wlan: handle 802.11 indications from device
Add handling for 802.11 specific rndis indications.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:17 -04:00
Jussi Kivilinna 2a4901bcbe rndis_host: allow rndis_wlan to see all indications
Allow rndis_wlan to see all indications. Currently rndis_host lets rndis_wlan to
know about link state changes only, but there is whole set of other
802.11-specific indications that rndis_wlan should handle properly. So rename
link_change() to indication() and convert rndis_wlan to use it.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:17 -04:00
Jussi Kivilinna 27b7b5c131 rndis_wlan: add rndis_set/query_oid debugging
Add better debugging for failed OID queries.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:16 -04:00
Jussi Kivilinna e5a11a822e rndis_wlan: set current packet filter to zero on stop
Set current packet filter to zero to block receiving data packets from
device.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:16 -04:00
Jussi Kivilinna 7eaab7086c rndis_wlan: reset device and restore multicast list on rndis_wlan_reset()
Reset device properly with RNDIS_MSG_RESET in rndis_wlan_reset() and restore
multicast list afterwards.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:16 -04:00
Jussi Kivilinna 005ba2f17e rndis_wlan: clear cfg80211 scan on rndis_wlan_stop()
Scanning gets stuck if device is stopped when scan is active. Fix by
clearing/aborting cfg80211 scan on rndis_wlan_stop().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:16 -04:00
Jussi Kivilinna 110736de93 rndis_wlan: stop workers on rndis_wlan_stop() and restore on rndis_wlan_reset()
Driver doesn't need to poll statistics/link status when stopped.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:15 -04:00
Jussi Kivilinna 1487cd5e76 usbnet: allow "minidriver" to prevent urb unlinking on usbnet_stop
rndis_wlan devices freeze after running usbnet_stop several times. It appears
that firmware freezes in state where it does not respond to any RNDIS commands
and device have to be physically unplugged/replugged. This patch lets
minidrivers to disable unlink_urbs on usbnet_stop through new info flag.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:15 -04:00
Johannes Berg e46ab7f088 iwlwifi: don't export symbols not needed in other modules
Even with the split into iwlcore/agn/3945 not all symbols
that cross file boundaries are needed in other modules, a
few are only used within iwlcore, for example.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:15 -04:00
Luis R. Rodriguez 42935ecaf4 mac80211: redefine usage of the mac80211 workqueue
The mac80211 workqueue exists to enable mac80211 and drivers
to queue their own work on a single threaded workqueue. mac80211
takes care to flush the workqueue during suspend but we never
really had requirements on drivers for how they should use
the workqueue in consideration for suspend.

We extend mac80211 to document how the mac80211 workqueue should
be used, how it should not be used and finally move raw access to
the workqueue to mac80211 only. Drivers and mac80211 use helpers
to queue work onto the mac80211 workqueue:

  * ieee80211_queue_work()
  * ieee80211_queue_delayed_work()

These helpers will now warn if mac80211 already completed its
suspend cycle and someone is trying to queue work. mac80211
flushes the mac80211 workqueue prior to suspend a few times,
but we haven't taken the care to ensure drivers won't add more
work after suspend. To help with this we add a warning when
someone tries to add work and mac80211 already completed the
suspend cycle.

Drivers should ensure they cancel any work or delayed work
in the mac80211 stop() callback.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:44:14 -04:00
Luis R. Rodriguez 64344d7822 at76c50x-usb: remove unneeded flush_workqueue() at usb disconnect
This driver only uses the mac80211 workqueue and mac80211 requires us to
cancel all work at driver stop. Since we now have the cancels in the right
places at stop() we really don't need to flush the mac80211 workqueue so
remove it.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:27 -04:00
Bob Copeland 8784d2ee92 ath5k: fix CAB queue operation
We need to process tx descriptors for all queues (currently main tx
queue and cabq) which may have triggered the TX completion interrupt.
Otherwise, the queues can get stuck after sending a few frames.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:27 -04:00
Holger Schurig 7e2ce646fc orinoco: enable cfg80211 "set_channel" operation
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:26 -04:00
Luis R. Rodriguez 91b092d734 ar9170: remove EXPERIMENTAL marker
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:26 -04:00
Larry Finger 18c6951091 b43: Work around mac80211 race condition
As shown in http://thread.gmane.org/gmane.linux.kernel.wireless.general/36497,
mac80211 has a bug that allows a call to the TX routine after the queues have
been stopped. This situation will only occur under extreme stress. Although
b43 does not crash when this condition occurs, it does generate a WARN_ON and
also logs a queue overrun message. This patch recognizes b43 is not at fault
and logs a message only when the most verbose debugging mode is enabled. In
the unlikely event that the queue is not stopped when the DMA queue becomes
full, then a warning is issued.

During testing of this patch with one output stream running repeated tcpperf
writes and a second running a flood ping, this routine was entered with
the DMA ring stopped about once per hour. The condition where the DMA queue is
full but the ring has not been stopped has never been seen by me.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:26 -04:00
Bob Copeland ae6f53f25f ath5k: update PCU opmode whenever a new interface is added
Previously, we would store the operating mode at interface up time,
but only update the PCU registers when the next reset happened.
The result is that if beacon configuration (ops->bss_info_changed)
happens before ops->config, we will program the wrong things into
the timer registers.  Consequently, beacons won't work in AP mode
until after a reset (channel change, scan etc.).

This is fragile anyway so just program the opmode as soon as
mac80211 gives it to us.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:25 -04:00
Vasanthakumar Thiagarajan 0b3acfa71a ath9k: Remove unused ath9k_hw_intrget()
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:24 -04:00
Vasanthakumar Thiagarajan 3fc0fbf407 ath9k: Maintain monotonicity of PER while going across different phy
Monotonicity of packet error rate should be kept when moving
from one phy to another (legacy to ht, ht single stream to dual,
etc). Current code skips updating per for other phys.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:24 -04:00
Vasanthakumar Thiagarajan 42e8856092 ath9k: Update rate control for 11NA HT40 mode
Now the lowest rate in 11na ht40 mode is 13.5Mbps this shortens the
range when compared to 11na ht20 mode where the lowest rate is 6.5Mbps.
To improve the range, make 6.5Mbps as the lowest rate in 11na ht40 mode,
this improves the range by approximately 2dB. 11ng ht40 does not have
this issue as it also has basic rates (1, 2, 5.5 and 11).

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:24 -04:00
Ivo van Doorn ad2f34b41f rt2x00: Fix build error when crypto support is disabled
When only rt2400pci or rt2500pci is compiled without any of the other
rt2x00 modules, then CONFIG_RT2X00_LIB_CRYPTO will not be enabled.

However rt2x00mac_set_tim() implemented within #ifdef CONFIG_RT2X00_LIB_CRYPTO
statements while the declaration is placed outside the definition. This results in linking
errors as reporte by Ken.

rt2x00_set_tim() has nothing to do with crypto, and thus should be moved outside
of the #ifdef statements.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:22 -04:00
Luis R. Rodriguez 33172899a9 rt2x00: move experimental on kconfig only to rt2800usb
These drivers have been around for a while, if there are issues
they should be reported. rt2800usb is still a bit flaky though.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:22 -04:00
Luis R. Rodriguez 3e6404528c wireless: use menuconfig for WLAN_PRE80211 and WLAN_80211
This should make it very clear which are pre-802.11 or not

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:21 -04:00
Luis R. Rodriguez 75323fa3de ath5k: remove EXPERIMENTAL marker
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:21 -04:00
Luis R. Rodriguez 44b7dd6dde ath: use menuconfig to put ath stuff in its own page
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:21 -04:00
Luis R. Rodriguez b820b3bcb0 ath: simplify kconfig dependency and add documentation
Make atheros wireless drivers visible when you select
"Atheros wirless drivers". Adds links to ath.ko page,
and Atheros drivers page on the wiki.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:21 -04:00
Luis R. Rodriguez d17734aee6 ath: depend on cfg80211
The ath.ko module itself depends on cfg80211

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:20 -04:00
Luis R. Rodriguez e351cfbf4e ar9170: remove unneeded flush_workqueue()
cancel_delayed_work_sync() and cancel_work_sync() are already being
used therefore already waiting for all pending work by the driver
to have been completed, no need to flush the mac80211 workqueue.

Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:20 -04:00
Luis R. Rodriguez 9ed21d3901 at76c50x-usb: cancel scan work at stop callback
This should fix suspend as mac80211 expects all work queued
to the mac80211 workqueue to be canceled at driver stop().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:19 -04:00
Luis R. Rodriguez ebc8ab17d6 ar76c50x-usb: cancel promisc work during mac80211 stop
We weren't ever cancelling this.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:19 -04:00
Luis R. Rodriguez c94dbff799 ath9k: move workqueue cancels to stop callback
We should be cancelling our work at the stop callback since
we are borrowing the mac80211 workqueue for our work. As it
stands mac80211 expects this for suspend purposes.

The ath9k specific virtual wiphy stuff need only be
cancelled only when the we have no secondary virtual wiphys.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:19 -04:00
Luis R. Rodriguez 35c95ab9b5 ath9k: move cancel_delayed_work_sync() out of ath_deinit_leds()
We do this as we'll be moving the cancel elsewhere later.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:18 -04:00
Luis R. Rodriguez 9851bad7a3 ath9k: re-order cancelling of work on mac80211 workqueue
ath9k uses the mac80211 workqueue for 4 different types of work:

 * Led blink work
 * TX hang monitoring work
 * internal wiphy schedular work
 * channel change work done for internal wiphy schedular

Since the internal wiphy schedular can end up kicking off some
channel channel change work we should first cancel the wiphy
schedular work and then the channel change work.

The TX hang work can be cancelled second since we're going down
anyway.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-08-04 16:43:18 -04:00
David S. Miller 2f6d7c1b34 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2009-07-30 19:26:55 -07:00
David S. Miller df597efb57 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
	drivers/net/wireless/iwlwifi/iwl-3945.h
	drivers/net/wireless/iwlwifi/iwl-tx.c
	drivers/net/wireless/iwlwifi/iwl3945-base.c
2009-07-30 19:22:43 -07:00
Wey-Yi Guy 1e4247d457 iwlwifi: debugFs to enable/disable HT40 support
Add debugfs file to enable/disable HT40(40MHz) channel support.
By default, 40MHz is supported if AP can support the function.

By echo "1" to "disable_ht40" file, iwlwifi driver will disable the
40MHz support and only allow 20MHz channel.

Because the information exchange happen during association time,
so enable/disable ht40 channel only can be performed when it is not
associated with AP.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:23 -04:00
Luis R. Rodriguez 35a1e70dfe ath9k: remove unused ATH_PCI_VERSION
Our version goes by the kernel release.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:21 -04:00
Johannes Berg a9a11622c5 cfg80211: self-contained wext handling where possible
Finally! This is what you've all been waiting for!

This patch makes cfg80211 take care of wext emulation
_completely_ by itself, drivers that don't need things
cfg80211 doesn't do yet don't even need to be aware of
wireless extensions.
This means we can also clean up mac80211's and iwm's
Kconfig and make it possible to build them w/o wext
now!

		RIP wext.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:20 -04:00
Johannes Berg 1f9298f960 cfg80211: combine IWESSID handlers
Since we now have handlers IWESSID for all modes, we can
combine them into one.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:18 -04:00
Johannes Berg 562e482265 cfg80211: combine IWAP handlers
Since we now have IWAP handlers for all modes, we can
combine them into one.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:16 -04:00
Johannes Berg 0e82ffe3b9 cfg80211: combine iwfreq implementations
Until now we implemented iwfreq for managed mode, we
needed to keep the implementations separate, but now
that we have all versions implemented we can combine
them and export just one handler.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:14 -04:00
Sujith fec247c0d5 ath9k: Add debug counters for TX
Location: ath9k/phy#/xmit

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:09 -04:00
Gabor Juhos cbdec97587 ath9k: get rid of unnecessary setpower calls
We are using setpower routines regardless of the current power mode.
Don't bother the hardware, if it is not necessary.

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:04 -04:00
Gabor Juhos 96148326c4 ath9k: fix race with IEEE80211_CONF_PS checks
There is a small window where the mac80211 changes the IEEE80211_CONF_PS
flag, and then informs the driver about the change. We have a race
condition if we are checking the flag in the same time. Avoid it by
introducing a local variable, and using that instead of checking the
IEEE80211_CONF_PS flag directly.

This fix the problem reported by Luis:
http://article.gmane.org/gmane.linux.kernel.wireless.general/34363

Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:03 -04:00
Alexander Beregalov ff8365ca88 ar9170: fix build error when !CONFIG_AR9170_LEDS
Fix this build error when CONFIG_AR9170_LEDS is not set
drivers/net/wireless/ath/ar9170/main.c:1296: error: 'struct ar9170' has
no member named 'led_work'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:46:01 -04:00
John W. Linville 11866efa9b ray_cs: remove bogus NULL check at head of ray_get_wireless_stats
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Martin Ettl <ettl.martin@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:45:59 -04:00
Reinette Chatre 6686d17e16 iwlagn: fix sparse warning when compiling without debug
C [M]  drivers/net/wireless/iwlwifi/iwl-core.o
drivers/net/wireless/iwlwifi/iwl-core.c:1341: warning:
‘iwl_dump_nic_error_log’ defined but not used

Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:45:54 -04:00
Reinette Chatre f7ea097d9b iwlagn: fix null pointer access during ucode load on 1000
Commit "iwlwifi: Handle new firmware file with ucode build number
in header" introduced new ucode header parsing routines, but
neglected to initialize these routines for 1000. The system thus goes
into infinite loop trying to load ucode, failing every time with a null
pointer exception as it tries to parse the header.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 15:45:53 -04:00
Roel Kluin 57921c312e libertas: Read buffer overflow
Several arrays were read before checking whether the index was within
bounds. ARRAY_SIZE() should be used to determine the size of arrays.

rates->rates has an arraysize of 1, so calling get_common_rates()
with a rates_size of MAX_RATES (14) was causing reads out of bounds.

tmp_size can increment at most to (ARRAY_SIZE(lbs_bg_rates) - 1) *
(*rates_size - 1), so that should be the number of elements of tmp[].

A goto can be eliminated: ret was already set upon its declaration.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 14:52:01 -04:00
Roel Kluin 430453fc2a libertas: Read outside array bounds
reads bss->rates[j] before checking bounds of index, and should use
ARRAY_SIZE to determine the size of the array.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-29 14:52:01 -04:00
Pavel Machek 1da46bebb1 iwlwifi: fix LED config option
IWLWIFI_LEDS option should certainly have help comment, and should
default to y.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-27 15:24:27 -04:00