]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
14 years agoiwlwifi: move agn only eeprom functions to separate file
Wey-Yi Guy [Fri, 8 Oct 2010 23:05:19 +0000 (16:05 -0700)]
iwlwifi: move agn only eeprom functions to separate file

Some of the functions in iwl-eeprom.c file are for agn devices only,
Those functions do not have to be part of iwlcore.ko, so move those
to iwl-agn-eeprom.c file.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: check beacon frame size
Johannes Berg [Thu, 7 Oct 2010 11:00:33 +0000 (04:00 -0700)]
iwlagn: check beacon frame size

When the beacon_skb is NULL, we might still
attempt to use it in this code path (if we
ever get here) -- make the code a bit more
defensive and check the return value of
iwl_fill_beacon_frame() against zero.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: blink LED in IBSS mode
Johannes Berg [Thu, 7 Oct 2010 10:52:35 +0000 (03:52 -0700)]
iwlwifi: blink LED in IBSS mode

We recently found that contrary to expectations,
the LED is not blinking in IBSS mode. Fix this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: rewrite RXON checks
Johannes Berg [Thu, 7 Oct 2010 11:02:03 +0000 (04:02 -0700)]
iwlwifi: rewrite RXON checks

The RXON checking is a bit magical, and prints
out too much information if something goes wrong.
Make it less magical and print out only the items
that were actually wrong.

Also remove the comment about removing it -- the
driver is constantly changing so these checks are
useful.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoiwlagn: 6050 ops should be used;
Wey-Yi Guy [Wed, 6 Oct 2010 20:46:11 +0000 (13:46 -0700)]
iwlagn: 6050 ops should be used;

For 6050 series of devices, 6050 ops should be used;
One of the 6050 config still use 6000 ops, fix it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: clean up some beacon handling
Johannes Berg [Mon, 4 Oct 2010 12:50:36 +0000 (05:50 -0700)]
iwlwifi: clean up some beacon handling

There's no need to check for NULL before
calling dev_kfree_skb() since it is valid
to call it on NULL -- it becomes a no-op.

There's also no need to initialise the
beacon_skb variable to NULL just after
the memory it is in has been kzalloc'ed.

Some minor whitespace cleanups, and a
lock assertion in a function that needs
the mutex (to access the beacon_skb var)
complete the patch.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: rename ibss_beacon variable
Johannes Berg [Mon, 4 Oct 2010 12:50:06 +0000 (05:50 -0700)]
iwlwifi: rename ibss_beacon variable

Since we're also going to support AP (GO) mode,
the variable isn't used for just IBSS beacons
any more -- rename it to not mislead readers.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: allow probe-after-rx on 2.4 GHz
Johannes Berg [Mon, 4 Oct 2010 12:47:23 +0000 (05:47 -0700)]
iwlwifi: allow probe-after-rx on 2.4 GHz

There are two passive 2.4 GHz channels: 12 and 13.
If you have a hidden SSID on those, you will not
be able to connect to it because we don't send out
probe requests there. We can allow this by using
the firmware's probe-after-rx functionality on
those channels as well.

This fixes
https://bugzilla.kernel.org/show_bug.cgi?id=16462

Reported-by: Daniel J Blueman <daniel.blueman@gmail.com>
Tested-by: Daniel J Blueman <daniel.blueman@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlgn: need longer tx queue stuck timer for coex devices
Wey-Yi Guy [Thu, 23 Sep 2010 22:24:22 +0000 (15:24 -0700)]
iwlgn: need longer tx queue stuck timer for coex devices

For BT/WiFi combo devices, need longer tx stuck queue
timer, so those devices won't reload firmware too often.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoath9k: Fix potential use-after-free.
Ben Greear [Wed, 13 Oct 2010 19:01:23 +0000 (12:01 -0700)]
ath9k: Fix potential use-after-free.

The ath_debug_stat_tx references bf->bf_mpdu, which
is the skb consumed by  ath_tx_complete.  So, call
the ath_debug_stat_tx method first.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix SMPS request
Johannes Berg [Wed, 13 Oct 2010 17:23:21 +0000 (19:23 +0200)]
mac80211: fix SMPS request

It looks like I submitted a different patch
than I tested, because clearly the code in
mac80211 is missing actually propagating the
requested SMPS mode. Fix that!

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Set RX filter for Probe Request based on filter flag
Jouni Malinen [Wed, 13 Oct 2010 14:29:31 +0000 (17:29 +0300)]
ath9k: Set RX filter for Probe Request based on filter flag

This allows mac80211 to enable receiving of Probe Request frames in
station mode which is needed for P2P.

Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: add probe request filter flag
Johannes Berg [Wed, 13 Oct 2010 10:06:24 +0000 (12:06 +0200)]
mac80211: add probe request filter flag

Using the frame registration notification, we
can see when probe requests are requested and
notify the low-level driver via filtering. The
flag is also set in AP and IBSS modes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: notify drivers about frame registrations
Johannes Berg [Wed, 13 Oct 2010 10:06:23 +0000 (12:06 +0200)]
cfg80211: notify drivers about frame registrations

Drivers may need to adjust their filters according
to frame registrations, so notify them about them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: Fix documentation in rate control
Mohammed Shafi Shajakhan [Wed, 13 Oct 2010 06:17:09 +0000 (11:47 +0530)]
ath9k: Fix documentation in rate control

This fix updates the documenation in Rate Control Table structure

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Move debugfs under ieee80211/[wiphy-name]
Ben Greear [Tue, 12 Oct 2010 17:55:38 +0000 (10:55 -0700)]
ath5k: Move debugfs under ieee80211/[wiphy-name]

This automatically keeps things proper when wiphy
is renamed.

Based on patch by Johannes Berg <johannes@sipsolutions.net>

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowext: fix alignment problem in serializing 'struct iw_point'
Gerrit Renker [Tue, 12 Oct 2010 05:07:42 +0000 (07:07 +0200)]
wext: fix alignment problem in serializing 'struct iw_point'

wext: fix alignment problem in serializing 'struct iw_point'

This fixes a typo in the definition of the serialized length of struct iw_point:
 a) wireless.h is exported to userspace, the typo causes IW_EV_POINT_PK_LEN
    to be 12 on 64-bit, and 8 on 32-bit systems (causing misalignment);
 b) in compat-64 mode iwe_stream_add_point() memcpys overlap (see below).

The second case in  in compat-64 mode looks like (variable names are as in
include/net/iw_handler.h:iwe_stream_add_point()):

 point_len = IW_EV_COMPAT_POINT_LEN = 8
 lcp_len   = IW_EV_COMPAT_LCP_LEN   = 4
 2nd memcpy: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN = 12 - 4 = 8

 IW_EV_LCP_PK_LEN
 <-------------->                *---> 'extra' data area
 +-------+-------+-------+-------+---------------+------- ...-+
 | len   | cmd   |length | flags |  (empty) -> extra      ... |
 +-------+-------+-------+-------+---------------+------- ...-+
    2       2       2       2          4

     lcp_len
 <-------------->                <-!! OVERLAP !!>
 <--1st memcpy--><------- 2nd memcpy ----------->
                                 <---- 3rd memcpy ------- ... >
 <--------- point_len ---------->

This case could cause overrun whenever iw_point.length < 4.
The other two cases are -
 * 32-bit systems: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN =  8 - 4 = 4,
   the second memcpy copies exactly the 4 required bytes;
 * 64-bit systems: IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN = 12 - 4 = 8,
   the second memcpy copies a superfluous (but non overlapping) 4 bytes.

The patch changes IW_EV_POINT_PK_LEN to be 8, so that in all 3 cases always only
the requested iw_point.{length,flags} (both __u16) are copied, avoiding overrrun
(compat-64) and superfluous copy (64-bit). In addition, the userspace header is
sanitized (in agreement with version 30 of the wireless tools).

Many thanks to Johannes Berg for help and review with this patch.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix build break from "ath5k: Print out opmode in debugfs"
Joe Perches [Tue, 12 Oct 2010 18:07:44 +0000 (11:07 -0700)]
ath5k: fix build break from "ath5k: Print out opmode in debugfs"

Also improve ath_opmode_to_string usage by having it return UNKNOWN
rather than NULL in the event of failure to map the opmode value to a
representative string.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: Print wiphy name in sysfs.
Ben Greear [Mon, 11 Oct 2010 17:28:59 +0000 (10:28 -0700)]
wireless: Print wiphy name in sysfs.

The index cannot be used to reliably reconstruct a phy
name, so explicitly add the phy name to sysfs so that scripts
can figure out the parent phy device for a particular
wireless interface.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Tue, 12 Oct 2010 19:52:25 +0000 (15:52 -0400)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agoiwl3945: fix queue allocation
Johannes Berg [Tue, 12 Oct 2010 09:26:13 +0000 (02:26 -0700)]
iwl3945: fix queue allocation

commit 6f98613258b966ffe0e6def18129b386514d10e0
Author: Jay Sternberg <jay.e.sternberg@intel.com>
Date:   Sat Sep 18 09:07:04 2010 -0700

    iwlagn: reduce redundant parameter definitions

broke 3945 because Jay accidentally removed the
num_of_queues parameter for 3945, so that we now
attempt to allocate a zero-sized queue array,
which leads to SLUB returning ZERO_SIZE_PTR (0x10)
which we then try to dereference thus crashing the
system. Restore the necessary num_of_queues param.

This fixes
http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2254

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: prio_tbl need to download before calibration
Wey-Yi Guy [Mon, 11 Oct 2010 21:24:05 +0000 (14:24 -0700)]
iwlagn: prio_tbl need to download before calibration

For WiFi/BT combo devices, priority table always need to download
before perform any calibration operation.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiiwlagn: always download priority table
Wey-Yi Guy [Thu, 23 Sep 2010 16:56:51 +0000 (09:56 -0700)]
iiwlagn: always download priority table

For advance BT/WiFi co-exist, always download bt priority table
before sending bt_config command

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agort2x00: Fix URB error handling
Ivo van Doorn [Mon, 11 Oct 2010 13:39:48 +0000 (15:39 +0200)]
rt2x00: Fix URB error handling

kill_urb guarentees that when the function returns, the URB has
been fully killed. This means we don't need the extra sleeping
after the call to kill_urb.

kill_urb can however also guarentee the submit_urb to fail, as
a result, we must catch the return value from submit_urb an
correctly mark the entry as owned by the driver, and the
status as broken.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Don't perform watchdog checks on empty queue
Ivo van Doorn [Mon, 11 Oct 2010 13:39:04 +0000 (15:39 +0200)]
rt2x00: Don't perform watchdog checks on empty queue

The currently used watchdog functions cannot be applied
to empty queues.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Make queue_entry flags access atomic
Ivo van Doorn [Mon, 11 Oct 2010 13:38:45 +0000 (15:38 +0200)]
rt2x00: Make queue_entry flags access atomic

All access to the queue_entry->flags can be done concurrently,
so all flags must use the atomic operators. On most locations
this was already done, so just fix the last few non-atomic
versions.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix dead queue when skb allocation failed
Ivo van Doorn [Mon, 11 Oct 2010 13:38:26 +0000 (15:38 +0200)]
rt2x00: Fix dead queue when skb allocation failed

When the RX skb allocation failed, we should recycle
the previously allocated skbuffer. By calling return
we would kill the RX queue completely since the
entry would be invalidated.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Validate MCS on RX path
Ivo van Doorn [Mon, 11 Oct 2010 13:38:07 +0000 (15:38 +0200)]
rt2x00: Validate MCS on RX path

Similar to the PLCP signal and bitrates values,
we should validate the MCS value from the RX descriptor
before sending it to mac80211.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Move watchdog work to kernel work_queue
Ivo van Doorn [Mon, 11 Oct 2010 13:37:47 +0000 (15:37 +0200)]
rt2x00: Move watchdog work to kernel work_queue

The watchdog function must run on a work_queue
which is independent of any other work inside rt2x00.

The main reasons, being that a broken work on the mac80211
work_queue can otherwise prevent the watchdog to run (while
in fact the watchdog could fix the issue). And on the other
hand because the watchdog relies on the completion of the
completion handlers for RX/TX which for the USB case, occur
on the mac80211 workqueue.

This fixes some "Queue %d failed to flush" errors, which were
caused by the watchdog function waiting on the completion
handler which was scheduled to run right after the watchdog.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Simplify Queue function arguments
Ivo van Doorn [Mon, 11 Oct 2010 13:37:25 +0000 (15:37 +0200)]
rt2x00: Simplify Queue function arguments

A lot of functions accept a struct rt2x00_dev combined with
either a struct queue_entry or struct data_queue argument.
This can be simplified by only passing on the queue/entry
argument.

In cases where rt2x00_dev and a sk_buff are send together,
we can send the queue_entry instead.

rt2x00usb_alloc_urb and rt2x00usb_free_urb have a bit
of vague naming. Instead they allocate all the data which
belongs to a rt2x00 data queue entry.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoWIRELESS: at76c50x, remove unneeded NULL check
Jiri Slaby [Mon, 11 Oct 2010 09:27:32 +0000 (11:27 +0200)]
WIRELESS: at76c50x, remove unneeded NULL check

Stanse found that urb cannot be NULL in at76_rx_tasklet because it is
dereferenced earlier, so remove the unneeded check.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: prepare for rev3+ channel tables
Rafał Miłecki [Mon, 11 Oct 2010 01:19:22 +0000 (03:19 +0200)]
b43: N-PHY: prepare for rev3+ channel tables

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: fix logic in band switching
Rafał Miłecki [Mon, 11 Oct 2010 01:11:03 +0000 (03:11 +0200)]
b43: N-PHY: fix logic in band switching

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: store info about current channel's type
Rafał Miłecki [Mon, 11 Oct 2010 01:11:02 +0000 (03:11 +0200)]
b43: N-PHY: store info about current channel's type

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agob43: N-PHY: grab more info about new channel
Rafał Miłecki [Mon, 11 Oct 2010 01:11:01 +0000 (03:11 +0200)]
b43: N-PHY: grab more info about new channel

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: built-in rate control A-MPDU fix
Björn Smedman [Sun, 10 Oct 2010 20:51:54 +0000 (22:51 +0200)]
ath9k: built-in rate control A-MPDU fix

This patch attempts to ensure that ath9k's built-in rate control algorithm
does not rely on the value of the ampdu_len and ampdu_ack_len tx status
fields unless the IEEE80211_TX_STAT_AMPDU flag is set.

This patch has not been tested.

Cc: <stable@kernel.org>
Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: A-MPDU rate control info fix
Björn Smedman [Sun, 10 Oct 2010 20:44:39 +0000 (22:44 +0200)]
ath9k: A-MPDU rate control info fix

This patch fixes the following problems with the rate control feedback
generated by ath9k for A-MPDU frames:

1. Rate control feedback is carried on the first frame of an aggregate
that is either ACKed, or has execeeded the software retry count and is
considered failed. However, ath9k would incorrectly assume the aggregate
had the length 1 if one of these conditions did not apply to the first
frame of the aggregate, but instead a later frame. This fix therefor
copies the bf_nframes field of the buffer in the same manner as the rates
field of the tx status.

2. Sometimes the ampdu_len and ampdu_ack_len fields of the tx status was
left uninitialized eventhough the IEEE80211_TX_STAT_AMPDU flag was set.
This is now avoid by setting flag and fields in the same place.

3. Even if a frame has been selected for aggregation by mac80211 and
marked with the IEEE80211_TX_CTL_AMPDU flag it can sometimes happen that
ath9k transmits the frame without aggregation. In these cases the
ampdu_ack_len field could be incorrectly computed because the nbad
parameter to ath_tx_rc_status was incorrect.

Cc: <stable@kernel.org>
Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: minstrel_ht A-MPDU fix
Björn Smedman [Sun, 10 Oct 2010 20:14:25 +0000 (22:14 +0200)]
mac80211: minstrel_ht A-MPDU fix

This patch fixes two problems with the minstrel_ht rate control
algorithms handling of A-MPDU frames:

1. The ampdu_len field of the tx status is not always initialized for
non-HT frames (and it would probably be unreasonable to require all
drivers to do so). This could cause rate control statistics to be
corrupted. We now trust the ampdu_len and ampdu_ack_len fields only when
the frame is marked with the IEEE80211_TX_STAT_AMPDU flag.

2. Successful transmission attempts where only recognized when the A-MPDU
subframe carrying the rate control status information was marked with the
IEEE80211_TX_STAT_ACK flag. If this information happed to be carried on a
frame that failed to be ACKed then the other subframes (which may have
succeeded) where not correctly registered. We now update rate control
statistics regardless of whether the subframe carrying the information was
ACKed or not.

Cc: <stable@kernel.org>
Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: don't kmalloc 16 bytes
Johannes Berg [Sun, 10 Oct 2010 16:52:10 +0000 (18:52 +0200)]
mac80211: don't kmalloc 16 bytes

Since this small buffer isn't used for DMA,
we can simply allocate it on the stack, it
just needs to be 16 bytes of which only 8
will be used for WEP40 keys.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: update the new location to the maintainers file
Kalle Valo [Sun, 10 Oct 2010 08:28:33 +0000 (11:28 +0300)]
wl1251: update the new location to the maintainers file

wl1251 is grown up now and can have its own room^H^H^H^Hdirectory.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: move to it's own directory
Kalle Valo [Sun, 10 Oct 2010 08:28:32 +0000 (11:28 +0300)]
wl1251: move to it's own directory

wl1271 driver is under heavy development but on the other hand the older
wl1251 driver is currently considered more as a legacy driver. To make it
easier to develop wl1271 features move wl1251 to it's own directory,
drivers/net/wireless/wl1251.

There are no functional changes, only moving of files. One regression
is that Kconfig won't be updated automatically and user needs to enable
wl1251 manually with an older config file.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1251: create a copy of wl12xx_80211.h for wl1251
Kalle Valo [Sun, 10 Oct 2010 08:28:31 +0000 (11:28 +0300)]
wl1251: create a copy of wl12xx_80211.h for wl1251

In preparation of moving wl1251 out from drivers/net/wireless/wl12xx
create a separate copy of wl12xx_80211.h.

This file should not even exist, we should instead use generic ieee80211
definitions. This will be fixed in the future so that the file can
be removed.

Signed-off-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: A-MPDU frame type filter
Christian Lamparter [Sat, 9 Oct 2010 23:15:07 +0000 (01:15 +0200)]
carl9170: A-MPDU frame type filter

In the past, carl9170 has been plagued by mysterious
ghosts.

e.g.:
 wlan4: deauthenticated from 02:04:d8:3c:ac:c1 (Reason: 0)

Apparently, the AP sent us a bogus deauthentication
notification. But upon closer inspection the
"management frame" turned out to be a corrupted
scrap of an unsuccessful A-MPDU.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: remove stale rx error path
Christian Lamparter [Sat, 9 Oct 2010 20:23:37 +0000 (22:23 +0200)]
carl9170: remove stale rx error path

The total/fatal error bit was erroneously prefixed
with AR9170_RX_ERROR instead of AR9170_RX_STATUS.
Luckily, the hardware specification confirmed that
the 0x80 flag will never be set for mac->error.
So, it was always just a dead branch.

This patch also imports the latest version of
shared wlan.h header from the firmware git.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocarl9170: common error path for bad frames
Christian Lamparter [Sat, 9 Oct 2010 19:37:11 +0000 (21:37 +0200)]
carl9170: common error path for bad frames

This patch replaces several identical frame drop
paths with a single shared rx frame error handler.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Fix tx status handling in rt2800pci
Helmut Schaa [Sat, 9 Oct 2010 11:35:48 +0000 (13:35 +0200)]
rt2x00: Fix tx status handling in rt2800pci

The patches "rt2x00: Improve TX status entry validation" and "rt2x00: rework tx
status handling in rt2800pci" together were causing problems with tx status
processing in rt2800pci:

phy1 -> rt2800pci_txdone: Warning - Got TX status for an empty queue 3, dropping
phy1 -> rt2800pci_txdone: Warning - Got TX status for an unavailable queue 7, dropping

Fix this by using the correct field definition for getting the QID out of the
tx status report.

Reported-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Tested-by: Luis Correia <luis.f.correia@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Remove superfluous initialization of qidx
Helmut Schaa [Sat, 9 Oct 2010 11:35:13 +0000 (13:35 +0200)]
rt2x00: Remove superfluous initialization of qidx

There is no need to initialize qidx to zero as it will ever be
overwritten by the correct value.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Use unlikely for error case in rt2x00queue_write_tx_frame
Helmut Schaa [Sat, 9 Oct 2010 11:34:43 +0000 (13:34 +0200)]
rt2x00: Use unlikely for error case in rt2x00queue_write_tx_frame

This is an error condition that is not supposed to happen. Hence, it is
safe to add unlikely to this check.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Use proper type for rxwi_w2 in rt2800_agc_to_rssi
Helmut Schaa [Sat, 9 Oct 2010 11:34:11 +0000 (13:34 +0200)]
rt2x00: Use proper type for rxwi_w2 in rt2800_agc_to_rssi

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Optimize unmapping of skbs
Helmut Schaa [Sat, 9 Oct 2010 11:33:43 +0000 (13:33 +0200)]
rt2x00: Optimize unmapping of skbs

Since no skb will be mapped for RX and TX at the same time we can
simply shortcut the check for SKBDESC_DMA_MAPPED_TX.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agort2x00: Shortcut link state updates when not operating as STA
Helmut Schaa [Sat, 9 Oct 2010 11:33:16 +0000 (13:33 +0200)]
rt2x00: Shortcut link state updates when not operating as STA

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Update mesh constants to approved IEEE ANA values
Steve deRosier [Sun, 10 Oct 2010 00:23:28 +0000 (17:23 -0700)]
mac80211: Update mesh constants to approved IEEE ANA values

This patch updates IEEE802.11 mesh constants to be consistent with newly
approved values. It modifies some values, as well as adds many new constants
in preparation for updating mesh code to the current 802.11s drafts. ANA
numbers were taken from:
https://mentor.ieee.org/802.11/dcn/09/11-09-0031-12-0000-ana-database-assigned-number-authority.xls

A few notes are in order:
1. This will break backwards compatibility with existing Linux kernels as
over-the-air constants have changed.
2. Some old and obsolete constants have been retained for now as the mesh code
itself hasn't been updated yet to the new 802.11s draft. This was desired to
keep the existing mesh scheme working until it can be updated. Adding the
approved values is the first step in updating the mesh code.
3. Obsolete constants have been clearly marked.
4. All ANA approved 802.11s constants have been added.

Signed-off-by: Steve deRosier <steve@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: implement channel utilization stats for survey
Felix Fietkau [Sun, 10 Oct 2010 16:21:52 +0000 (18:21 +0200)]
ath9k: implement channel utilization stats for survey

Results for the active channel are updated whenever a new survey dump
is requested, the old data is kept to allow multiple processes to
make their own channel utilization averages.
All other channels only contain the data for the last time that the
hardware was on the channel, i.e. the last scan result or other
off-channel activity.
Running a background scan does not clear the data for the active
channel.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k: add compile time checking for the size of the channel list
Felix Fietkau [Sat, 9 Oct 2010 00:39:30 +0000 (02:39 +0200)]
ath9k: add compile time checking for the size of the channel list

This prevents random memory corruption if the number of channels ever gets
changed without an update to the internal channel array size.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: add channel utilization stats to the survey command
Felix Fietkau [Sat, 9 Oct 2010 00:39:29 +0000 (02:39 +0200)]
cfg80211: add channel utilization stats to the survey command

Using these, user space can calculate a relative channel utilization
with arbitrary intervals by regularly taking snapshots of the survey
results.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: temporarily disable reorder release timer
Christian Lamparter [Fri, 8 Oct 2010 20:35:09 +0000 (22:35 +0200)]
mac80211: temporarily disable reorder release timer

Several serve threading problems in the current
release reorder timer implementation have been
discovered.

A lengthy discussion - which lists some of the
pitfalls and possible solutions - can be found at:
 http://marc.info/?t=128635927000001

But due to the complicated nature of the subject and
the imminent advent of a new -rc cycle, it was
decided to disable the feature for the time being.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix possible null-pointer de-reference
Christian Lamparter [Fri, 8 Oct 2010 20:27:07 +0000 (22:27 +0200)]
mac80211: fix possible null-pointer de-reference

This patch not only fixes a null-pointer de-reference
that would be triggered by a PLINK_OPEN frame with mis-
matching/incompatible mesh configuration, but also
responds correctly to non-compatible PLINK_OPEN frames
by generating a PLINK_CLOSE with the right reason code.

The original bug was detected by smatch.
( http://repo.or.cz/w/smatch.git )

net/mac80211/mesh_plink.c +574 mesh_rx_plink_frame(168)
error: we previously assumed 'sta' could be null.

Cc: <stable@kernel.org>
Reviewed-and-Tested-by: Steve deRosier <steve@cozybit.com>
Reviewed-and-Tested-by: Javier Cardona <javier@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: use the common cycle counter / listen time implementation
Felix Fietkau [Fri, 8 Oct 2010 20:13:54 +0000 (22:13 +0200)]
ath5k: use the common cycle counter / listen time implementation

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: move the cycle counter tracking to ath
Felix Fietkau [Fri, 8 Oct 2010 20:13:53 +0000 (22:13 +0200)]
ath9k_hw: move the cycle counter tracking to ath

Instead of keeping track of wraparound, clear the counters on every
access and keep separate deltas for ANI and later survey use.
Also moves the function for calculating the 'listen time' for ANI

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: store the clock rate in common data on channel changes
Felix Fietkau [Fri, 8 Oct 2010 20:13:52 +0000 (22:13 +0200)]
ath5k: store the clock rate in common data on channel changes

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath9k_hw: store the clock rate in common data on channel changes
Felix Fietkau [Fri, 8 Oct 2010 20:13:51 +0000 (22:13 +0200)]
ath9k_hw: store the clock rate in common data on channel changes

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Adjust opmode when interfaces are removed.
Ben Greear [Fri, 8 Oct 2010 19:01:15 +0000 (12:01 -0700)]
ath5k: Adjust opmode when interfaces are removed.

Otherwise, if there is an AP and a STATION, and AP
is removed, the NIC will not revert back to STATION mode.

Reported-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: Print out opmode in debugfs.
Ben Greear [Fri, 8 Oct 2010 16:43:29 +0000 (09:43 -0700)]
ath5k: Print out opmode in debugfs.

Helps debug multi-VIF scenarios.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowireless: Set some stats used by /proc/net/wireless (wext)
Ben Greear [Thu, 7 Oct 2010 23:39:20 +0000 (16:39 -0700)]
wireless: Set some stats used by /proc/net/wireless (wext)

Some stats for /proc/net/wireless (and wext in general) are not
being set.  This patch addresses a few of those with values easily
obtained from mac80211 core.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: Improve mlme probe response log messages.
Ben Greear [Thu, 7 Oct 2010 23:12:06 +0000 (16:12 -0700)]
mac80211: Improve mlme probe response log messages.

Old messages didn't mention the device in question.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "wireless: Use first phyX name available when registering phy devices."
Johannes Berg [Mon, 11 Oct 2010 18:46:52 +0000 (14:46 -0400)]
Revert "wireless: Use first phyX name available when registering phy devices."

This reverts commit 5a254ffe3ffdfa84fe076009bd8e88da412180d2.

The commit failed to take into account that allocated wireless devices
(wiphys) are not added into the device list upon allocation, but only
when they are registered. Therefore, it opened up a race between
allocating and registering a name, so that if two processes allocate and
register concurrently ("alloc, alloc, register, register" rather than
"alloc, register, alloc, register") the code will attempt to use the
same name twice.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
14 years agoMerge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Mon, 11 Oct 2010 18:43:46 +0000 (14:43 -0400)]
Merge branch 'wireless-next' of git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx

14 years agowl1271: sdio: add suspend/resume support
Ohad Ben-Cohen [Fri, 8 Oct 2010 13:16:27 +0000 (16:16 +0300)]
wl1271: sdio: add suspend/resume support

Add required suspend/resume support to prevent the SDIO
core from removing our card completely during system suspend.

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agowl1271: sdio: enable runtime PM
Ohad Ben-Cohen [Fri, 8 Oct 2010 13:16:16 +0000 (16:16 +0300)]
wl1271: sdio: enable runtime PM

Enable runtime PM for the wl1271 SDIO device.

We request power whenever the WLAN interface is brought up,
and release it after the WLAN interface is taken down.

As a result, power is released immediately after probe returns,
since at that point power has not been explicitly requested yet
(i.e. the WLAN interface is still down).

Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Tested-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
14 years agoiwlagn: add temperature offset calib for 6000g2
Shanyu Zhao [Tue, 21 Sep 2010 23:54:01 +0000 (16:54 -0700)]
iwlagn: add temperature offset calib for 6000g2

6000g2 devices need to have temperature offset calibration. The runtime
uCode needs to receive the calibration results just like BB and LO
calibration. To do this, driver reads the offset value from NVM and send
it to uCode after runtime uCode is alive.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: fix default calibration table size
Shanyu Zhao [Tue, 21 Sep 2010 19:06:18 +0000 (12:06 -0700)]
iwlagn: fix default calibration table size

iwlagn driver uses the IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE
as the chain noise reset calibration index and
IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE+1 as the chain noise gain
calibration index, if not specified by the TLV value in the new
firmware format.

However, this is broken if we need to add more calibrations like
the temperature offset calibration because we increased
IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE by 1.

To fix this issue, define IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE
and use it as the calibration index instead. We still keep the
IWL_MAX_STANDARD_PHY_CALIBRATE_TBL_SIZE as a sanity check for
the TLV value given by ucode.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: no version check for experimental uCode
Wey-Yi Guy [Tue, 21 Sep 2010 23:15:58 +0000 (16:15 -0700)]
iwlagn: no version check for experimental uCode

For experimental uCode, it should work with the driver
if driver has experimental uCode support option enabled;
remove the API version checking.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: fix dual-mode scanning
Johannes Berg [Wed, 22 Sep 2010 14:32:13 +0000 (07:32 -0700)]
iwlwifi: fix dual-mode scanning

The recent scanning code shuffle accidentally
moved the SCAN_HW bit setting _after_ the PAN
parameters are modified, which means that they
don't take the scan into account -- fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove iwl_check_bits
Johannes Berg [Wed, 22 Sep 2010 16:02:12 +0000 (18:02 +0200)]
iwlwifi: remove iwl_check_bits

The function is used exactly once, and the caller
doesn't even need the special check, it can be
simplified to a simple bit check.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: clean up declarations
Johannes Berg [Wed, 22 Sep 2010 16:02:11 +0000 (18:02 +0200)]
iwlwifi: clean up declarations

A number of declarations in iwl-core.h should
be in agn specific files, and also rename the
iwl-calib.h file to iwl-agn-calib.h to better
reflect that it belongs to agn.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove apm_ops.stop
Johannes Berg [Wed, 22 Sep 2010 16:02:10 +0000 (18:02 +0200)]
iwlwifi: remove apm_ops.stop

Since all devices share the same operation here,
there's no need to call it indirectly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove set_pwr_src operation
Johannes Berg [Wed, 22 Sep 2010 16:02:09 +0000 (18:02 +0200)]
iwlwifi: remove set_pwr_src operation

The set_pwr_src operation is only ever used from
within the same sub-driver that it is declared
in, so it can just be called directly instead of
being an operation. Also, it is never called to
set the power source to V_aux, so change the two
functions accordingly (but keep the V_aux code
for documentation purposes in a comment).

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove set_ct_kill operation
Johannes Berg [Wed, 22 Sep 2010 16:02:08 +0000 (18:02 +0200)]
iwlwifi: remove set_ct_kill operation

This operation is only ever called from set_hw_params,
which is also already based on the config/ops, so that
there's no need to have a separate set_ct_kill op and
we can just call the right ct_threshold function.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move iwl_dump_fh to agn
Johannes Berg [Wed, 22 Sep 2010 16:02:07 +0000 (18:02 +0200)]
iwlwifi: move iwl_dump_fh to agn

The iwl_dump_fh function is only used
by the agn module, so it can be there
instead of being exported by the core.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move iwl_dump_csr to agn
Johannes Berg [Wed, 22 Sep 2010 16:02:06 +0000 (18:02 +0200)]
iwlwifi: move iwl_dump_csr to agn

The iwl_dump_csr function is only used
within the agn module, so it can be
moved there instead of being exported
by the core.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move iwl_toggle_rx_ant to agn
Johannes Berg [Wed, 22 Sep 2010 16:02:05 +0000 (18:02 +0200)]
iwlwifi: move iwl_toggle_rx_ant to agn

The iwl_toggle_tx_ant function is only used
by agn code, so it can be moved into the
agn module instead of being exported from
the core.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove agn rates info there
Johannes Berg [Wed, 22 Sep 2010 16:02:04 +0000 (18:02 +0200)]
iwlwifi: remove agn rates info there

Code and data related to agn bitrates can be
part of the agn module rather than being in
the core module.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove spurious exports
Johannes Berg [Wed, 22 Sep 2010 16:02:03 +0000 (18:02 +0200)]
iwlwifi: remove spurious exports

A number of exports, especially related to
thermal throttling, are unnecessary because
the code lives in the same module that it
is used in, so remove them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move tx fail code to agn
Johannes Berg [Wed, 22 Sep 2010 16:02:02 +0000 (18:02 +0200)]
iwlwifi: move tx fail code to agn

The code to print out TX failure reasons is
AGN specific, so it can be in the AGN module.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move agn specific station code there
Johannes Berg [Wed, 22 Sep 2010 16:02:01 +0000 (18:02 +0200)]
iwlwifi: move agn specific station code there

By duplicating a little bit of code between 3945
and agn, we can move a lot of code into an agn
specific station management file and thus reduce
the amount of code in core that is dead to 3945.

before:
   text    data     bss     dec     hex filename
 212886    3872      96  216854   34f16 iwlcore.ko
 620542   10448     304  631294   9a1fe iwlagn.ko
 314013    3264     196  317473   4d821 iwl3945.ko

after:
   text    data     bss     dec     hex filename
 202857    3872      92  206821   327e5 iwlcore.ko
 629102   10448     308  639858   9c372 iwlagn.ko
 314240    3264     196  317700   4d904 iwl3945.ko

delta:
 -10029   iwlcore.ko
   8560   iwlagn.ko
    227   iwl3945.ko

so it's a net win even if you have both loaded,
likely because a lot of EXPORT_SYMBOLs go away.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: remove verify_signature eeprom operation
Johannes Berg [Wed, 22 Sep 2010 16:02:00 +0000 (18:02 +0200)]
iwlwifi: remove verify_signature eeprom operation

All drivers share the same implementation, so
there's no need to call this via a function
pointer nor to export it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: rename iwl_mac_beacon_update
Johannes Berg [Wed, 22 Sep 2010 16:01:59 +0000 (18:01 +0200)]
iwlwifi: rename iwl_mac_beacon_update

Rename iwl_mac_beacon_update to iwlcore_beacon_update
and make the calling convention a bit different. The
old name with _mac_ indicated that it was a mac80211
callback, but that's no longer true.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: move chain settings to agn
Johannes Berg [Wed, 22 Sep 2010 16:01:58 +0000 (18:01 +0200)]
iwlwifi: move chain settings to agn

The core module doesn't need to carry around
the code for chain settings that is used for
HT drivers (agn) only.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwl3945: use iwl3945_commit_rxon
Johannes Berg [Wed, 22 Sep 2010 16:01:57 +0000 (18:01 +0200)]
iwl3945: use iwl3945_commit_rxon

There's no need to go via the indirect function
call from within the 3945 subdriver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlwifi: introduce post_scan hook
Johannes Berg [Wed, 22 Sep 2010 16:01:56 +0000 (18:01 +0200)]
iwlwifi: introduce post_scan hook

The different drivers need to do different things
after a scan, so create a post_scan hook to allow
them to do this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoiwlagn: rename iwl_commit_rxon
Johannes Berg [Wed, 22 Sep 2010 16:01:55 +0000 (18:01 +0200)]
iwlagn: rename iwl_commit_rxon

iwl_commit_rxon really should be named
iwlagn_commit_rxon, so rename it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
14 years agoath9k_hw: Fix hw reset failure with HTC driver
Rajkumar Manoharan [Thu, 7 Oct 2010 15:28:39 +0000 (20:58 +0530)]
ath9k_hw: Fix hw reset failure with HTC driver

The following commit removed DISABLE_REGWRITE_BUFFER ops. The unnecessary
REGWRITE_BUFFER_FLUSH was not removed properly which is causing failure on
hw reset.

Author: Felix Fietkau <nbd@openwrt.org>
Date:   Tue Oct 5 12:03:42 2010 +0200

    ath9k_hw: clean up register write buffering

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agocfg80211: constify WDS address
Johannes Berg [Thu, 7 Oct 2010 11:11:09 +0000 (13:11 +0200)]
cfg80211: constify WDS address

There's no need for the WDS peer address
to not be const, so make it const.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agonl80211: use new genl helpers for WDS
Johannes Berg [Thu, 7 Oct 2010 11:10:30 +0000 (13:10 +0200)]
nl80211: use new genl helpers for WDS

Bill Jordan's patch to allow setting the WDS
peer crossed with my patch removing all the
boilerplate code in nl80211, and consequently
he didn't make use of it yet. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agomac80211: fix sw scan locking
Johannes Berg [Thu, 7 Oct 2010 10:55:24 +0000 (12:55 +0200)]
mac80211: fix sw scan locking

The recent scan overhaul broke locking
because now we can jump to code that
attempts to unlock, while we don't have
the mutex held. Fix this by holding the
mutex around all the relevant code.

Reported-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agowl1271: Support FEM autodetection
Juuso Oikarinen [Thu, 7 Oct 2010 07:16:42 +0000 (10:16 +0300)]
wl1271: Support FEM autodetection

In the NVS/INI-parameters for the driver/firmware there is the FEM
(front end module) selection option, which may configure the hardware FEM
via autodetection or manual selection. So far, there has been support for
manual selection only.

Add support for FEM autodetection.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Thu, 7 Oct 2010 18:40:26 +0000 (14:40 -0400)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 7 Oct 2010 18:39:03 +0000 (14:39 -0400)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

14 years agoRevert "mac80211: use netif_receive_skb in ieee80211_tx_status callpath"
John W. Linville [Thu, 7 Oct 2010 15:35:40 +0000 (11:35 -0400)]
Revert "mac80211: use netif_receive_skb in ieee80211_tx_status callpath"

This reverts commit 5ed3bc7288487bd4f891f420a07319e0b538b4fe.

It turns-out that not all drivers are calling ieee80211_tx_status from a
compatible context.  Revert this for now and try again later...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoRevert "rtl8180: use NAPI for bottom-half processing"
John W. Linville [Thu, 7 Oct 2010 15:31:56 +0000 (11:31 -0400)]
Revert "rtl8180: use NAPI for bottom-half processing"

This reverts commit 030725d2c7c1fafec7ede618647bf30ed79601f0.

This commit relies on commit 5ed3bc7288487bd4f891f420a07319e0b538b4fe
("mac80211: use netif_receive_skb in ieee80211_tx_status callpath")
Unfortunately not all drivers are calling ieee80211_tx_status from a
compatible context, so that commit needs to be reverted in 2.6.36.

Signed-off-by: John W. Linville <linville@tuxdriver.com>