openwrt/staging/blogic.git
11 years agoiwlwifi: mvm: Rename some power management definitions and methods
Alexander Bondar [Tue, 5 Mar 2013 11:47:04 +0000 (13:47 +0200)]
iwlwifi: mvm: Rename some power management definitions and methods

Replace SLEEP_OVER_DTIM by SKIP_OVER_DTIM.
Add iwl_mvm prefix to a function name.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: downgrade to old power management API
Alexander Bondar [Sun, 3 Feb 2013 19:26:44 +0000 (21:26 +0200)]
iwlwifi: mvm: downgrade to old power management API

Current available FW still doesn't support new PM API.
Therefore, to enable basic power management with the
existing firmware, change the API in the driver back
to the API used in the current firmware.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: remove BT Coex constraints upon roaming to A band
Emmanuel Grumbach [Wed, 20 Mar 2013 13:28:27 +0000 (15:28 +0200)]
iwlwifi: mvm: remove BT Coex constraints upon roaming to A band

When we roam to A band, we don't need to constraint WiFi
any more since it is operating on a different band.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: implement reduced Tx power
Emmanuel Grumbach [Thu, 24 Jan 2013 08:35:13 +0000 (10:35 +0200)]
iwlwifi: mvm: implement reduced Tx power

This allows to have better wifi TPT when BT is active under
good RSSI conditions.
Wifi will have better chance to send Acks and Cts even if BT
is active.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: add per-interface debugfs with mac_params file
Johannes Berg [Tue, 26 Mar 2013 09:47:53 +0000 (10:47 +0100)]
iwlwifi: mvm: add per-interface debugfs with mac_params file

Use the per-interface debugfs infrastructure to create a
directory and symlink, and add a file containing debug
data related to each virtual interface.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoMerge remote-tracking branch 'wireless-next/master' into iwlwifi-next
Johannes Berg [Tue, 26 Mar 2013 09:35:50 +0000 (10:35 +0100)]
Merge remote-tracking branch 'wireless-next/master' into iwlwifi-next

11 years agoiwlwifi: mvm: split long debug print
Emmanuel Grumbach [Wed, 20 Mar 2013 15:12:46 +0000 (17:12 +0200)]
iwlwifi: mvm: split long debug print

This caused issues with tracing as it's longer than
the buffer size used there.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoiwlwifi: mvm: ignore bt_ch_announce module parameter
Emmanuel Grumbach [Tue, 19 Mar 2013 21:09:58 +0000 (23:09 +0200)]
iwlwifi: mvm: ignore bt_ch_announce module parameter

This module parameter isn't and won't be used. So ignore
its value and set BT_CH_ANNOUNCE unconditionally.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agob43: remove warning for LP-PHY with sprom < 8
Hauke Mehrtens [Thu, 21 Mar 2013 19:28:40 +0000 (20:28 +0100)]
b43: remove warning for LP-PHY with sprom < 8

The BCM5354 SoC has a build in ieee80211 core rev 13 with a LP-PHY on
it. This devices has a sprom version 3 stored in the nvram. This patch
removes the warning and uses the opo values from the sprom as mentioned
in the specs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: read additional sprom v2 and v3 attributes.
Hauke Mehrtens [Thu, 21 Mar 2013 19:25:21 +0000 (20:25 +0100)]
ssb: read additional sprom v2 and v3 attributes.

These attributes should be in the sprom for rev 2 and 3, but they were
not read out.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: fix sprom constant for ant_available_{bg,a}
Hauke Mehrtens [Thu, 21 Mar 2013 15:26:19 +0000 (16:26 +0100)]
ssb: fix sprom constant for ant_available_{bg,a}

This was done accordingly to new specs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agob43: use bcma_chipco_gpio_control()
Hauke Mehrtens [Thu, 21 Mar 2013 15:19:45 +0000 (16:19 +0100)]
b43: use bcma_chipco_gpio_control()

With this patch the same registers are written, but this access is now
protected by a lock.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: define board types
Rafał Miłecki [Tue, 19 Mar 2013 15:58:59 +0000 (16:58 +0100)]
bcma: define board types

Using that IDs we can write workarounds for various cards

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: define more board types
Rafał Miłecki [Tue, 19 Mar 2013 15:58:58 +0000 (16:58 +0100)]
ssb: define more board types

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agobcma: extract board_type from SPROM
Rafał Miłecki [Tue, 19 Mar 2013 12:18:44 +0000 (13:18 +0100)]
bcma: extract board_type from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agossb: extract board_type from SPROM
Rafał Miłecki [Tue, 19 Mar 2013 12:18:43 +0000 (13:18 +0100)]
ssb: extract board_type from SPROM

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agomwifiex: add support to configure VHT for AP mode
Yogesh Ashok Powar [Tue, 19 Mar 2013 03:06:03 +0000 (20:06 -0700)]
mwifiex: add support to configure VHT for AP mode

Currently, default VHT configuration from the firmware is used
for the VHT operations. Adding vhtcfg command to configure the
firmware based on input received from cfg.

Enable VHT for AP mode only when cfg80211_ap_settings has a
VHT IE i.e., when ieee80211ac is set to 1 in the hostapd.conf.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: usb: add NET_IP_ALIGN padding to RX skb when needed
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:29 +0000 (11:59 +0200)]
rtlwifi: usb: add NET_IP_ALIGN padding to RX skb when needed

Add proper alignment at first packet copy, to avoid extra copies made later
in networking stack.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: usb: defer rx processing to tasklet
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:24 +0000 (11:59 +0200)]
rtlwifi: usb: defer rx processing to tasklet

Move processing of received packets to tasklet from hard-irq context.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: usb: remove extra skb copy on RX path
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:18 +0000 (11:59 +0200)]
rtlwifi: usb: remove extra skb copy on RX path

RX path has extra copying of packets, that can be avoided.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agortlwifi: usb: use usb_alloc_coherent for RX buffers
Jussi Kivilinna [Sun, 17 Mar 2013 09:59:13 +0000 (11:59 +0200)]
rtlwifi: usb: use usb_alloc_coherent for RX buffers

Use dedicated DMA coherent buffers for RX urbs, to avoid allocation of large
skbuffs in hard-irq context and improve performance.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
11 years agoMerge branch 'for-linville' of git://git.kernel.org/pub/scm/linux/kernel/git/luca...
John W. Linville [Mon, 25 Mar 2013 20:40:52 +0000 (16:40 -0400)]
Merge branch 'for-linville' of git://git./linux/kernel/git/luca/wl12xx

11 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Mon, 25 Mar 2013 20:39:06 +0000 (16:39 -0400)]
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
John W. Linville [Mon, 25 Mar 2013 20:38:28 +0000 (16:38 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next

11 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Mon, 25 Mar 2013 20:38:02 +0000 (16:38 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

11 years agoMerge branch 'wl12xx-next' into for-linville
Luciano Coelho [Mon, 25 Mar 2013 15:06:37 +0000 (17:06 +0200)]
Merge branch 'wl12xx-next' into for-linville

11 years agowlcore: move handling from hardirq to the irq thread function
Luciano Coelho [Fri, 8 Mar 2013 07:41:53 +0000 (09:41 +0200)]
wlcore: move handling from hardirq to the irq thread function

Spin locks and completions are expensive in hard IRQ context and cause
problems with RT kernels.  In RT kernels, both spin locks and
completions can schedule(), so we can't use them in hard irq context.

Move handling code into the irq thread function to avoid that.

Reported-by: Gregoire Gentil <gregoire@alwaysinnovating.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: use print_hex_dump_debug()
Luciano Coelho [Tue, 12 Mar 2013 15:04:01 +0000 (17:04 +0200)]
wlcore: use print_hex_dump_debug()

We were printing out all the hex dumps regardless of whether dynamic
debugging was enabled or not.  Now that print_hex_dump_debug() has
been implemented, we can use that instead.

Reported-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: consider dummy packets when tx queues are empty
Arik Nemtsov [Tue, 12 Mar 2013 15:19:46 +0000 (17:19 +0200)]
wlcore: consider dummy packets when tx queues are empty

Don't ignore dummy packets when our queues are empty. This causes dummy
packets never to be sent when traffic is not suspended by FW thresholds,
which happens only in high Tx throughput situations. This may hurt Rx
performance.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: correctly check state before regdomain conf
Arik Nemtsov [Tue, 12 Mar 2013 15:19:45 +0000 (17:19 +0200)]
wlcore: correctly check state before regdomain conf

The wlcore state was checked without the mutex being taken. This leads
to WARN_ONs sometimes if a notification arrives when the driver
is on, but the mutex is only taken after it is off. This usually
happens if stopping the driver while connected to a network.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: AP-mode - recover security seq num for stations
Arik Nemtsov [Tue, 12 Mar 2013 15:19:44 +0000 (17:19 +0200)]
wlcore: AP-mode - recover security seq num for stations

Save the sequence number of the broadcast AP link in the wlvif. For each
connected station, save the sequence number in the drv_priv part of
ieee80211_sta. Use the saved numbers on recovery/resume, with the
obligatory increment on recovery.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: free AP global links properly on recovery
Arik Nemtsov [Tue, 12 Mar 2013 15:19:43 +0000 (17:19 +0200)]
wlcore: free AP global links properly on recovery

Dont use free_sta() on AP global links. It would fail an internal check
within the function and various structures within the link struct would
not be reset.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowl18xx: print chip info during boot
Victor Goldenshtein [Tue, 12 Mar 2013 15:19:42 +0000 (17:19 +0200)]
wl18xx: print chip info during boot

Print board type, PG with metal and ROM versions.
This might help debugging HW related issues.

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: don't attempt to roam in case of p2p
Eyal Shapira [Tue, 12 Mar 2013 15:19:41 +0000 (17:19 +0200)]
wlcore: don't attempt to roam in case of p2p

For STA we report beacon loss to higher levels so that wpa_s
can attempt to roam without disconnecting. In case of P2P CLI
we don't want to attempt roaming and instead disconnect immediately
upon beacon loss.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: change warn on missing lock in wlcore_queue_xx funcs
Arik Nemtsov [Tue, 12 Mar 2013 15:19:40 +0000 (17:19 +0200)]
wlcore: change warn on missing lock in wlcore_queue_xx funcs

On !CONFIG_SMP builds spin_is_locked always returns 0. Assert the
locking using assert_spin_locked, which is written to behave correctly
in all cases.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: report rssi from roaming statistics
Nadim Zubidat [Tue, 12 Mar 2013 15:19:39 +0000 (17:19 +0200)]
wlcore: report rssi from roaming statistics

report the average beacon rssi which is calculated
by firmware for roaming statistics instead of the
last rx packet rssi. this results a more accurate
rssi reporting

Signed-off-by: Nadim Zubidat <nadimz@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: consolidate tx_seq handling on recovery
Arik Nemtsov [Tue, 12 Mar 2013 15:19:38 +0000 (17:19 +0200)]
wlcore: consolidate tx_seq handling on recovery

Accumulate the total number of sent packets per-link to find out how far
the encryption sequence number has progressed. Use this number as the
initial security sequence number after recovery.

This consolidates security sequence handling for both chip families, as
we no longer have to rely on 12xx specific Tx completion.

A fortunate side effect of this is correct management of seq numbers for
AP roles and multi-role scenarios.

When a link is removed we save the last seq number on a persistent part
of the wlvif. This helps the data survive through recoveries/suspends,
which also entail changes in the hlid of the link.

This functionality is STA only currently.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: don't risk using stale HLID during .sta_state callback
Arik Nemtsov [Tue, 12 Mar 2013 15:19:37 +0000 (17:19 +0200)]
wlcore: don't risk using stale HLID during .sta_state callback

The HLID of a STA can change, particularly during recovery. Don't cache
the HLID before it was potentially allocated.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: fix link count in single-link-PSM optimization
Arik Nemtsov [Tue, 12 Mar 2013 15:19:36 +0000 (17:19 +0200)]
wlcore: fix link count in single-link-PSM optimization

commit 144614f3eebd7d only allowed a single active link when
turning on the optimization, ignoring the fact that an AP has two
additional global links.
Use 3 links as an indication for a single active link. Use the
FW PSM bits to verify the extra active link belongs to the AP role.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: set max num of Rx BA sessions per chip
Igal Chernobelsky [Tue, 12 Mar 2013 15:19:35 +0000 (17:19 +0200)]
wlcore: set max num of Rx BA sessions per chip

Maximum number of supported RX BA sessions depends on chip type.
wl18xx supports 5 RX BA sessions while wl12xx supports 3.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agowlcore: enter elp in force ps mode in 5ms
Igal Chernobelsky [Tue, 12 Mar 2013 15:19:34 +0000 (17:19 +0200)]
wlcore: enter elp in force ps mode in 5ms

It is requiered to enter sleep mode with smaller delay in forced PS mode.
This fixes issue of testing force PS mode during VoIP traffic where packets
are sent every 20ms. Chip never enters ps mode with default 30 ms delay
in such test.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
11 years agoBluetooth: fix error return code in rfcomm_add_listener()
Wei Yongjun [Wed, 20 Mar 2013 12:23:37 +0000 (20:23 +0800)]
Bluetooth: fix error return code in rfcomm_add_listener()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
11 years agoiwlwifi: mvm: Add support for different ROC types
Ilan Peer [Wed, 13 Feb 2013 09:05:18 +0000 (11:05 +0200)]
iwlwifi: mvm: Add support for different ROC types

Schedule different time event based on the ROC type

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 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 agocfg80211: fix error return code in cfg80211_init()
Wei Yongjun [Wed, 20 Mar 2013 12:22:54 +0000 (20:22 +0800)]
cfg80211: fix error return code in cfg80211_init()

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agocfg80211: fix potential connection work crash
Johannes Berg [Wed, 20 Mar 2013 13:05:52 +0000 (14:05 +0100)]
cfg80211: fix potential connection work crash

If wpa_supplicant and iw/iwconfig are used together, very
rarely the system crashes. It seems to be related to the
connection parameters not being set up, but it's not all
clear to me how this happens. In any case, checking that
the conn pointer exists here is probably a good idea.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agoath6kl: fix size_t printf warnings
Kalle Valo [Tue, 19 Mar 2013 13:25:20 +0000 (15:25 +0200)]
ath6kl: fix size_t printf warnings

My new tracing code for ath6kl introduced these warnings on 64-bit:

trace.h:38:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:61:1: warning: format '%d' expects argument of type 'int',
but argument 4 has type 'size_t' [-Wformat]
trace.h:84:1: warning: format '%d' expects argument of type 'int',
but argument 6 has type 'size_t' [-Wformat]
trace.h:119:1: warning: format '%d' expects argument of type 'int',
but argument 7 has type 'size_t' [-Wformat]
trace.h:173:1: warning: format '%d' expects argument of type 'int',
but argument 3 has type 'size_t' [-Wformat]
trace.h:193:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]
trace.h:221:1: warning: format '%d' expects argument of type 'int',
but argument 5 has type 'size_t' [-Wformat]

Fix them by using %zd.

Reported-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.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 agomac80211_hwsim: assign CAB queue properly on interface type change
Johannes Berg [Mon, 18 Mar 2013 21:13:18 +0000 (22:13 +0100)]
mac80211_hwsim: assign CAB queue properly on interface type change

When an interface change type, the CAB queue must be reassigned,
do this in hwsim to avoid warnings/crashes.

Reported-by: Jouni Malinen <j@w1.fi>
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 agomac80211: stop queues temporarily for flushing
Johannes Berg [Wed, 13 Feb 2013 11:25:28 +0000 (12:25 +0100)]
mac80211: stop queues temporarily for flushing

Sometimes queues are flushed in the middle of
operation, which can lead to driver issues.
Stop queues temporarily, while flushing, to
avoid transmitting new packets while they are
being flushed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: pass queue bitmap to flush operation
Johannes Berg [Wed, 13 Feb 2013 11:11:00 +0000 (12:11 +0100)]
mac80211: pass queue bitmap to flush operation

There are a number of situations in which mac80211 only
really needs to flush queues for one virtual interface,
and in fact during this frames might be transmitted on
other virtual interfaces. Calculate and pass a queue
bitmap to the driver so it knows which queues to flush.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211/minstrel_ht: do not sample actively used rates
Felix Fietkau [Sat, 16 Mar 2013 16:00:27 +0000 (17:00 +0100)]
mac80211/minstrel_ht: do not sample actively used rates

max_tp_rate2 and max_prob_rate tend to get used occasionally during
retransmission, which is more useful for the statistics than probing
with individual probe packets.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211/minstrel_ht: avoid useless sampling of high-probability slower rates
Felix Fietkau [Sat, 16 Mar 2013 16:00:26 +0000 (17:00 +0100)]
mac80211/minstrel_ht: avoid useless sampling of high-probability slower rates

Slow rates that have >95% success probability do not need to be
monitored continuously. When the channel conditions change rapidly, the
slow sampling results are useless anyway. When conditions change slowly,
they will be monitored by gradual downgrading of the actively used
rates. This patch slightly improves throughput under good conditions.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211/minstrel_ht: improve rate selection stability
Felix Fietkau [Sat, 16 Mar 2013 16:00:25 +0000 (17:00 +0100)]
mac80211/minstrel_ht: improve rate selection stability

Under load, otherwise stable rates can easily fluctuate because of
collisions. In my tests on a clean channel, the success probability of
the max throughput rate often stays somewhere between 90% and 100% under
load. This can cause some unnecessary switching to lower rates.
This patch improves stability by treating success probability values
between 90% and 100% the same.
In my tests on a 3x3 HT20 link with lots of TCP traffic, it improves the
average throughput by a few mbit/s.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
11 years agomac80211: remove vif debugfs driver callbacks
Stanislaw Gruszka [Fri, 8 Mar 2013 13:46:15 +0000 (14:46 +0100)]
mac80211: remove vif debugfs driver callbacks

This basically reverts commit b207cdb07f3f01ec1adaac62e9d0cc918c60a81a.

Now is possible to use drv_{add,remove}_interface() and vif->debugfs_dir
to create/remove per interface debugfs files. Remove redundant
callbacks.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>