]> Pileus Git - ~andy/linux/log
~andy/linux
13 years agoath9k: clean up code duplication around ath_tx_start
Felix Fietkau [Sun, 14 Nov 2010 14:20:10 +0000 (15:20 +0100)]
ath9k: clean up code duplication around ath_tx_start

Merge initial processing for the CAB queue and regular tx.
Also move ath_tx_cabq() to beacon.c and make it static.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bf_tx_aborted from struct ath_buf
Felix Fietkau [Sun, 14 Nov 2010 14:20:09 +0000 (15:20 +0100)]
ath9k: remove bf_tx_aborted from struct ath_buf

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_frmlen from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:08 +0000 (15:20 +0100)]
ath9k: remove bfs_frmlen from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_nframes from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:07 +0000 (15:20 +0100)]
ath9k: remove bfs_nframes from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_al from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:06 +0000 (15:20 +0100)]
ath9k: remove bfs_al from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_keyix from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:05 +0000 (15:20 +0100)]
ath9k: remove bfs_keyix from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_paprd_timestamp from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:04 +0000 (15:20 +0100)]
ath9k: remove bfs_paprd_timestamp from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_keytype from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:03 +0000 (15:20 +0100)]
ath9k: remove bfs_keytype from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_tidno from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:02 +0000 (15:20 +0100)]
ath9k: remove bfs_tidno from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove bfs_seqno from struct ath_buf_state
Felix Fietkau [Sun, 14 Nov 2010 14:20:01 +0000 (15:20 +0100)]
ath9k: remove bfs_seqno from struct ath_buf_state

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix PA predistortion training frame setup
Felix Fietkau [Sat, 13 Nov 2010 23:03:01 +0000 (00:03 +0100)]
ath9k: fix PA predistortion training frame setup

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: set default values for radar pulse detection
Felix Fietkau [Sat, 13 Nov 2010 19:22:41 +0000 (20:22 +0100)]
ath9k_hw: set default values for radar pulse detection

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Modify rt2x00queue_remove_l2pad to make skb->data two-byte alignment
RA-Jay Hung [Sat, 13 Nov 2010 18:13:53 +0000 (19:13 +0100)]
rt2x00: Modify rt2x00queue_remove_l2pad to make skb->data two-byte alignment

When send out skb data to mac80211, orignal code will cause mac80211
unaligned access, so modify code to make mac80211 can natural access.

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix header_length in rt2x00lib_txdone
RA-Jay Hung [Sat, 13 Nov 2010 18:12:54 +0000 (19:12 +0100)]
rt2x00: Fix header_length in rt2x00lib_txdone

Put the assignment of header_length after pull out extra tx headroom

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Fix rt2800 USB TX Path DMA issue
RA-Jay Hung [Sat, 13 Nov 2010 18:11:46 +0000 (19:11 +0100)]
rt2x00: Fix rt2800 USB TX Path DMA issue

rt2800usb chips need to add 1~3 bytes zero padding after each 802.11 header & payload,
and at the end need to add 4 bytes zero padding whether doing TX bulk aggregation or not,

TXINFO_W0_USB_DMA_TX_PKT_LEN in TXINFO must include 1-3 bytes padding after 802.11 header & payload
but do not include 4 bytes end zero padding.

In rt2800usb_get_tx_data_len do not consider multiple of the USB packet size case, sometimes this will
cause USB DMA problem.

Signed-off-by: RA-Jay Hung <jay_hung@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Use ioremap for SoC devices instead of KSEG1ADDR.
Gertjan van Wingerde [Sat, 13 Nov 2010 18:11:22 +0000 (19:11 +0100)]
rt2x00: Use ioremap for SoC devices instead of KSEG1ADDR.

Make the code a bit more portable to architectures that do not support
KSEG1ADDR.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Tested-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>
13 years agort2x00: Remove unneccessary internal Kconfig symbols.
Gertjan van Wingerde [Sat, 13 Nov 2010 18:10:54 +0000 (19:10 +0100)]
rt2x00: Remove unneccessary internal Kconfig symbols.

CONFIG_RT2800PCI_PCI and CONFIG_RT2800PCI_SOC are strictly not needed
as we can check the dependent symbols directly in the rest of Kconfig
and the code, so clean up the Kconfig namespace a bit.

Signed-off-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>
13 years agort2x00: Remove RT30XX Kconfig variables.
Gertjan van Wingerde [Sat, 13 Nov 2010 18:10:31 +0000 (19:10 +0100)]
rt2x00: Remove RT30XX Kconfig variables.

Enabling of RT30xx devices via Kconfig variables was introduced when these
devices weren't properly supported yet.
Now that that they are properly supported and functional, we can remove these
Kconfig variables for RT30xx devices and simply enable them whenever rt2800pci
and/or rt2800usb is enabled.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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>
13 years agort2x00: Clean up Kconfig for RT2800 devices.
Gertjan van Wingerde [Sat, 13 Nov 2010 18:10:10 +0000 (19:10 +0100)]
rt2x00: Clean up Kconfig for RT2800 devices.

General clean up of the Kconfig part for RT28XX devices.
Also remove the indications of non functional support for rt27xx/rt28xx/rt30xx
devices, as this is no longer true. They just work fine.
Finally, remove the experimental indications for rt27xx/rt28xx/rt30xx devices
as that is no longer true. Keep the experimental indications for rt33xx/rt35xx
devices, though.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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>
13 years agort2x00: Add initial support for RT3370/RT3390 devices.
Gertjan van Wingerde [Sat, 13 Nov 2010 18:09:50 +0000 (19:09 +0100)]
rt2x00: Add initial support for RT3370/RT3390 devices.

Modified from Eddy's patch by adding the RT3370 USB support as well.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Cc: Eddy Tsai <Eddy_Tsai@ralinktech.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2x00: Increase REGISTER_BUSY_COUNT
Ivo van Doorn [Sat, 13 Nov 2010 18:08:14 +0000 (19:08 +0100)]
rt2x00: Increase REGISTER_BUSY_COUNT

For some hardware the REGISTER_BUSY_COUNT isn't sufficient,
increase the REGISTER_BUSY_COUNT to 100 to catch most
devices which have more problems with accessing the registers.

For normal operating devices nothing would change as they will
exit the loop early anyway.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Acked-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Use macro for caldata array size
Mohammed Shafi Shajakhan [Sat, 13 Nov 2010 15:28:27 +0000 (20:58 +0530)]
ath9k_htc: Use macro for caldata array size

The calibration data variable size is based on the number of
channels available in the ath9k driver.

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: kill elapsed_jiffies
Stanislaw Gruszka [Fri, 12 Nov 2010 07:47:07 +0000 (08:47 +0100)]
iwlwifi: kill elapsed_jiffies

Subtract of jiffies is fine even if one variable overwrap.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: simplify iwlagn_tx_skb
Stanislaw Gruszka [Fri, 12 Nov 2010 07:47:06 +0000 (08:47 +0100)]
iwlagn: simplify iwlagn_tx_skb

We can simplify length calculation in iwlagn_tx_skb, that function
is enough complex, without fuzz it more than necessary.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwl3945: remove unused len_org variable
Stanislaw Gruszka [Fri, 12 Nov 2010 07:47:05 +0000 (08:47 +0100)]
iwl3945: remove unused len_org variable

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add support for setting the ad-hoc multicast rate
Felix Fietkau [Thu, 11 Nov 2010 14:07:23 +0000 (15:07 +0100)]
mac80211: add support for setting the ad-hoc multicast rate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add support for setting the ad-hoc multicast rate
Felix Fietkau [Thu, 11 Nov 2010 14:07:22 +0000 (15:07 +0100)]
cfg80211: add support for setting the ad-hoc multicast rate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add function to get probe request template for current AP
Juuso Oikarinen [Thu, 11 Nov 2010 06:50:18 +0000 (08:50 +0200)]
mac80211: Add function to get probe request template for current AP

Chipsets with hardware based connection monitoring need to autonomically
send directed probe-request frames to the AP (in the event of beacon loss,
for example.)

For the hardware to be able to do this, it requires a template for the frame
to transmit to the AP, filled in with the BSSID and SSID of the AP, but also
the supported rate IE's.

This patch adds a function to mac80211, which allows the hardware driver to
fetch this template after association, so it can be configured to the hardware.

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: add a private op for configuring radar pulse detection
Felix Fietkau [Thu, 11 Nov 2010 02:18:38 +0000 (03:18 +0100)]
ath9k_hw: add a private op for configuring radar pulse detection

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: clean up tx buffer setup
Felix Fietkau [Thu, 11 Nov 2010 02:18:37 +0000 (03:18 +0100)]
ath9k: clean up tx buffer setup

Merge ath_tx_send_normal and ath_tx_send_ht_normal.
Move the paprd state initialization and sequence number assignment
to reduce the number of redundant checks.

This not only simplifies buffer allocation error handling, but also
removes a small inconsistency in the buffer HT flag.
This flag should only be set if the frame is also a QoS data frame.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove the tx info padding byte abuse
Felix Fietkau [Thu, 11 Nov 2010 02:18:36 +0000 (03:18 +0100)]
ath9k: remove the tx info padding byte abuse

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: handle tx underrun in the driver instead of rate control
Felix Fietkau [Thu, 11 Nov 2010 02:18:35 +0000 (03:18 +0100)]
ath9k: handle tx underrun in the driver instead of rate control

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove the unnecessary private xretry tx flag
Felix Fietkau [Thu, 11 Nov 2010 02:18:34 +0000 (03:18 +0100)]
ath9k: remove the unnecessary private xretry tx flag

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Cleanup opmode setting logic.
Ben Greear [Wed, 10 Nov 2010 19:43:51 +0000 (11:43 -0800)]
ath5k: Cleanup opmode setting logic.

An earlier review suggested moving the code in a small
method that was only called once inline.  This patch
accomplishes that.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix low throughput issue with AR93xx
Senthil Balasubramanian [Wed, 10 Nov 2010 13:03:16 +0000 (05:03 -0800)]
ath9k_hw: Fix low throughput issue with AR93xx

TX underruns were noticed when RTS/CTS preceded aggregates.
This issue was noticed in ar93xx family of chipsets only.
The workaround involves padding the RTS or CTS length up
to the min packet length of 256 bytes required by the
hardware by adding delimiters to the fist descriptor of
the aggregate.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix bug in delimiter padding computation
Vasanthakumar Thiagarajan [Wed, 10 Nov 2010 13:03:15 +0000 (05:03 -0800)]
ath9k: Fix bug in delimiter padding computation

There is a roundng error in delimiter padding computation
which causes severe throughput drop with some of AR9003.

signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Cc:stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add helper function for interpolation
Vasanthakumar Thiagarajan [Wed, 10 Nov 2010 13:03:14 +0000 (05:03 -0800)]
ath9k_hw: Add helper function for interpolation

Also round off interpolated values this would improve power
accuracy by 0.5dB in some cases.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Improve power control accuracy for AR9003
Vasanthakumar Thiagarajan [Wed, 10 Nov 2010 13:03:13 +0000 (05:03 -0800)]
ath9k_hw: Improve power control accuracy for AR9003

It is done for 5Ghz by adding three temperature slopes.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Enable strong signal detection for AR9003
Vasanthakumar Thiagarajan [Wed, 10 Nov 2010 13:03:12 +0000 (05:03 -0800)]
ath9k_hw: Enable strong signal detection for AR9003

Attenuation from eeprom is configured into attenuator control
register.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix XPABIAS level configuration for AR9003
Vasanthakumar Thiagarajan [Wed, 10 Nov 2010 13:03:11 +0000 (05:03 -0800)]
ath9k_hw: Fix XPABIAS level configuration for AR9003

Improper configuration of 0x16288 and 0x16290 would affect transmission.

Cc:stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: add eeprom templates for ar9003 family chipsets
Senthil Balasubramanian [Wed, 10 Nov 2010 13:03:10 +0000 (05:03 -0800)]
ath9k_hw: add eeprom templates for ar9003 family chipsets

We are currently using the default eeprom default and it doesn't
work properly for all ar9003 family chipsets. So add eeprom
templates for different versisons and select the eeprom table
based on the template version programmed in the eeprom.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix paprd training frame failure.
Senthil Balasubramanian [Wed, 10 Nov 2010 13:03:09 +0000 (05:03 -0800)]
ath9k_hw: Fix paprd training frame failure.

paprd training frame fails in some rates. Fix the rate mask.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Initialize 2GHz CTL properly.
Senthil Balasubramanian [Wed, 10 Nov 2010 13:03:08 +0000 (05:03 -0800)]
ath9k_hw: Initialize 2GHz CTL properly.

The last 2GHz CTL was not being initialized, so power was being
set to 0 instead of 30dbm. Initialize to 30 like other CTLs.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add new member into the eeprom structure.
Senthil Balasubramanian [Wed, 10 Nov 2010 13:03:07 +0000 (05:03 -0800)]
ath9k_hw: Add new member into the eeprom structure.

Add eeprom base extension structures which are needed for
AR938x caliberation changes and gain calculation.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Fix a reset failure on AR9382 (2x2).
Senthil Balasubramanian [Thu, 11 Nov 2010 08:40:33 +0000 (00:40 -0800)]
ath9k_hw: Fix a reset failure on AR9382 (2x2).

AR9382 needs to be configured for the correct chain mask before
running AGC/TxIQ caliberation. Otherwise reset would fail.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath5k: Add support for antenna configuration
Bruno Randolf [Wed, 10 Nov 2010 03:51:01 +0000 (12:51 +0900)]
ath5k: Add support for antenna configuration

Support setting the antenna configuration via cfg/mac80211. At the moment only
allow the simple pre-defined configurations we already have (fixed antenna A/B
or diversity), but more advanced settings are possible to implement.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: Add antenna configuration
Bruno Randolf [Wed, 10 Nov 2010 03:50:56 +0000 (12:50 +0900)]
mac80211: Add antenna configuration

Allow antenna configuration by calling driver's function for it.

We disallow antenna configuration if the wiphy is already running, mainly to
make life easier for 802.11n drivers which need to recalculate HT capabilites.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: Add nl80211 antenna configuration
Bruno Randolf [Wed, 10 Nov 2010 03:50:50 +0000 (12:50 +0900)]
cfg80211: Add nl80211 antenna configuration

Allow setting of TX and RX antennas configuration via nl80211.

The antenna configuration is defined as a bitmap of allowed antennas to use.
This API can be used to mask out antennas which are not attached or should not
be used for other reasons like regulatory concerns or special setups.

Separate bitmaps are used for RX and TX to allow configuring different antennas
for receiving and transmitting. Each bitmap is 32 bit long, each bit
representing one antenna, starting with antenna 1 at the first bit. If an
antenna bit is set, this means the driver is allowed to use this antenna for RX
or TX respectively; if the bit is not set the hardware is not allowed to use
this antenna.

Using bitmaps has the benefit of allowing for a flexible configuration
interface which can support many different configurations and which can be used
for 802.11n as well as non-802.11n devices. Instead of relying on some hardware
specific assumptions, drivers can use this information to know which antennas
are actually attached to the system and derive their capabilities based on
that.

802.11n devices should enable or disable chains, based on which antennas are
present (If all antennas belonging to a particular chain are disabled, the
entire chain should be disabled). HT capabilities (like STBC, TX Beamforming,
Antenna selection) should be calculated based on the available chains after
applying the antenna masks. Should a 802.11n device have diversity antennas
attached to one of their chains, diversity can be enabled or disabled based on
the antenna information.

Non-802.11n drivers can use the antenna masks to select RX and TX antennas and
to enable or disable antenna diversity.

While covering chainmasks for 802.11n and the standard "legacy" modes "fixed
antenna 1", "fixed antenna 2" and "diversity" this API also allows more rare,
but useful configurations as follows:

1) Send on antenna 1, receive on antenna 2 (or vice versa). This can be used to
have a low gain antenna for TX in order to keep within the regulatory
constraints and a high gain antenna for RX in order to receive weaker signals
("speak softly, but listen harder"). This can be useful for building long-shot
outdoor links. Another usage of this setup is having a low-noise pre-amplifier
on antenna 1 and a power amplifier on the other antenna. This way transmit
noise is mostly kept out of the low noise receive channel.
(This would be bitmaps: tx 1 rx 2).

2) Another similar setup is: Use RX diversity on both antennas, but always send
on antenna 1. Again that would allow us to benefit from a higher gain RX
antenna, while staying within the legal limits.
(This would be: tx 0 rx 3).

3) And finally there can be special experimental setups in research and
development even with pre 802.11n hardware where more than 2 antennas are
available. It's good to keep the API simple, yet flexible.

Signed-off-by: Bruno Randolf <br1@einfach.org>
--
v7: Made bitmasks 32 bit wide and rebased to latest wireless-testing.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers/net/wireless/b43legacy/main.c: Use printf extension %pV
Joe Perches [Wed, 10 Nov 2010 00:35:19 +0000 (16:35 -0800)]
drivers/net/wireless/b43legacy/main.c: Use printf extension %pV

Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers/net/wireless/b43/main.c: Use printf extension %pV
Joe Perches [Wed, 10 Nov 2010 00:35:18 +0000 (16:35 -0800)]
drivers/net/wireless/b43/main.c: Use printf extension %pV

Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agodrivers/net/wireless/ath/debug.c: Use printf extension %pV
Joe Perches [Wed, 10 Nov 2010 00:35:17 +0000 (16:35 -0800)]
drivers/net/wireless/ath/debug.c: Use printf extension %pV

Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: workaround poor scanning with BCM4320a
Jussi Kivilinna [Tue, 9 Nov 2010 17:25:56 +0000 (19:25 +0200)]
rndis_wlan: workaround poor scanning with BCM4320a

BCM4320a devices seem to sometimes do scanning pretty poorly. This can be
workaround by issuing new scan every second, while not yet connected. By this
new scanning method device catches beacons much faster. Fixes bug #20822.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agorndis_wlan: workaround device not returning bss for currently connected AP
Jussi Kivilinna [Tue, 9 Nov 2010 17:25:47 +0000 (19:25 +0200)]
rndis_wlan: workaround device not returning bss for currently connected AP

BCM4320a devices do not return bss for currently connected AP in bss-list,
althought this is required by NDIS specs. Missing bss leads to warning at
net/wireless/sme.c:__cfg80211_connect_result(), WARN_ON(!bss).

Workaround this by crafting bss manually with information we can read from
device. Workaround is only used when device bss-list does not return current
bss, and so is only used with BCM4320a devices and not newer BCM4320b ones.

Fixes bug #20152.

Reported-by: Luís Picciochi <Pitxyoki@gmail.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: support hardware TX fragmentation offload
Arik Nemtsov [Mon, 8 Nov 2010 09:51:06 +0000 (11:51 +0200)]
mac80211: support hardware TX fragmentation offload

The lower driver is notified when the fragmentation threshold changes
and upon a reconfig of the interface.

If the driver supports hardware TX fragmentation, don't fragment
packets in the stack.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: return -ENOMEM on alloc fail (instead of CRC check's result)
Rafał Miłecki [Wed, 3 Nov 2010 22:28:45 +0000 (23:28 +0100)]
ssb: return -ENOMEM on alloc fail (instead of CRC check's result)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agossb: workarounds: be verbose about hacking SPROM revision, don't duplicate code
Rafał Miłecki [Wed, 3 Nov 2010 21:06:26 +0000 (22:06 +0100)]
ssb: workarounds: be verbose about hacking SPROM revision, don't duplicate code

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: use const struct fw pointers throughout
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:53 +0000 (17:23 -0800)]
mwl8k: use const struct fw pointers throughout

This eliminates compiler warnings by doing things how the
firmware class expects.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: make initial firmware load asynchronous
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:52 +0000 (17:23 -0800)]
mwl8k: make initial firmware load asynchronous

Introduce a firmware loading state machine to manage the process
of loading firmware asynchronously and completing initialization
upon success.  The state machine attempts to load the preferred
firmware image.  If that fails, and if an alternative firmware
image is available, it will attempt to load that one.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: add API version checking for AP firmware
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:51 +0000 (17:23 -0800)]
mwl8k: add API version checking for AP firmware

The AP firmware specifies an API version in the GET_HW_SPEC
command response.  Currently, the driver only supports AP
firmware for the 8366, and only supports API v1.  In the future,
if higher API version firmwares emerge (possibly for different
chips), different ops can be selected based on the reported API
version.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: choose proper firmware image as directed by user
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:50 +0000 (17:23 -0800)]
mwl8k: choose proper firmware image as directed by user

The mwl8k can operate in AP or STA mode, depending on the
firmware image that is loaded.  By default, STA firmware is
loaded.  Allow the user to override this default mode at
module load time.  This saves an unnecessary firmware reload
for users only interested in AP mode.

Also, the firmware image can be swapped to meet the user's
add_interface request.  For example, suppose the STA
firmware is loaded, no STA interface has been added, and the
user adds an AP interface.  In this case, the AP firmware
will be loaded to meet the request.

Based on contributions from Pradeep Nemavat <pnemavat@marvell.com>,
Yogesh Powar <yogeshp@marvell.com>, and
Lennert Buytenhek <buytenh@wantstofly.org>.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: factor out firmware loading and hw init code
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:49 +0000 (17:23 -0800)]
mwl8k: factor out firmware loading and hw init code

This is in preparation for supporting different fw images for
different interface types, and for supporting asynchronous
firmware loading.

Based on a patch from Pradeep Nemavat <pnemavat@marvell.com>
and Yogesh Powar <yogeshp@marvell.com>

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: rf_tx_power cmd not supported by AP firmware APIv1
Nishant Sarmukadam [Sat, 13 Nov 2010 01:23:48 +0000 (17:23 -0800)]
mwl8k: rf_tx_power cmd not supported by AP firmware APIv1

APIv1 AP firmware does not support the RF_TX_POWER command.  It
supports the similar TX_POWER command.

Signed-off-by: Pradeep Nemavat <pnemavat@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomwl8k: revert unnecessary modification of tx descriptor
Brian Cavagnolo [Sat, 13 Nov 2010 01:23:47 +0000 (17:23 -0800)]
mwl8k: revert unnecessary modification of tx descriptor

This reverts change 783391c443728febc669e40597193308460e7b4f.
The stabilized AP v1 firmware uses the same tx descriptor as
the STA firmware.

Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: EHS_REMOVE_WAKEUP is not always supported
Deepak Saxena [Sun, 31 Oct 2010 13:40:33 +0000 (13:40 +0000)]
libertas: EHS_REMOVE_WAKEUP is not always supported

Certain firmware versions, particularly the 8388 found on the XO-1,
do not support the EHS_REMOVE_WAKEUP command that is used to disable
WOL. Sending this command to the card will return a failure that
would get propagated up the stack and cause suspend to fail.

Instead, fall back to an all-zero wakeup mask.

This fixes http://dev.laptop.org/ticket/9967

Signed-off-by: Deepak Saxena <dsaxena@laptop.org>
Signed-off-by: Daniel Drake <dsd@laptop.org>
[includes fixups by Paul Fox]
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agolibertas: don't block usb8388 suspend if no wakeup conditions are set
Daniel Drake [Sun, 31 Oct 2010 13:40:12 +0000 (13:40 +0000)]
libertas: don't block usb8388 suspend if no wakeup conditions are set

This hunk added by commit 66fceb69b72f seems erroneous. We don't want to
prevent suspend of the whole system if no wakeup params are set.

In the case of the usb8388 we do want to keep the card powered up even
if there are no wakeup params. This is because it will continue acting
as a mesh node.

If the mesh is disabled, it would indeed make more sense to power down
the card during suspend, as the equivalent hunk does for the SD interface.
But that's a separate task; for now just restore the previous behaviour.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix extension channel checks to initiate communication
Luis R. Rodriguez [Sat, 13 Nov 2010 00:31:23 +0000 (16:31 -0800)]
cfg80211: fix extension channel checks to initiate communication

When operating in a mode that initiates communication and using
HT40 we should fail if we cannot use both primary and secondary
channels to initiate communication. Our current ht40 allowmap
only covers STA mode of operation, for beaconing modes we need
a check on the fly as the mode of operation is dynamic and
there other flags other than disable which we should read
to check if we can initiate communication.

Do not allow for initiating communication if our secondary HT40
channel has is either disabled, has a passive scan flag, a
no-ibss flag or is a radar channel. Userspace now has similar
checks but this is also needed in-kernel.

Reported-by: Jouni Malinen <jouni.malinen@atheros.com>
Cc: stable@kernel.org
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Set proper eeprom offset for AR9287 HTC devices
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:26 +0000 (17:51 +0530)]
ath9k_hw: Set proper eeprom offset for AR9287 HTC devices

AR9287 based PCI & USB devices are differed in eeprom start offset.
So set proper the offset for HTC devices to read nvram correctly.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Add new devices into AR7010
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:25 +0000 (17:51 +0530)]
ath9k_htc: Add new devices into AR7010

Treat new PIDs (0xA704, 0x1200) as AR7010 devices.

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Update usb device ID list
Rajkumar Manoharan [Wed, 10 Nov 2010 12:21:24 +0000 (17:51 +0530)]
ath9k_htc: Update usb device ID list

Added new VID/PIDs into supported devices list

Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Remove pm_qos request after hw unregister.
Vivek Natarajan [Wed, 10 Nov 2010 09:41:07 +0000 (15:11 +0530)]
ath9k: Remove pm_qos request after hw unregister.

Update pm_qos before removing it in deinit_device to prevent this
warning:

pm_qos_update_request() called for unknown object.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: set STATUS_READY before commit_rxon
Wey-Yi Guy [Fri, 12 Nov 2010 21:52:37 +0000 (13:52 -0800)]
iwlwifi: set STATUS_READY before commit_rxon

Have the STATUS_READY bit set before commit_rxon call to avoid fail
to send tx power to uCode.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: check change before commit RXON cmd
Shanyu Zhao [Fri, 12 Nov 2010 21:48:13 +0000 (13:48 -0800)]
iwlagn: check change before commit RXON cmd

When setting rxon chain and filter, no need to commit RXON when the
chain flag is not changed. This reduces the number of RXON commands
we send down to uCode.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: use SKU information in the EEPROM
Wey-Yi Guy [Wed, 10 Nov 2010 21:32:59 +0000 (13:32 -0800)]
iwlagn: use SKU information in the EEPROM

EEPROM contain the SKU information for the device, use it.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: update QoS before commit associated RXON
Shanyu Zhao [Thu, 11 Nov 2010 02:25:58 +0000 (18:25 -0800)]
iwlagn: update QoS before commit associated RXON

RXON command without association bit can clear the QoS info in the
uCode. Therefore, before sending the associated RXON, we need to
send the QoS command just in case.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: fix PAN slot timing wrt. DTIM
Johannes Berg [Thu, 11 Nov 2010 02:25:49 +0000 (18:25 -0800)]
iwlagn: fix PAN slot timing wrt. DTIM

When the DTIM is not 1, then the slot timing is in
some cases required to be calclulated based on the
DTIM interval instead of the beacon interval, fix
that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: reprogram AP STA after assoc
Johannes Berg [Thu, 11 Nov 2010 02:25:48 +0000 (18:25 -0800)]
iwlagn: reprogram AP STA after assoc

Instead of unconditionally sending unassoc RXON,
before any assoc RXON, re-send only the AP STA
entry which is required after the BSSID has been
programmed into the device to set up internal
filters in the microcode properly.

This fixes some issues that we correlated with
sending a lot of RXON commands to the device.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: avoid crash if vif is not assigned
Johannes Berg [Thu, 11 Nov 2010 02:25:47 +0000 (18:25 -0800)]
iwlagn: avoid crash if vif is not assigned

For reasons that aren't entirely clear to me,
we sometimes get here during hardware reset
without the interface being set. Don't crash,
but keep a warning.

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 PAN queues
Johannes Berg [Thu, 11 Nov 2010 02:25:46 +0000 (18:25 -0800)]
iwlagn: fix PAN queues

Currently, when a PAN queue needs to be
stopped, we erroneously stop queue number 5
(for example) with mac80211 -- which doesn't
even exist!

To avoid that problem, recalculate the swq_id
for all queues when setting up the queues,
and don't use the default identity mapping
that is acceptable for devices which don't
support PAN.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: always build swq_id as virtual queue ID
Johannes Berg [Thu, 11 Nov 2010 02:25:45 +0000 (18:25 -0800)]
iwlwifi: always build swq_id as virtual queue ID

Previously, we used the swq_id's mechanism
to have AC and HW queue different only for
aggregation queues. To be able to fix a bug
with iPAN simply always build the swq_id as
ac | (hwq << 2) and remove the flag bit.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: pass txq to wake/stop queue
Johannes Berg [Thu, 11 Nov 2010 02:25:44 +0000 (18:25 -0800)]
iwlwifi: pass txq to wake/stop queue

Instead of passing the txq->swq_id, pass the
txq struct directly to make sure that in the
future nobody will pass an invalid number.
Only three places actually change from using
the txq_id or the skb's queue_mapping to now
using txq->swq_id as well.

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 a bogus AGG_OFF check
Johannes Berg [Thu, 11 Nov 2010 02:25:43 +0000 (18:25 -0800)]
iwlagn: remove a bogus AGG_OFF check

Even if this check were to happen, using the
txq_id here (which is a HW queue) would lead
to confusion in mac80211. Luckily, it doesn't
seem like this can ever happen.

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 unused variable swq_id
Johannes Berg [Thu, 11 Nov 2010 02:25:42 +0000 (18:25 -0800)]
iwlagn: remove unused variable swq_id

Simply remove the unused variable swq_id.

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 some naming regarding FIFOs
Johannes Berg [Thu, 11 Nov 2010 02:25:41 +0000 (18:25 -0800)]
iwlagn: fix some naming regarding FIFOs

Some variables are misnamed in the FIFO setup
code, fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlwifi: change default led mode for different devices
Wey-Yi Guy [Tue, 9 Nov 2010 17:21:34 +0000 (09:21 -0800)]
iwlwifi: change default led mode for different devices

Set the default led mode for different devices.

For the newer devices such as 6000g2a, 6000g2b and newer,
the default led mode is On/Off instead of blinking.

The led_mode still can be control through module parameter
  0: system default
  1: On/Off
  2: blinking

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: change default ACK/CTS MASK setting for WiFi/BT coex
Wey-Yi Guy [Mon, 8 Nov 2010 20:37:20 +0000 (12:37 -0800)]
iwlagn: change default ACK/CTS MASK setting for WiFi/BT coex

Change the default BT_KILL_ACK_MASK and BT_KILL_CTS_MASK for BT coex

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: support dynamic aggregation for BT coex
Wey-Yi Guy [Mon, 8 Nov 2010 22:54:37 +0000 (14:54 -0800)]
iwlagn: support dynamic aggregation for BT coex

Use dynamic aggregation threshold if bt traffic load is high
to reduce the impact on aggregated frame.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: set dynamic aggregation threshold for BT
Wey-Yi Guy [Mon, 8 Nov 2010 22:55:43 +0000 (14:55 -0800)]
iwlagn: set dynamic aggregation threshold for BT

Setting the max/min/def value for BT dynamic aggregation threshold.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agoiwlagn: used frame count info in compressed ba packet
Wey-Yi Guy [Wed, 10 Nov 2010 19:05:38 +0000 (11:05 -0800)]
iwlagn: used frame count info in compressed ba packet

For newer devices, uCode provide both "number of frames sent"
and "number of frames acked" information inside the compressed_ba
packet. So instead of figure the success/failure information through
the bitmap, use those information which is much betrer approach.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
13 years agocarl9170: fix usb anchor wait timeout
Christian Lamparter [Mon, 15 Nov 2010 14:11:26 +0000 (15:11 +0100)]
carl9170: fix usb anchor wait timeout

usb_wait_anchor_empty_timeout's @timeout
wants milliseconds and not jiffies.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: fix WIPHY_FLAG_IBSS_RSN bit
Jussi Kivilinna [Fri, 12 Nov 2010 06:53:56 +0000 (08:53 +0200)]
cfg80211: fix WIPHY_FLAG_IBSS_RSN bit

WIPHY_FLAG_IBSS_RSN is BIT(7) as is WIPHY_FLAG_CONTROL_PORT_PROTOCOL. Change
to BIT(8).

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43legacy: Fix compile on ARM architecture
Arnd Hannemann [Thu, 11 Nov 2010 17:44:32 +0000 (11:44 -0600)]
b43legacy: Fix compile on ARM architecture

When b43legacy is compiled on the arm platform, the following errors are seen:

  CC [M]  drivers/net/wireless/b43legacy/xmit.o
In file included from include/net/dst.h:11,
from drivers/net/wireless/b43legacy/xmit.c:31:
include/net/dst_ops.h:28: error: expected ':', ',', ';', '}' or '__attribute__'
   before '____cacheline_aligned_in_smp'
include/net/dst_ops.h: In function 'dst_entries_get_fast':
include/net/dst_ops.h:33: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_get_slow':
include/net/dst_ops.h:41: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_add':
include/net/dst_ops.h:49: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_init':
include/net/dst_ops.h:55: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
include/net/dst_ops.h: In function 'dst_entries_destroy':
include/net/dst_ops.h:60: error: 'struct dst_ops' has no member named
   'pcpuc_entries'
make[4]: *** [drivers/net/wireless/b43legacy/xmit.o] Error 1
make[3]: *** [drivers/net/wireless/b43legacy] Error 2
make[2]: *** [drivers/net/wireless] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

The cause is a missing include of <linux/cache.h>, which is present for
i386 and x86_64 architectures, but not for arm.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocarl9170: use generic sign_extend32 master-2010-11-15
Christian Lamparter [Fri, 29 Oct 2010 21:11:23 +0000 (23:11 +0200)]
carl9170: use generic sign_extend32

This patch replaces the handcrafted
sign extension cruft with a generic
bitop function.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agobitops: Provide generic sign_extend32 function
Andreas Herrmann [Mon, 30 Aug 2010 19:04:01 +0000 (19:04 +0000)]
bitops: Provide generic sign_extend32 function

This patch moves code out from wireless drivers where two different
functions are defined in three code locations for the same purpose and
provides a common function to sign extend a 32-bit value.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: use wl12xx_platform_data to pass data
Grazvydas Ignotas [Wed, 3 Nov 2010 22:13:49 +0000 (00:13 +0200)]
wl1251: use wl12xx_platform_data to pass data

Make use the newly added method to pass platform data for wl1251 too.
This allows to eliminate some redundant code.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Acked-by: Luciano Coelho <luciano.coelho@nokia.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: add runtime PM support for SDIO
Grazvydas Ignotas [Mon, 8 Nov 2010 13:29:36 +0000 (15:29 +0200)]
wl1251: add runtime PM support for SDIO

Add runtime PM support, similar to how it's done for wl1271.
This allows to power down the card when the driver is loaded but
network is not in use.

Cc: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowl1251: add power callback to wl1251_if_operations
Grazvydas Ignotas [Wed, 3 Nov 2010 22:13:47 +0000 (00:13 +0200)]
wl1251: add power callback to wl1251_if_operations

Call interface specific power callback before calling board specific
one. Also allow that callback to fail. This is how it's done for
wl1271 and will be used for runtime_pm support.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: enable shadow register
Wey-Yi Guy [Wed, 10 Nov 2010 17:56:50 +0000 (09:56 -0800)]
iwlagn: enable shadow register

For 6000 series devices and up, enable automatic update MAC's register
for better power usage in PSP mode

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: disable disconnected antenna for advanced bt coex
Shanyu Zhao [Wed, 10 Nov 2010 17:56:49 +0000 (09:56 -0800)]
iwlwifi: disable disconnected antenna for advanced bt coex

Disconnected antenna algorithm is used to find out which antennas are
disconnected. It should be disabled for devices that support advanced
bluetooth coexist.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: seperate disconnected antenna function
Shanyu Zhao [Wed, 10 Nov 2010 17:56:48 +0000 (09:56 -0800)]
iwlwifi: seperate disconnected antenna function

Disconnected antenna algorithm is seperated into its own function from chain noise
calibration routine for better code management.

Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlagn: fix RXON HT
Johannes Berg [Wed, 10 Nov 2010 17:56:47 +0000 (09:56 -0800)]
iwlagn: fix RXON HT

When the HT information is changed due to
BSS changes (like legacy stations joining)
we need to recalculate HT RXON parameters.

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>