firefly-linux-kernel-4.4.55.git
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./linux/kernel/git/linville/wireless

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>
10 years agoath9k: move ath9k_process_rssi to common.c
Oleksij Rempel [Tue, 4 Feb 2014 09:27:39 +0000 (10:27 +0100)]
ath9k: move ath9k_process_rssi to common.c

we can reuse this fucntion on ath9k_htc.
Now we will need to use common version last_rssi, so switch
it too.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath: add last_rssi to ath_common
Oleksij Rempel [Tue, 4 Feb 2014 09:27:38 +0000 (10:27 +0100)]
ath: add last_rssi to ath_common

we need access to this variable from common functions.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agort2x00: move frequent messages to debug level
Stanislaw Gruszka [Fri, 31 Jan 2014 12:18:09 +0000 (13:18 +0100)]
rt2x00: move frequent messages to debug level

On commit 28f2bce9f8bbf704c86f8c684337f82c51592c81 I make change that
print various messages as default. This can cause flood of messages
related to TX status timeout on some environments. I partially fixed
problem on commit bb9c298f3193ac5b80e47b325c690700580b6bcf, but forgot
to move two more messages to debug level.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: CR4 takes precedence over CM3 in brcmf_chip_enter_download()
Arend van Spriel [Wed, 29 Jan 2014 14:32:24 +0000 (15:32 +0100)]
brcmfmac: CR4 takes precedence over CM3 in brcmf_chip_enter_download()

In the enter and exit download sequence the chip core info was checked
for presence of CM3 ARM core. If found it would enter download state for
the CM3. However, on devices that have a CM3 and CR4 this is not correct
and the CR4 should be used to enter download state. This patch changes
the ARM core lookup giving CR4 precedence.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: correct setting of WEP broadcast/unicast keys
Daniel Kim [Wed, 29 Jan 2014 14:32:23 +0000 (15:32 +0100)]
brcmfmac: correct setting of WEP broadcast/unicast keys

The brcmf_add_keyext() is for setting per-station key for cipher
algorithms such as WPA1/WPA2 and should not be used to set
WEP broadcast/unicast keys. This patch fixes connect failure
problem with AP using 802.1x-WEP.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: get chip core information from the device
Arend van Spriel [Wed, 29 Jan 2014 14:32:22 +0000 (15:32 +0100)]
brcmfmac: get chip core information from the device

Instead of instantiating core info structs based upon the
chip identifier it is now done parsing information provided
on the device.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: remove unintended error logging
Arend van Spriel [Wed, 29 Jan 2014 14:32:21 +0000 (15:32 +0100)]
brcmfmac: remove unintended error logging

In brcmf_contstruct_reginfo() some error logging was added by:

  commit f7c51a1a72f50870f80001ddf528a6f7f992bc16
  Author: Arend van Spriel <arend@broadcom.com>
  Date:   Wed Dec 11 16:21:21 2013 +0100

      brcmfmac: correct reporting HT40 support in wiphy htcap

This logging was not intended to be delivered and adds a lot
of messages in the log. The patch removes this logging statement.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: remove TRACE level debug message from brcmf_sdio_bus_sleep()
Arend van Spriel [Wed, 29 Jan 2014 14:32:20 +0000 (15:32 +0100)]
brcmfmac: remove TRACE level debug message from brcmf_sdio_bus_sleep()

The function brcmf_sdio_bus_sleep() function is called rather
frequently, which fills the log when TRACE level is enabled. Reduced
the level to SDIO.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: make chip related functions host interface independent
Arend van Spriel [Wed, 29 Jan 2014 14:32:19 +0000 (15:32 +0100)]
brcmfmac: make chip related functions host interface independent

This patch make several chip related functions host interface
independent by defining callback interface struct brcmf_buscore_ops.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: on sdio remove first detach bus then stop worker.
Hante Meuleman [Wed, 29 Jan 2014 14:32:18 +0000 (15:32 +0100)]
brcmfmac: on sdio remove first detach bus then stop worker.

Currently the function sdio_remove will first destroy the datawork
workqueue and then detach the bus. This can create the situation
where work gets added on non-existing work queue resulting in panic.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: simplify sdio code download routine.
Hante Meuleman [Wed, 29 Jan 2014 14:32:17 +0000 (15:32 +0100)]
brcmfmac: simplify sdio code download routine.

brcmf_sdio_download_code_file is using a loop to send small blobs
of data. This is unnecessarily complex and was simplified with this
patch.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: fix sdio sending of large buffers.
Hante Meuleman [Wed, 29 Jan 2014 14:32:16 +0000 (15:32 +0100)]
brcmfmac: fix sdio sending of large buffers.

the function brcmf_sdiod_ramrw is supposed to be able to send
large blobs of data. However inside the loop the skb->len field
did not correctly get reset each round. As a result only small
blobs could be sent. This patch fixes this problem.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: rename sdio_chip.[ch]
Arend van Spriel [Wed, 29 Jan 2014 14:32:15 +0000 (15:32 +0100)]
brcmfmac: rename sdio_chip.[ch]

Just renaming the file. This file will contain chip related functions
that are independent of the host interface type.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: move SDIO specific functions
Arend van Spriel [Wed, 29 Jan 2014 14:32:14 +0000 (15:32 +0100)]
brcmfmac: move SDIO specific functions

The chip related functions will be made agnostic of the host
interface. However, some functions in the source file are
rather SDIO specific so better move it to the SDIO specific
source file.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: enable firmware console logging functionality
Daniel Kim [Wed, 29 Jan 2014 14:32:13 +0000 (15:32 +0100)]
brcmfmac: enable firmware console logging functionality

Address of rte console was not initialized and so console logging
functionality didn't kick in. This patch fixes it and makes console
polling interval a debugfs variable.

Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Daniel Kim <dekim@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add owner info to sdio_driver structure
Franky Lin [Wed, 29 Jan 2014 14:32:12 +0000 (15:32 +0100)]
brcmfmac: add owner info to sdio_driver structure

To link module attribute with sdio device driver attribute in sysfs.

Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: expand sta info to report dtim and beacon period.
Hante Meuleman [Wed, 29 Jan 2014 14:32:11 +0000 (15:32 +0100)]
brcmfmac: expand sta info to report dtim and beacon period.

Expand the get_station command to also report dtim period and
beacon interval when the device is connected.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Fix uninitialized variable in ath9k_has_tx_pending()
Geert Uytterhoeven [Sun, 26 Jan 2014 10:53:21 +0000 (11:53 +0100)]
ath9k: Fix uninitialized variable in ath9k_has_tx_pending()

drivers/net/wireless/ath/ath9k/main.c: In function ‘ath9k_has_tx_pending’:
drivers/net/wireless/ath/ath9k/main.c:1869: warning: ‘npend’ may be used uninitialized in this function

Introduced by commit 10e2318103f5941aa70c318afe34bc41f1b98529 ("ath9k:
optimize ath9k_flush").

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agortl818x: change misleading names for few register bit definitions
andrea merello [Tue, 21 Jan 2014 19:16:43 +0000 (20:16 +0100)]
rtl818x: change misleading names for few register bit definitions

In rtl8180/rtl8187 drivers, few register bit definitions have
names of form FOOBAR_SHIFT, suggesting they should be used as
shift offset, for example
reg |= (1 << ENABLE_FOO_SHIFT).

However they are actually defined as (1 << x) and thus they are
used (correctly) like
reg |= ENABLE_FOO_SHIFT;

This patch kills the misleading _SHIFT suffix.

Signed-off-by: andrea merello <andrea.merello@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: Remove unnecessary check
Sujith Manoharan [Tue, 21 Jan 2014 03:46:43 +0000 (09:16 +0530)]
ath9k: Remove unnecessary check

The commit "ath9k: Fix IQ calibration" added a check
to ensure that valid i2_p_q2_a0_d1 values are not discarded.
But since it is masked with 0xfff earlier, the codepath
will not be executed.

The earlier case where all values above 0x800 were considered
invalid is incorrect, since the HW can return valid values
between 0x800 and 0xfff.

Cc: Kai Shi <kaishi@qca.qualcomm.com>
Reported-by: Alex Hacker <hacker@epn.ru>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: prepare for multi-interface CSA support
Michal Kazior [Mon, 20 Jan 2014 14:27:12 +0000 (15:27 +0100)]
ath9k: prepare for multi-interface CSA support

Soon mac80211 will support multi-interface CSA so
using sc->csa_vif is not an option.

Instead just depend on vif->csa_active. Calling
ieee80211_csa_finish() multiple number of times
should not be an issue.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac802...
John W. Linville [Wed, 12 Feb 2014 20:24:14 +0000 (15:24 -0500)]
Merge branch 'for-john' of git://git./linux/kernel/git/jberg/mac80211-next

10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
John W. Linville [Wed, 12 Feb 2014 20:21:07 +0000 (15:21 -0500)]
Merge git://git./linux/kernel/git/iwlwifi/iwlwifi-next

10 years agoLinux 3.14-rc2
Linus Torvalds [Mon, 10 Feb 2014 02:15:47 +0000 (18:15 -0800)]
Linux 3.14-rc2

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Mon, 10 Feb 2014 02:14:53 +0000 (18:14 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/linux-security

Pull SELinux fixes from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  SELinux:  Fix kernel BUG on empty security contexts.
  selinux: add SOCK_DIAG_BY_FAMILY to the list of netlink message types

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Mon, 10 Feb 2014 02:12:07 +0000 (18:12 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
 "A couple of fixes, both -stable fodder.  The O_SYNC bug is fairly
  old..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix a kmap leak in virtio_console
  fix O_SYNC|O_APPEND syncing the wrong range on write()

10 years agoMerge branch 'stable-3.14' of git://git.infradead.org/users/pcmoore/selinux into...
James Morris [Mon, 10 Feb 2014 00:48:21 +0000 (11:48 +1100)]
Merge branch 'stable-3.14' of git://git.infradead.org/users/pcmoore/selinux into for-linus

10 years agofix a kmap leak in virtio_console
Al Viro [Sun, 2 Feb 2014 12:05:05 +0000 (07:05 -0500)]
fix a kmap leak in virtio_console

While we are at it, don't do kmap() under kmap_atomic(), *especially*
for a page we'd allocated with GFP_KERNEL.  It's spelled "page_address",
and had that been more than that, we'd have a real trouble - kmap_high()
can block, and doing that while holding kmap_atomic() is a Bad Idea(tm).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>