profile/ivi/kernel-x86-ivi.git
13 years agoath5k: Cleanup turbo channel flags
Nick Kossifidis [Tue, 23 Nov 2010 19:49:53 +0000 (21:49 +0200)]
ath5k: Cleanup turbo channel flags

 * Clean up CHANNEL_T(URBO), use AR5K_BWMODE_40MHZ instead

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use correct clock when setting ofdm timings
Nick Kossifidis [Tue, 23 Nov 2010 19:48:32 +0000 (21:48 +0200)]
ath5k: Use correct clock when setting ofdm timings

 * Use correct clock value when setting OFDM timings on
 non-default bwmodes.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Skip tx power setting on AR5210 for now
Nick Kossifidis [Tue, 23 Nov 2010 19:45:21 +0000 (21:45 +0200)]
ath5k: Skip tx power setting on AR5210 for now

 * Don't return -EINVAL when trying to set tx power
 on RF5110 because AR5210 reset will fail. We need to
 add support for RF5110 and AR5210 eeprom in the future
 but for now just skip it.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Tweak phy activate to rx start delay based on bwmode
Nick Kossifidis [Tue, 23 Nov 2010 19:44:02 +0000 (21:44 +0200)]
ath5k: Tweak phy activate to rx start delay based on bwmode

 * Tweak phy activation -> rx delay for different bwmodes

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: No need to save/restore staid flags on reset
Nick Kossifidis [Tue, 23 Nov 2010 19:42:22 +0000 (21:42 +0200)]
ath5k: No need to save/restore staid flags on reset

 * Since we set antenna flags on phy init and ack bitrate
 mode on pcu init, there is no need to save/restore sta_id
 flags on ath5k_hw_reset. Also we don't need to re-set our
 mac address because it's not affected by resets.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Support synth-only channel change for AR2413/AR5413
Nick Kossifidis [Tue, 23 Nov 2010 19:39:28 +0000 (21:39 +0200)]
ath5k: Support synth-only channel change for AR2413/AR5413

 * Add synth-only channel change for AR2413/5413. When we call
 ath5k_reset with a channel ath5k_hw_reset will first try to
 set channel on PHY while PHY is running instead of doing a normal
 full reset. To do this phy_init has to change to implement this
 functionality.

 * Clean up change_channel flag, what it really did was skip PCU
 registers when setting initvals. This is done because on reset
 PCU registers are not affected (except the registers we set
 in pcu init and -due to hw problems- TSF). Use a new skip_pcu
 flag that's not misleading instead. In the future we might use
 that to also skip PCU reset and save us the TSF etc problems
 (needs testing because standard practice is to reset everything).

 * Use fast channel change only when setting channel, and set skip_pcu
 to false only on init. When we reset the card due to DMA or PHY
 problems skip pcu but never do a fast channel change.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Skip powertable setting when we are on the same channel
Nick Kossifidis [Tue, 23 Nov 2010 19:37:30 +0000 (21:37 +0200)]
ath5k: Skip powertable setting when we are on the same channel

 * Only set power table if we are changing channel/mode
 there is no need to recalculate and reset the power table
 all the time.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Update PLL programming for turbo/half/quarter
Nick Kossifidis [Tue, 23 Nov 2010 19:33:22 +0000 (21:33 +0200)]
ath5k: Update PLL programming for turbo/half/quarter

 * Set correct PLL settings for each bwmode

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Update spur mitigation filter for turbo/half/quarter
Nick Kossifidis [Tue, 23 Nov 2010 19:28:15 +0000 (21:28 +0200)]
ath5k: Update spur mitigation filter for turbo/half/quarter

 * Add spur mitigation filter support for half/quarter and turbo.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Tweak power detector delays on RF5111/RF5112
Nick Kossifidis [Tue, 23 Nov 2010 19:26:13 +0000 (21:26 +0200)]
ath5k: Tweak power detector delays on RF5111/RF5112

 * Tweak power detector delays on AR5111/AR5112 when
 using half/quarter modes.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Always set IFS intervals on reset
Nick Kossifidis [Tue, 23 Nov 2010 19:24:54 +0000 (21:24 +0200)]
ath5k: Always set IFS intervals on reset

 * Make sure we always set IFS timings even if no
 coverage class is set. If we don't we'll miss the
 needed changes for different bwmodes.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use turbo flag on DCU
Nick Kossifidis [Tue, 23 Nov 2010 19:21:50 +0000 (21:21 +0200)]
ath5k: Use turbo flag on DCU

 * Set AR5K_DCU_GBL_IFS_MISC_TURBO_MODE flag on DCU when operating
 on 40MHz

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Set all IFS intervals, not just slot time
Nick Kossifidis [Tue, 23 Nov 2010 19:19:45 +0000 (21:19 +0200)]
ath5k: Set all IFS intervals, not just slot time

 * Replace set_slot_time with set_ifs_intervals that also sets
 the various inter-frame space intervals based on current bwmode.

 * Clean up AR5210 mess from reset_tx_queue, AR5210 only has one
 data queue and we set IFS intervals for that queue on set_ifs_intervals
 so there is nothing left to do for 5210 on reset_tx_queue.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Extend rate_duration
Nick Kossifidis [Tue, 23 Nov 2010 19:12:23 +0000 (21:12 +0200)]
ath5k: Extend rate_duration

 * Extend ieee80211_generic_frame_duration to support the various
 bwmodes.

 * Better document what's going on with ack bitrates and update
 write_rate_duration to support the standard ack bitrates (when
 we don't set the high bit).

 * Get rid of set_ack_bitrate_high and introduce a flag on ath5k_hw
 for this (we only called the function on init anyway so there is no
 difference).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Extend get_default_sifs/slot_time
Nick Kossifidis [Tue, 23 Nov 2010 19:09:11 +0000 (21:09 +0200)]
ath5k: Extend get_default_sifs/slot_time

 * Extend get_default_sifs/slot_time to include timings for turbo
 half and quarter rate modes.

 * AR5210 code for now uses timings already on core clock units
 instead of usecs so rename them (we 'll clean it up later).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Move tx retries setting outside reset_tx_queue
Nick Kossifidis [Tue, 23 Nov 2010 19:07:04 +0000 (21:07 +0200)]
ath5k: Move tx retries setting outside reset_tx_queue

 * Move setting of tx retry limits on a separate function
 (we 'll clean up this AR5210 mess later)

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Increase PHY settling parameters for turo mode
Nick Kossifidis [Tue, 23 Nov 2010 19:04:43 +0000 (21:04 +0200)]
ath5k: Increase PHY settling parameters for turo mode

 * On turbo mode increase PHY settling times, note that
 we only increase switch settling time on AR5212 as indicated
 by initvals.

 * A few cleanups: Move frame control settings for AR5210 from
 reset_tx_queue to tweak_initvals and remove phy_scal settings
 from tweak_initvals (we tweak them alread on set_sleep_clock).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Small cleanup on tweak_initvals
Nick Kossifidis [Tue, 23 Nov 2010 19:02:20 +0000 (21:02 +0200)]
ath5k: Small cleanup on tweak_initvals

 * Now that we properly set rx/tx latencies for AR5311 remove
 that old buggy part of code left inside ath5k_hw_tweak_initval_settings
 that was never executed (you can't have an RF5112 radio on a mac older
 than AR5212). Also use a magic value for 5311 PHY_SCAL value.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Put core clock initialization on a new function
Nick Kossifidis [Tue, 23 Nov 2010 19:00:37 +0000 (21:00 +0200)]
ath5k: Put core clock initialization on a new function

 * Handle all usec parameters in one function. It's much cleaner
 this way.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add new field on ath5k_hw to track bandwidth modes
Nick Kossifidis [Tue, 23 Nov 2010 18:58:34 +0000 (20:58 +0200)]
ath5k: Add new field on ath5k_hw to track bandwidth modes

 * Prepare for half/quarter/turbo support, introduce a new
 ah_bwmode parameter and get rid of ah_turbo. Bwmode stands
 for "bandwidth mode" and can have 4 values, default (20MHz),
 turbo (40MHz), half rate (10MHz), and quarter rate (5MHz).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use new function to stop beacon queue
Nick Kossifidis [Tue, 23 Nov 2010 18:55:17 +0000 (20:55 +0200)]
ath5k: Use new function to stop beacon queue

 * Since we only use ath5k_hw_stop_tx_dma to stop the beacon
 queue, introduce a new function ath5k_hw_stop_beacon_queue so
 that we can use that instead and have better control. In the future
 we can add more beacon queue specific stuff there (maybe tweak
 beacon timers or something), for now just call ath5k_hw_stop_tx_dma.

 * Also since we don't call ath5k_hw_stop_rx/tx_dma from outside
 dma.c, make them static.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Check RXE when setting RXDP
Nick Kossifidis [Tue, 23 Nov 2010 18:52:24 +0000 (20:52 +0200)]
ath5k: Check RXE when setting RXDP

 * Make sure we are not trying to set RXDP while RX is active,
 for now ignore the return value.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use DCU early termination correctly
Nick Kossifidis [Tue, 23 Nov 2010 18:50:16 +0000 (20:50 +0200)]
ath5k: Use DCU early termination correctly

 * DCU early termination should be used to quickly flush QCU
 according to docs so don't enable it for all queues, enable
 it only when stopping each queue and disable it when we are
 done.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Debug DMA timeouts
Nick Kossifidis [Tue, 23 Nov 2010 18:47:31 +0000 (20:47 +0200)]
ath5k: Debug DMA timeouts

 * Increase timeouts on ath5k_hw_stop_tx_dma and also wait for
 tx queue to stop before checking for pending frames

 * Add a new debug level to debug dma start/stop

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use new dma_stop function on base.c
Nick Kossifidis [Tue, 23 Nov 2010 18:45:38 +0000 (20:45 +0200)]
ath5k: Use new dma_stop function on base.c

 * Since we stop rx/tx dma and pcu durring reset there is no need to
 call ath5k_hw_stop_rx/tx_dma before, also there is no need to call
 them durring stop_locked since we can use ath5k_hw_dma_stop for
 both.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Stop PCU on reset
Nick Kossifidis [Tue, 23 Nov 2010 18:43:18 +0000 (20:43 +0200)]
ath5k: Stop PCU on reset

 * Stop PCU receive logic (DRU) durring reset
 We need to be sure pcu is not active when trying to stop rx dma
 right now this is done on ath5k_reset (base.c) but later we are
 going to clean it up.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add new function to stop rx/tx DMA
Nick Kossifidis [Tue, 23 Nov 2010 18:41:15 +0000 (20:41 +0200)]
ath5k: Add new function to stop rx/tx DMA

 * Add a new function to stop rx/tx dma and use in when reset starts

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Reset cleanup and generic cleanup
Nick Kossifidis [Tue, 23 Nov 2010 18:36:45 +0000 (20:36 +0200)]
ath5k: Reset cleanup and generic cleanup

 * No functional changes

 * Clean up reset:
 Introduce init functions for each unit and call them instead
 of having everything inside ath5k_hw_reset (it's just c/p for
 now so nothing changes except calling order -I tested it with
 various cards and it's ok-)

 * Further cleanups:
 ofdm_timings belongs to phy.c
 rate_duration belongs to pcu.c
 clock functions are general and belong to reset.c (more to follow)

 * Reorder functions for better organization:
 We start with helpers and other functions follow in categories,
 init functions are last

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Add support for Adaptive Power Management
Mohammed Shafi Shajakhan [Tue, 23 Nov 2010 15:12:27 +0000 (20:42 +0530)]
ath9k: Add support for Adaptive Power Management

This feature is to mitigate the problem of certain 3
stream chips that exceed the PCIe power requirements.An EEPROM flag
controls which chips have APM enabled which is basically read from
miscellaneous configuration element of the EEPROM header.

This workaround will reduce power consumption by using 2 Tx chains for
Single and Double stream rates (5 GHz only).All self generated frames
(regardless of rate) are sent on 2 chains when this feature is
enabled(Chip Limitation).

Cc: Paul Shaw <paul.shaw@atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Tested-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix RX aggregation locking
Johannes Berg [Mon, 29 Nov 2010 10:09:16 +0000 (11:09 +0100)]
mac80211: fix RX aggregation locking

The RX aggregation locking documentation was
wrong, which led Christian to also code the
timer timeout handling for it somewhat wrongly.

Fix the documentation, the two places that
need to hold the reorder lock across accesses
to the structure, and the debugfs code that
should just use RCU.

Also, remove acquiring the sta->lock across
reorder timeouts since it isn't necessary, and
change a few places to GFP_KERNEL because the
code path here doesn't need atomic allocations
as I noticed when reviewing all this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix software retry counter tracking
Felix Fietkau [Sun, 28 Nov 2010 18:37:48 +0000 (19:37 +0100)]
ath9k: fix software retry counter tracking

The recent tx path cleanups moved the software retry count tracking
from the ath_buf to the skb cb, however the actual counter update
referred to the wrong location, confusing block-ack window tracking.
Fix this by using the retries counter in the struct ath_frame_info.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoRevert "ath9k_htc: Handle monitor mode properly for HTC devices"
Rajkumar Manoharan [Fri, 26 Nov 2010 17:54:33 +0000 (23:24 +0530)]
Revert "ath9k_htc: Handle monitor mode properly for HTC devices"

This reverts commit 446fad5a5b6be765c8ec39bfdbbc6c7aa63fbcbb.

The change had broken the packet injection on monitoring mode.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove code which enables btcoex based on subsys id
Vasanthakumar Thiagarajan [Fri, 26 Nov 2010 14:10:07 +0000 (06:10 -0800)]
ath9k: Remove code which enables btcoex based on subsys id

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Reintroduce modparam to enable btcoex
Vasanthakumar Thiagarajan [Fri, 26 Nov 2010 14:10:06 +0000 (06:10 -0800)]
ath9k: Reintroduce modparam to enable btcoex

It is not ideal to enable btcoex based on subsys id as it is
not unique, they are so random. It is also a pain keeping
all of them in a table to enable btcoex for a particular
hw. Going back to the old idea.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: implement off-channel mgmt TX
Johannes Berg [Thu, 25 Nov 2010 09:02:30 +0000 (10:02 +0100)]
mac80211: implement off-channel mgmt TX

This implements the new off-channel TX API
in mac80211 with a new work item type. The
operation doesn't add a new work item when
we're on the right channel and there's no
wait time so that for example p2p probe
responses will be transmitted without delay.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211: extend mgmt-tx API for off-channel
Johannes Berg [Thu, 25 Nov 2010 09:02:29 +0000 (10:02 +0100)]
nl80211/cfg80211: extend mgmt-tx API for off-channel

With p2p, it is sometimes necessary to transmit
a frame (typically an action frame) on another
channel than the current channel. Enable this
through the CMD_FRAME API, and allow it to wait
for a response. A new command allows that wait
to be aborted.

However, allow userspace to specify whether or
not it wants to allow off-channel TX, it may
actually want to use the same channel only.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: minor change in bt coex normal LUT
Wey-Yi Guy [Thu, 18 Nov 2010 18:40:03 +0000 (10:40 -0800)]
iwlagn: minor change in bt coex normal LUT

Minor changes in LUT

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use different kill mask when SCO active
Wey-Yi Guy [Thu, 25 Nov 2010 01:25:03 +0000 (17:25 -0800)]
iwlagn: use different kill mask when SCO active

use different kill_ack_mask and kill_cts_mask when detect SCO
is active.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Offical name for 100/130 device
Wey-Yi Guy [Wed, 17 Nov 2010 20:13:55 +0000 (12:13 -0800)]
iwlagn: Offical name for 100/130 device

Change to offical name for 100 devices:
   "Intel(R) Centrino(R) Wireless-N 100"

Change to offical name for 130 devices:
   "Intel(R) Centrino(R) Wireless-N 130"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Offical name for 6000g2b device
Wey-Yi Guy [Wed, 17 Nov 2010 20:13:54 +0000 (12:13 -0800)]
iwlagn: Offical name for 6000g2b device

Change to offical name for 6000g2b devices:
   "Intel(R) Centrino(R) Wireless-N 1030"
   "Intel(R) Centrino(R) Advanced-N 6230"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Offical name for 6000g2a device
Wey-Yi Guy [Wed, 17 Nov 2010 20:13:53 +0000 (12:13 -0800)]
iwlagn: Offical name for 6000g2a device

Change to offical name for 6000g2a devices:
   "Intel(R) Centrino(R) Advanced-N 6205"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: Offical name for 6050g2 device
Wey-Yi Guy [Wed, 17 Nov 2010 20:13:52 +0000 (12:13 -0800)]
iwlagn: Offical name for 6050g2 device

Change to offical name for 6050g2 devices:
   "Intel(R) Centrino(R) Wireless-N 6150"

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: use mac80211 AC defines
Johannes Berg [Wed, 17 Nov 2010 19:33:27 +0000 (11:33 -0800)]
iwlwifi: use mac80211 AC defines

Instead of hardcoding the numbers that must
match mac80211, use the constants. Not that
this means we could change the constants,
but at least this way it's clearer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: advertise reliable TX status
Johannes Berg [Tue, 16 Nov 2010 19:55:02 +0000 (11:55 -0800)]
iwlagn: advertise reliable TX status

Our hardware has reliable TX status, but we're
not currently advertising that to mac80211.
Since the packet loss monitoring will depend
on it, advertise it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: fix station powersave accounting for aggregation
Johannes Berg [Tue, 16 Nov 2010 19:51:38 +0000 (11:51 -0800)]
iwlagn: fix station powersave accounting for aggregation

Since aggregation queues are station-specific, the
device will not reject packets in them but rather
will stop the appropriate aggregation queues when
a station goes to sleep. I forgot to account for
this in the driver, so if a station went to sleep
that had aggregation enabled, traffic would stop
indefinitely.

Fix this by only accounting frames queued on the
normal AC queues for associated station.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: remove powersave warning
Johannes Berg [Tue, 16 Nov 2010 19:51:04 +0000 (11:51 -0800)]
iwlagn: remove powersave warning

Through races, a packet may be enqueued for
transmission to a station while that station
is going to sleep, in which case the warning
here triggers. Instead of warning, check the
condition -- if this packet is not a PS-poll
response then we still enqueue it but it will
be rejected by the device since the station
is marked as asleep.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: use antenna information in EEPROM
Wey-Yi Guy [Mon, 15 Nov 2010 21:43:07 +0000 (13:43 -0800)]
iwlwifi: use antenna information in EEPROM

The valid tx/rx antenna information is part of EEPROM, so use it
to configure the device.

For few cases, the EEPROM did not reflect the correct antenna, but
it is too late to modify the EEPROM, so overwrite with .cfg parameters

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: remove unused define
Wey-Yi Guy [Mon, 15 Nov 2010 21:56:10 +0000 (13:56 -0800)]
iwlwifi: remove unused define

was not used, remove it

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoath9k_hw: remove ath9k_hw_stoppcurecv
Felix Fietkau [Sat, 20 Nov 2010 02:08:48 +0000 (03:08 +0100)]
ath9k_hw: remove ath9k_hw_stoppcurecv

It is no longer used anywhere

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Identify devices using driver_info
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:22 +0000 (16:53 +0530)]
ath9k_htc: Identify devices using driver_info

Categorize AR7010 & AR9287 devices based on driver_info
of usb_device_id, instead of PIDs. This avoids per-device cases
and minimize code changes for new device addition.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:21 +0000 (16:53 +0530)]
ath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)

AR9287 devices (PCI/USB) use different eeprom start location
to read nvram. New devices might endup with same devid. So use
driver_info to set offset, instead of devid. driver_info is
valid for HTC devices alone which is filled in usb_device_id.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add driver_info in usb device list
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:20 +0000 (16:53 +0530)]
ath9k_htc: Add driver_info in usb device list

Added driver_info to identify AR7010, R9287 HTC devices.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath: Add a driver_info bitmask field
Rajkumar Manoharan [Fri, 19 Nov 2010 11:23:19 +0000 (16:53 +0530)]
ath: Add a driver_info bitmask field

The driver_info stores the device category information which
is used to load appropriate device firmware, select firmware offset
and eeprom starting location. The driver_info is accessed across
ath9k_htc and ath9k_hw. Hence placed under common structure.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: advance power management support
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:56 +0000 (10:58 -0800)]
iwlwifi: advance power management support

For 6000g2b and up, adding advance power management support
for better power consumption

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: power management checking for shadow register
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:55 +0000 (10:58 -0800)]
iwlwifi: power management checking for shadow register

If shadow register is enable, modify the power management
command to inform uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: consider BT for power management
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:54 +0000 (10:58 -0800)]
iwlwifi: consider BT for power management

Check the BT PSPoll flag when fill PM command to uCode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: add more power management flags
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:53 +0000 (10:58 -0800)]
iwlwifi: add more power management flags

Adding additional power management option available for the device.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: name change for BT config flag
Wey-Yi Guy [Tue, 23 Nov 2010 18:58:52 +0000 (10:58 -0800)]
iwlagn: name change for BT config flag

Bit 7 of BT config flag is used to enable/disable PSPoll sync.
Make the name to match it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: implement packet loss notification
Johannes Berg [Wed, 24 Nov 2010 07:10:06 +0000 (08:10 +0100)]
mac80211: implement packet loss notification

For drivers that have accurate TX status reporting
we can report the number of consecutive lost packets
to userspace using the new cfg80211 CQM event. The
threshold is fixed right now, this may need to be
improved in the future.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: allow using CQM event to notify packet loss
Johannes Berg [Wed, 24 Nov 2010 07:10:05 +0000 (08:10 +0100)]
cfg80211: allow using CQM event to notify packet loss

This adds the ability for drivers to use CQM events
to notify about packet loss for specific stations
(which could be the AP for the managed mode case).
Since the threshold might be determined by the
driver (it isn't passed in right now) it will be
passed out of the driver to userspace in the event.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Add documentation for antenna ops
Bruno Randolf [Wed, 24 Nov 2010 05:34:41 +0000 (14:34 +0900)]
cfg80211: Add documentation for antenna ops

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: avoid aggregation for VO traffic
Luis R. Rodriguez [Tue, 23 Nov 2010 23:05:02 +0000 (15:05 -0800)]
mac80211: avoid aggregation for VO traffic

This should help with latency issues which can happen when
using aggregation.

Cc: Felix Fietkau <nbd@openwrt.org>
Cc: Matt Smith <matt.smith@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: avoid aggregation for VO traffic
Luis R. Rodriguez [Tue, 23 Nov 2010 23:05:01 +0000 (15:05 -0800)]
ath9k: avoid aggregation for VO traffic

This should help with latency issues which can happen when
using aggregation.

Cc: Matt Smith <matt.smith@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: reduce the number of retries for nullfunc probing
Felix Fietkau [Tue, 23 Nov 2010 02:10:32 +0000 (03:10 +0100)]
mac80211: reduce the number of retries for nullfunc probing

Since nullfunc frames are transmitted as unicast frames, they're more
reliable than the broadcast probe requests, so we need fewer retries
to figure out whether the AP is really gone.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: use nullfunc instead of probe request for connection monitoring
Felix Fietkau [Tue, 23 Nov 2010 02:10:31 +0000 (03:10 +0100)]
mac80211: use nullfunc instead of probe request for connection monitoring

nullfunc frames are better for connection monitoring, because probe requests
are answered even if the AP has already dropped the connection, whereas
nullfunc frames from an unassociated station will trigger a disassoc/deauth
frame from the AP (WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA), which allows
the station to reconnect immediately instead of waiting until it attempts to
transmit the next unicast frame.

This only works on hardware with reliable tx ACK reporting, any other hardware
needs to fall back to the probe request method.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211/mac80211: improve ad-hoc multicast rate handling
Felix Fietkau [Mon, 22 Nov 2010 19:58:24 +0000 (20:58 +0100)]
cfg80211/mac80211: improve ad-hoc multicast rate handling

- store the multicast rate as an index instead of the rate value
  (reduces cpu overhead in a hotpath)
- validate the rate values (must match a bitrate in at least one sband)

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: probe the AP when resuming
Felix Fietkau [Tue, 23 Nov 2010 19:28:03 +0000 (20:28 +0100)]
mac80211: probe the AP when resuming

Check the connection by probing the AP (either using nullfunc or a
probe request). If nullfunc probing is supported and the assoc is no
longer valid, the AP will send a disassoc/deauth immediately.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: calculate beacon loss time accurately
Felix Fietkau [Fri, 19 Nov 2010 21:55:38 +0000 (22:55 +0100)]
mac80211: calculate beacon loss time accurately

Instead of using a fixed 2 second timeout, calculate beacon loss interval
from the advertised beacon interval and a frame count.  With this beacon
loss happens after N (default 7) consecutive frames are missed which
for a typical setup (100TU beacon interval) is ~700ms (or ~1/3 previous).

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: restart beacon miss timer on system resume from suspend
Felix Fietkau [Fri, 19 Nov 2010 21:55:37 +0000 (22:55 +0100)]
mac80211: restart beacon miss timer on system resume from suspend

Signed-off-by: Paul Stewart <pstew@google.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: little cleanups
Rafał Miłecki [Thu, 18 Nov 2010 20:11:43 +0000 (21:11 +0100)]
b43: N-PHY: little cleanups

Remove some typos, warnings, initialize some values to follow wl's code path.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: rev2: save and restore PHY regs on RSSI poll
Rafał Miłecki [Thu, 18 Nov 2010 20:11:42 +0000 (21:11 +0100)]
b43: N-PHY: rev2: save and restore PHY regs on RSSI poll

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix BPHY init
Rafał Miłecki [Thu, 18 Nov 2010 20:11:41 +0000 (21:11 +0100)]
b43: N-PHY: fix BPHY init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: init BPHY when needed
Rafał Miłecki [Thu, 18 Nov 2010 12:28:00 +0000 (13:28 +0100)]
b43: N-PHY: init BPHY when needed

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix some typos, conditions, set gain_boost
Rafał Miłecki [Thu, 18 Nov 2010 12:27:59 +0000 (13:27 +0100)]
b43: N-PHY: fix some typos, conditions, set gain_boost

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: minor fixes to match specs
Rafał Miłecki [Thu, 18 Nov 2010 12:27:58 +0000 (13:27 +0100)]
b43: N-PHY: minor fixes to match specs

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: fix values for PHY regs in channel tables of 2055 radio
Rafał Miłecki [Thu, 18 Nov 2010 12:27:57 +0000 (13:27 +0100)]
b43: N-PHY: fix values for PHY regs in channel tables of 2055 radio

Additional comment by Larry Finger <Larry.Finger@lwfinger.net>:

This change deserves a bit more explanation. You might include something like
"These tables came from reverse engineering the 5.10.56.46 version of the
Broadcom driver. Trace comparisons between b43 and the current Broadcom driver
(5.10.120.0) show byte reversals for the PHY register writes."

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet/wireless: Use pr_<level> and netdev_<level>
Joe Perches [Wed, 17 Nov 2010 03:56:49 +0000 (19:56 -0800)]
net/wireless: Use pr_<level> and netdev_<level>

No change in output for pr_<level> prefixes.
netdev_<level> output is different, arguably improved.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Wed, 24 Nov 2010 21:19:24 +0000 (16:19 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

13 years agoRevert "nl80211/mac80211: Report signal average"
John W. Linville [Wed, 24 Nov 2010 21:18:36 +0000 (16:18 -0500)]
Revert "nl80211/mac80211: Report signal average"

This reverts commit 86107fd170bc379869250eb7e1bd393a3a70e8ae.

This patch inadvertantly changed the userland ABI.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: b43: fix error path in SDIO
Guennadi Liakhovetski [Tue, 23 Nov 2010 16:10:24 +0000 (17:10 +0100)]
wireless: b43: fix error path in SDIO

Fix unbalanced call to sdio_release_host() on the error path.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: fix eeprom access
Felix Fietkau [Mon, 22 Nov 2010 17:26:51 +0000 (18:26 +0100)]
ath9k_htc: fix eeprom access

wireless-testing commit a05b5d45049d60a06a1b12976150572304a51928
ath9k: add support for reading eeprom from platform data on PCI devices

This change moved the initialization of the AH_USE_EEPROM flag from ath9k_hw
to ath9k. This needs to be added to ath9k_htc as well

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: fix A-MPDU key search issues on AR9003
Felix Fietkau [Mon, 22 Nov 2010 14:39:39 +0000 (15:39 +0100)]
ath9k_hw: fix A-MPDU key search issues on AR9003

Under load, a large number of frames can produce decryption errors, even when
no key cache update is being done. Performing a key search for every single
frame in an A-MPDU improves reliability.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agozd1211rw: Use const
Joe Perches [Sun, 21 Nov 2010 02:39:03 +0000 (18:39 -0800)]
zd1211rw: Use const

Mark arrays const that are unmodified after initializations.

   text    data     bss     dec     hex filename
  19291      56    4136   23483    5bbb drivers/net/wireless/zd1211rw/zd_chip.o.old
  19291      56    4136   23483    5bbb drivers/net/wireless/zd1211rw/zd_chip.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Use static const
Joe Perches [Sun, 21 Nov 2010 02:39:01 +0000 (18:39 -0800)]
rt2x00: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  40197      56    8336   48589    bdcd drivers/net/wireless/rt2x00/rt2800lib.o.new
  40205      56    8336   48597    bdd5 drivers/net/wireless/rt2x00/rt2800lib.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: Use static const
Joe Perches [Sun, 21 Nov 2010 02:39:00 +0000 (18:39 -0800)]
rndis_wlan: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  41757    2205    9896   53858    d262 drivers/net/wireless/rndis_wlan.o.old
  41653    2205    9880   53738    d1ea drivers/net/wireless/rndis_wlan.o.new

Changed functions rndis_set_oid and set_bssid to take const *'s.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoray_cs: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:59 +0000 (18:38 -0800)]
ray_cs: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  42607    3581    8536   54724    d5c4 drivers/net/wireless/ray_cs.o.new
  42603    3585    8536   54724    d5c4 drivers/net/wireless/ray_cs.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:58 +0000 (18:38 -0800)]
libertas: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
   3650      56     704    4410    113a drivers/net/wireless/libertas/rx.o.new
   3695      56     704    4455    1167 drivers/net/wireless/libertas/rx.o.old
  27328     964    5240   33532    82fc drivers/net/wireless/libertas/cfg.o.new
  27328     964    5240   33532    82fc drivers/net/wireless/libertas/cfg.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:57 +0000 (18:38 -0800)]
iwlwifi: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  48644      57   12120   60821    ed95 drivers/net/wireless/b43/phy_n.o.new
  48661      57   12120   60838    eda6 drivers/net/wireless/b43/phy_n.o.old
  37906      86    7904   45896    b348 drivers/net/wireless/iwlwifi/iwl-agn-lib.o.new
  37937      86    7904   45927    b367 drivers/net/wireless/iwlwifi/iwl-agn-lib.o.old
  37781     523    6752   45056    b000 drivers/net/wireless/iwlwifi/iwl-3945.o.new
  37781     523    6752   45056    b000 drivers/net/wireless/iwlwifi/iwl-3945.o.old

Changed b43_nphy_write_clip_detection to take a const u16 *

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:56 +0000 (18:38 -0800)]
b43: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
   5502      56    1336    6894    1aee drivers/net/wireless/b43/phy_common.o.new
   5511      56    1336    6903    1af7 drivers/net/wireless/b43/phy_common.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoatmel: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:55 +0000 (18:38 -0800)]
atmel: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  42578     720    8528   51826    ca72 drivers/net/wireless/atmel.o.old
  42578     720    8528   51826    ca72 drivers/net/wireless/atmel.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:54 +0000 (18:38 -0800)]
carl9170: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
   1897      56     672    2625     a41 drivers/net/wireless/ath/carl9170/cmd.o.new
   1897      56     672    2625     a41 drivers/net/wireless/ath/carl9170/cmd.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:53 +0000 (18:38 -0800)]
ath9k: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  11161      56    2136   13353    3429 drivers/net/wireless/ath/ath9k/ar9003_paprd.o.new
  11167      56    2136   13359    342f drivers/net/wireless/ath/ath9k/ar9003_paprd.o.old
  15428      56    3056   18540    486c drivers/net/wireless/ath/ath9k/eeprom_4k.o.old
  15451      56    3056   18563    4883 drivers/net/wireless/ath/ath9k/eeprom_4k.o.new
  14087      56    2560   16703    413f drivers/net/wireless/ath/ath9k/eeprom_9287.o.old
  14036      56    2560   16652    410c drivers/net/wireless/ath/ath9k/eeprom_9287.o.new
  10041      56    2384   12481    30c1 drivers/net/wireless/ath/ath9k/ani.o.new
  10088      56    2384   12528    30f0 drivers/net/wireless/ath/ath9k/ani.o.old
   9316    1580    2304   13200    3390 drivers/net/wireless/ath/ath9k/htc_drv_init.o.new
   9316    1580    2304   13200    3390 drivers/net/wireless/ath/ath9k/htc_drv_init.o.old
  16483      56    3432   19971    4e03 drivers/net/wireless/ath/ath9k/ar9003_phy.o.new
  16517      56    3432   20005    4e25 drivers/net/wireless/ath/ath9k/ar9003_phy.o.old
  18221     104    2960   21285    5325 drivers/net/wireless/ath/ath9k/rc.o.old
  18203     104    2960   21267    5313 drivers/net/wireless/ath/ath9k/rc.o.new
  19985      56    4288   24329    5f09 drivers/net/wireless/ath/ath9k/eeprom_def.o.new
  20040      56    4288   24384    5f40 drivers/net/wireless/ath/ath9k/eeprom_def.o.old
  23997      56    4984   29037    716d drivers/net/wireless/ath/ath9k/ar5008_phy.o.old
  23846      56    4984   28886    70d6 drivers/net/wireless/ath/ath9k/ar5008_phy.o.new
  24285      56    3184   27525    6b85 drivers/net/wireless/ath/ath9k/ar9003_eeprom.o.old
  24101      56    3184   27341    6acd drivers/net/wireless/ath/ath9k/ar9003_eeprom.o.new
   6834      56    1032    7922    1ef2 drivers/net/wireless/ath/ath9k/ar9002_phy.o.old
   6780      56    1032    7868    1ebc drivers/net/wireless/ath/ath9k/ar9002_phy.o.new
  36211      64    8624   44899    af63 drivers/net/wireless/ath/ath9k/hw.o.new
  36401      64    8624   45089    b021 drivers/net/wireless/ath/ath9k/hw.o.old
   9281      56    1496   10833    2a51 drivers/net/wireless/ath/ath9k/ar9003_calib.o.old
   9150      56    1496   10702    29ce drivers/net/wireless/ath/ath9k/ar9003_calib.o.new

Use ARRAY_SIZE instead of a magic number.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Use static const
Joe Perches [Sun, 21 Nov 2010 02:38:52 +0000 (18:38 -0800)]
ath5k: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

   text    data     bss     dec     hex filename
  11266      56    2464   13786    35da drivers/net/wireless/ath/ath5k/ani.o.old
  11181      56    2464   13701    3585 drivers/net/wireless/ath/ath5k/ani.o.new

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoar9170: Use const
Joe Perches [Sun, 21 Nov 2010 02:38:51 +0000 (18:38 -0800)]
ar9170: Use const

Mark an array const.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: fix init-self regression
Christian Lamparter [Sat, 20 Nov 2010 15:53:26 +0000 (16:53 +0100)]
carl9170: fix init-self regression

The commit: "carl9170: tx path review" introduced a regression.

gcc (with -Winit-self):
tx.c:1264: warning: ‘super’ is used uninitialized in this function

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: remove duplicated #include
Huang Weiyi [Sat, 20 Nov 2010 12:06:02 +0000 (20:06 +0800)]
libertas: remove duplicated #include

Remove duplicated #include('s) in
  drivers/net/wireless/libertas/cfg.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix recursive locking in the tx flush path
Felix Fietkau [Sat, 20 Nov 2010 02:08:46 +0000 (03:08 +0100)]
ath9k: fix recursive locking in the tx flush path

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix modular 3945 only build
Johannes Berg [Thu, 18 Nov 2010 20:08:10 +0000 (12:08 -0800)]
iwlwifi: fix modular 3945 only build

If only 3945 is selected, and is a module, build
fails because iwl-legacy.c won't be compiled. Fix
this by adding it to the build correctly.

This doesn't happen for 4965 because it is a bool
option, not tristate, since it's built into the
AGN module.

Reported-by: Randy Dunlap <randy.dunlap@oracle.com>
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Disable hw crypto for GTKs on AP VLAN interfaces
Helmut Schaa [Fri, 19 Nov 2010 07:11:01 +0000 (08:11 +0100)]
mac80211: Disable hw crypto for GTKs on AP VLAN interfaces

When using AP VLAN interfaces, each VLAN interface should be in its own
broadcast domain. Hostapd achieves this by assigning different GTKs to
different AP VLAN interfaces.

However, mac80211 drivers are not aware of AP VLAN interfaces and as
such mac80211 sends the GTK to the driver in the context of the base AP
mode interface. This causes problems when multiple AP VLAN interfaces
are used since the driver will use the same key slot for the different
GTKs (there's no way for the driver to distinguish the different GTKs
from different AP VLAN interfaces). Thus, only the clients associated
to one AP VLAN interface (the one that was created last) can actually
use broadcast traffic.

Fix this by not programming any GTKs for AP VLAN interfaces into the hw
but fall back to using software crypto. The GTK for the underlying AP
interface is still sent to the driver.

That means, broadcast traffic to stations associated to an AP VLAN
interface is encrypted in software whereas broadcast traffic to
stations associated to the non-VLAN AP interface is encrypted in
hardware.

Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Fix regulatory bug with multiple cards and delays
Luis R. Rodriguez [Thu, 18 Nov 2010 05:46:09 +0000 (21:46 -0800)]
cfg80211: Fix regulatory bug with multiple cards and delays

When two cards are connected with the same regulatory domain
if CRDA had a delayed response then cfg80211's own set regulatory
domain would still be the world regulatory domain. There was a bug
on cfg80211's logic such that it assumed that once you pegged a
request as the last request it was already the currently set
regulatory domain. This would mean we would race setting a stale
regulatory domain to secondary cards which had the same regulatory
domain since the alpha2 would match.

We fix this by processing each regulatory request atomically,
and only move on to the next one once we get it fully processed.
In the case CRDA is not present we will simply world roam.

This issue is only present when you have a slow system and the
CRDA processing is delayed. Because of this it is not a known
regression.

Without this fix when a delay is present with CRDA the second card
would end up with an intersected regulatory domain and not allow it
to use the channels it really is designed for. When two cards with
two different regulatory domains were inserted you'd end up
rejecting the second card's regulatory domain request.
This fails with mac80211_hswim's regtest=2 (two requests, same alpha2)
and regtest=3 (two requests, different alpha2) module parameter
options.

This was reproduced and tested against mac80211_hwsim using this
CRDA delayer:

       #!/bin/bash
       echo $COUNTRY >> /tmp/log
       sleep 2
       /sbin/crda.orig

And these regulatory tests:

       modprobe mac80211_hwsim regtest=2
       modprobe mac80211_hwsim regtest=3

Reported-by: Mark Mentovai <mark@moxienet.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Tested-by: Mark Mentovai <mark@moxienet.com>
Tested-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>