GitHub/moto-9609/android_kernel_motorola_exynos9610.git
16 years agort2x00: Only disable beaconing just before beacon update
Ivo van Doorn [Sun, 9 Mar 2008 21:42:59 +0000 (22:42 +0100)]
rt2x00: Only disable beaconing just before beacon update

We should not write 0 to the beacon sync register during
config_intf() since that will clear out the beacon interval
and forces the beacon to be send out at the lowest interval.
(reported by Mattias Nissler).

The side effect of the same bug was that while working with
multiple virtual AP interfaces a change for any of those
interfaces would disable beaconing untill an beacon update
was provided.

This is resolved by only updating the TSF_SYNC value during
config_intf(). In update_beacon() we disable beaconing
temporarily to prevent fake beacons to be transmitted.
Finally kick_tx_queue() will enable beaconing again.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Use skbdesc fields for descriptor initialization
Ivo van Doorn [Sun, 9 Mar 2008 21:41:53 +0000 (22:41 +0100)]
rt2x00: Use skbdesc fields for descriptor initialization

In rt2x00lib_write_tx_desc() the skb->data and skb->len fields
were incorrectly used. For USB drivers both of those values
contain invalid data (skb->data points to the device descriptor,
skb->len contains the frame _and_ descriptor length).

Instead of using the skbuffer fields we should use the skbdesc
fields which are correctly initialized and contain all the data
that we need.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Don't use unitialized rxdesc->size
Mattias Nissler [Sun, 9 Mar 2008 21:41:22 +0000 (22:41 +0100)]
rt2x00: Don't use unitialized rxdesc->size

rxdesc->size is unitialized before the desriptor has been read.
Move the truncation of the sk buffer to the moment all variables
have been initialized.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Don't use uninitialized desc_len
Ivo van Doorn [Sun, 9 Mar 2008 21:40:06 +0000 (22:40 +0100)]
rt2x00: Don't use uninitialized desc_len

skbdesc->desc_len is uninitialized at the start
of the function. So it is a _bad_ idea to use it...

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Use the correct size when copying the control info in txdone
Mattias Nissler [Sun, 9 Mar 2008 21:39:32 +0000 (22:39 +0100)]
rt2x00: Use the correct size when copying the control info in txdone

The sizeof() operator was incorrectly applied to the pointer, not the struct.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Initialize TX control field in data entries
Mattias Nissler [Sun, 9 Mar 2008 21:38:54 +0000 (22:38 +0100)]
rt2x00: Initialize TX control field in data entries

In the TX path, the driver didn't copy the TX control data structure. Thus, it
was invalid in the TX done handler, causing serious trouble and misbehaviour.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agort2x00: Align RX descriptor to 4 bytes
Ivo van Doorn [Sun, 9 Mar 2008 21:38:18 +0000 (22:38 +0100)]
rt2x00: Align RX descriptor to 4 bytes

Some architectures give problems when reading
RX frame descriptor words when the descriptor
is not aligned on a 4 byte boundrary.

Due to optimalizations for the ieee80211 payload
4 byte alignment, it is no longer guarenteed
that the descriptor is placed on the 4 byte
boundrary (In fact, for rt73usb it is absolutely
never aligned to 4 bytes, for rt2500usb it depends
on the length of the payload).

This will copy the descriptor to a 4 byte aligned
location before it is read for the first time.
This will also move the payload data alignment
in rt2x00usb (instead of inside the driver) where
it has always belonged.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: pull out helpers for writing noise table
Harvey Harrison [Sat, 8 Mar 2008 10:40:38 +0000 (02:40 -0800)]
b43: pull out helpers for writing noise table

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorndis_wlan: cleanup, rename structure members
Jussi Kivilinna [Fri, 7 Mar 2008 23:23:25 +0000 (01:23 +0200)]
rndis_wlan: cleanup, rename structure members

Rename members of ndis_80211_* structures to match the style of
the rest of the code.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agorndis_wlan: cleanup, rename and reorder enums and structures
Jussi Kivilinna [Fri, 7 Mar 2008 23:23:17 +0000 (01:23 +0200)]
rndis_wlan: cleanup, rename and reorder enums and structures

Rename enums and structures to ndis_80211_* for greater readability.
Also change order so that enumerations are presented first.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agodrivers/net/wireless/ath5k - convert == (true|false) to simple logical tests
Joe Perches [Fri, 7 Mar 2008 22:21:16 +0000 (14:21 -0800)]
drivers/net/wireless/ath5k - convert == (true|false) to simple logical tests

(test == true) is not nice.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: implement SSID scanning for SIOCSIWSCAN
Holger Schurig [Wed, 5 Mar 2008 06:05:32 +0000 (07:05 +0100)]
libertas: implement SSID scanning for SIOCSIWSCAN

After my bit scan re-writing the SIOCSIWSCAN wext ioctl no longer supported
scanning for a specific SSID. However, wpa_supplicant is a possible user of
this ioctl, so here is code that add's this.

While passing, removed even more of the debugfs-based scanning. You can (and
should) the SIOCSIWSCAN to ask for scans, so there is no need for
proprietary interfaces for scanning. And, besides, the scan result couldn't
be used further, e.g. not for associating.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agothe scheduled rc80211-simple.c removal
Adrian Bunk [Tue, 4 Mar 2008 23:26:15 +0000 (15:26 -0800)]
the scheduled rc80211-simple.c removal

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agothe scheduled ieee80211 softmac removal
Adrian Bunk [Tue, 4 Mar 2008 23:26:14 +0000 (15:26 -0800)]
the scheduled ieee80211 softmac removal

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agothe scheduled bcm43xx removal
Adrian Bunk [Tue, 4 Mar 2008 23:26:12 +0000 (15:26 -0800)]
the scheduled bcm43xx removal

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Cc: <Larry.Finger@lwfinger.net>
Cc: <stefano.brivio@polimi.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomake b43_mac_{enable,suspend}() static
Adrian Bunk [Tue, 4 Mar 2008 23:26:06 +0000 (15:26 -0800)]
make b43_mac_{enable,suspend}() static

b43_mac_{enable,suspend}() can now become static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
David S. Miller [Wed, 12 Mar 2008 02:17:18 +0000 (19:17 -0700)]
Merge branch 'master' of /linux/kernel/git/linville/wireless-2.6.26

16 years agoiwlwifi: fix potential lock inversion deadlock
Reinette Chatre [Fri, 7 Mar 2008 21:47:20 +0000 (13:47 -0800)]
iwlwifi: fix potential lock inversion deadlock

This is a change to a previous patch ("iwlwifi: 3945 split tx_complete
to command and packet function") to ensure we do not have hardirq safe
locks (priv->lock in this case) depend on hardirq unsafe locks.

We only call iwl3945_tx_queue_reclaim while in a tasklet so we have to use
the irqsafe version of the function.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agowireless: correct warnings from using '%llx' for type 'u64'
John W. Linville [Fri, 7 Mar 2008 21:38:43 +0000 (16:38 -0500)]
wireless: correct warnings from using '%llx' for type 'u64'

drivers/net/wireless/ath5k/debug.c: In function 'read_file_tsf': drivers/net/wireless/ath5k/debug.c:203: warning: format '%016llx'
expects type 'long long unsigned int', but argument 4 has type 'u64' drivers/net/wireless/ath5k/debug.c:203: warning: format '%016llx'
expects type 'long long unsigned int', but argument 4 has type 'u64' drivers/net/wireless/ath5k/debug.c: In function 'read_file_beacon':
drivers/net/wireless/ath5k/debug.c:274: warning: format '%016llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
drivers/net/wireless/ath5k/debug.c:274: warning: format '%016llx' expects type 'long long unsigned int', but argument 4 has type 'u64'

drivers/net/wireless/iwlwifi/iwl-4965.c: In function 'iwl4965_tx_status_reply_compressed_ba':
drivers/net/wireless/iwlwifi/iwl-4965.c:3907: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'u64'
drivers/net/wireless/iwlwifi/iwl-4965.c: In function 'iwl4965_rx_reply_compressed_ba':
drivers/net/wireless/iwlwifi/iwl-4965.c:4039: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type '__le64'
drivers/net/wireless/iwlwifi/iwl-4965.c:4046: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'u64'
drivers/net/wireless/iwlwifi/iwl4965-base.c: In function 'iwl4965_tx_status_reply_tx':
drivers/net/wireless/iwlwifi/iwl4965-base.c:3661: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'u64'

Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: work around wrong beacon rx timestamp in IBSS mode
Bruno Randolf [Wed, 5 Mar 2008 09:36:26 +0000 (18:36 +0900)]
ath5k: work around wrong beacon rx timestamp in IBSS mode

atheros hardware has a problem with the rx timestamp of some IBSS beacons when
they caused a TSF update (they have the same BSSID).

the rx timestamp is wrong especially if the beacon frames get bigger than 78
byte (at least on AR5213 and AR5414 hardware). in that case ath5k_extend_tsf()
will assume a rs_tstamp overflow and give us a timestamp too far in the past
which will cause mac80211 to merge IBSS on every beacon (which is not necessary
since the BSSID already matches). but in this case we know that the HW must
have synced to the beacons TSF and the rx timestamp must be later than that so
we can adjust mactime accordingly.

also rename the function to ath5k_check_ibss_tsf() and change comments, since
"hw merge" is better described as a TSF update.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: add notes about rx timestamp
Bruno Randolf [Wed, 5 Mar 2008 09:36:05 +0000 (18:36 +0900)]
ath5k: add notes about rx timestamp

add comments about the fact that we don't know when exactly the atheros
hardware takes the RX timestamp.

drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: move rx and tx status structures out of hardware descriptor
Bruno Randolf [Wed, 5 Mar 2008 09:35:45 +0000 (18:35 +0900)]
ath5k: move rx and tx status structures out of hardware descriptor

move ath5k_tx_status and ath5k_rx_status structures out of the hardware
descriptor since they are not accessed by the hardware at all. they just
contain converted information from the hardware descriptor. since they are only
used in the rx and tx tasklets there is also no use to keep them for each
descriptor.

drivers/net/wireless/ath5k/ath5k.h:     Changes-licensed-under: ISC
drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
drivers/net/wireless/ath5k/debug.c:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/debug.h:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: struct ath5k_desc cleanups
Bruno Randolf [Wed, 5 Mar 2008 09:35:23 +0000 (18:35 +0900)]
ath5k: struct ath5k_desc cleanups

* make struct ath5k_desc clearer by directly including unions of structures,
  which correspond to the hardware descriptors of different HW versions (5210
  and 5212). before they were casted at onto ath5k_desc at different points
  (e.g.  ds_hw[2]).

* rename some structures and variable names to make their use clearer, e.g.
  struct ath5k_hw_4w_tx_desc to ath5k_hw_4w_tx_ctl.

* substitute "old" with "5210" and "new" with "5212" (eg. rename
  ath5k_hw_proc_new_rx_status() to ath5k_hw_proc_5212_rx_status()) because old
  and new are relative and we might have a newer structure at some point.

* unify structs ath5k_hw_old_rx_status and ath5k_hw_new_rx_status into one
  ath5k_hw_rx_status, because they only differ in the flags and masks.

drivers/net/wireless/ath5k/ath5k.h:     Changes-licensed-under: ISC
drivers/net/wireless/ath5k/debug.c:     Changes-licensed-under: GPL
drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC
drivers/net/wireless/ath5k/hw.h:        Changes-licensed-under: ISC

Signed-off-by: Bruno Randolf <bruno@thinktube.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: grab NIC access when disabling aggregations
Ron Rindjunsky [Fri, 7 Mar 2008 01:36:56 +0000 (17:36 -0800)]
iwlwifi: grab NIC access when disabling aggregations

This patch grabs NIC access inside iwl4965_tx_queue_agg_disable, instead of the
caller doing it.
The caller must still hold priv->lock when calling the function.

Signed-off-by: Max Stepanov <max.stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: 3945 split tx_complete to command and packet function
Tomas Winkler [Fri, 7 Mar 2008 01:36:55 +0000 (17:36 -0800)]
iwlwifi: 3945 split tx_complete to command and packet function

This patch
1. removes cmd completion from iwl3945_tx_queue_reclaim
and creates iwl3945_cmd_queue_reclaim.
1. removes 11n relevant elements from this function
2. removes call to ieee80211_tx_status_irqsafe
and uses ieee80211_tx_status only

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Fix 3945 rate scaling
Tomas Winkler [Fri, 7 Mar 2008 01:36:54 +0000 (17:36 -0800)]
iwlwifi: Fix 3945 rate scaling

This patch fix 3945 rate scaling after cfg80211 rate/band changes

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: queue functions cleanup
Tomas Winkler [Fri, 7 Mar 2008 01:36:53 +0000 (17:36 -0800)]
iwlwifi: queue functions cleanup

This patch moves
1. iwl_queue_inc_wrap and int iwl_queue_dec_wrap
into  iwl-helpers.h these two functions are identical to common
for both iwl3956 and iwl4965
2. renames x2_queue_used to iwl3945_x2_queue_used
3. exports iwl3945_queue_space out of iwl3964-base.c

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Moving EEPROM handling in iwlcore module
Assaf Krauss [Thu, 6 Mar 2008 18:40:20 +0000 (10:40 -0800)]
iwlwifi: Moving EEPROM handling in iwlcore module

This patch move EEPROM code into iwl core module

Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: add iwl-core module
Tomas Winkler [Thu, 6 Mar 2008 18:40:19 +0000 (10:40 -0800)]
iwlwifi: add iwl-core module

This patch adds iwl-core module to iwlwifi driver.
This module will contain common code and infrastracture for iwlwifi
driver

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: fix locking unbalance in 4965 rate scale
Tomas Winkler [Wed, 5 Mar 2008 19:31:00 +0000 (11:31 -0800)]
iwlwifi: fix locking unbalance in 4965 rate scale

This patch fixes locking unbalance after adding rcu locking
for sta

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: document IEEE80211_TXCTL_OFDM_HT
Ron Rindjunsky [Wed, 5 Mar 2008 15:38:59 +0000 (17:38 +0200)]
mac80211: document IEEE80211_TXCTL_OFDM_HT

This patch clarifies the use of IEEE80211_TXCTL_OFDM_HT flag.

Can by united with patch "mac80211: adding mac80211_tx_control
flags and HT flags"

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Cancel scanning upon association
Emmanuel Grumbach [Wed, 5 Mar 2008 02:09:32 +0000 (18:09 -0800)]
iwlwifi: Cancel scanning upon association

This patch cancels an ongoing HW scan upon association. Not doing this
resulted in instability in association.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Take the fw file name from the iwl_cfg.
Tomas Winkler [Wed, 5 Mar 2008 02:09:31 +0000 (18:09 -0800)]
iwlwifi: Take the fw file name from the iwl_cfg.

This patch adds fw_name to iwl_cfg. This allows run time selection
of needed fw/ucode file

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: add struct iwl_cfg
Tomas Winkler [Wed, 5 Mar 2008 02:09:30 +0000 (18:09 -0800)]
iwlwifi: add struct iwl_cfg

This patch introduces struct iwl_cfg. struct iwl_cfg defines static
configuration for each device type and sku. It is passed as driver_data
to the bus probe function.
This patch also introduce new common header file iwl-core.h
which will represent core functionality of iwlwifi driver

3945ABG uses separate iwl-3945-dev.h header file for now

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Move HBUS address to iwl-csr.h
Tomas Winkler [Wed, 5 Mar 2008 02:09:29 +0000 (18:09 -0800)]
iwlwifi: Move HBUS address to iwl-csr.h

HBUS is accessed through CSR registers
moved to iwl-csr.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: extract iwl-csr.h
Tomas Winkler [Wed, 5 Mar 2008 02:09:28 +0000 (18:09 -0800)]
iwlwifi: extract iwl-csr.h

This patch extract CSR Register definition into separate
header files as most of the definition are commons to both
3945 and 4965.

Definitions specific for 3945 and 4965 are properly prefixed

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: use mac80211_tx_control_flags
Ron Rindjunsky [Wed, 5 Mar 2008 02:09:27 +0000 (18:09 -0800)]
iwlwifi: use mac80211_tx_control_flags

This patch makes use of the new mac80211_tx_control_flags and tx_rate to
pass Tx data, regular and 11n, from the HW tx response into the rate scaling.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: adding mac80211_tx_control_flags and HT flags
Ron Rindjunsky [Wed, 5 Mar 2008 02:09:26 +0000 (18:09 -0800)]
mac80211: adding mac80211_tx_control_flags and HT flags

This patch makes enum from the defines previously dwelled inside
ieee80211_tx_control for better readability.
The patch also addes HT flags, for 802.11n drivers:
- IEEE80211_TXCTL_OFDM_HT: request low-level driver to use HT OFDM rates
- IEEE80211_TXCTL_GREEN_FIELD: use green field protection
- IEEE80211_TXCTL_DUP_DATA: duplicate data on both 20 Mhz channels
- IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame in 40Mhz width
- IEEE80211_TXCTL_SHORT_GI: send this frame with short guard interval

Tx command can be a combination of any of these flags, along with
bitrate represented by ieee80211_rate. this will allow legacy drivers to
switch easily to any 11n rate representation.

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
CC: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: 802.11n spec removes AUTO offset for FAT channel
Guy Cohen [Wed, 5 Mar 2008 02:09:25 +0000 (18:09 -0800)]
iwlwifi: 802.11n spec removes AUTO offset for FAT channel

This patch adapts to 802.11 patch and remove AUTO offset for FAT
channel

Signed-off-by: Guy Cohen <guy.cohen@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Fix failed frames status report typo
Michael Buesch [Fri, 7 Mar 2008 18:52:24 +0000 (19:52 +0100)]
b43: Fix failed frames status report typo

This fixes a typo in the status report.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Add TX statistics debugging counters
Michael Buesch [Fri, 7 Mar 2008 14:50:02 +0000 (15:50 +0100)]
b43: Add TX statistics debugging counters

This adds a few debugging counters, that are useful for debugging the
"card does not transmit" or "connection is unstable" kind of problems.
It's also useful for tuning an RC algorithm.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Rename the DMA ring pointers
Michael Buesch [Thu, 6 Mar 2008 15:32:46 +0000 (16:32 +0100)]
b43: Rename the DMA ring pointers

Rename the DMA ring pointers to have more descriptive and standard
names. Also remove the 6th unused TX ring. We can add it back later,
if we need it. The unused TX-status rx-ring is also removed, as that's
only used by legacy devices not supported by this driver anyway.

This is no functional change, except less memory allocation for
the removed rings.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: Add QOS support
Michael Buesch [Wed, 5 Mar 2008 20:18:49 +0000 (21:18 +0100)]
b43: Add QOS support

This adds QOS support to the b43 driver.
QOS can be disabled on driver level with a module parameter for debugging purposes.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: don't call conf_tx under RCU lock
Johannes Berg [Wed, 5 Mar 2008 19:39:31 +0000 (20:39 +0100)]
mac80211: don't call conf_tx under RCU lock

Reinette pointed out that with the sta_info RCU-ification
the behaviour here changed and the conf_tx callback is
now invoked under RCU read lock. That is not necessary so
this patch restores the original behaviour

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Add 2413 to srev_names so that it shows up during module load
Nick Kossifidis [Fri, 7 Mar 2008 16:52:51 +0000 (11:52 -0500)]
ath5k: Add 2413 to srev_names so that it shows up during module load

Add 2413 to srev_names so that it shows up during module load.
This is based on the new patch 7 which did not introduce a helper
on ath5k_hw_reset().

Changes-licensed-under: 3-clause-BSD
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Make some changes to follow register dumps.
Nick Kossifidis [Fri, 7 Mar 2008 16:48:21 +0000 (11:48 -0500)]
ath5k: Make some changes to follow register dumps.

Make some changes which mimic what we see in register dumps.
This patch does not add a helper to ath5k_hw_reset(). It
does seem clear we need a re-shuffle around ath5k_hw_reset()
though as code in there is lengthy and already hitting 80-char
limit. This can be dealt with later though.

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Fixes for PCI-E cards
Nick Kossifidis [Thu, 28 Feb 2008 21:20:52 +0000 (16:20 -0500)]
ath5k: Fixes for PCI-E cards

 * Fix nic_wakeup for PCI-E chips (don't set AR5K_RESET_CTL_PCI bit)

 * Fix dma size setting for PCI-E chips (thanx to Bob Copeland).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Remove RF5413 from rf gain optimization functions
Nick Kossifidis [Thu, 28 Feb 2008 19:51:40 +0000 (14:51 -0500)]
ath5k: Remove RF5413 from rf gain optimization functions

 * Since RF2413 it seems that RF_BUFFER settings are different (notice
that the last part -"bank 7" or whatever- is smaller than in 5111/5112).
So until we know what's going on we assume there is no gain optimization
stuff in post-5112 chips.

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: more RF2413 stuff
Nick Kossifidis [Thu, 28 Feb 2008 19:50:50 +0000 (14:50 -0500)]
ath5k: more RF2413 stuff

 * Add AR5K_RF2413 to radio check during hw_reset so it doesn't complain

 * Write ah_phy_spending value we set during attach instead of checking
each time for radio revision

 * Skip txpower setup for RF2413 because it can't transmit with it
(weird thing is that RF5413 has no problem with it).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Identify RF2413 and deal with PHY_SPENDING
Nick Kossifidis [Thu, 28 Feb 2008 19:49:05 +0000 (14:49 -0500)]
ath5k: Identify RF2413 and deal with PHY_SPENDING

 * Attach RF2413.

 * Propertly handle different AR5K_PHY_SPENDING settings for each RF
chip by adding a field in ath5k_hw. This way we won't have to check
inside hw_reset (see next patch).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Add RF2413 initial settings
Nick Kossifidis [Thu, 28 Feb 2008 19:43:51 +0000 (14:43 -0500)]
ath5k: Add RF2413 initial settings

* Add initial settings for RF2413

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoath5k: Add RF2413 srev values
Nick Kossifidis [Thu, 28 Feb 2008 19:40:00 +0000 (14:40 -0500)]
ath5k: Add RF2413 srev values

 * Add RF2413 srev values and a new entry on ath5k_radio enum for it
  since it differs from RF5413 (it's not like 5112-2112).

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years ago[NETNS][IPV6] mcast - handle several network namespace
Daniel Lezcano [Fri, 7 Mar 2008 19:16:55 +0000 (11:16 -0800)]
[NETNS][IPV6] mcast - handle several network namespace

This patch make use of the network namespace information at the right
places to handle the multicast for several network namespaces.  It
makes the socket control to be per namespace too.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] tcp6 - handle several network namespace
Daniel Lezcano [Fri, 7 Mar 2008 19:16:26 +0000 (11:16 -0800)]
[NETNS][IPV6] tcp6 - handle several network namespace

We have the right network namespace at the right place now.
So make use of this information to make tcp6 per network namespace

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] tcp6 - make socket control per namespace
Daniel Lezcano [Fri, 7 Mar 2008 19:16:02 +0000 (11:16 -0800)]
[NETNS][IPV6] tcp6 - make socket control per namespace

Instead of having a tcp6_socket global to all the namespace, there is
tcp6 socket control per namespace. That is consistent with which
namespace sent a RST and allows to pass the socket to the underlying
function to retrieve the network namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] ndisc - make socket control per namespace
Daniel Lezcano [Fri, 7 Mar 2008 19:15:34 +0000 (11:15 -0800)]
[NETNS][IPV6] ndisc - make socket control per namespace

Make ndisc socket control per namespace.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] ndisc - make ndisc handle multiple network namespaces
Daniel Lezcano [Fri, 7 Mar 2008 19:14:49 +0000 (11:14 -0800)]
[NETNS][IPV6] ndisc - make ndisc handle multiple network namespaces

Make ndisc handle multiple network namespaces:
Remove references to init_net, add network namespace parameters and add
pernet_operations for ndisc

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: Benjamin Thery <benjamin.thery@bull.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[NETNS][IPV6] fix some missing namespace
Daniel Lezcano [Fri, 7 Mar 2008 19:14:16 +0000 (11:14 -0800)]
[NETNS][IPV6] fix some missing namespace

This patch adds some missing namespace

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[UDP]: Revert udplite and code split.
David S. Miller [Fri, 7 Mar 2008 00:22:02 +0000 (16:22 -0800)]
[UDP]: Revert udplite and code split.

This reverts commit db1ed684f6c430c4cdad67d058688b8a1b5e607c ("[IPV6]
UDP: Rename IPv6 UDP files."), commit
8be8af8fa4405652e6c0797db5465a4be8afb998 ("[IPV4] UDP: Move
IPv4-specific bits to other file.") and commit
e898d4db2749c6052072e9bc4448e396cbdeb06a ("[UDP]: Allow users to
configure UDP-Lite.").

First, udplite is of such small cost, and it is a core protocol just
like TCP and normal UDP are.

We spent enormous amounts of effort to make udplite share as much code
with core UDP as possible.  All of that work is less valuable if we're
just going to slap a config option on udplite support.

It is also causing build failures, as reported on linux-next, showing
that the changeset was not tested very well.  In fact, this is the
second build failure resulting from the udplite change.

Finally, the config options provided was a bool, instead of a modular
option.  Meaning the udplite code does not even get build tested
by allmodconfig builds, and furthermore the user is not presented
with a reasonable modular build option which is particularly needed
by distribution vendors.

Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Update version to 1.6.3
Allan Stephens [Thu, 6 Mar 2008 23:08:40 +0000 (15:08 -0800)]
[TIPC]: Update version to 1.6.3

This patch updates TIPC's version number to 1.6.3.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Enhancements to message header writing
Allan Stephens [Thu, 6 Mar 2008 23:08:10 +0000 (15:08 -0800)]
[TIPC]: Enhancements to message header writing

This patch makes two enhancements to the routine used to
set bit fields within a TIPC message header:

 1) It now ignores any bits of the new field value that are not
    covered by the mask being used.  (Previously, if the new value
    exceeded the size of the mask the extra bits could corrupt
    other fields in the message header word being updated.)

 2) The code has been optimized to minimize the number of run-time
    endianness conversion operations by leveraging the fact that the
    mask (and, in some cases, the value as well) is constant and the
    necessary conversion can be performed by the compiler.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Use correct bitmask when setting version
Allan Stephens [Thu, 6 Mar 2008 23:07:42 +0000 (15:07 -0800)]
[TIPC]: Use correct bitmask when setting version

This patch ensures that the 3-bit version field of the TIPC
message header is masked correctly when written into a message.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Minor cleanup of message header code
Allan Stephens [Thu, 6 Mar 2008 23:06:55 +0000 (15:06 -0800)]
[TIPC]: Minor cleanup of message header code

This patch eliminates some unused or duplicate message header
symbols, and fixes up the comments and/or location of a few
other symbols.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Eliminate "sparse" symbol warnings
Allan Stephens [Thu, 6 Mar 2008 23:06:06 +0000 (15:06 -0800)]
[TIPC]: Eliminate "sparse" symbol warnings

This patch eliminates warnings about undeclared symbols.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Add argument validation for shutdown()
Allan Stephens [Thu, 6 Mar 2008 23:05:38 +0000 (15:05 -0800)]
[TIPC]: Add argument validation for shutdown()

This patch validates that the "how" argument to shutdown()
is SHUT_RDWR, since this is the only form that TIPC supports.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years ago[TIPC]: Removal of message header option code
Allan Stephens [Thu, 6 Mar 2008 23:05:07 +0000 (15:05 -0800)]
[TIPC]: Removal of message header option code

This patch removes code associated with optional, user-specified
fields of the TIPC message header.  Such fields were never
utilized by TIPC, and have now been removed from the protocol
specification.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
16 years agozd1211rw: support for mesh interface and beaconing
Luis Carlos Cobo [Mon, 3 Mar 2008 20:32:15 +0000 (12:32 -0800)]
zd1211rw: support for mesh interface and beaconing

The previously unused CR_CAM_MODE register is set to MODE_AP_WDS. This makes the
driver ack mesh (WDS) frames. It does not affect Infra functionality of the
driver.

Previously missing beaconing support has been added. This might also help
implement a currently missing ah-hoc mode.

Support for interrupts from the device have been added, but we are not handling
most of them.

Mesh interfaces are considered associated as long as the interface is up.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: clean up scan.c, remove zeromac and bcastmac
David Woodhouse [Mon, 3 Mar 2008 11:18:59 +0000 (12:18 +0100)]
libertas: clean up scan.c, remove zeromac and bcastmac

Should be purely cosmetic apart from the removal of the two pointless
MAC addresses.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert 802_11_SCAN to a direct command
David Woodhouse [Mon, 3 Mar 2008 11:18:03 +0000 (12:18 +0100)]
libertas: convert 802_11_SCAN to a direct command

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: add LED control TLV to types.h
David Woodhouse [Mon, 3 Mar 2008 11:16:42 +0000 (12:16 +0100)]
libertas: add LED control TLV to types.h

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agolibertas: convert KEY_MATERIAL to a direct command
David Woodhouse [Mon, 3 Mar 2008 11:15:39 +0000 (12:15 +0100)]
libertas: convert KEY_MATERIAL to a direct command

The struct enc_key probably wants to die too, but that can come later.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: Fix 52 rate report in rx status
Tomas Winkler [Sat, 1 Mar 2008 23:52:00 +0000 (01:52 +0200)]
iwlwifi: Fix 52 rate report in rx status

This patch fixes reporting rate in RX packets in 52 band.
The rate was updated from CCK rate index instead of OFDM rate 6M
Most of the patch is collateral clean up

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: refactor init geos function
Tomas Winkler [Sat, 1 Mar 2008 23:36:04 +0000 (01:36 +0200)]
iwlwifi: refactor init geos function

This patch refactors init geos function. It also fixes few minor bugs.
IWL_MAX_RATE -> IWL_RATE_COUNT (IWL_MAX_RATE included also MCS setting)
There are 9 and 13 rates for 4965 in 2.4 and 5.2 respectively  (rate 60)

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agoiwlwifi: removing unused priv->config
Tomas Winkler [Sat, 1 Mar 2008 23:25:59 +0000 (01:25 +0200)]
iwlwifi: removing unused priv->config

This patch removes unused variable in iwlYYYY_priv

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agossb: Add Gigabit Ethernet driver
Michael Buesch [Fri, 29 Feb 2008 10:36:12 +0000 (11:36 +0100)]
ssb: Add Gigabit Ethernet driver

This adds the Gigabit Ethernet driver for the SSB
Gigabit Ethernet core. This driver actually is a frontend to
the Tigon3 driver. So the real work is done by tg3.
This device is used in the Linksys WRT350N.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix hardware scan completion
Johannes Berg [Wed, 5 Mar 2008 09:58:40 +0000 (10:58 +0100)]
mac80211: fix hardware scan completion

The mac80211 MLME requires restarting timers after a scan
completes but this wasn't done when hardware scan offload
was added, so add it now.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Bill Moss <bmoss@clemson.edu>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix mesh_path and sta_info get_by_idx functions
Luis Carlos Cobo [Sat, 1 Mar 2008 01:51:25 +0000 (17:51 -0800)]
mac80211: fix mesh_path and sta_info get_by_idx functions

Skip properly entries whose dev does not match.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: path IE fields macros, fix alignment problems and clean up
Luis Carlos Cobo [Sat, 1 Mar 2008 01:07:54 +0000 (17:07 -0800)]
mac80211: path IE fields macros, fix alignment problems and clean up

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add PLINK_ prefix and kernel doc to enum plink_state
Luis Carlos Cobo [Fri, 29 Feb 2008 23:46:08 +0000 (15:46 -0800)]
mac80211: add PLINK_ prefix and kernel doc to enum plink_state

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: always force mesh_path deletions
Luis Carlos Cobo [Fri, 29 Feb 2008 23:04:13 +0000 (15:04 -0800)]
mac80211: always force mesh_path deletions

Postponing the deletion is not really useful anymore.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: delete mesh_path timer on mesh_path removal
Luis Carlos Cobo [Fri, 29 Feb 2008 22:49:37 +0000 (14:49 -0800)]
mac80211: delete mesh_path timer on mesh_path removal

This avoids dereferencing a no longer existing struct mesh_path.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up use of endianness conversion functions
Luis Carlos Cobo [Fri, 29 Feb 2008 22:30:32 +0000 (14:30 -0800)]
mac80211: clean up use of endianness conversion functions

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: breakdown mesh network attributes in different extra fields for wext
Luis Carlos Cobo [Fri, 29 Feb 2008 20:32:46 +0000 (12:32 -0800)]
mac80211: breakdown mesh network attributes in different extra fields for wext

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: move comment to better location
Luis Carlos Cobo [Fri, 29 Feb 2008 20:20:39 +0000 (12:20 -0800)]
mac80211: move comment to better location

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix incorrect parenthesis
Luis Carlos Cobo [Fri, 29 Feb 2008 20:15:28 +0000 (12:15 -0800)]
mac80211: fix incorrect parenthesis

Pointed out by Johannes Berg.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix mesh endianness sparse warnings and unmark it as broken
Luis Carlos Cobo [Fri, 29 Feb 2008 20:13:38 +0000 (12:13 -0800)]
mac80211: fix mesh endianness sparse warnings and unmark it as broken

This patch fixes all the mesh related endianness warnings reported by sparse. As
they were the reason why Johannes marked mesh as BROKEN, that flag has been
removed.

Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: always insert key into list
Johannes Berg [Sat, 1 Mar 2008 18:32:18 +0000 (19:32 +0100)]
mac80211: always insert key into list

Today I hit one of my new WARN_ONs in the mac80211 code because
a key wasn't being freed correctly. After wondering for a while
I finally tracked it to the fact that STA keys aren't added to
the per-sdata key list correctly, they are supposed to always be
on that list, not just for default keys. This patch fixes that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agob43: verify sta_notify mac80211 callback
Johannes Berg [Mon, 25 Feb 2008 15:27:50 +0000 (16:27 +0100)]
b43: verify sta_notify mac80211 callback

This helps verify that nothing bad is going on in mac80211,
it is unfortunately not possible to implement this generically
in mac80211 easily because there we can't assume that we only
have a single vif which b43 currently can assume.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix sta_info mesh timer bug
Johannes Berg [Wed, 27 Feb 2008 08:56:40 +0000 (09:56 +0100)]
mac80211: fix sta_info mesh timer bug

I noticed a bug I introduced when mesh is enabled: sta_info_destroy()
will end up calling cancel_timer() on a timer that has never been
initialized because the timer is only initialized in mesh_plink_alloc(),
not in sta_info_alloc(). This patch moves the initialization of all mesh
related fields into sta_info_alloc(), adds a bit of sanity checking to
the cfg80211 handlers and sta_info_insert() and makes mesh_plink_alloc()
a static helper function that is only used from the mesh plink code.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: add documentation book
Johannes Berg [Tue, 26 Feb 2008 13:34:06 +0000 (14:34 +0100)]
mac80211: add documentation book

Quite a while ago I started this book. The required kernel-doc
patches have since gone into the tree so it is now possible to
build the book in mainline.

The actual documentation is still rather incomplete and not all
things are linked into the book, but this enables us to edit
the documentation collaboratively, hopefully driver authors can
add documentation based on their experience with mac80211.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: don't clear next_hop in path reclaim
Johannes Berg [Tue, 26 Feb 2008 09:53:57 +0000 (10:53 +0100)]
mac80211: don't clear next_hop in path reclaim

Luis pointed out that this path is going to be freed right
away anyway so there's no point in assigning next_hop.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: remove STA entries when taking down interface
Johannes Berg [Mon, 25 Feb 2008 15:27:49 +0000 (16:27 +0100)]
mac80211: remove STA entries when taking down interface

When we take down an interface, we need to remove the STA info
items that belong to it because otherwise we might invoke a
sta_notify() callback in the driver when we later delete the
STA entries, but in that case the driver will already have
removed its knowledge of the interface they belonged to leading
to confusion. Also, we could invoke the set_tim() callback after
the driver removed its knowledge of the interface, which can
lead to a crash if it requests a beacon with a then-invalid vif
pointer!

A side effect of this patch is that, because it was easier, it
disallows changing the WDS peer while an interface is up. Should
that actually be necessary, it can be added back, but the WDS
peer STA entry may not be added while the interface is UP so for
now I've simplified the WDS peer's STA entry lifetime management.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up sta_info and document locking
Johannes Berg [Mon, 25 Feb 2008 15:27:48 +0000 (16:27 +0100)]
mac80211: clean up sta_info and document locking

This patch cleans up the sta_info struct and documents how
each set of variables is locked. Notably, flags locking is
completely missing. It also adds kernel-doc for some (but
not all yet) members of the struct.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split sta_info_add
Johannes Berg [Mon, 25 Feb 2008 15:27:47 +0000 (16:27 +0100)]
mac80211: split sta_info_add

sta_info_add() has two functions: allocating a station info
structure and inserting it into the hash table/list. Splitting
these two functions allows allocating with GFP_KERNEL in many
places instead of GFP_ATOMIC which is now required by the RCU
protection. Additionally, in many places RCU protection is now
no longer needed at all because between sta_info_alloc() and
sta_info_insert() the caller owns the structure.

This fixes a few race conditions with setting initial flags
and similar, but not all (see comments in ieee80211_sta.c and
cfg.c). More documentation on the existing races will be in
a follow-up patch.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: RCU-ify STA info structure access
Johannes Berg [Mon, 25 Feb 2008 15:27:46 +0000 (16:27 +0100)]
mac80211: RCU-ify STA info structure access

This makes access to the STA hash table/list use RCU to protect
against freeing of items. However, it's not a true RCU, the
copy step is missing: whenever somebody changes a STA item it
is simply updated. This is an existing race condition that is
now somewhat understandable.

This patch also fixes the race key freeing vs. STA destruction
by making sure that sta_info_destroy() is always called under
RTNL and frees the key.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: split ieee80211_txrx_data
Johannes Berg [Mon, 25 Feb 2008 15:27:43 +0000 (16:27 +0100)]
mac80211: split ieee80211_txrx_data

Split it into ieee80211_tx_data and ieee80211_rx_data to clarify
usage/flag usage and remove the stupid union thing.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: reorder a few fields in sta_info
Johannes Berg [Mon, 25 Feb 2008 21:17:30 +0000 (22:17 +0100)]
mac80211: reorder a few fields in sta_info

Three __le16s followed by an enum (int) leave a two-byte hole
of padding which we can use for two of the other fields.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: fix kernel-doc comment for mesh_plink_deactivate
Johannes Berg [Mon, 25 Feb 2008 20:36:27 +0000 (21:36 +0100)]
mac80211: fix kernel-doc comment for mesh_plink_deactivate

Accidentally copied in a __mesh_plink_deactivate, noticed by Luis
Carlos Cobo.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: clean up mesh RX path a bit more
Johannes Berg [Mon, 25 Feb 2008 15:24:38 +0000 (16:24 +0100)]
mac80211: clean up mesh RX path a bit more

Moves another ifdef into the sta_info header file in favour of
compiling more code even w/o CONFIG_MAC80211_MESH.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Carlos Cobo <luisca@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 years agomac80211: export mesh_plink_broken
Johannes Berg [Mon, 25 Feb 2008 15:15:06 +0000 (16:15 +0100)]
mac80211: export mesh_plink_broken

This needs to be exported because rate control algorithms
can be modular.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>