]> git.openfabrics.org - ~emulex/infiniband.git/log
~emulex/infiniband.git
10 years agoMerge branch 'for-linville' of git://github.com/kvalo/ath
John W. Linville [Mon, 24 Feb 2014 20:02:36 +0000 (15:02 -0500)]
Merge branch 'for-linville' of git://github.com/kvalo/ath

10 years agoRevert "Staging: rtl8812ae: remove modules field of rate_control_ops"
John W. Linville [Mon, 24 Feb 2014 19:35:46 +0000 (14:35 -0500)]
Revert "Staging: rtl8812ae: remove modules field of rate_control_ops"

This reverts commit 35582ad9d342025653aaf28ed321bf5352488d7f.

This should not have been merged through this tree...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath10k: implement sta_rc_update()
Michal Kazior [Fri, 14 Feb 2014 13:49:48 +0000 (14:49 +0100)]
ath10k: implement sta_rc_update()

This allows dynamic changes of bandwidth/nss/smps,
e.g. via ht/vht operation mode change
notification.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix SMPS support
Michal Kazior [Fri, 14 Feb 2014 13:45:51 +0000 (14:45 +0100)]
ath10k: fix SMPS support

Firmware ignores SMPS flags in peer assoc command.

For SMPS to work it is necessary to set peer
parameter after peer assoc command so that tx
chainmask is setup properly.

This should fix packet loss and improve throughput
with stations that have SMPS enabled upon
association.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: release conf_mutex if vdev_start() fails
Kalle Valo [Thu, 13 Feb 2014 16:13:12 +0000 (18:13 +0200)]
ath10k: release conf_mutex if vdev_start() fails

I modified Michal's commit c930f744bdb0 ("ath10k: implement channel switching") to return
when vdev_start() fails, but forgot to release conf_mutex.

Found by coccinelle:

>> drivers/net/wireless/ath/ath10k/mac.c:2745:5-11: preceding lock on line 2663

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath: remove camel case from struct reg_dmn_pair_mapping
Kalle Valo [Thu, 13 Feb 2014 16:13:12 +0000 (18:13 +0200)]
ath: remove camel case from struct reg_dmn_pair_mapping

Fixes a checkpatch warning in ath10k:

drivers/net/wireless/ath/ath10k/mac.c:1636: WARNING: Avoid CamelCase: <regpair->regDmnEnum>

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix alignment in ath10k_dbg()
Kalle Valo [Thu, 13 Feb 2014 16:13:12 +0000 (18:13 +0200)]
ath10k: fix alignment in ath10k_dbg()

Fix a checkpatch warning:

drivers/net/wireless/ath/ath10k/debug.h:95: CHECK: Alignment should match open parenthesis

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoStaging: rtl8812ae: remove modules field of rate_control_ops
Stephen Rothwell [Thu, 13 Feb 2014 02:14:13 +0000 (13:14 +1100)]
Staging: rtl8812ae: remove modules field of rate_control_ops

This has been removed in further work.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Update dtim period before starting BSS
Pontus Fuchs [Wed, 12 Feb 2014 19:04:48 +0000 (19:04 +0000)]
wcn36xx: Update dtim period before starting BSS

The dtim period sent to FW was 0 because the dtim period
was never set. This caused an incorrect dtim count to be sent in
beacons.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Track dpu signature per sta
Pontus Fuchs [Wed, 12 Feb 2014 19:04:47 +0000 (19:04 +0000)]
wcn36xx: Track dpu signature per sta

This fixes problems seen with multiple softap clients and reconnecting
softap clients.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Rename wcn36xx_vif.ucast_dpu_signature to self_ucast_dpu_sign
Pontus Fuchs [Wed, 12 Feb 2014 19:04:46 +0000 (19:04 +0000)]
wcn36xx: Rename wcn36xx_vif.ucast_dpu_signature to self_ucast_dpu_sign

This is more line with the names of the other members

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Add support for 3680
Pontus Fuchs [Wed, 12 Feb 2014 19:04:45 +0000 (19:04 +0000)]
wcn36xx: Add support for 3680

3680 has a few registers on other addresses.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Print FW capabilities
Pontus Fuchs [Wed, 12 Feb 2014 19:04:44 +0000 (19:04 +0000)]
wcn36xx: Print FW capabilities

After fw caps exchange, print the FW's capabilities.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Cache nv to avoid request_firmware on resume path
Pontus Fuchs [Wed, 12 Feb 2014 19:04:43 +0000 (19:04 +0000)]
wcn36xx: Cache nv to avoid request_firmware on resume path

If wowlan if off mac80211 will stop / start the driver on suspend /
resume. This causes problems on resume since request_firmware is called
from start. Fix this by caching the nv.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Wait longer for SMD commands to complete
Pontus Fuchs [Wed, 12 Feb 2014 19:04:42 +0000 (19:04 +0000)]
wcn36xx: Wait longer for SMD commands to complete

On some wcnss firmwares the start command can take up to 300ms to
complete. Currently there is a 200ms timeout for SMD command to
complete which causes the start to fail.

Increase the timeout to 500ms. Also improve debug information
regarding SMD command completion time.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Improve feature caps exchange
Pontus Fuchs [Wed, 12 Feb 2014 19:04:41 +0000 (19:04 +0000)]
wcn36xx: Improve feature caps exchange

* Response format is not in the canonical format.
  wcn36xx_smd_rsp_status_check cannot be used.

* Save the FW caps in wcn36xx struct for later use.

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowcn36xx: Fix copy paste error hal_exit_bmps -> hal_keep_alive
Pontus Fuchs [Wed, 12 Feb 2014 19:04:40 +0000 (19:04 +0000)]
wcn36xx: Fix copy paste error hal_exit_bmps -> hal_keep_alive

Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: add support for STA CSA with chan contexts
Arik Nemtsov [Mon, 10 Feb 2014 11:47:34 +0000 (13:47 +0200)]
wlcore: add support for STA CSA with chan contexts

TI wl12xx/wl18xx cards support channel switch via a driver specific
switch_channel op while operating with channel contexts.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: enable beacon filtering only after receiving a beacon
Eliad Peller [Mon, 10 Feb 2014 11:47:33 +0000 (13:47 +0200)]
wlcore: enable beacon filtering only after receiving a beacon

Enabling beacon filtering before receving a beacon
might result in not having a beacon at all for the
current connected AP, which prevents the station
from entering power-save.

Replace the current approach (of starting beacon
filtering on init) and configure beacon filering
only after bss_conf->dtimper is set (which means
mac80211 already parsed a beacon).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: increase timeout to 5000 msecs
Yaniv Machani [Mon, 10 Feb 2014 11:47:32 +0000 (13:47 +0200)]
wlcore: increase timeout to 5000 msecs

dfs configuration command might take longer than
the current timeout. increase it to 5 seconds.

Signed-off-by: Yaniv Machani <yanivma@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: decrease warning verbosity during recovery
Arik Nemtsov [Mon, 10 Feb 2014 11:47:31 +0000 (13:47 +0200)]
wlcore: decrease warning verbosity during recovery

Silently ignore repetitive scheduling of recovery work and commands
being passed to the bus when the HW is not available. This can happen
many times during recovery and slow it down. It also spams the kernel
logs.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: consider multiple APs when checking active_link_count
Eliad Peller [Mon, 10 Feb 2014 11:47:30 +0000 (13:47 +0200)]
wlcore: consider multiple APs when checking active_link_count

Each AP has its own global and broadcast links, so when
checking for active sta count (according to the active_link_count)
we must take them all into account.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: don't handle unsetting of default wep key
Eliad Peller [Mon, 10 Feb 2014 11:47:29 +0000 (13:47 +0200)]
wlcore: don't handle unsetting of default wep key

mac80211 unsets the default wep key on disassoc.
The fw doesn't support this notification, so simply
ignore it.

The actual flow actually triggers fw recovery in some
cases, as mac80211 unsets the default key only after
disassoc, when wlvif->sta.hlid, resulting in invalid
hlid being passed to the fw.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: wl18xx: allow CCK rates for AP mode
Arik Nemtsov [Mon, 10 Feb 2014 11:47:28 +0000 (13:47 +0200)]
wlcore: wl18xx: allow CCK rates for AP mode

12xx chips allow only OFDM rates in AP mode for BT-Coex purposes. This
is no longer required in 18xx chips, starting with FW 8.6.0.0.8.

Update the min allowed FW version in 18xx to support this functionality.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: don't stop sched_scan on interface removal
Barak Bercovitz [Mon, 10 Feb 2014 11:47:27 +0000 (13:47 +0200)]
wlcore: don't stop sched_scan on interface removal

Stopping sched scan on interface removal (during recovery)
is no longer needed, as sched scanning is automatically
restarted by mac80211.

Signed-off-by: Barak Bercovitz <barak@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: send EAPOL frames with voice priority
Igal Chernobelsky [Mon, 10 Feb 2014 11:47:26 +0000 (13:47 +0200)]
wlcore: send EAPOL frames with voice priority

Send EAPOL frames with voice priority by setting (the new)
TX_HW_ATTR_EAPOL_FRAME bit in tx attribute.

Sending EAPOL with voice priority fixes re-key
timeout issues during heavy traffic.

Signed-off-by: Igal Chernobelsky <igalc@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl18xx: move to new firmware (wl18xx-fw-3.bin)
Eliad Peller [Mon, 10 Feb 2014 11:47:25 +0000 (13:47 +0200)]
wl18xx: move to new firmware (wl18xx-fw-3.bin)

Bump the min wl18xx fw version to 8.8.0.0.13

This fw is not backward compatible with older
firmware (due to api changes), so use bump
the firmware name as well.

Some modifications were done to the driver-fw api
in order to support multiple APs.

Additionally, some of the consts (such as max stations,
max links and max RX BA sessions) were changed.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl12xx/wl18xx: configure iface_combinations per-hw
Eliad Peller [Mon, 10 Feb 2014 11:47:24 +0000 (13:47 +0200)]
wlcore/wl12xx/wl18xx: configure iface_combinations per-hw

Each hw supports a different iface combinations.
Define the supported combinations in each driver,
and save it in wl->iface_combinations.

Since each driver defines its own combinations now,
it can also define its max supported channels, so
we no longer need to save and set it explicitly
in wlcore.

Update wl18xx interface combinations to allow
multiple APs.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl12xx/wl18xx: configure max_stations per-hw
Eliad Peller [Mon, 10 Feb 2014 11:47:23 +0000 (13:47 +0200)]
wlcore/wl12xx/wl18xx: configure max_stations per-hw

Each hw supports a different max stations (connected to the
same ap). add a new wl->max_ap_stations and use it instead
of the current common AP_MAX_STATIONS.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl12xx/wl18xx: configure num_links per-hw
Eliad Peller [Mon, 10 Feb 2014 11:47:22 +0000 (13:47 +0200)]
wlcore/wl12xx/wl18xx: configure num_links per-hw

Upcoming fw versions will have different max links support
(according to the hw). Get ready for it by configuring
wl->num_links per-hw, instead of using the const WL12XX_MAX_LINKS.

However, continue using WLCORE_MAX_LINKS in order to simplify
structs declarations (we use it in multiple bitmaps, and converting
them to dynamic arrays is just cumbersome).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl12xx/wl18xx: simplify fw_status handling
Eliad Peller [Mon, 10 Feb 2014 11:47:21 +0000 (13:47 +0200)]
wlcore/wl12xx/wl18xx: simplify fw_status handling

Instead of splitting the fw_status into 2 and using some
complex calculations, read the fw status and let each low-level
driver (wl12xx/wl18xx) convert it into a common struct.

This is required for the upcoming fw api changes, which
break the current logic anyway.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: AP: don't start mac80211 PS on non-peer HLIDs
Arik Nemtsov [Mon, 10 Feb 2014 11:47:20 +0000 (13:47 +0200)]
wlcore: AP: don't start mac80211 PS on non-peer HLIDs

It seems the wl18xx FW sometimes sends spurious changes on the PSM state
of the broadcast HLID. This causes us to search for a station on a
non-peer link and fail, causing warnings in our log.

Prevent the driver from considering PSM changes for any non-peer HLIDs.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: block read/writes to FW during ELP
Barak Bercovitz [Mon, 10 Feb 2014 11:47:19 +0000 (13:47 +0200)]
wlcore: block read/writes to FW during ELP

When the chip is in ELP mode read/write to FW is invalid and may cause
the lower layers to get stuck. The reads/writes concerning ELP wakeup
are the exception here and are checked for. In addition to blocking the
IO, produce a warning.

Signed-off-by: Barak Bercovitz <barak@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: cancel Tx watchdog on suspend and rearm on first Tx after
Arik Nemtsov [Mon, 10 Feb 2014 11:47:18 +0000 (13:47 +0200)]
wlcore: cancel Tx watchdog on suspend and rearm on first Tx after

Sometimes a tx_flush during suspend fails, but the FW manages to flush
out the packets during the time when the host is supsended. Cancel
the Tx-watchdog on suspend to not cause a spurious recovery on resume
for that case. Set a flag to reinit the watchdog on the first Tx after
resume, so we'll still recover if the FW is not empty and there's
indeed a problem.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: memset wl->rx_filter_enabled to zero after recovery
Nadim Zubidat [Mon, 10 Feb 2014 11:47:17 +0000 (13:47 +0200)]
wlcore: memset wl->rx_filter_enabled to zero after recovery

zero rx_filter_enabled array after recovery to avoid
cases were the driver will keep trying to clear a
filter which is not configured in FW.

Such case will cause consecutive recoveries due to
command execution failures.

While on it, convert rx_filter_enabled to bitmap,
to save some memory and make sparse happy (it
doesn't like sizeof(bool array)).

Signed-off-by: Nadim Zubidat <nadimz@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: use kernel api to replace b43 specific helper function
ZHAO Gang [Fri, 17 Jan 2014 16:17:39 +0000 (00:17 +0800)]
b43: use kernel api to replace b43 specific helper function

Use ieee80211_channel_to_frequency() to replace b43_channel_to_freq_{2,5}ghz(),
and remove unused b43_freq_to_channel_{2,5}ghz().

Signed-off-by: ZHAO Gang <gamerh2o@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville [Thu, 13 Feb 2014 19:43:02 +0000 (14:43 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

10 years agoath10k: Use pci_enable_msi_range()
Alexander Gordeev [Thu, 13 Feb 2014 15:50:02 +0000 (17:50 +0200)]
ath10k: Use pci_enable_msi_range()

As result deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() and pci_enable_msix_range()
interfaces.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: Disable MSI in case IRQ configuration is unknown
Alexander Gordeev [Thu, 13 Feb 2014 15:50:01 +0000 (17:50 +0200)]
ath10k: Disable MSI in case IRQ configuration is unknown

In case IRQ configuration is unknown possibly enabled MSIs
are left enabled in ath10k_pci_deinit_irq(). This update
fixes the described misbehaviour.

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: Get rid of superfluous call to pci_disable_msi()
Alexander Gordeev [Thu, 13 Feb 2014 15:50:01 +0000 (17:50 +0200)]
ath10k: Get rid of superfluous call to pci_disable_msi()

The documentation states that pci_enable_msi_block() returns the number of
requests 'could have been allocated', not 'could allocate'. IOW, MSIs are *not*
enabled if a positive value returned.

kvalo: add commit log based on Alexander's email

Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: pass frames with invalid peer status to upper layer
Janusz Dziedzic [Thu, 13 Feb 2014 15:50:00 +0000 (17:50 +0200)]
ath10k: pass frames with invalid peer status to upper layer

Pass frames with invalid peer status to upper layer.
Next mac80211 will validate frames and drop if required.
This is required to detect spurious frames and pass
this info to user mode (detect CLASS2 CLASS3 frames from
nonauthenticated/nonassociated stations).

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: AP: handle HT station which does not have HT RX MCS
Bartosz Markowski [Mon, 10 Feb 2014 12:12:55 +0000 (13:12 +0100)]
ath10k: AP: handle HT station which does not have HT RX MCS

This is a workaround for HT-enabled STAs which break the spec
and have no HT capabilities RX mask (no HT RX MCS map).

As per spec, in section 20.3.5 Modulation and coding scheme (MCS),
MCS 0 through 7 are mandatory in 20MHz with 800 ns GI at all STAs.

Firmware asserts if such situation occurs.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: suspend hardware before reset
Marek Puzyniak [Mon, 10 Feb 2014 16:14:24 +0000 (17:14 +0100)]
ath10k: suspend hardware before reset

In case of warm reset target need to be suspended.
Suspend function is extented to handle both cases
with disabling interrupts and without disabling interrupts.
Warm target reset requires suspend with all interrupts
disabled.

This patch depends on
ath10k: fix device initialization routine

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: refactor suspend/resume functions
Marek Puzyniak [Mon, 10 Feb 2014 16:14:23 +0000 (17:14 +0100)]
ath10k: refactor suspend/resume functions

Suspend/resume callbacks are not protected by configuration mutex
so adding such protection. Also in order to simplify implemetation
of suspend function wait queue is replaced by completion.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix device initialization routine
Michal Kazior [Mon, 10 Feb 2014 16:14:22 +0000 (17:14 +0100)]
ath10k: fix device initialization routine

Hardware CUS232 version 2 has some issues with cold
reset that lead to Data Bus Errors or system hangs
in some cases. It's safer to use warm reset when
possible as it shouldn't trigger the
aforementioned issues.

Prefer warm reset over cold reset. However since
warm reset doesn't work after FW crash make sure to
fallback to cold reset when booting up the HW.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: Set proper nss value for the peer
Marek Kwaczynski [Mon, 10 Feb 2014 10:25:25 +0000 (11:25 +0100)]
ath10k: Set proper nss value for the peer

It was found during testing the nss calculation does not
cover all corner cases. Station could request eq. only MCS8
and MCS9 (nss=2 specific). Next num_rates=2 so the driver
sets nss=(max((2+7)/8, 1))=1. Which is wrong. The in-driver
calculation was introduced prior (commit ddcc347b70
mac80211: fix rx_nss calculation for drivers with hw rc).
Since it's fixed, use mac80211 provided value from now.
End user will experience lower throuhputs than expected
if the nss is wrongly calculated.

Signed-off-by: Marek Kwaczynski <marek.kwaczynski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: remove excessive rx msdu len check
Bartosz Markowski [Tue, 11 Feb 2014 07:37:06 +0000 (08:37 +0100)]
ath10k: remove excessive rx msdu len check

This throw a lot of pointless warnings in case of DFS (radar
detection) and PHYERR events from firmware, when firmware may
actually insert more data, than we assume.

Besides of being noisy this debug does not protect or check
anything usefull currently. It was introduced long time ago
while debugging aggregations. So just removing it.

Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: better tx/rx debugging
Ben Greear [Wed, 5 Feb 2014 21:58:34 +0000 (13:58 -0800)]
ath10k: better tx/rx debugging

Make it easier to grep for htt rx errors.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: add more debugging for receive errors
Ben Greear [Wed, 5 Feb 2014 21:58:33 +0000 (13:58 -0800)]
ath10k: add more debugging for receive errors

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: print out size of wmi-ready-event message
Ben Greear [Wed, 5 Feb 2014 21:58:32 +0000 (13:58 -0800)]
ath10k: print out size of wmi-ready-event message

Show message length and expected length.  Helps debug
firmware mismatch issues.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agomwifiex: add key material v2 support
Avinash Patil [Sat, 8 Feb 2014 00:32:35 +0000 (16:32 -0800)]
mwifiex: add key material v2 support

This patch adds key material V2 support to mwifiex.
Newer FW supports this feature and FW KEY API version is used
to determine which command structure needs to be used.

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>
10 years agomwifiex: parse API version from FW
Avinash Patil [Sat, 8 Feb 2014 00:30:42 +0000 (16:30 -0800)]
mwifiex: parse API version from FW

This patch adds support to parse FW API version TLVs.
Currently only API version for key_material is supported.

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>
10 years agomwifiex: disable all TDLS link during disconnection
Avinash Patil [Sat, 8 Feb 2014 00:30:41 +0000 (16:30 -0800)]
mwifiex: disable all TDLS link during disconnection

During deauthenticate/link lost event, disable all TDLS links as
TDLS would not work when infra connection is not active.
Also this will avoid an issue where ping to peer station doesn't
work after reassociation to AP where we had created TDLS link in
earlier association.

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>
10 years agomwifiex: separate BA params for TDLS link if 11ac is supported
Avinash Patil [Sat, 8 Feb 2014 00:30:40 +0000 (16:30 -0800)]
mwifiex: separate BA params for TDLS link if 11ac is supported

If TDLS link is 11ac enabled i.e. we as well as peer station
supports VHT, configure seprate TX & RX window sizes during
BA setup. So even if BSS does not support 11ac, we can use VHT
capabilities and higher window sizes on direct link.

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>
10 years agomwifiex: add VHT support for TDLS
Avinash Patil [Sat, 8 Feb 2014 00:30:39 +0000 (16:30 -0800)]
mwifiex: add VHT support for TDLS

During TDLS setup request/response, if HW is 11ac capable,
we add VHT Capability IEs in outgoing data frame. Also while
processing received setup request/response, we preserve peer's
11ac capability retrieved from IEs.

Patch also gets VHT parameters from config_station handlers and
sets it to FW using TDLS config command.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: pass ieee80211_vht_cap to mwifiex_fill_vht_cap_tlv
Avinash Patil [Sat, 8 Feb 2014 00:30:38 +0000 (16:30 -0800)]
mwifiex: pass ieee80211_vht_cap to mwifiex_fill_vht_cap_tlv

This patch changes mwifiex_fill_vht_cap_tlv function to pass
struct ieee80211_vht_cap instead of mwifiex_ie_types_vhtcap
so that it can be used generically.

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>
10 years agomwifiex: AMPDU support for TDLS link
Avinash Patil [Sat, 8 Feb 2014 00:30:37 +0000 (16:30 -0800)]
mwifiex: AMPDU support for TDLS link

This patch adds AMPDU support for TDLS link. We have set 11n
capabilities including AMPDU parameters during ENABLE_LINK.
We set a variable in RA list to indicate this as TDLS link.
This patch uses these capabilities to know if AMPDU is allowed
on TDLS link and enables AMPDU aggregation for TX and RX reording
support for RA list for this peer.

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>
10 years agomwifiex: tdls related handling for data packets addressed to TDLS peer
Avinash Patil [Sat, 8 Feb 2014 00:30:36 +0000 (16:30 -0800)]
mwifiex: tdls related handling for data packets addressed to TDLS peer

1. If data packet is addressed to TDLS peer for which link is
established, mark these packets with TDLS flag so that FW can
send them on direct link instead of sending via AP.
2. If data packet is addressed to TDLS peer and TDLS setup is
underway, move these packets to TDLS queue.
3. If this packet is TDLS setup packet, do not block it.

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>
10 years agomwifiex: provision for holding and restoring packets during TDLS setup
Avinash Patil [Sat, 8 Feb 2014 00:30:35 +0000 (16:30 -0800)]
mwifiex: provision for holding and restoring packets during TDLS setup

While TDLS link is being setup, few packets from this station to
peer station may be buffered at AP. It may happen that once TDLS
link is setup, packets sent from station to peer on direct link
get delivered before traffic from AP arrives at peer station.
This results into packet reordering issue at peer station.

To avoid this, we hold data packets destined to TDLS peer during
TDLS setup. These packets are moved to temperory TDLS TX queue.
Upon successful TDLS setup, they are moved to RA list created for
this peer. Upon failure, packets are moved back to AP's RA list
for that particular TID.

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>
10 years agomwifiex: add cfg80211 change_station handler support
Avinash Patil [Sat, 8 Feb 2014 00:30:34 +0000 (16:30 -0800)]
mwifiex: add cfg80211 change_station handler support

This patch adds cfg80211 change_station handler support for mwifiex
which is needed for TDLS link setup. Driver creates a command to
modify peer link capabilities and issues command to FW.

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>
10 years agomwifiex: add cfg80211 add_station handler support
Avinash Patil [Sat, 8 Feb 2014 00:30:33 +0000 (16:30 -0800)]
mwifiex: add cfg80211 add_station handler support

This patch adds cfg80211 add_station handler support for mwifiex
which is needed for TDLS setup. Driver issues create TDLS link
command to FW upon receiving add_station from cfg80211.

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>
10 years agomwifiex: add cfg80211 tdls_oper handler support
Avinash Patil [Sat, 8 Feb 2014 00:27:34 +0000 (16:27 -0800)]
mwifiex: add cfg80211 tdls_oper handler support

This patch adds cfg80211 handler tdls_oper handler support to
mwifiex. Upon enable link, driver sets status as TDLS status as
setup complete and also sets AMSDU size, AMPDU params for direct
link. Upon disable link, driver issues command to FW to delete
this link in FW.

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>
10 years agomwifiex: parse TDLS action frames during RX
Avinash Patil [Sat, 8 Feb 2014 00:27:33 +0000 (16:27 -0800)]
mwifiex: parse TDLS action frames during RX

This patch adds support for parsing TDLS action frames during
station receive handler.
Peer station capabilities are stored into station node.

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>
10 years agomwifiex: add tdls_mgmt handler support
Avinash Patil [Sat, 8 Feb 2014 00:27:32 +0000 (16:27 -0800)]
mwifiex: add tdls_mgmt handler support

This patch adds support for TDLS management frames transmit
handler. mwifiex driver supports TDLS with external support,
i.e. expects user space application to form TDLS frames.
Same is advertised to cfg80211 during registration.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: cleanup in mwifiex_fill_cap_info()
Amitkumar Karwar [Sat, 8 Feb 2014 00:27:31 +0000 (16:27 -0800)]
mwifiex: cleanup in mwifiex_fill_cap_info()

Pass 'struct ieee80211_ht_cap' pointer to
mwifiex_fill_cap_info() instead of
'struct mwifiex_ie_types_htcap' pointer, because the routine
internally uses the later one.
This patch also adds WARN_ON_ONCE check for NULL band.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: move station list functions to common code
Avinash Patil [Sat, 8 Feb 2014 00:27:30 +0000 (16:27 -0800)]
mwifiex: move station list functions to common code

These functions are now needed by TDLS while managing station list.
Move them from AP related file to utility file.

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>
10 years agomwifiex: make tos_to_tid_inv part of mwifiex_private structure
Avinash Patil [Sat, 8 Feb 2014 00:27:29 +0000 (16:27 -0800)]
mwifiex: make tos_to_tid_inv part of mwifiex_private structure

tos_to_tid_inv values are needed even during TDLS restore
operations. Currently tos_to_tid_inv is part of wmm.c and
is declared static.
Make it part of private structure so that it can be used in
other files as well.

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>
10 years agomwifiex: handle AMPDU supported check for AP interface
Avinash Patil [Sat, 8 Feb 2014 00:27:28 +0000 (16:27 -0800)]
mwifiex: handle AMPDU supported check for AP interface

This patch fixes a bug where we were checking for AP's AMPDU param
setting even when transmitting traffic to associated station.
Patch adds provision to pass additional parameter ra_list pointer
to function which checks if AMPDU is allowed. If current BSS type is
AP, we check station's AMPDU params else we check AP's AMPDU params.

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>
10 years agomwifiex: advertise correct beamforming information for VHT
Amitkumar Karwar [Sat, 8 Feb 2014 00:27:27 +0000 (16:27 -0800)]
mwifiex: advertise correct beamforming information for VHT

Currently MU/SU beamformer and MU beamformee features are
not supported.

Hence this patch modifies VHT capability information accordingly.
Number of sounding dimensions should be zero in this case.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: update beamforming capability field for HT
Amitkumar Karwar [Sat, 8 Feb 2014 00:27:26 +0000 (16:27 -0800)]
mwifiex: update beamforming capability field for HT

This patch makes sure that beamforming capability field in
ht capability info gets filled if hardware supports the feature.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: don't leak DMA command skbuffs
Aaron Durbin [Sat, 8 Feb 2014 00:25:51 +0000 (16:25 -0800)]
mwifiex: don't leak DMA command skbuffs

The current mwifiex pcie driver assumed that it would get
its cmdrsp_complete() callback called before another command
was sent to unmap the command's skbuff. However, that is not
true. The mwifiex_check_ps_cond() will send a sleep command
to the card without having adapter->curr_cmd set. Within the
workqueue's state machine the adapter's state would be set
to allow commands (curr_cmd = NULL && cmd_sent = false) after
having receieved the response from the sleep command. The
card->cmd_buf would then be overridden with the new command
but the first command's skbuff was not unmapped. This leaks
mapped skbuffs when a bounce buffer is employed.

To rectify this unmap the card->cmd_buf when the response is
received from the card instead of waiting for the
cmdrsp_complete() callback.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: balance dma map/unmap sizes
Aaron Durbin [Sat, 8 Feb 2014 00:25:50 +0000 (16:25 -0800)]
mwifiex: balance dma map/unmap sizes

Depending on the underlying DMA implementation its
not possible to partially unmap DMA buffers. Moreover
its not possible to understand the intent of passing
0 as the size to dma unmap. The intent of this
driver is unmap the entire skb buffer. The only way
to ensure that the size matches on unmap is to store
both the dma address and the size in the skb ca field.

Introduce a mwifiex_dma_mapping structure which tracks
the dma address and the size. Additionally, provide
a mwifiex_unmap_pci_memory() that utilizes the new
structure. This also provide symmetry within the
internal API.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: implement extended scan feature
Amitkumar Karwar [Wed, 12 Feb 2014 02:39:56 +0000 (18:39 -0800)]
mwifiex: implement extended scan feature

In extended scan, host gets scan results through one or
multiple events instead of scan command response. Host will
send next scan command when all the events are received.

Legacy scan sometimes truncates scan results in a noisy
environment due to buffer length limitation. This issue
is addressed in extended scan.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: separate out next scan command queueing logic
Amitkumar Karwar [Sat, 8 Feb 2014 00:23:36 +0000 (16:23 -0800)]
mwifiex: separate out next scan command queueing logic

This new function will be useful later for extended scan
feature.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: separate out response buffer parsing code
Amitkumar Karwar [Sat, 8 Feb 2014 00:23:35 +0000 (16:23 -0800)]
mwifiex: separate out response buffer parsing code

This new function will be useful later for extended scan
feature.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: change beacon parameter structure
Amitkumar Karwar [Sat, 8 Feb 2014 00:23:34 +0000 (16:23 -0800)]
mwifiex: change beacon parameter structure

'mwifiex_bcn_param' structure contains five parameters which
are present in beacon buffer in case of legacy scan.

'rssi' field won't be there in this buffer for extended scan.
Hence 'bssid' and 'rssi' are removed from the structure and it is
renamed as 'mwifiex_fixed_bcn_param' so that we can have common
parsing logic later for both.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: remove unsupported code in 11ac
Bing Zhao [Sat, 8 Feb 2014 00:21:01 +0000 (16:21 -0800)]
mwifiex: remove unsupported code in 11ac

bit12 in fw_cap_info is for testing only.
Remove all related code.

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: improve readability in 11ac mcsmap to maxrate conversion
Bing Zhao [Sat, 8 Feb 2014 00:21:00 +0000 (16:21 -0800)]
mwifiex: improve readability in 11ac mcsmap to maxrate conversion

1) rename max_mcs to mcs;
2) initialize 'i' and 'nss' as 1 instead of 0 in nss lookup;
3) use GET_VHTNSSMCS(mcs_map, nss) macro;
4) use IEEE80211_VHT_MCS_* definitions instead of hard coding

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: make 11ac mcs rate tables global and const
Bing Zhao [Sat, 8 Feb 2014 00:20:59 +0000 (16:20 -0800)]
mwifiex: make 11ac mcs rate tables global and const

Remove these local array variables and define them as static
const array in global space.
The duplicated mcs_rate table is removed automatically with this
change.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: make use of IEEE80211_VHT_MCS_NOT_SUPPORTED
Bing Zhao [Sat, 8 Feb 2014 00:20:58 +0000 (16:20 -0800)]
mwifiex: make use of IEEE80211_VHT_MCS_NOT_SUPPORTED

Remove driver's macro and use ieee80211's definition instead

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Calculate IQ-CAL median
Sujith Manoharan [Fri, 7 Feb 2014 04:59:55 +0000 (10:29 +0530)]
ath9k: Calculate IQ-CAL median

This patch adds a routine to calculate the median IQ correction
values for AR955x, which is used for outlier detection.
The normal method which is used for all other chips is
bypassed for AR955x.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Expand the IQ coefficient array
Sujith Manoharan [Fri, 7 Feb 2014 04:59:54 +0000 (10:29 +0530)]
ath9k: Expand the IQ coefficient array

This will be used for storing data for mutiple
IQ calibration runs, for AR955x.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Modify IQ calibration for AR955x
Sujith Manoharan [Fri, 7 Feb 2014 04:59:53 +0000 (10:29 +0530)]
ath9k: Modify IQ calibration for AR955x

IQ calibration post-processing for AR955x is different
from other chips - instead of just doing it as part
of AGC calibration once, it is triggered 3 times and
a median is determined. This patch adds initial support
for changing the calibration behavior for AR955x.

Also, to simplify things, a helper routine to issue/poll
AGC calibration is used.

For non-AR955x chips, the iqcal_idx (which will be used
in subsequent patches) is set to zero.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix magnitude/phase calculation
Sujith Manoharan [Fri, 7 Feb 2014 04:59:52 +0000 (10:29 +0530)]
ath9k: Fix magnitude/phase calculation

Incorrect values are programmed in the registers
containing the IQ correction coefficients by the IQ-CAL
post-processing code. Fix this.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Rename ar9003_hw_tx_iqcal_load_avg_2_passes
Sujith Manoharan [Fri, 7 Feb 2014 04:59:51 +0000 (10:29 +0530)]
ath9k: Rename ar9003_hw_tx_iqcal_load_avg_2_passes

Use ar9003_hw_tx_iq_cal_outlier_detection instead.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Check explicitly for IQ calibration
Sujith Manoharan [Fri, 7 Feb 2014 04:59:50 +0000 (10:29 +0530)]
ath9k: Check explicitly for IQ calibration

In chips like AR955x, the initvals contain the information
whether IQ calibration is to be done in the HW when an
AGC calibration is triggered. Check if IQ-CAL is enabled
in the initvals before flagging 'txiqcal_done' as true.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix IQ cal post processing for SoC
Sujith Manoharan [Fri, 7 Feb 2014 04:59:49 +0000 (10:29 +0530)]
ath9k: Fix IQ cal post processing for SoC

Calibration data is not reused for SoC chips, so
call ar9003_hw_tx_iq_cal_post_proc() with the correct
argument. The 'is_reusable' flag is currently used
only for PC-OEM chips, but it makes things clearer to
specify it explicity.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: Add device ID for Buffalo WLI-UV-AG300P
Masaki TAGAWA [Thu, 6 Feb 2014 05:06:24 +0000 (14:06 +0900)]
ath9k_htc: Add device ID for Buffalo WLI-UV-AG300P

Buffalo WLI-UV-AG300P is almost the same as Sony UWA-BR100.

Signed-off-by: Masaki TAGAWA <masaki@club.kyutech.ac.jp>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove ath9k rate control
Sujith Manoharan [Thu, 6 Feb 2014 04:52:55 +0000 (10:22 +0530)]
ath9k: Remove ath9k rate control

There is no benefit in retaining the legacy rate control module
in the driver codebase.

It is known to be buggy and has less than optimal performance
in real-world environments compared with minstrel. The only
reason that it was kept when we made the switch to minstrel
as default was that it showed higher throughput numbers in a
clean/ideal environment.

This is no longer the case and minstrel can push ath9k to
the same throughput levels. In TCP, with 3-stream cards, more than
295 Mbps can be obtained in open air, with 2-stream cards,
210 Mbps is easily reached. To test performance issues,
instead of using a broken rate control module, it is better
to use the fixed-rate interface provided by mac80211 anyway.

The ath9k RC has not received any bug fixes in years and is
just bit-rotting away - this patch removes it.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: catch fw panic pattern
Oleksij Rempel [Tue, 4 Feb 2014 09:27:50 +0000 (10:27 +0100)]
ath9k_htc: catch fw panic pattern

... and print what we get.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: remove useless memcpy
Oleksij Rempel [Tue, 4 Feb 2014 09:27:49 +0000 (10:27 +0100)]
ath9k_htc: remove useless memcpy

after switch to common fucntions we do not need this memcpy any more.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_rx_skb_postprocess
Oleksij Rempel [Tue, 4 Feb 2014 09:27:48 +0000 (10:27 +0100)]
ath9k_htc: use ath9k_cmn_rx_skb_postprocess

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_rx_skb_postprocess to common.c
Oleksij Rempel [Tue, 4 Feb 2014 09:27:47 +0000 (10:27 +0100)]
ath9k: move ath9k_rx_skb_postprocess to common.c

and rename it to ath9k_cmn_rx_skb_postprocess. We will use it
on ath9k_htc.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: sync rx_status-> related code with ath9k
Oleksij Rempel [Tue, 4 Feb 2014 09:27:46 +0000 (10:27 +0100)]
ath9k_htc: sync rx_status-> related code with ath9k

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_rx_accept
Oleksij Rempel [Tue, 4 Feb 2014 09:27:45 +0000 (10:27 +0100)]
ath9k_htc: use ath9k_cmn_rx_accept

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_process_rate
Oleksij Rempel [Tue, 4 Feb 2014 09:27:44 +0000 (10:27 +0100)]
ath9k_htc: use ath9k_cmn_process_rate

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: use ath9k_cmn_process_rssi
Oleksij Rempel [Tue, 4 Feb 2014 09:27:43 +0000 (10:27 +0100)]
ath9k_htc: use ath9k_cmn_process_rssi

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k_htc: add rx header converter to make it usable by ath9k
Oleksij Rempel [Tue, 4 Feb 2014 09:27:42 +0000 (10:27 +0100)]
ath9k_htc: add rx header converter to make it usable by ath9k

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_rx_accept to common.c
Oleksij Rempel [Tue, 4 Feb 2014 09:27:41 +0000 (10:27 +0100)]
ath9k: move ath9k_rx_accept to common.c

we can reuse it on ath9k_htc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: move ath9k_process_rate to common.c
Oleksij Rempel [Tue, 4 Feb 2014 09:27:40 +0000 (10:27 +0100)]
ath9k: move ath9k_process_rate to common.c

we can reuse this function in ath9k_htc

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>