OSDN Git Service

tomoyo/tomoyo-test1.git
11 years agoMerge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Johannes Berg [Wed, 20 Mar 2013 13:30:42 +0000 (14:30 +0100)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

11 years agoiwlwifi: mvm: Increase the max remain on channel time
Ilan Peer [Wed, 20 Feb 2013 06:41:54 +0000 (08:41 +0200)]
iwlwifi: mvm: Increase the max remain on channel time

Increase the maximal remain on channel time as longer remain
on channel requests are handled by the FW using fragmented
time events.

This reduces the number of user/kernel space iterations during
flows such as p2p_listen. In addition it is currently required
for flows which require longer duration such as p2p_sd.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix WoWLAN RF-kill bug
Johannes Berg [Wed, 20 Mar 2013 09:40:05 +0000 (10:40 +0100)]
iwlwifi: mvm: fix WoWLAN RF-kill bug

The RF-kill wakeup trigger flag is set in the wrong command,
which means it won't work. Also fix the comment in the TCP
wakeup trigger code -- the firmware was changed to look at
all the different trigger flags.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: tune the move to static SMPS due to BT load
Emmanuel Grumbach [Tue, 19 Mar 2013 12:40:38 +0000 (14:40 +0200)]
iwlwifi: mvm: tune the move to static SMPS due to BT load

We should disable MIMO only if bt_traffic_load goes up to 3.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV
Emmanuel Grumbach [Sat, 9 Mar 2013 18:38:19 +0000 (20:38 +0200)]
iwlwifi: mvm: take the valid_{rx,tx}_ant from the TLV

This is the right source of information for the valid Tx
antennas, not the NVM.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: take the radio type / step / dash from TLVs
Emmanuel Grumbach [Thu, 7 Mar 2013 15:27:40 +0000 (17:27 +0200)]
iwlwifi: mvm: take the radio type / step / dash from TLVs

This data should taken from TLVs and not from the NVM. This
is true for the value written in CSR_HW_IF_CONFIG_REG too.

Also, no need to set the CSR_HW_IF_CONFIG_REG_BIT_MAC_SI bit
for 7000 devices which are the only devices currently
supported.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: specify filter flags in monitor mode
Johannes Berg [Mon, 18 Mar 2013 12:04:50 +0000 (13:04 +0100)]
iwlwifi: mvm: specify filter flags in monitor mode

In firmware "listener" (monitor) mode, we still need to
open up the filters with the filter flags to receive all
frames.

Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: add debug message when a CMD is dropped in RFKILL
Emmanuel Grumbach [Wed, 13 Mar 2013 20:16:20 +0000 (22:16 +0200)]
iwlwifi: add debug message when a CMD is dropped in RFKILL

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: print the flags in ALIVE notification
Emmanuel Grumbach [Wed, 13 Mar 2013 15:02:41 +0000 (17:02 +0200)]
iwlwifi: mvm: print the flags in ALIVE notification

This has valuable data about RFkill state seen from the fw
side.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: remove 5ghz_disable option
Stanislaw Gruszka [Tue, 12 Mar 2013 16:35:58 +0000 (17:35 +0100)]
iwlwifi: remove 5ghz_disable option

5ghz_disable has no effect any longer, that was changed during
refactoring of EEPROM reading/parsing. Remove it, wpa_supplicant
allow now to specify frequencies, on which device will operate.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Fix quota handling for monitor interface
Ilan Peer [Wed, 13 Mar 2013 12:52:04 +0000 (14:52 +0200)]
iwlwifi: mvm: Fix quota handling for monitor interface

1. Quota for the monitor interface should be added only if there is
   a channel context assigned to the interface.
2. In the unassign channel context flow, need to remove the quota
   for the monitor interface binding, before unbinding.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: use kmemdup instead of kmalloc+memcpy
Andrei Epure [Sun, 10 Mar 2013 13:22:33 +0000 (15:22 +0200)]
iwlwifi: use kmemdup instead of kmalloc+memcpy

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Remove obsolete queue definitions
Ilan Peer [Wed, 13 Mar 2013 13:20:35 +0000 (15:20 +0200)]
iwlwifi: mvm: Remove obsolete queue definitions

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: don't support multi-channel inhibition
Emmanuel Grumbach [Sun, 10 Mar 2013 10:06:12 +0000 (12:06 +0200)]
iwlwifi: mvm: don't support multi-channel inhibition

This feature is not implemented yet in firmware.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: fix the {ack,cts}_kill_msk
Emmanuel Grumbach [Sun, 10 Mar 2013 18:15:24 +0000 (20:15 +0200)]
iwlwifi: mvm: fix the {ack,cts}_kill_msk

The masks were wrong. They should be 0xffffffff when SCO,
HID or SNIFF profiles are used. They should be 0xffff0000
in any other case (default) to get a bit more throughput
when the BT profile allows for it.

Fix a debug print on the way.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: Add beacon notification handler
Ilan Peer [Tue, 5 Mar 2013 13:26:03 +0000 (15:26 +0200)]
iwlwifi: mvm: Add beacon notification handler

Mostly for debugging purposes

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: suppress key error messages in AP mode
Johannes Berg [Wed, 6 Mar 2013 12:15:21 +0000 (13:15 +0100)]
iwlwifi: mvm: suppress key error messages in AP mode

In AP mode, don't attempt to program GTKs into the
device, they're used for TX only so not needed and
programming them causes error messages. Also, in
this case and if key programming fails, avoid trying
to remove the key that isn't present later.

Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: MVM op_mode is supported on 7000 only
Emmanuel Grumbach [Wed, 6 Mar 2013 09:34:44 +0000 (11:34 +0200)]
iwlwifi: mvm: MVM op_mode is supported on 7000 only

The code removed in this patch was used for bring up on
older NICs. No MVM capable fw will ever be released for
older NICs, so remove that code.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agort2800: 5592: add more USB devices IDs
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:53 +0000 (19:19 +0100)]
rt2800: 5592: add more USB devices IDs

Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: iq calibration for 5GHz
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:52 +0000 (19:19 +0100)]
rt2800: 5592: iq calibration for 5GHz

Based on:
RT5592_IQCalibration()

DPO_RT5572_LinuxSTA_2.6.1.3_20121022/cips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: add Kconfig
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:51 +0000 (19:19 +0100)]
rt2800: 5592: add Kconfig

Enable support to 5592 chip.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: TXWI & RXWI descriptors size
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:50 +0000 (19:19 +0100)]
rt2800: 5592: TXWI & RXWI descriptors size

Based on:
TXWI_STRUC
RXWI_STRUC

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/include/chip/rtmp_mac.h

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: add chip specific vgc calculations
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:49 +0000 (19:19 +0100)]
rt2800: 5592: add chip specific vgc calculations

Based on:
RT5592_ChipAGCAdjust()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: add AGC init
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:48 +0000 (19:19 +0100)]
rt2800: 5592: add AGC init

Based on:
RT5592_RTMPAGCInit()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: add write_with_rx_chain function
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:47 +0000 (19:19 +0100)]
rt2800: add write_with_rx_chain function

Based on:
AsicBBPWriteWithRxChain()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rtmp_chip.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: rearrange bbp/rfcsr initialization
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:46 +0000 (19:19 +0100)]
rt2800: rearrange bbp/rfcsr initialization

This makes order of initialization of various registers similar like
on vendor driver.

Based on:
NICInitializeAsic()
RT5592LoadRFNormalModeSetup()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/common/rtmp_init.c
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chip/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: add iq calibration
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:45 +0000 (19:19 +0100)]
rt2800: 5592: add iq calibration

Based on:
GetIQCalibration()
IQCalibration()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rtmp_chip.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: more channel switch registers settings (BBP & GLRT)
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:44 +0000 (19:19 +0100)]
rt2800: 5592: more channel switch registers settings (BBP & GLRT)

Based on:
RT5592_ChipSwitchChannel()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: enable rf init
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:43 +0000 (19:19 +0100)]
rt2800: 5592: enable rf init

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: setup LDO_CFG0 when configuring channel
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:42 +0000 (19:19 +0100)]
rt2800: 5592: setup LDO_CFG0 when configuring channel

Based on:
RT5592_ChipSwitchChannel()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: init frequency calibration
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:41 +0000 (19:19 +0100)]
rt2800: 5592: init frequency calibration

Based on:
InitFrequencyCalibrationMode()
RT5592_ChipCap

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/common/frq_cal.c
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: initialize RF_38/39/30 registers
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:40 +0000 (19:19 +0100)]
rt2800: 5592: initialize RF_38/39/30 registers

Based on:
RT5592LoadRFNormalModeSetup()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: initialize BBP_R138 register
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:39 +0000 (19:19 +0100)]
rt2800: 5592: initialize BBP_R138 register

Based on:
RT5592LoadRFNormalModeSetup()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: initalize BBP_R103 register on new revisions
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:38 +0000 (19:19 +0100)]
rt2800: 5592: initalize BBP_R103 register on new revisions

Based on:
NICInitRT5592RFRegisters()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: initalize RF_R27 on older revisions
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:37 +0000 (19:19 +0100)]
rt2800: 5592: initalize RF_R27 on older revisions

Based on:
NICInitRT5592RFRegisters()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: RF early registers initialization
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:36 +0000 (19:19 +0100)]
rt2800: 5592: RF early registers initialization

Based on:
NICInitRT5592RFRegisters()
RF5592Reg_2G_5G[]

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

This patch also merge common frequency adjustment (RF_R17 settings)
code. Further work is needed, to setup more RF/BBP/MAC registers after
that.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: common BBP initialization
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:35 +0000 (19:19 +0100)]
rt2800: 5592: common BBP initialization

Add BBP registers initialization common with other chipsets, but for now
performed only for 5592.

Based on:
NICInitBBP()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/common/rtmp_init.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: BBP registers initialization
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:34 +0000 (19:19 +0100)]
rt2800: 5592: BBP registers initialization

Based on:
NICInitRT5592BbpRegisters()
NICInitBBP()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/common/rtmp_init.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: MAC registers initalization
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:33 +0000 (19:19 +0100)]
rt2800: 5592: MAC registers initalization

Based on:
NICInitRT5592MacRegisters()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

On vendor driver we do not initialize TX_SW_CFG{1,2}. However the same
difference is between rt2x00 and vendor driver for 5390 chip.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: channel config stub
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:32 +0000 (19:19 +0100)]
rt2800: 5592: channel config stub

Based on:
RT5592_ChipSwitchChannel()

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: add channels table
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:31 +0000 (19:19 +0100)]
rt2800: 5592: add channels table

Based on:
RT5592_ChipSwitchChannel()
RT5592_Frequency_Plan_Xtal20M[]
RT5592_Frequency_Plan_Xtal40M[]

from:
DPO_RT5572_LinuxSTA_2.6.1.3_20121022/chips/rt5592.c

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: 5592: early defines
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:30 +0000 (19:19 +0100)]
rt2800: 5592: early defines

Add basic defines for 5592 chip. It can not be enabled until
CONFIG_RT2800USB_RT55XX configuration option will be provided in the
Kconfig.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2800: do not crash if spec->channels is NULL
Stanislaw Gruszka [Sat, 16 Mar 2013 18:19:29 +0000 (19:19 +0100)]
rt2800: do not crash if spec->channels is NULL

In case the spec->channels was not specified, print warning instead
of hard crash the kernel.

Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Tested-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: Fix tx status reporting for reordered frames in rt2800pci
Helmut Schaa [Fri, 15 Mar 2013 08:57:57 +0000 (09:57 +0100)]
rt2x00: Fix tx status reporting for reordered frames in rt2800pci

rt2800 hardware sometimes reorders tx frames when transmitting to
multiple BA enabled STAs concurrently.

For example a tx queue
[ STA1 | STA2 | STA1 | STA2 ]
can result in the tx status reports
[ STA1 | STA1 | STA2 | STA2 ]
when the hw decides to put the frames for STA1 in one AMPDU.

To mitigate this effect associate the currently processed tx status
to the first frame in the tx queue with a matching wcid.

This patch fixes several problems related to incorrect tx status
reporting. Furthermore the tx rate selection is much more stable when
communicating with multiple STAs.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: Revert "rt2x00: remove unused argument"
Helmut Schaa [Fri, 15 Mar 2013 08:57:56 +0000 (09:57 +0100)]
rt2x00: Revert "rt2x00: remove unused argument"

This reverts commit db36f792370959ff26458f80942cf98fe8249d95
since I'm going to use the data pointer that was removed in
a follow up patch.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: cleanup VHT cap
Yogesh Ashok Powar [Thu, 14 Mar 2013 01:32:47 +0000 (18:32 -0700)]
mwifiex: cleanup VHT cap

Firmware returned VHT cap has the same format that cfg80211
expects. There is no need to parse the vht cap from the firmware
and then set it to ieee80211_sta_vht_cap. Just copying is
sufficient.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge tag 'for-linville-20130318' of git://github.com/kvalo/ath6kl
John W. Linville [Mon, 18 Mar 2013 20:34:55 +0000 (16:34 -0400)]
Merge tag 'for-linville-20130318' of git://github.com/kvalo/ath6kl

11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Mon, 18 Mar 2013 13:39:21 +0000 (09:39 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless

Conflicts:
net/nfc/llcp/llcp.c

11 years agoath6kl: Fix a debugfs crash for USB devices
Mohammed Shafi Shajakhan [Tue, 12 Mar 2013 16:33:03 +0000 (22:03 +0530)]
ath6kl: Fix a debugfs crash for USB devices

Credit distribution stats is currently implemented
only for SDIO. This fixes a crash in debugfs for
USB interface.

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<f91c2048>] read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
*pde = b62bd067
Oops: 0000 [#1] SMP

EIP: 0060:[<f91c2048>] EFLAGS: 00210246 CPU: 0
EIP is at read_file_credit_dist_stats+0x38/0x330 [ath6kl_core]
EAX: 00000000 EBX: e6f7a9c0 ECX: e7b148b8 EDX: 00000000
ESI: 000000c8 EDI: e7b14000 EBP: e6e09f64 ESP: e6e09f30
DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Process cat (pid: 4058, ti=e6e08000 task=e50cf230 task.ti=e6e08000)
Stack:
00008000 00000000 e6e09f64 c1132d3c 00004e71 e50cf230 00008000 089e4000
e7b148b8 00000000 e6f7a9c0 00008000 089e4000 e6e09f8c c11331fc e6e09f98
00000001 e6e09f7c f91c2010 e6e09fac e6f7a9c0 089e4877 089e4000 e6e09fac

Call Trace:
[<c1132d3c>] ? rw_verify_area+0x6c/0x120
[<c11331fc>] vfs_read+0x8c/0x160
[<f91c2010>] ? read_file_war_stats+0x130/0x130 [ath6kl_core]
[<c113330d>] sys_read+0x3d/0x70
[<c15755b4>] syscall_call+0x7/0xb
[<c1570000>] ? fill_powernow_table_pstate+0x127/0x127

Cc: Ryan Hsu <ryanhsu@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath: changed kmalloc to kmemdup
Andrei Epure [Sun, 10 Mar 2013 12:39:58 +0000 (14:39 +0200)]
ath: changed kmalloc to kmemdup

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment
Myoungje Kim [Sun, 10 Mar 2013 06:16:05 +0000 (08:16 +0200)]
ath6kl: Fix the byte alignment rule to avoid loss of bytes in a TCP segment

Either first 3 bytes of the first received tcp segment or last one
over MTU size file can be loss due to the byte alignment problem.
Although ATH6KL_HTC_ALIGN_BYTES was defined for 'extra bytes for htc header
alignment' in the patch "Fix buffer alignment for scatter-gather
I/O"(1df94a857), there exists the bytes loss issue which means that it will be
truncated 3 bytes in the transmitted file contents if a file which has over MTU
size is transferred through TCP/IP stack.  It doesn't look like TCP/IP stack
bug of 3.5 or the latest version of kernel but the byte alignment issue.  This
patch is to use the roundup() function for the byte alignment rather than the
predefined ATH6KL_HTC_ALIGN_BYTES.

kvalo: fixed indentation

Signed-off-by: Myoungje Kim <mjei78@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: remove false check from ath6kl_rx()
Kalle Valo [Sun, 10 Mar 2013 05:51:39 +0000 (07:51 +0200)]
ath6kl: remove false check from ath6kl_rx()

Dan found a check from ath6kl_rx() which doesn't make any sense at all:

"  1327          if (status || !(skb->data + HTC_HDR_LENGTH)) {
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^
skb->data is a pointer.  This pointer math is always going to be false.
Should it be testing "packet->act_len < HTC_HDR_LENGTH" or something?"

I don't know what the check really was supposed to do, but I think Dan's guess
is right. Fix it accordingly.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()
Kalle Valo [Sun, 10 Mar 2013 05:51:29 +0000 (07:51 +0200)]
ath6kl: add an extra band check to ath6kl_wmi_beginscan_cmd()

Dan reported that smatch found a possible issue in ath6kl_wmi_beginscan_cmd()
where we might access sc->supp_rates beyond the end. It shouldn't happen as
ar->wiphy->bands always have just the first two bands set, but add an extra
check just to be sure.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add tracing support to debug message macros
Kalle Valo [Mon, 18 Mar 2013 11:42:22 +0000 (13:42 +0200)]
ath6kl: add tracing support to debug message macros

Now all log messages are sent through the tracing infrastruture as well.
Tracing point doesn't follow debug_mask module parameter, instead it sends
all debug messages, so once you enable ath6kl_log_dbg tracing point you will
get a lot of messages. Needs to be discussed if this is sensible or not.
The overhead should be small enough and we anyway include debug level as
well so it's easy to filter in user space.

I wasn't really sure what to do with ath6kl_dbg_dump() and for now decided
that it also sends the buffer to user space. But most likely in the future
ath6kl_dbg_dump() should go away in favor of using proper tracing points, but
we will see.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add tracing support to log functions
Kalle Valo [Mon, 18 Mar 2013 11:42:22 +0000 (13:42 +0200)]
ath6kl: add tracing support to log functions

All log messages are now sent through tracing interface as well if
ATH6KL_TRACING is enabled.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: convert ath6kl_info/err/warn macros to real functions
Kalle Valo [Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)]
ath6kl: convert ath6kl_info/err/warn macros to real functions

After this it's cleaner to add trace calls.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: adding tracing points for htc_mbox
Kalle Valo [Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)]
ath6kl: adding tracing points for htc_mbox

Add tracing points for htc layer, just dumping the packets to user space.
I wasn't really sure what to do with the status value, it might not always
be accurate, but I included it anyway.

I skipped htc_pipe (and usb) implementation for now. Need to add those
tracepoints later.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add tracing point for hif irqs
Kalle Valo [Mon, 18 Mar 2013 11:42:21 +0000 (13:42 +0200)]
ath6kl: add tracing point for hif irqs

Add a tracing point for hif irq and dump the register content to user space.
This is in hif.c as we could use the same code also with SPI but, as ath6kl
doesn't SPI and most likely never will be, this is used just by SDIO so
name the trace point as ath6kl_sdio_irq to make it easier to manage filters.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add tracing points for sdio transfers
Kalle Valo [Mon, 18 Mar 2013 11:42:20 +0000 (13:42 +0200)]
ath6kl: add tracing points for sdio transfers

Add tracing points for sdio transfers, just dump the address, flags and the
buffer.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: add tracing support and tracing points for wmi packets
Kalle Valo [Mon, 18 Mar 2013 11:42:20 +0000 (13:42 +0200)]
ath6kl: add tracing support and tracing points for wmi packets

Add basic tracing infrastructure support to ath6kl and which can be
enabled with CONFIG_ATH6KL_TRACING.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: cold reset target after host warm boot
Kalle Valo [Sat, 9 Mar 2013 10:01:50 +0000 (12:01 +0200)]
ath6kl: cold reset target after host warm boot

Julien reported that ar6004 usb device fails to initialise
after host has been rebooted and power is still on for the ar6004 device. He
found out that doing a cold reset fixes the issue.

I wasn't sure what would be the best way to detect if target needs a reset so I
settled on checking a timeout from htc_wait_recv_ctrl_message().

Reported-by: Julien Massot <jmassot@aldebaran-robotics.com>
Tested-by: Julien Massot <jmassot@aldebaran-robotics.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: fix usb related error handling and warnings
Kalle Valo [Sat, 9 Mar 2013 10:01:43 +0000 (12:01 +0200)]
ath6kl: fix usb related error handling and warnings

It was annoying to debug usb warm reboot initialisation problems as many usb
related functions just ignored errors and it wasn't obvious from the kernel
logs what was failing. Fix all that so that error messages are printed and
errors are handled properly.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: cleanup ath6kl_reset_device()
Kalle Valo [Sat, 9 Mar 2013 10:01:35 +0000 (12:01 +0200)]
ath6kl: cleanup ath6kl_reset_device()

Move it to init.c, make it static, remove all useless checks and force it to
always do cold reset.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agoath6kl: print firmware capabilities
Kalle Valo [Wed, 6 Mar 2013 06:56:06 +0000 (08:56 +0200)]
ath6kl: print firmware capabilities

Printin the  firmware capabilities during the first firmware boot makes it easier to find out what
features firmware supports.

Obligatory screenshot:

[21025.678481] ath6kl: ar6003 hw 2.1.1 sdio fw 3.2.0.144 api 3
[21025.678667] ath6kl: firmware supports: sched-scan,sta-p2pdev-duplex,rsn-cap-override

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
11 years agob43: HT-PHY: enable basic TX power setup
Rafał Miłecki [Thu, 7 Mar 2013 15:47:27 +0000 (16:47 +0100)]
b43: HT-PHY: enable basic TX power setup

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: setup TX power control
Rafał Miłecki [Thu, 7 Mar 2013 15:47:26 +0000 (16:47 +0100)]
b43: HT-PHY: setup TX power control

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement RSSI polling
Rafał Miłecki [Sat, 9 Mar 2013 12:56:26 +0000 (13:56 +0100)]
b43: HT-PHY: implement RSSI polling

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement playing sample tone
Rafał Miłecki [Thu, 7 Mar 2013 15:47:24 +0000 (16:47 +0100)]
b43: HT-PHY: implement playing sample tone

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement stopping sample tone playback
Rafał Miłecki [Thu, 7 Mar 2013 15:47:23 +0000 (16:47 +0100)]
b43: HT-PHY: implement stopping sample tone playback

It was another sequence I recognized in HT-PHY dump:
 phy_read(0x00c7) -> 0x0001
 phy_read(0x00c3) -> 0x0000
phy_write(0x00c3) <- 0x0002
 phy_read(0x00c3) -> 0x0000
phy_write(0x00c3) <- 0x0000
The difference to N-PHY is that it writes to 6 tables instead of a one
(after above).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement controlling TX power control
Rafał Miłecki [Sat, 9 Mar 2013 12:52:12 +0000 (13:52 +0100)]
b43: HT-PHY: implement controlling TX power control

Don't enable it until we have (almost?) whole TX power management
figured out. It's similar to the N-PHY, the difference is that we call a
"fix" *before* disabling power control.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement PA override
Rafał Miłecki [Sat, 9 Mar 2013 12:49:01 +0000 (13:49 +0100)]
b43: HT-PHY: implement PA override

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement CCA reset
Rafał Miłecki [Thu, 7 Mar 2013 15:47:20 +0000 (16:47 +0100)]
b43: HT-PHY: implement CCA reset

It was just another similar-to-N-PHY and easy-to-track routine:
write32 0xb0601408 <- 0x00002057
 phy_read(0x0001) -> 0x0000
phy_write(0x0001) <- 0x4000
phy_write(0x0001) <- 0x0000
write32 0xb0601408 <- 0x00002055
(b43_phy_ht_force_rf_sequence was moved up unmodified)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement MAC reclocking
Rafał Miłecki [Thu, 7 Mar 2013 15:47:19 +0000 (16:47 +0100)]
b43: HT-PHY: implement MAC reclocking

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: implement spurious tone avoidance
Rafał Miłecki [Thu, 7 Mar 2013 15:47:18 +0000 (16:47 +0100)]
b43: HT-PHY: implement spurious tone avoidance

On N-PHY it's also done after TX power fix, so it was easy to spot.
Unfortunately the MMIO logs I have from ndsiwrapper include channels
1-12 only, so enabling code for 13 and 14 is just a N-PHY-based guess.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: move TX fix to the separated function
Rafał Miłecki [Thu, 7 Mar 2013 15:47:17 +0000 (16:47 +0100)]
b43: HT-PHY: move TX fix to the separated function

On N-PHY after B43_PHY_B_TEST operation there is a call to TX power fix
function which iterates over available cores. It matches our HT-PHY code
which means it's probably also some TX fix.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: add classifier control function
Rafał Miłecki [Thu, 7 Mar 2013 15:47:16 +0000 (16:47 +0100)]
b43: HT-PHY: add classifier control function

After comparing operations on reg 0xB on N and HT it seems to be the
same register with similar ops. Implement them for HT-PHY.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: HT-PHY: rename AFE defines
Rafał Miłecki [Sat, 9 Mar 2013 12:43:49 +0000 (13:43 +0100)]
b43: HT-PHY: rename AFE defines

It you take a look at N-PHY analog switch function it touches every core
on the chipset. It seems HT-PHY does they same, it just has 3 cores
instead of 2 (which make sense since BCM4331 is 3x3). Rename AFE defines
to include core id.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: temperature measurement
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:51 +0000 (14:12 +0200)]
wil6210: temperature measurement

Firmware got support for temperature measurement.
There are 2 temperature sensors: MAC and radio

"not available" temperature - reported by FW as 0 or ~0

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: sync with new firmware
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:50 +0000 (14:12 +0200)]
wil6210: sync with new firmware

Adjust driver for changes in the FW API.
Noticeable changes in the FW are:
- temperature sensing
- infrastructure for multiple connections
- infrastructure for P2P
- signal strength indication

This commit introduces only changes that are required to support same functionality
as previous firmware, no new features.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: new SW reset
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:49 +0000 (14:12 +0200)]
wil6210: new SW reset

New firmware allows for shorter SW reset procedure.
After SW reset, FW raises "fw done" IRQ, at this
moment mailbox control structures are initialized, driver caches it.

New status bit wil_status_reset_done introduced to track completion
of the reset. It is set by "fw ready" irq, and required for WMI rx flow
to access control structures.

WMI Tx flow protected by other status bit, wil_status_fwready. It can't
be set before wil_status_reset_done is set by design.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: headers clean-up
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:48 +0000 (14:12 +0200)]
wil6210: headers clean-up

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: use WLAN_CAPABILITY_DMG_TYPE_MASK
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:47 +0000 (14:12 +0200)]
wil6210: use WLAN_CAPABILITY_DMG_TYPE_MASK

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: fix FW error notification
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:46 +0000 (14:12 +0200)]
wil6210: fix FW error notification

user space get notified through kobject_uevent_env(), that might sleep and thus
should run in thread context.

Move user space notification to the thread handler, while mark FW is non-functional
right in the hard IRQ.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: report all received mgmt frames
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:45 +0000 (14:12 +0200)]
wil6210: report all received mgmt frames

Pass to cfg80211 all management frames.
Used by wpa_supplicant.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: use cfg80211_inform_bss_frame()
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:44 +0000 (14:12 +0200)]
wil6210: use cfg80211_inform_bss_frame()

Avoid unnecessary frame parsing

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: refactor connect_worker
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:43 +0000 (14:12 +0200)]
wil6210: refactor connect_worker

Move wmi_connect_worker() to the main.c and change names for consistency.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: Fix garbage sent to the FW with wmi_set_ie()
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:42 +0000 (14:12 +0200)]
wil6210: Fix garbage sent to the FW with wmi_set_ie()

Extra reference was taken by mistake.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: do not set IE's for beacon
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:41 +0000 (14:12 +0200)]
wil6210: do not set IE's for beacon

On the DMG band, there is no 'normal' beacon frame.
Instead, transmitted is short 'DMG beacon' frame, that do not include IE's
So, beacon IE's are not relevant for the DMG band.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: handle WMI_BA_STATUS_EVENTID
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:40 +0000 (14:12 +0200)]
wil6210: handle WMI_BA_STATUS_EVENTID

Firmware indicated block ack agreement status change.
For now, just log it.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: handle linkup/linkdown WMI events
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:39 +0000 (14:12 +0200)]
wil6210: handle linkup/linkdown WMI events

Firmware indicates linkup/linkdown when data path becomes ready.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: Remove local implementation of dynamic hexdump
Vladimir Kondratiev [Wed, 13 Mar 2013 12:12:38 +0000 (14:12 +0200)]
wil6210: Remove local implementation of dynamic hexdump

This functionality now integrated in kernel, local hack not needed any more

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowil6210: remove unused including <linux/version.h>
Wei Yongjun [Tue, 12 Mar 2013 03:09:34 +0000 (11:09 +0800)]
wil6210: remove unused including <linux/version.h>

Remove including <linux/version.h> that don't need it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: pci: Fix flipping of MAC address
Larry Finger [Mon, 11 Mar 2013 20:38:26 +0000 (15:38 -0500)]
ssb: pci: Fix flipping of MAC address

Since commit e565275 entitled "ssb: pci: Standardize a function to get mac
address", the SPROM readout of the MAC has had the values flipped so that
00:11:22:33:44:55 became 11:00:33:22:55:44. The fix has been tested on both
little- and big-endian architectures.

Reported-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: rtl8192cu: Fix problem that prevents reassociation
Larry Finger [Wed, 13 Mar 2013 15:28:13 +0000 (10:28 -0500)]
rtlwifi: rtl8192cu: Fix problem that prevents reassociation

The driver was failing to clear the BSSID when a disconnect happened. That
prevented a reconnection. This problem is reported at
https://bugzilla.redhat.com/show_bug.cgi?id=789605,
https://bugzilla.redhat.com/show_bug.cgi?id=866786,
https://bugzilla.redhat.com/show_bug.cgi?id=906734, and
https://bugzilla.kernel.org/show_bug.cgi?id=46171.

Thanks to Jussi Kivilinna for making the critical observation
that led to the solution.

Reported-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Tested-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Tested-by: Alessandro Lannocca <alessandro.lannocca@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agort2x00: fix rt2x00 to work with the new ralink SoC config symbols
John Crispin [Wed, 13 Mar 2013 12:20:15 +0000 (13:20 +0100)]
rt2x00: fix rt2x00 to work with the new ralink SoC config symbols

Since v3.9-rc1 the kernel has basic support for Ralink WiSoC. The config symbols
are named slightly different than before. Fix the rt2x00 to match the new
symbols.

The commit causing this breakage is:
commit ae2b5bb6570481b50a7175c64176b82da0a81836
Author: John Crispin <blogic@openwrt.org>
Date:   Sun Jan 20 22:05:30 2013 +0100
MIPS: ralink: adds Kbuild files

Signed-off-by: John Crispin <blogic@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Wed, 13 Mar 2013 17:29:56 +0000 (13:29 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth

11 years agoBluetooth: Device 0cf3:3008 should map AR 3012
Sunguk Lee [Mon, 11 Mar 2013 19:41:58 +0000 (04:41 +0900)]
Bluetooth: Device 0cf3:3008 should map AR 3012

T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=0cf3 ProdID=3008 Rev= 0.01
S:  Manufacturer=Atheros Communications
S:  Product=Bluetooth USB Host Controller
S:  SerialNumber=Alaska Day 2006
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Signed-off-by: Sunguk Lee <d3m3vilurr@gmail.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agomwl8k: don't overwrite regulatory settings on fw reload
Jonas Gorski [Mon, 11 Mar 2013 16:44:21 +0000 (17:44 +0100)]
mwl8k: don't overwrite regulatory settings on fw reload

Currently the caps are parsed on every firmware reload, causing any
channel flags to be cleared.
When there is a firmware to interface mode mismatch, the triggered
firmware reload causes a reset of the regulatory settings, causing all
channels to become available:

root@openrouter:/# iw phy phy0 info
Wiphy phy0
        Band 1:
(...)
                Frequencies:
                        * 2412 MHz [1] (0.0 dBm)
                        * 2417 MHz [2] (0.0 dBm)
                        * 2422 MHz [3] (0.0 dBm)
                        * 2427 MHz [4] (0.0 dBm)
                        * 2432 MHz [5] (0.0 dBm)
                        * 2437 MHz [6] (0.0 dBm)
                        * 2442 MHz [7] (0.0 dBm)
                        * 2447 MHz [8] (0.0 dBm)
                        * 2452 MHz [9] (0.0 dBm)
                        * 2457 MHz [10] (0.0 dBm)
                        * 2462 MHz [11] (0.0 dBm)
                        * 2467 MHz [12] (0.0 dBm)
                        * 2472 MHz [13] (0.0 dBm)
                        * 2484 MHz [14] (0.0 dBm)
(...)

To prevent this, only parse the caps on the first firmware load during
hardware probe, and store them locally to know we have already parsed
them.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agowireless:rtlwifi: replaced kmalloc+memcpy with kmemdup
Andrei Epure [Sun, 10 Mar 2013 13:09:47 +0000 (15:09 +0200)]
wireless:rtlwifi: replaced kmalloc+memcpy with kmemdup

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoiwlegacy: fix sparse warnings
Stephen Hemminger [Fri, 8 Mar 2013 19:12:56 +0000 (11:12 -0800)]
iwlegacy: fix sparse warnings

Make local functions and tables static. Make ops table
Mark 3945 ops as read_mostly.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>