pandora-kernel.git
12 years agoiwlagn: generically provide iwl_trans_send_cmd_pdu
Johannes Berg [Thu, 15 Sep 2011 18:46:43 +0000 (11:46 -0700)]
iwlagn: generically provide iwl_trans_send_cmd_pdu

There's no need to have the transport layer have a
callback for iwl_trans_send_cmd_pdu() since it is
just a generic wrapper around iwl_trans_send_cmd().

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move PCI-E transport files
Johannes Berg [Thu, 15 Sep 2011 18:46:42 +0000 (11:46 -0700)]
iwlagn: move PCI-E transport files

Move all the PCI-E specific transport files to
be iwl-trans-pcie*; specifically iwl-trans.c
which is really iwl-trans-pcie.c.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: merge eeprom access into single file
Wey-Yi Guy [Thu, 15 Sep 2011 18:46:41 +0000 (11:46 -0700)]
iwlagn: merge eeprom access into single file

After driver split and no need to support legacy devices, there is no reason
we need to separate the NVM access into different files, merge those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: provide data after WARN_ON
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:40 +0000 (11:46 -0700)]
iwlagn: provide data after WARN_ON

From time to time, we hit a WARN_ON in iwl_mac_remove_interface.
This basically means that we got out of sync with mac80211: the vif
we hold differs from the vif 80211 passes as parameter. Try to get
some data that will help to debug this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: replace beacon_time_fsf_bits variable with #define
Don Fry [Thu, 15 Sep 2011 18:46:39 +0000 (11:46 -0700)]
iwlagn: replace beacon_time_fsf_bits variable with #define

All devices use the same value for beacon_time_tsf_bits.  Use the #define

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: simplify chain_noise_num_beacons indirection
Fry, Donald H [Thu, 15 Sep 2011 18:46:38 +0000 (11:46 -0700)]
iwlagn: simplify chain_noise_num_beacons indirection

chain_noise_num_beacons is set and never changes.  Use the #define
rather than 3 levels of indirection.

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: fix modinfo display for 135 ucode.
Fry, Donald H [Thu, 15 Sep 2011 18:46:37 +0000 (11:46 -0700)]
iwlagn: fix modinfo display for 135 ucode.

The modinfo report for 135 ucode is iwlwifi-135-IWL135_UCODE_API_MAX.ucode
Change to show the value of the define:  iwlwifi-135-6.ucode

Signed-off-by: Don Fry <donald.h.fry@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: New SKU for 6005 SFF
Wey-Yi Guy [Thu, 15 Sep 2011 18:46:36 +0000 (11:46 -0700)]
iwlagn: New SKU for 6005 SFF

Adding another SKU for 6005 series devices.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: Convert kzalloc to kcalloc
Joe Perches [Thu, 15 Sep 2011 19:47:26 +0000 (12:47 -0700)]
iwlagn: Convert kzalloc to kcalloc

Convert kzalloc to kcalloc, coalesce multiple lines too.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: add documentation to the transport layer
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:34 +0000 (11:46 -0700)]
iwlagn: add documentation to the transport layer

and do a few clean up fixes on the way

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: document the bus layer API
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:33 +0000 (11:46 -0700)]
iwlagn: document the bus layer API

Add documentation to the bus layer API - iwl-bus.h

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: use enum iwl_rxon_context_id instead of u8
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:32 +0000 (11:46 -0700)]
iwlagn: use enum iwl_rxon_context_id instead of u8

enum iwl_rxon_context_id is the right type to use when we need a
rxon_context_id.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move iwl_stop / wake_queue to the upper layer
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:31 +0000 (11:46 -0700)]
iwlagn: move iwl_stop / wake_queue to the upper layer

Add a wrapper in the upper layer to call the mac80211's function.
This allows not to have the transport layer call mac80211 directly.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: free the Tx cmd when a non empty Tx queue is freed
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:30 +0000 (11:46 -0700)]
iwlagn: free the Tx cmd when a non empty Tx queue is freed

When a non-empty Tx queueis freed, the buffer it contains must be
freed too. Since the Tx cmd are now allocated from a pool, the Tx
cmd must be freed too.

This patch avoids to destroy a non-empty pool of Tx cmd.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: unmap cmd queue's tfds as BIDI
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:29 +0000 (11:46 -0700)]
iwlagn: unmap cmd queue's tfds as BIDI

If the driver is unloaded while there is still a host command in
flight, its tfd will be freed by iwl_tx_queue_free.
This function is called for both types of queues: Tx queues and cmd
queue. This didn't take in count the fact that in Tx queues, tfds are
mapped as TO_DEVICE (besides the first TB), whereas in cmd queue, all
TBs are mapped as BIDI.

Hence, tx_queue_free unmapped the second (and higher) TB of each tfd
in the cmd queue as TO_DEVICE, whereas they must be freed as BIDI.
This means that if a multi TFD is in flight while we unload the
driver (which is quite unlikely but can happen), we will get the
warning below.

This patch fixes this.

[  445.234060] ------------[ cut here ]------------
[  445.236273] WARNING: at lib/dma-debug.c:861 check_unmap+0x337/0x780()
[  445.236654] iwlagn 0000:02:00.0: DMA-API: device driver frees DMA memory with different direction [device address=0x0000000126950540] [size=8 bytes] [mapped with DMA_BIDIRECTIONAL] [unmapped with DMA_TO_DEVICE]
[  445.236654] Modules linked in: ...
[  445.236654] Pid: 1415, comm: modprobe Not tainted 3.1.0-rc4-wl-65912-g5215ff1-dirty #79
[  445.236654] Call Trace:
[  445.236654]  [<ffffffff81043a51>] warn_slowpath_common+0x71/0xa0
[  445.236654]  [<ffffffff81043b37>] warn_slowpath_fmt+0x47/0x50
[  445.236654]  [<ffffffff8121e687>] check_unmap+0x337/0x780
[  445.236654]  [<ffffffff810e9136>] ? free_one_page+0x156/0x320
[  445.236654]  [<ffffffff8121ec5a>] debug_dma_unmap_page+0x5a/0x60
[  445.236654]  [<ffffffffa021d701>] iwlagn_unmap_tfd.isra.11+0x121/0x1c0 [iwlagn]
[  445.236654]  [<ffffffffa021ddf2>] iwlagn_txq_free_tfd+0x42/0x70 [iwlagn]
[  445.236654]  [<ffffffffa02121de>] iwl_tx_queue_unmap+0x4e/0x70 [iwlagn]
[  445.236654]  [<ffffffffa0212fad>] iwl_trans_pcie_tx_free+0x10d/0x440 [iwlagn]
[  445.236654]  [<ffffffff81064959>] ? destroy_workqueue+0xb9/0x1e0
[  445.236654]  [<ffffffffa021330a>] iwl_trans_pcie_free+0x2a/0x2c0 [iwlagn]
[  445.236654]  [<ffffffffa022f4f2>] iwl_remove+0x149/0x17e [iwlagn]
[  445.236654]  [<ffffffffa022f546>] iwl_pci_remove+0x1f/0x65 [iwlagn]
[  445.236654]  [<ffffffff81228337>] pci_device_remove+0x47/0x120
[  445.236654]  [<ffffffff8134566c>] __device_release_driver+0x7c/0xe0
[  445.236654]  [<ffffffff81345dc8>] driver_detach+0xc8/0xd0
[  445.236654]  [<ffffffff813454c8>] bus_remove_driver+0x88/0xe0
[  445.236654]  [<ffffffff81346572>] driver_unregister+0x62/0xa0
[  445.236654]  [<ffffffff812271d4>] pci_unregister_driver+0x44/0xc0
[  445.236654]  [<ffffffffa0211ce5>] iwl_pci_unregister_driver+0x15/0x20 [iwlagn]
[  445.236654]  [<ffffffffa022f595>] iwl_exit+0x9/0xa74 [iwlagn]
[  445.236654]  [<ffffffff810918f4>] sys_delete_module+0x184/0x240
[  445.236654]  [<ffffffff81452ece>] ? retint_swapgs+0xe/0x13
[  445.236654]  [<ffffffff8121098e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[  445.236654]  [<ffffffff81459e2b>] system_call_fastpath+0x16/0x1b
[  445.236654] ---[ end trace 1fbc362b7dbe5d74 ]---
[  445.236654] Mapped at:
[  445.236654]  [<ffffffff8121d7cb>] debug_dma_map_page+0x8b/0x150
[  445.236654]  [<ffffffffa021e7b7>] iwl_enqueue_hcmd+0x837/0xa40 [iwlagn]
[  445.236654]  [<ffffffffa021f92d>] iwl_trans_pcie_send_cmd+0x8d/0x580 [iwlagn]
[  445.236654]  [<ffffffffa01f7c75>] iwl_send_calib_results+0x75/0xd0 [iwlagn]
[  445.236654]  [<ffffffffa01f21f6>] iwlagn_alive_notify+0x196/0x1f0 [iwlagn]
[  445.386500] iwlagn 0000:02:00.0: PCI INT A disabled

Reported-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME
Emmanuel Grumbach [Thu, 15 Sep 2011 18:46:28 +0000 (11:46 -0700)]
iwlagn: warn about buggy fw that doesn't set SEQ_RX_FRAME

The way we check if there is host command that should be reclaimed is
way too complicated. We should have a clear indication from the fw.
The fw is expected to set the SEQ_RX_FRAME bit if the frame was
originated by the fw which indicates to the driver that there is no
host command to free.
Somehow, there seem to have been buggy fw out there, hence the very
old comment.

This code checks if we have still buggy fw out there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Reset caldata on radio enable
Rajkumar Manoharan [Thu, 15 Sep 2011 13:32:54 +0000 (19:02 +0530)]
ath9k: Reset caldata on radio enable

Not doing so, the caldata continues to retain older history
values learned on that channel. It is always safer to start
noise floor calibration from the defaults after the assoication.
So this patch resets the nf history buffer when none of the
STA vifs are associated.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: load noise floor from history after the full chip reset
Rajkumar Manoharan [Thu, 15 Sep 2011 13:32:53 +0000 (19:02 +0530)]
ath9k: load noise floor from history after the full chip reset

Currently during the full reset, the nf calibration is always
restarted from the defaults. The noise floor history buffers are
never be used again after the scan and ath reset. This patch
ensures that nf histories are always be used that helps to
improve the signal quality on congested environment

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix magnitude/phase coeff correction
Rajkumar Manoharan [Thu, 15 Sep 2011 13:32:25 +0000 (19:02 +0530)]
ath9k_hw: Fix magnitude/phase coeff correction

Do the magnitude/phase coeff correction only if the outlier
is detected. Updating wrong magnitude/phase coeff factor
impacts not only tx gain setting but also leads to poor
performance in congested networks. In the clear environment
the impact is very minimal because the outlier happens
very rarely according to the past experiment. It occured
less than once every 1000 calibrations.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove ar9100_hw_compute_pll_control
Felix Fietkau [Thu, 15 Sep 2011 12:25:38 +0000 (14:25 +0200)]
ath9k_hw: remove ar9100_hw_compute_pll_control

AR913x uses the same PLL register layout as AR9160 and later.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: fix setting the hardware diversity flag
Felix Fietkau [Thu, 15 Sep 2011 12:25:37 +0000 (14:25 +0200)]
ath9k_hw: fix setting the hardware diversity flag

ath9k_hw_set_diversity is only called from init.c where it cannot affect
the hardware setting because it's cleared on the next reset.
Instead of using a PHY op for something that's supposed to be initialized
statically, set the register value directly in the INI override function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove dead code in the eeprom ops
Felix Fietkau [Thu, 15 Sep 2011 12:25:36 +0000 (14:25 +0200)]
ath9k_hw: remove dead code in the eeprom ops

The eeprom .set_addac function is only necessary for AR9160, remove it
from eeprom_4k.c and remove the dummy function from eeprom_9287.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: clean up hardware revision checks
Felix Fietkau [Thu, 15 Sep 2011 12:25:35 +0000 (14:25 +0200)]
ath9k_hw: clean up hardware revision checks

- AR_SREV_5416_20_OR_LATER is always true, remove it
- AR_SREV_9280_20_OR_LATER is always true within eeprom_4k.c and eeprom_9287.c
- (AR_SREV_9271 || AR_SREV_9285) is always true in eeprom_4k.c

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: sync the dma buffer after changing the retry flag
Felix Fietkau [Thu, 15 Sep 2011 10:59:49 +0000 (12:59 +0200)]
ath9k: sync the dma buffer after changing the retry flag

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: add cfg80211_find_vendor_ie() function
Eliad Peller [Thu, 15 Sep 2011 08:53:01 +0000 (11:53 +0300)]
cfg80211: add cfg80211_find_vendor_ie() function

Add function to find vendor-specific ie (along with
vendor-specific ie struct definition and P2P OUI values)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flag
Felix Fietkau [Thu, 15 Sep 2011 08:03:12 +0000 (10:03 +0200)]
ath9k: fix setting the IEEE80211_TX_CTL_CLEAR_PS_FILT flag

When the driver inserts padding between the 802.11 header and data, it
needs to set the hdr variable to the new header location.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoRevert "ath9k: do not insert padding into tx buffers on AR9380+"
John W. Linville [Mon, 19 Sep 2011 19:42:31 +0000 (15:42 -0400)]
Revert "ath9k: do not insert padding into tx buffers on AR9380+"

This reverts commit 4245d31347bdc99a608dc1d1cfe64e44aa3d1771.

12 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Mon, 19 Sep 2011 19:42:21 +0000 (15:42 -0400)]
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

12 years agoMAINTAINERS: update ath6kl
Kalle Valo [Tue, 13 Sep 2011 07:21:25 +0000 (10:21 +0300)]
MAINTAINERS: update ath6kl

It's not in staging anymore and I'm the current maintainer.

Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Naveen Singh <nvesing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: fix endian issues and comments for BAR failure handling
Felix Fietkau [Thu, 15 Sep 2011 07:37:46 +0000 (09:37 +0200)]
mac80211: fix endian issues and comments for BAR failure handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: do not insert padding into tx buffers on AR9380+
Felix Fietkau [Wed, 14 Sep 2011 19:24:27 +0000 (21:24 +0200)]
ath9k: do not insert padding into tx buffers on AR9380+

With the new EDMA descriptor format, a single descriptor can contain up
to four buffer pointers. By splitting the buffer into two parts, we can
let the hardware add the padding internally instead of using memmove on
the skb data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: optimize ath_tx_rc_status usage
Felix Fietkau [Wed, 14 Sep 2011 19:24:26 +0000 (21:24 +0200)]
ath9k: optimize ath_tx_rc_status usage

The only flag that needs to be set when ath_tx_rc_status is called with
rc_update == false is the IEEE80211_TX_STAT_TX_FILTERED flag. All other
data is ignored in that case.
This flag can be set from ath_tx_complete_buf instead, so that we can
drop a few redundant calls to ath_tx_rc_status and remove the rc_update
function parameter

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove a redundant check in ath_tx_form_aggr
Felix Fietkau [Wed, 14 Sep 2011 19:24:25 +0000 (21:24 +0200)]
ath9k: remove a redundant check in ath_tx_form_aggr

ath_lookup_legacy now checks all the tx rate flags for MCS vs legacy

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: optimize ath9k_ps_restore
Felix Fietkau [Wed, 14 Sep 2011 19:24:24 +0000 (21:24 +0200)]
ath9k: optimize ath9k_ps_restore

ath_hw_cycle_counters_update only needs to be called if the power state
changes. Most of the time this does not happen, even when ps_usecount
goes down to 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: remove the old tx descriptor API
Felix Fietkau [Wed, 14 Sep 2011 19:24:23 +0000 (21:24 +0200)]
ath9k_hw: remove the old tx descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: use the new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:22 +0000 (21:24 +0200)]
ath9k: use the new API for setting tx descriptors

With the new API, tx descriptors can be written in one single pass
instead of having to re-read and rewrite fields from multiple places.
This makes the code easier to read and also slightly improves performance
on embedded MIPS hardware.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: add a new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:21 +0000 (21:24 +0200)]
ath9k_hw: add a new API for setting tx descriptors

Instead of using lots of different functions with long argument lists,
pull all the necessary information from one struct. This makes the code
easier to read and eliminates the need for copying data between multiple
linked descriptors.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc
Felix Fietkau [Wed, 14 Sep 2011 19:24:20 +0000 (21:24 +0200)]
ath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc

Reduces the number of accesses to uncached descriptor memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: call ath9k_hw_set_desc_link for beacon descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:19 +0000 (21:24 +0200)]
ath9k: call ath9k_hw_set_desc_link for beacon descriptors

This ensures that only ath9k_hw_set_desc_link needs to recalculate the tx
descriptor checksum on AR9380+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: move ath_buf_set_rate to remove a forward declaration
Felix Fietkau [Wed, 14 Sep 2011 19:24:18 +0000 (21:24 +0200)]
ath9k: move ath_buf_set_rate to remove a forward declaration

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: reduce the number of functions that access the tx descriptor
Felix Fietkau [Wed, 14 Sep 2011 19:24:17 +0000 (21:24 +0200)]
ath9k: reduce the number of functions that access the tx descriptor

Makes it easier to clean up the ath9k_hw descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags
Felix Fietkau [Wed, 14 Sep 2011 19:24:16 +0000 (21:24 +0200)]
ath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: ensure that rx is not enabled during a reset
Felix Fietkau [Wed, 14 Sep 2011 19:23:03 +0000 (21:23 +0200)]
ath9k: ensure that rx is not enabled during a reset

During a reset, rx buffers are flushed after rx has been disabled. To avoid
race conditions, rx needs to stay disabled during the reset, so avoid any
calls to ath9k_hw_rxena in that case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: make beacon timer initialization more reliable
Felix Fietkau [Wed, 14 Sep 2011 19:23:02 +0000 (21:23 +0200)]
ath9k: make beacon timer initialization more reliable

When starting the AP beacon timer, it assumes that the TSF has recently
been cleared. Set the SC_OP_TSF_RESET flag to ensure that this is always
the case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: fix enabling interrupts after a hardware error interrupt
Felix Fietkau [Wed, 14 Sep 2011 19:23:01 +0000 (21:23 +0200)]
ath9k: fix enabling interrupts after a hardware error interrupt

The interrupt handler increases the interrupt disable refcount, so the
tasklet needs to always call ath9k_hw_enable_interrupts.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Fix PS wrappers and enabling LED
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:40 +0000 (15:09 +0530)]
ath9k: Fix PS wrappers and enabling LED

in ath_pci_resume it seems we are not enabling LED properly, in addition
we have a PS wrapper fix for this

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: enable LED pin for AR946/8x chipsets
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:13 +0000 (15:09 +0530)]
ath9k: enable LED pin for AR946/8x chipsets

now the LED starts working for AR946/8x chipsets

Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Do full chip reset on 11A channels for AR9003
Rajkumar Manoharan [Wed, 14 Sep 2011 08:50:30 +0000 (14:20 +0530)]
ath9k_hw: Do full chip reset on 11A channels for AR9003

AR9003 seems to have issues sometimes with fast channel change
in 5GHz and this case is handled specifically for AR9280 by doing
a full reset. Let's do a full reset for 5GHz channles of AR9380
& for all channels of AR9280 pci chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: move register definitions to header files
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:19 +0000 (22:38 +0530)]
ath9k_hw: move register definitions to header files

Move the register macros to appropriate header files to be in
sync with other register definitions and also a single place
to refer everything.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add support for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:18 +0000 (22:38 +0530)]
ath9k_hw: Add support for AR946/8x chipsets.

This patch adds support for AR946/8x chipets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Split tx/rx gain table initval handling
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:17 +0000 (22:38 +0530)]
ath9k_hw: Split tx/rx gain table initval handling

Split tx/rx gain table initval hanlding part so readability
is better and easy to manage the code.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Add initvals and register definitions for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:16 +0000 (22:38 +0530)]
ath9k_hw: Add initvals and register definitions for AR946/8x chipsets.

Add initvals and register modifications required to support AR946/8x chipsets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agonl80211/cfg80211/mac80211: fix wme docs
Eliad Peller [Sun, 11 Sep 2011 06:46:55 +0000 (09:46 +0300)]
nl80211/cfg80211/mac80211: fix wme docs

Add/fix some missing docs.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Fri, 16 Sep 2011 20:20:43 +0000 (16:20 -0400)]
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

12 years agolibertas: prioritize usb8388_olpc.bin firmware on OLPC machines
Andres Salomon [Fri, 9 Sep 2011 00:35:17 +0000 (17:35 -0700)]
libertas: prioritize usb8388_olpc.bin firmware on OLPC machines

Normally, the v9 firmware will be loaded if it's available.  However, on
OLPC XO-1 machines, the olpc-specific firmware supports extra functionality.
This makes the libertas driver attempt to load the custom firmware first
if the machine is an OLPC machine; if that fails (or it's not an OLPC
machine), fall back to attempting to load the other firmwares.

usb8388_olpc.bin is currently found in the linux-firmware repository.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agowireless: fix kernel-doc warning in net/cfg80211.h
Randy Dunlap [Thu, 8 Sep 2011 17:16:50 +0000 (10:16 -0700)]
wireless: fix kernel-doc warning in net/cfg80211.h

Fix kernel-doc warning in net/cfg80211.h:

Warning(include/net/cfg80211.h:1884): No description found for parameter 'registered'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Use the available helper functions to initialize the WCID table
Helmut Schaa [Thu, 8 Sep 2011 12:39:04 +0000 (14:39 +0200)]
rt2x00: Use the available helper functions to initialize the WCID table

Use rt2800_config_wcid and rt2800_delete_wcid_attr to initialize the
WCID table instead of writing to the registers directly.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Forbid aggregation for STAs not programmed into the hw
Helmut Schaa [Thu, 8 Sep 2011 12:38:36 +0000 (14:38 +0200)]
rt2x00: Forbid aggregation for STAs not programmed into the hw

If a STA is not known by the hw (i.e. has no WCID assigned) don't allow
aggregation since this might mess up tx status reports and we won't be
able to distinguish the reports of multiple WCID-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Make use of sta_add/remove callbacks in rt2800
Helmut Schaa [Thu, 8 Sep 2011 12:38:01 +0000 (14:38 +0200)]
rt2x00: Make use of sta_add/remove callbacks in rt2800

This allows us to assign a WCID to each STA even for STAs without
crypto key.

To achieve this search for an unused WCID in the HW WCID table and
assign it to the according STA. When configuring a pairwise key for this
STA we don't need to write the MAC address and BSSIDX anymore but just
update the crypto related fields in the WCID_ATTR table.

This has two advantages:

1) Setting a new key for an already available STA (PTK rekeying) is
slightly less expensive and should improve performance in situations
where a lot of rekeying happens (e.g. a huge number of stations and/or
a small rekeying interval)

2) The TXWI now gets a WCID assigned for unencrypted frames which will
be reflected in the corresponding tx status report. This should make tx
status reports in unencrypted AP mode more reliable as we can
distinguish between multiple key-less STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add WCID to HT TX descriptor
Helmut Schaa [Thu, 8 Sep 2011 12:37:19 +0000 (14:37 +0200)]
rt2x00: Add WCID to HT TX descriptor

When sending an unencrypted frame to a STA the driver might want to pass
a suitable WCID since we don't have a key index to allow tx status
reports to get properly assigned to the correct STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add WCID to crypto struct
Helmut Schaa [Thu, 8 Sep 2011 12:36:45 +0000 (14:36 +0200)]
rt2x00: Add WCID to crypto struct

When a WCID was already assigned to a STA the key configuration
functions need to use the same WCID for configuring the keys. Hence, add
the WCID to the crypo configuration structure.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Introduce sta_add/remove callbacks
Helmut Schaa [Thu, 8 Sep 2011 12:36:04 +0000 (14:36 +0200)]
rt2x00: Introduce sta_add/remove callbacks

This implements a basic sta_add and sta_remove callback. Introduce a new
structure rt2x00_sta and ask mac80211 to allocate it as private part of
its ieee80211_sta. rt2x00_sta only contains the WCID for now.

The sta_add callback allows the driver to assign a WCID to a station
that is currently being added. The same wcid is also passed to the
sta_remove callback one mac80211 removes this STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Move bssidx calculation into its own function
Helmut Schaa [Thu, 8 Sep 2011 12:34:22 +0000 (14:34 +0200)]
rt2x00: Move bssidx calculation into its own function

This will be used by a later patch. No functional changes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Update device channel in case of HW channel switch supported
Shahar Levi [Thu, 8 Sep 2011 05:44:05 +0000 (08:44 +0300)]
mac80211: Update device channel in case of HW channel switch supported

The hw.conf.channel value is not updated properly for drivers that
support HW channel switch.  Since the switch is done entirely by the
driver and we don't call ieee80211_hw_config(), this value remains
untouched.  This patch fixes that by setting the new channel directly in
ieee80211_chswitch_work().

Signed-off-by: Shahar Levi <shahar_levi@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Mark all mesh stations as QoS capable
Javier Cardona [Thu, 8 Sep 2011 00:49:54 +0000 (17:49 -0700)]
mac80211: Mark all mesh stations as QoS capable

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Mesh data frames must have the QoS header
Javier Cardona [Thu, 8 Sep 2011 00:49:53 +0000 (17:49 -0700)]
mac80211: Mesh data frames must have the QoS header

Per sec 7.1.3.5 of draft 12.0 of 802.11s, mesh frames indicate the
presence of the mesh control header in their QoS header.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: Start implementing QoS support for mesh interfaces
Javier Cardona [Thu, 8 Sep 2011 00:49:52 +0000 (17:49 -0700)]
mac80211: Start implementing QoS support for mesh interfaces

In order to support QoS in mesh, we need to assign queue mapping only
after the next hop has been resolved, both for forwarded and locally
originated frames.  Also, now that this is fixed, remove the XXX comment
in ieee80211_select_queue().

Also, V-Shy Ho reported that the queue mapping was not being applied to
the forwarded frame (fwd_skb instead of skb).  Fixed that as well.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Avoid unnecessary uncached
Helmut Schaa [Wed, 7 Sep 2011 18:11:26 +0000 (20:11 +0200)]
rt2x00: Avoid unnecessary uncached

Reading the TX desciptor words from coherent memory is always uncached
and potentially slow. Hence, don't read the TX descriptor prior to
writing it since we update all fields anyway.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Update some TX descriptor
Helmut Schaa [Wed, 7 Sep 2011 18:11:03 +0000 (20:11 +0200)]
rt2x00: Update some TX descriptor

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Remove incorrect led blink
Helmut Schaa [Wed, 7 Sep 2011 18:10:45 +0000 (20:10 +0200)]
rt2x00: Remove incorrect led blink

rt2800 devices are not capable of configuring arbitrary LED on/off
periods. The LED_CFG register fields ON_PERIOD and OFF_PERIOD are only
used by the hw when the LED mode is set to "blink upon TX".

Hence, remove the blink callback. This will result in software emulation
for LED blinking.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Add LED_CFG register description
Helmut Schaa [Wed, 7 Sep 2011 18:10:25 +0000 (20:10 +0200)]
rt2x00: Add LED_CFG register description

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2x00: Minor optimizazion in txdone path
Helmut Schaa [Wed, 7 Sep 2011 18:10:02 +0000 (20:10 +0200)]
rt2x00: Minor optimizazion in txdone path

We can save an indirect function call + some instructions for fetching
the actual function pointer by passing the driver specific txwi pointer
directly from rt2800pci/rt2800usb to rt2800lib instead of using the
rt2800_drv_get_txwi callback.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agocfg80211: verify format of uAPSD information
Johannes Berg [Wed, 7 Sep 2011 09:50:48 +0000 (11:50 +0200)]
cfg80211: verify format of uAPSD information

The format is intended to be like the subfields
in the QoS Info field, verify that is the case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: fix compilation when debug flags is unset
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:25 +0000 (09:31 -0700)]
iwlagn: fix compilation when debug flags is unset

Trivial fixes to allow compilation without warnings when debug
compilation flag isn't set.
Also fix the compilation when debugfs flag isn't set.
Fix a warning: unused priv pointer on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove lines from the wrong place
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:24 +0000 (09:31 -0700)]
iwlagn: remove lines from the wrong place

Few lines for program bt_ch_announce being place in the wrong place. Remove those.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: enable 11n support for "_d" sku
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:23 +0000 (09:31 -0700)]
iwlagn: enable 11n support for "_d" sku

"_d" SKU is 11n enabled device

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: disply queue read/write pointer when stuck
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:22 +0000 (09:31 -0700)]
iwlagn: disply queue read/write pointer when stuck

When driver detect queue stuck, display current read/write pointer before
perform frimware reload.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: iwl-trans.c can't dereference iwl_priv any more
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:21 +0000 (09:31 -0700)]
iwlagn: iwl-trans.c can't dereference iwl_priv any more

This reaches encapsulation for this file. In order to reach this:
 * move priv->valid_context to iwl_shared
 * move the last_rejected initialization to the upper layer
 * define a wrapper iwl_nic_config in the upper layer that calls to
   cfg->lib->ops->nic_config

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: move traffic_log back to upper layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:20 +0000 (09:31 -0700)]
iwlagn: move traffic_log back to upper layer

The traffic log debugfs handlers were mistakenly moved to the
transport layer because they print the pointers of the Tx / Rx
queues. The pointers of the queues can be fetched by another debugfs
handler.
So bring the traffic log back to the upper layer and remove the part
that reads the Tx / Rx queues' pointers.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: clean up of transport layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:19 +0000 (09:31 -0700)]
iwlagn: clean up of transport layer

Move a few declarations needed by the transport layer to iwl-shared.h
Move iwl_cmd_meta, iwl_tx_queue and friends to the internal transport
header file.
Move iwl_device_cmd iwl_host_cmd and friends to iwl-trans.h since
these structs are used in the API to the transport layer.
Move get_cmd_string to the upper layer with a declaration in
iwl-shared.h.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: remove priv dereferences from the transport layer
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:18 +0000 (09:31 -0700)]
iwlagn: remove priv dereferences from the transport layer

Another round of clean up on the transport layer.
Define a wrapper around wiphy_rfkill_set_hw_state to prevent the
transport layer from accessing priv->hw.
Also move wait_command_queue to the transport layer.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: merge iwl_pci_down and iwl_pci_remove
Emmanuel Grumbach [Tue, 6 Sep 2011 16:31:17 +0000 (09:31 -0700)]
iwlagn: merge iwl_pci_down and iwl_pci_remove

The latter was the only place that called the first. The two
functions were split when the iwl_pci_probe called iwl_pci_down
upon failure in the probe. Since iwl_pci_probe undoes its work by
itself, there is no need to split between iwl_pci_down, and
iwl_pci_remove.

Thanks to Pavel Roskin for pointing that out.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlagn: only perform necessary calibration at init time
Wey-Yi Guy [Tue, 6 Sep 2011 16:31:16 +0000 (09:31 -0700)]
iwlagn: only perform necessary calibration at init time

During init time, only the necessary calibration should be performed. This
not only save time, also avoid uCode crash because lack of necessary information.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k_hw: Fix magnitude/phase average in TxIQ Calibration
Rajkumar Manoharan [Tue, 6 Sep 2011 16:29:51 +0000 (21:59 +0530)]
ath9k_hw: Fix magnitude/phase average in TxIQ Calibration

The commit "ath9k_hw: Fix Tx IQ Calibration hang issue in
AR9003 chips" did not consider more than one potential sample
while calculating magnitude/phase average if more than one
sample has the same value which could affect post-processing
of outlier detection that causes an undesirable Tx IQ
correction value will be assigned to tx gain settings where
outlier happens.

Cc: Kai Shi <kaishi@qca.qualcomm.com>
Reported-by: Paul Stewart <pstew@google.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Paul Stewart <pstew@google.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Move cycle conters under cc_lock
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:07 +0000 (21:00 +0530)]
ath9k: Move cycle conters under cc_lock

This patch protects cycle counters access by cc_lock
and also prints current sample index.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: Take the samples in unassociated state
Rajkumar Manoharan [Tue, 6 Sep 2011 15:30:06 +0000 (21:00 +0530)]
ath9k: Take the samples in unassociated state

Currently the samples debugfs which maintains the snapshorts of
mac/bb only on associated state. Hence to cover issues on idle
state, the samples are taken whenever the driver is ready.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: further optimise buffer expiry timer
Johannes Berg [Tue, 6 Sep 2011 12:13:06 +0000 (14:13 +0200)]
mac80211: further optimise buffer expiry timer

Juuso optimised the timer to not run all the
time in commit 3393a608c4979a94d1887efc05b7.
However, after that it will still run once
more even if all frames just expired. Fixing
that also makes the function return value a
little clearer in the process.

Also, while at it, change the return value
to bool (instead of int).

Cc: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: implement few random missing ops
Rafał Miłecki [Sun, 4 Sep 2011 21:23:53 +0000 (23:23 +0200)]
b43: N-PHY: implement few random missing ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: split workarounds into per-PHY-ver functions
Rafał Miłecki [Sun, 4 Sep 2011 21:23:52 +0000 (23:23 +0200)]
b43: N-PHY: split workarounds into per-PHY-ver functions

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: replace some hacks with nice tables ops
Rafał Miłecki [Sun, 4 Sep 2011 21:23:51 +0000 (23:23 +0200)]
b43: N-PHY: replace some hacks with nice tables ops

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: N-PHY: use helper for checking IPA
Rafał Miłecki [Sun, 4 Sep 2011 21:18:22 +0000 (23:18 +0200)]
b43: N-PHY: use helper for checking IPA

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agomac80211: add ssid config to bss information in AP-mode
Arik Nemtsov [Sun, 4 Sep 2011 08:11:32 +0000 (11:11 +0300)]
mac80211: add ssid config to bss information in AP-mode

Set SSID information from nl80211 beacon parameters. Advertise changes
in SSID to low level drivers.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: LCN-PHY: load TX gain table on init
Rafał Miłecki [Sun, 4 Sep 2011 07:11:46 +0000 (09:11 +0200)]
b43: LCN-PHY: load TX gain table on init

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: add my copyrights and myself as the module author
Rafał Miłecki [Sat, 3 Sep 2011 19:01:02 +0000 (21:01 +0200)]
b43: add my copyrights and myself as the module author

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agob43: drop Copyright for not really copyrightable info
Rafał Miłecki [Sat, 3 Sep 2011 19:01:01 +0000 (21:01 +0200)]
b43: drop Copyright for not really copyrightable info

As discussed in "Licensing wlc_phy_radio.h and brcm80211" (Message-ID:
<AANLkTinQMRGkOvi4e4JMsHGV_BF_4Rf5oHCtZgQjwQ1g@mail.gmail.com>) content
of that file is not copyrightable, just names and numbers.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agominstrel_ht: fix Open BA session request floods
Christian Lamparter [Sat, 3 Sep 2011 07:06:20 +0000 (09:06 +0200)]
minstrel_ht: fix Open BA session request floods

Minstrel HT tries very hard to establish a BA session with
each peer once there's some data on the way. However the
stack does not inform minstrel if an aggregation session
is already in place, so it keeps trying and wastes good
cycles in the tx status path.

[ 8149.946393] Open BA session requested for $AP tid 0
[ 8150.048765] Open BA session requested for $AP tid 0
[ 8150.174509] Open BA session requested for $AP tid 0
[ 8150.274376] Open BA session requested for $AP tid 0
...

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: implement .get_antenna and .set_antenna
Felix Fietkau [Fri, 2 Sep 2011 23:40:27 +0000 (01:40 +0200)]
ath9k: implement .get_antenna and .set_antenna

On MIMO chips this can be used to enable/disable hardware chains, ensuring
that the MCS information is updated accordingly.
On non-MIMO chips with rx diversity (e.g. 9285), this configures the rx
input antenna.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: merge reset related functions
Felix Fietkau [Fri, 2 Sep 2011 23:40:26 +0000 (01:40 +0200)]
ath9k: merge reset related functions

reduces unnecessary code duplication. Also takes the sc_pcu_lock within
ath_reset instead of callsites, which makes it possible to always cancel
all queued work items before the reset, possibly fixing a few race
conditions (work items vs reset) along with it.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: always call ath_reset from workqueue context
Felix Fietkau [Fri, 2 Sep 2011 23:40:25 +0000 (01:40 +0200)]
ath9k: always call ath_reset from workqueue context

This makes it much easier to add further rework to avoid race conditions
between reset and other work items.
Move other functions to make ath_reset static.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoath9k: move a few functions around
Felix Fietkau [Fri, 2 Sep 2011 23:40:24 +0000 (01:40 +0200)]
ath9k: move a few functions around

Helps with making ath_reset static in the next commit

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>