deliverable/linux.git
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
John W. Linville [Tue, 22 Jul 2014 17:49:34 +0000 (13:49 -0400)] 
Merge git://git./linux/kernel/git/jberg/mac80211-next

10 years agomac80211: add support for Rx reordering offloading
Michal Kazior [Wed, 16 Jul 2014 10:12:15 +0000 (12:12 +0200)] 
mac80211: add support for Rx reordering offloading

Some drivers may be performing most of Tx/Rx
aggregation on their own (e.g. in firmware)
including AddBa/DelBa negotiations but may
otherwise require Rx reordering assistance.

The patch exports 2 new functions for establishing
Rx aggregation sessions in assumption device
driver has taken care of the necessary
negotiations.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
[fix endian bug]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix Rx reordering with RX_FLAG_AMSDU_MORE
Michal Kazior [Wed, 16 Jul 2014 10:09:31 +0000 (12:09 +0200)] 
mac80211: fix Rx reordering with RX_FLAG_AMSDU_MORE

Some drivers (e.g. ath10k) report A-MSDU subframes
individually with identical seqno. The A-MPDU Rx
reorder code did not account for that which made
it practically unusable with drivers using
RX_FLAG_AMSDU_MORE because it would end up
dropping a lot of frames resulting in confusion in
upper network transport layers.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove useless NULL checks
Eytan Lifshitz [Mon, 21 Jul 2014 12:18:41 +0000 (15:18 +0300)] 
mac80211: remove useless NULL checks

sdata can't be NULL, and key being NULL is really not possible
unless the code is modified.

The sdata check made a static analyze (klocwork) unhappy because
we would get pointer to local (sdata->local) and only then check
if sdata is non-NULL.

Signed-off-by: Eytan Lifshitz <eytan.lifshitz@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[remove !key check as well]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix a potential NULL access in ieee80211_crypto_hw_decrypt
Max Stepanov [Wed, 9 Jul 2014 13:55:32 +0000 (16:55 +0300)] 
mac80211: fix a potential NULL access in ieee80211_crypto_hw_decrypt

The NULL pointer access could happen when ieee80211_crypto_hw_decrypt
is called from ieee80211_rx_h_decrypt with the following condition:
1. rx->key->conf.cipher is not WEP, CCMP, TKIP or AES_CMAC
2. rx->sta is NULL

When ieee80211_crypto_hw_decrypt is called, it verifies
rx->sta->cipher_scheme and it will cause Oops if rx->sta is NULL.

This path adds an addirional rx->sta == NULL verification in
ieee80211_crypto_hw_decrypt for this case.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agowireless: fixup genregdb.awk for remove of antenna gain from wireless-regd
Luis R. Rodriguez [Mon, 14 Jul 2014 21:19:49 +0000 (14:19 -0700)] 
wireless: fixup genregdb.awk for remove of antenna gain from wireless-regd

Since "wireless-regdb: remove antenna gain" was merged in the
wireless-regdb tree, the awk script parser has been incompatible
with the 'official' regulatory database.  This fixes that up.
Without this change the max EIRP is set to 0 making 802.11 devices
useless.

The fragile nature of the awk parser must be replaced, but ideas
over how to do that in the most scalable way are being reviewed.
In the meantime update the documentation for CFG80211_INTERNAL_REGDB
so folks are aware of expectations for now.

Reported-by: John Walker <john@x109.net>
Reported-by: Krishna Chaitanya <chaitanya.mgit@gmail.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag
Luciano Coelho [Sat, 5 Jul 2014 08:43:01 +0000 (11:43 +0300)] 
mac80211: remove redundant IEEE80211_STA_CSA_RECEIVED flag

The csa_active flag was added in sdata a while ago and made
IEEE80211_STA_CSA_RECEIVED redundant.  The new flag is also used to
mark when CSA is ongoing on other iftypes and took over the old one as
the preferred method for checking whether we're in the middle of a
channel switch.  Remove the old, redundant flag.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: make sure TDLS teardown packet is sent on time
Liad Kaufman [Thu, 17 Jul 2014 14:14:31 +0000 (17:14 +0300)] 
mac80211: make sure TDLS teardown packet is sent on time

Since the teardown packet is created while the queues are
stopped, it isn't sent immediately, but rather is pending.
To be sure that when we flush the queues prior to destroying
the station we also send this packet - the tasklet handling
pending packets is invoked to flush the packets.

Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: ArikX Nemtsov <arik@wizery.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: ignore frames between TDLS peers when operating as AP
Arik Nemtsov [Thu, 17 Jul 2014 14:14:30 +0000 (17:14 +0300)] 
mac80211: ignore frames between TDLS peers when operating as AP

If the AP receives actions frames destined for other peers, it may
mistakenly toggle BA-sessions from itself to a peer.
Ignore TDLS data packets as well - the AP should not handle them.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agocfg80211: fix TDLS setup with VHT peers
Arik Nemtsov [Thu, 17 Jul 2014 14:14:29 +0000 (17:14 +0300)] 
cfg80211: fix TDLS setup with VHT peers

Some VHT TDLS peers (Google Nexus 5) include the VHT-AID IE in their
TDLS setup request/response. Usermode passes this aid as the station
aid, causing it to fail verifiction, since this happens in the
"set_station" stage. Make an exception for the TDLS use-case.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: disable VHT for TDLS
Arik Nemtsov [Thu, 17 Jul 2014 14:14:28 +0000 (17:14 +0300)] 
mac80211: disable VHT for TDLS

TDLS VHT support requires some more information elements during setup.
While these are not there, mask out the peer's VHT capabilities so that
VHT rates are not mistakenly used.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: set Rx highest rate in ht_cap
Arik Nemtsov [Thu, 17 Jul 2014 14:14:27 +0000 (17:14 +0300)] 
mac80211: set Rx highest rate in ht_cap

Set for completeness mostly, currently unused in the code.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: support HT for TDLS stations
Arik Nemtsov [Thu, 17 Jul 2014 14:14:26 +0000 (17:14 +0300)] 
mac80211: support HT for TDLS stations

Add the HT capabilities and HT operation information elements to TDLS
setup packets where appropriate.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: move TDLS data to mgd private part
Arik Nemtsov [Thu, 17 Jul 2014 14:14:25 +0000 (17:14 +0300)] 
mac80211: move TDLS data to mgd private part

We can only be a station for TDLS connections. Also fix a bug where
a delayed work could be left scheduled if the station interface was
brought down during TDLS setup.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add TDLS QoS param IE on setup-confirm
Arik Nemtsov [Thu, 17 Jul 2014 14:14:24 +0000 (17:14 +0300)] 
mac80211: add TDLS QoS param IE on setup-confirm

When TDLS QoS is supported by the the peer and the local card, add
the WMM parameter IE to the setup-confirm frame. Take the QoS settings
from the current AP, or if unsupported, use the default values from
the specification. This behavior is mandated by IEEE802.11-2012 section
10.22.4.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: add QoS IE during TDLS setup start
Arik Nemtsov [Thu, 17 Jul 2014 14:14:23 +0000 (17:14 +0300)] 
mac80211: add QoS IE during TDLS setup start

If QoS is supported by the card, add an appropriate IE to TDLS setup-
request and setup-response frames.

Consolidate the setting of the WMM info IE across mac80211.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: set TDLS capab to zero on failure frames
Arik Nemtsov [Thu, 17 Jul 2014 14:14:22 +0000 (17:14 +0300)] 
mac80211: set TDLS capab to zero on failure frames

When sending setup-failure frames, set the capability field to zero, as
mandated by the specification (IEEE802.11-2012 8.5.13).

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: avoid adding some IEs on TDLS setup failure packets
Arik Nemtsov [Thu, 17 Jul 2014 14:14:21 +0000 (17:14 +0300)] 
mac80211: avoid adding some IEs on TDLS setup failure packets

Most setup-specific information elements are not to be added when a
setup frame is sent with an error status code.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: split extra TDLS IEs in setup frames
Arik Nemtsov [Thu, 17 Jul 2014 14:14:20 +0000 (17:14 +0300)] 
mac80211: split extra TDLS IEs in setup frames

When building TDLS setup frames, use the IE order mandates in the
specification, splitting extra IEs coming from usermode.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: consolidate TDLS IE treatment
Arik Nemtsov [Thu, 17 Jul 2014 14:14:19 +0000 (17:14 +0300)] 
mac80211: consolidate TDLS IE treatment

Add all information elements for TDLS discovery and setup in the same
function.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Liad Kaufman <liad.kaufman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: fix error path for TDLS setup
Arik Nemtsov [Thu, 17 Jul 2014 14:14:18 +0000 (17:14 +0300)] 
mac80211: fix error path for TDLS setup

The patch "8f02e6b mac80211: make sure TDLS peer STA exists during
setup" broke TDLS error paths where the STA doesn't exist when sending
the error.
Fix it by only testing for STA existence during a non-error flow.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomac80211: track TDLS initiator internally
Arik Nemtsov [Thu, 17 Jul 2014 14:14:17 +0000 (17:14 +0300)] 
mac80211: track TDLS initiator internally

Infer the TDLS initiator and track it in mac80211 via a STA flag. This
avoids breaking old userspace that doesn't pass it via nl80211 APIs.

The only case where userspace will need to pass the initiator is when the
STA is removed due to unreachability before a teardown packet is sent.
Support for unreachability was only recently added to wpa_supplicant, so
it won't be a problem in practice.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomwifiex: remove redundant timestamps in debug prints
Bing Zhao [Thu, 17 Jul 2014 22:55:09 +0000 (15:55 -0700)] 
mwifiex: remove redundant timestamps in debug prints

We don't need wall-clock time here, and in most configurations
that care, there are already timestamps in the kernel using
CONFIG_PRINTK_TIME=y.

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: do not re-associate when already connected
Ujjal Roy [Thu, 17 Jul 2014 18:49:55 +0000 (11:49 -0700)] 
mwifiex: do not re-associate when already connected

In managed mode if the driver is getting a re-associate command
from cfg80211, driver deauthenticates with the AP internally and
sends a disconnected event to cfg80211 before completion of its
association process. The disconnected event then modifies the
SSID length as wdev->ssid_len = 0. So, upon receiving the connect
result event from driver, cfg80211 is unable to get that BSS from
the device's BSS list and generates the following WARN_ON message.

WARNING: CPU: 0 PID: 857 at net/wireless/sme.c:658
         __cfg80211_connect_result+0x3a6/0x3e0 [cfg80211]()

Avoid re-association while the device is already associated to a
network. Also remove the internal deauthentication from the
association path.

Signed-off-by: Ujjal Roy <royujjal@gmail.com>
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: remove needless current_bssid variable
Avinash Patil [Thu, 17 Jul 2014 18:48:47 +0000 (11:48 -0700)] 
mwifiex: remove needless current_bssid variable

This local variable is not used anywhere in function.

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 agob43: N-PHY: update spur avoidance to support newer devices
Rafał Miłecki [Thu, 17 Jul 2014 17:31:06 +0000 (19:31 +0200)] 
b43: N-PHY: update spur avoidance to support newer devices

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: use one shared function for setting MAC frequency
Rafał Miłecki [Thu, 17 Jul 2014 17:31:05 +0000 (19:31 +0200)] 
b43: use one shared function for setting MAC frequency

By the way add few chipsets that were tracked with "wl" dumps.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: set band on every channel switch
Rafał Miłecki [Thu, 17 Jul 2014 17:31:04 +0000 (19:31 +0200)] 
b43: N-PHY: set band on every channel switch

Seems to be required by some hardware, wl does it every time.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: complete 0x2057 radio init calibration
Rafał Miłecki [Thu, 17 Jul 2014 17:31:03 +0000 (19:31 +0200)] 
b43: N-PHY: complete 0x2057 radio init calibration

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: add tables for radio 0x2057 rev 14
Rafał Miłecki [Thu, 17 Jul 2014 17:31:02 +0000 (19:31 +0200)] 
b43: N-PHY: add tables for radio 0x2057 rev 14

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: fix channel switching with 2 GHz radio 0x2057
Rafał Miłecki [Thu, 17 Jul 2014 17:31:01 +0000 (19:31 +0200)] 
b43: N-PHY: fix channel switching with 2 GHz radio 0x2057

Values were written to wrong registers.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: drop negativity checks for unsigned values coming from kstrtoul()
Andrey Utkin [Thu, 17 Jul 2014 13:56:37 +0000 (16:56 +0300)] 
ath9k: drop negativity checks for unsigned values coming from kstrtoul()

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80471
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80481
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: set up tx power into the MRR
Lorenzo Bianconi [Wed, 16 Jul 2014 21:20:10 +0000 (23:20 +0200)] 
ath9k: set up tx power into the MRR

Set up tx power for each MRR segment in the tx descriptor

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath9k: fix pending tx frames accounting
Felix Fietkau [Wed, 16 Jul 2014 18:26:05 +0000 (20:26 +0200)] 
ath9k: fix pending tx frames accounting

Packets originally buffered for the regular hardware tx queues can end
up being transmitted through the U-APSD queue (via PS-Poll or U-APSD).
When packets are dropped due to retransmit failures, the pending frames
counter is not always updated properly.
Fix this by keeping track of the queue that a frame was accounted for in
the ath_frame_info struct, and using that on completion to decide
whether the counter should be updated.
This fixes some spurious transmit queue hangs.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: add support for BCM43217 found in Tenda W322E (14e4:43a9)
Rafał Miłecki [Tue, 15 Jul 2014 17:44:28 +0000 (19:44 +0200)] 
bcma: add support for BCM43217 found in Tenda W322E (14e4:43a9)

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobcma: extract antenna gains from SPROM correctly
Rafał Miłecki [Tue, 15 Jul 2014 14:54:47 +0000 (16:54 +0200)] 
bcma: extract antenna gains from SPROM correctly

Just like in case of SSB SPROMs they are encoded in a bit tricky way.
SPROM struct already uses s8 type and it's supposed to store decoded
values.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agossb: extract power info from SPROM revs 4 and 5
Rafał Miłecki [Tue, 15 Jul 2014 14:18:57 +0000 (16:18 +0200)] 
ssb: extract power info from SPROM revs 4 and 5

This is needed to properly handle early 802.11n devices like BCM4321.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: add new register region for AGC table
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:43 +0000 (09:49 +0300)] 
wil6210: add new register region for AGC table

New register area defined in the firmware

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: map RGF_USER_USAGE_1 on the debugfs
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:42 +0000 (09:49 +0300)] 
wil6210: map RGF_USER_USAGE_1 on the debugfs

Firmware sets this register with the offset of the firmware trace area
within the peripheral memory region. Critical for the firmware trace
to work

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: use same mapping table for FW addr translation and debugfs
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:41 +0000 (09:49 +0300)] 
wil6210: use same mapping table for FW addr translation and debugfs

Use single data source for all information regarding the firmware
memory map. With this change "ucode_xxx" regions disappears since
they are in fact part of larger "upper area" region

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix memory leak on error path in wil_write_file_rxon()
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:40 +0000 (09:49 +0300)] 
wil6210: fix memory leak on error path in wil_write_file_rxon()

If copy_from_user() fails, buffer allocated for parameters would leak

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: fix double definition of 'ctx'
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:39 +0000 (09:49 +0300)] 
wil6210: fix double definition of 'ctx'

Variable 'ctx' declarad again in the inner loop. Should use
one from outer loop instead.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: export FW/HW versions through debugfs
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:38 +0000 (09:49 +0300)] 
wil6210: export FW/HW versions through debugfs

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowil6210: support for "sparrow" hardware
Vladimir Kondratiev [Mon, 14 Jul 2014 06:49:37 +0000 (09:49 +0300)] 
wil6210: support for "sparrow" hardware

New hardware release appears; it require some changes to properly support  it.
Introduce struct wil_board and "board" attribute in wil6210_priv;
keep hardware variant information in this structure.
fill it on probe(). Used in the reset flow.

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoMerge tag 'for-linville-20140717' of git://github.com/kvalo/ath
John W. Linville [Fri, 18 Jul 2014 17:44:50 +0000 (13:44 -0400)] 
Merge tag 'for-linville-20140717' of git://github.com/kvalo/ath

10 years agoMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetoot...
John W. Linville [Fri, 18 Jul 2014 17:35:45 +0000 (13:35 -0400)] 
Merge branch 'for-upstream' of git://git./linux/kernel/git/bluetooth/bluetooth-next

10 years agomac80211: suppress unused variable warning without lockdep
Johannes Berg [Fri, 18 Jul 2014 07:47:26 +0000 (09:47 +0200)] 
mac80211: suppress unused variable warning without lockdep

When lockdep isn't compiled, a local variable isn't used
(it's only in a macro argument), annotate it to suppress
the compiler warning.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
10 years agomwifiex: remove redundant TDLS setup action frame check and avoid leaks
Bing Zhao [Tue, 15 Jul 2014 03:53:34 +0000 (20:53 -0700)] 
mwifiex: remove redundant TDLS setup action frame check and avoid leaks

The unwanted frame types are already handled in 'default' case
of the switch/case below.
The str_ptr is allocated but it can be leaked if the length check
fails in the REQUEST/RESP cases. Fix it by allocating sta_ptr
after the length checks.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agossb: extract antenna gains from SPROMs revs 4+ properly
Rafał Miłecki [Sat, 12 Jul 2014 14:42:10 +0000 (16:42 +0200)] 
ssb: extract antenna gains from SPROMs revs 4+ properly

They are encoded the same way as in older SPROMs.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agossb: make code for antenna gain extraction more generic
Rafał Miłecki [Sat, 12 Jul 2014 14:42:09 +0000 (16:42 +0200)] 
ssb: make code for antenna gain extraction more generic

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowireless: zd1211rw: new url for fw, remove experimental
Xose Vazquez Perez [Sat, 12 Jul 2014 12:57:38 +0000 (14:57 +0200)] 
wireless: zd1211rw: new url for fw, remove experimental

Cc: Daniel Drake <dsd@laptop.org>
Cc: Ulrich Kunitz <kune@deine-taler.de>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: add missing TX gain table for radio 0x2057 rev 5
Rafał Miłecki [Sat, 12 Jul 2014 10:34:46 +0000 (12:34 +0200)] 
b43: N-PHY: add missing TX gain table for radio 0x2057 rev 5

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: add brcmf_p2p_detach() call in brcmf_cfg80211_detach()
Arend van Spriel [Sat, 12 Jul 2014 06:49:42 +0000 (08:49 +0200)] 
brcmfmac: add brcmf_p2p_detach() call in brcmf_cfg80211_detach()

The function brcmf_p2p_detach() was only called in error flow of the
brcmf_cfg80211_attach() routine, but it also needs to be called
upon brcmf_cfg80211_detach().

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: rework wiphy structure setup
Arend van Spriel [Sat, 12 Jul 2014 06:49:41 +0000 (08:49 +0200)] 
brcmfmac: rework wiphy structure setup

Instead of waiting for IFF_UP of the primary net device to determine
the band and channel information of the wiphy structure, this is now
done during driver initialization in brcmf_cfg80211_attach(). The
channel information is obtained from the device and the 2G band is
updated when 40MHz bandwidth is enabled for that band. Before this
change the band and channel objects were common between multiple
brcmfmac devices in the system, which make that information rather
unreliable. That is also fixed with this reworked implementation.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: moving some functions around
Arend van Spriel [Sat, 12 Jul 2014 06:49:40 +0000 (08:49 +0200)] 
brcmfmac: moving some functions around

Just reordering the functions in preparation of subsequent changes.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agobrcmfmac: introduce feature and quirk handling
Arend van Spriel [Sat, 12 Jul 2014 06:49:39 +0000 (08:49 +0200)] 
brcmfmac: introduce feature and quirk handling

Introducing a new source module that will be responsible for
identifying features and quirks related to the device being
handled.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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: move attach and detach functions in wl_cfg80211.c
Arend van Spriel [Sat, 12 Jul 2014 06:49:38 +0000 (08:49 +0200)] 
brcmfmac: move attach and detach functions in wl_cfg80211.c

Preparing for another patch move the functions in separate commit.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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: Make firmware path a module parameter
Daniel Kim [Sat, 12 Jul 2014 06:49:37 +0000 (08:49 +0200)] 
brcmfmac: Make firmware path a module parameter

This patch makes firmware path a module parameter so that firmware and
nvram files can be loaded from the specified path.

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: rework debugfs functions in the driver
Arend van Spriel [Sat, 12 Jul 2014 06:49:36 +0000 (08:49 +0200)] 
brcmfmac: rework debugfs functions in the driver

Reworked the debugfs functions in the driver making it easier for
other driver parts to add a debugfs entry and keeping the information
they want to expose in debugfs private, ie. not in a header.

This is accomplished by providing the function brcmf_debugfs_add_entry()
in which the caller provides a read function in which they provide the
content. The debugfs function will take care of creating the debugfs
entry and cleaning up upon removal.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@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: make use of seq_file API for debugfs entries
Arend van Spriel [Sat, 12 Jul 2014 06:49:35 +0000 (08:49 +0200)] 
brcmfmac: make use of seq_file API for debugfs entries

The use of seq_file simplifies the debugfs code. Simpler is
better.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@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: Cleanup used device IDs.
Hante Meuleman [Sat, 12 Jul 2014 06:49:34 +0000 (08:49 +0200)] 
brcmfmac: Cleanup used device IDs.

This patch cleans up used broadcom IDs, device IDs for all the
bus layers and uses consistent naming for all IDs.

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 agomwifiex: correct a typo in mwifiex_ret_tdls_oper
Bing Zhao [Sat, 12 Jul 2014 03:57:15 +0000 (20:57 -0700)] 
mwifiex: correct a typo in mwifiex_ret_tdls_oper

This patch fixes this typo.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: declare sta_ptr in smaller scope
Bing Zhao [Sat, 12 Jul 2014 03:57:14 +0000 (20:57 -0700)] 
mwifiex: declare sta_ptr in smaller scope

sta_ptr is used only in an 'if' branch in this function.
Move it to the smaller scope where it is used.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: define TDLS idle timeout macro with units
Bing Zhao [Sat, 12 Jul 2014 03:57:13 +0000 (20:57 -0700)] 
mwifiex: define TDLS idle timeout macro with units

The unit of this timeout is in seconds.

Reported-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agomwifiex: fix a cut-n-paste error in adhoc-start
Bing Zhao [Sat, 12 Jul 2014 03:54:32 +0000 (20:54 -0700)] 
mwifiex: fix a cut-n-paste error in adhoc-start

The 'else if' branch never gets the chance as its condition
matches 'if' branch's.

Reported-by: David Binderman <dcb314@hotmail.com>
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: fix corner case system hang issue
Amitkumar Karwar [Sat, 12 Jul 2014 03:53:14 +0000 (20:53 -0700)] 
mwifiex: fix corner case system hang issue

Sometimes pending internal scan commands are delayed to give
preference to Tx traffic. 'scan_processing' flag has been
checked at the beginning of delay timer routine to know if in the
meantime scan operation has been cancelled.

There is a corner case where pending scan commands are emptied
after scan_processing flag check is passed. In this case
wrong pointer returned by list_first_entry() is passed to
list_del() which causes system hang.

This patch fixes the issue by adding list_empty() check.

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: access rx_reorder_tbl_ptr only while holding lock
Amitkumar Karwar [Sat, 12 Jul 2014 03:53:13 +0000 (20:53 -0700)] 
mwifiex: access rx_reorder_tbl_ptr only while holding lock

This patch fixes a bug in which rx_reorder_tbl_ptr is accessed
without holding spinlock at few places.

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 agowireless: rt2x00: add new rt2800usb devices
Xose Vazquez Perez [Fri, 11 Jul 2014 19:46:57 +0000 (21:46 +0200)] 
wireless: rt2x00: add new rt2800usb devices

0x0b05 0x17e8 RT5372 USB 2.0  bgn 2x2 ASUS USB-N14
0x0411 0x0253 RT5572 USB 2.0 abgn 2x2 BUFFALO WLP-U2-300D
0x0df6 0x0078 RT???? Sitecom N300

Cc: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: users@rt2x00.serialmonkey.com
Cc: linux-wireless@vger.kernel.org
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl18xx/wl12xx: convert bitmaps to unsigned longs
Eliad Peller [Fri, 11 Jul 2014 00:01:39 +0000 (03:01 +0300)] 
wlcore/wl18xx/wl12xx: convert bitmaps to unsigned longs

The *_bit operations expect unsigned longs.
Instead of casting the pointers, simply define various
bitmaps as unsigned long (instead of u32).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl18xx: make sure fw_status->priv exists before deref
Eliad Peller [Fri, 11 Jul 2014 00:01:38 +0000 (03:01 +0300)] 
wl18xx: make sure fw_status->priv exists before deref

In some corner cases with specific timings, we might
try dequeueing tx before we got information about
the link status (e.g. due to recovery during tx).

Instead of NULL dereference, assume all
the links in this case have low priorities.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl18xx: change the number of WLAN addrs per chip
Arik Nemtsov [Fri, 11 Jul 2014 00:01:37 +0000 (03:01 +0300)] 
wl18xx: change the number of WLAN addrs per chip

Each 18xx chip contains only 2 real MAC addresses
usable for WLAN, forcing us to use the LAA bit
approach to obtain a third MAC address.

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 switch channels on disconnected STA vifs
Arik Nemtsov [Fri, 11 Jul 2014 00:01:36 +0000 (03:01 +0300)] 
wlcore: don't switch channels on disconnected STA vifs

Sending the FW a channel switch command on a disconnected
vif may result in a beacon loss event. Avoid this corner case.

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: register vendor commands
Eliad Peller [Fri, 11 Jul 2014 00:01:35 +0000 (03:01 +0300)] 
wlcore: register vendor commands

All the smart config code is in place now,
so register the relevant vendor commands.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: increase max roc duration to 30 seconds
Eliad Peller [Fri, 11 Jul 2014 00:01:34 +0000 (03:01 +0300)] 
wlcore: increase max roc duration to 30 seconds

we don't have any actual limitation in the driver, so
increase it arbitrarily to 30 seconds.

The long ROC is needed for the smart config.flow.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl18xx: handle smart config events
Eliad Peller [Fri, 11 Jul 2014 00:01:33 +0000 (03:01 +0300)] 
wlcore/wl18xx: handle smart config events

add defintions and handling for smart config events
(SMART_CONFIG_SYNC_EVENT_ID and SMART_CONFIG_DECODE_EVENT_ID)

parse the relevant info and send it to userspace as
vendor event.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: handle smart config vendor commands
Eliad Peller [Fri, 11 Jul 2014 00:01:32 +0000 (03:01 +0300)] 
wlcore: handle smart config vendor commands

userspace can ask to perform various smart config
actions via custom vendor commands.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore/wl18xx: add smart config commands
Eliad Peller [Fri, 11 Jul 2014 00:01:31 +0000 (03:01 +0300)] 
wlcore/wl18xx: add smart config commands

These commands configures the fw to set key,
enter smart config mode, and exit it.

Add relevant hw ops as well.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: add smart config definitions
Eliad Peller [Fri, 11 Jul 2014 00:01:30 +0000 (03:01 +0300)] 
wlcore: add smart config definitions

Add definitions for the smart config commands.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: use correct LAA bit
Eliad Peller [Fri, 11 Jul 2014 00:01:29 +0000 (03:01 +0300)] 
wlcore: use correct LAA bit

The LAA bit is second bit of the MSB, not of the
third byte.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowl18xx: fix last tx rate calculation
Eliad Peller [Fri, 11 Jul 2014 00:01:28 +0000 (03:01 +0300)] 
wl18xx: fix last tx rate calculation

The last tx rate calculation didn't take into account
the different indices of 11a and 11g rates tables.

Add the required alignment (count only from the first
11a rate in case of 11a)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: user smaller sqn padding for GEM
Eliad Peller [Fri, 11 Jul 2014 00:01:27 +0000 (03:01 +0300)] 
wlcore: user smaller sqn padding for GEM

On recovery, we increase the current seq num by
WL1271_TX_SQN_POST_RECOVERY_PADDING in order to
compensate for packets we might have missed during
recovery.

It seems that some GEM APs have issues when the
gap is too big, so use a smaller padding in this case.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agowlcore: save seq num only between recoveries
Eliad Peller [Fri, 11 Jul 2014 00:01:26 +0000 (03:01 +0300)] 
wlcore: save seq num only between recoveries

We want seq num (freed_pkts) to be initialized
on each new connection, but keep persistent
between recoveries/suspends.

Save the freed_pkts in the private block of the
sta struct (we already do a similar thing for
AP's stations).

However, keep the old wlvif->total_freed_pkts
in order to avoid too intrusive change.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: don't warn about no 5 GHz support on 2.4 GHz devices
Rafał Miłecki [Tue, 8 Jul 2014 19:00:19 +0000 (21:00 +0200)] 
b43: don't warn about no 5 GHz support on 2.4 GHz devices

This could be a bit confusing to see warning about lacking support for
5 GHz band if your device supports 2.4 GHz only.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: enable radio 0x2057 rev 9 (AKA BCM43228) support
Rafał Miłecki [Tue, 8 Jul 2014 13:11:10 +0000 (15:11 +0200)] 
b43: enable radio 0x2057 rev 9 (AKA BCM43228) support

Support for N-PHY rev 8 with 0x2057 rev 5 is almost ready, but we still
need to figure out how to handle rev 9 first.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: implement channel switching of radio 0x2057 rev 5
Rafał Miłecki [Tue, 8 Jul 2014 13:11:09 +0000 (15:11 +0200)] 
b43: N-PHY: implement channel switching of radio 0x2057 rev 5

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: init and channel switching of radio 0x2057 rev 9
Rafał Miłecki [Tue, 8 Jul 2014 13:11:08 +0000 (15:11 +0200)] 
b43: N-PHY: init and channel switching of radio 0x2057 rev 9

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43; N-PHY: write most of the missing code for revs 7+
Rafał Miłecki [Tue, 8 Jul 2014 13:11:07 +0000 (15:11 +0200)] 
b43; N-PHY: write most of the missing code for revs 7+

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: add placeholders for new devices support
Rafał Miłecki [Tue, 8 Jul 2014 13:11:06 +0000 (15:11 +0200)] 
b43: N-PHY: add placeholders for new devices support

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: add TX gain tables for devices with specific EPA
Rafał Miłecki [Tue, 8 Jul 2014 13:11:05 +0000 (15:11 +0200)] 
b43: N-PHY: add TX gain tables for devices with specific EPA

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: N-PHY: drop reg 0x1 access restriction on new PHY revs
Rafał Miłecki [Tue, 8 Jul 2014 13:11:04 +0000 (15:11 +0200)] 
b43: N-PHY: drop reg 0x1 access restriction on new PHY revs

Initialization of N-PHY radio revs 5 and 7 requires writing to 0x1.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agob43: always print info about radio (manuf, id, revision)
Rafał Miłecki [Wed, 2 Jul 2014 17:07:43 +0000 (19:07 +0200)] 
b43: always print info about radio (manuf, id, revision)

Type of radio has a major meaning for the driver. There is quite some
code that does initialization/calibration depending on the radio rev.
Knowing radio params is quite important to provide help to users, so
print it even with debugging disabled.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
10 years agoath10k: sanitize tx ring index access properly
Michal Kazior [Mon, 14 Jul 2014 13:25:25 +0000 (16:25 +0300)] 
ath10k: sanitize tx ring index access properly

The tx ring index was immediately trimmed with a
bitmask. This discarded the 0xFFFFFFFF error case
(which theoretically can happen when a device is
abruptly disconnected) and led to using an invalid
tx ring index. This could lead to memory
corruption.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath10k: fix bmi exchange tx/rx race
Michal Kazior [Mon, 14 Jul 2014 13:25:25 +0000 (16:25 +0300)] 
ath10k: fix bmi exchange tx/rx race

It was possible for tx completion not to be
processed. In that case an old stack pointer was
left on copy engine tx ring. Next bmi exchange
would immediately pop it and use complete() on the
completion struct there causing corruption.

Make sure to wait for both tx and rx completions
properly.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoBluetooth: cmtp: Remove unnecessary null test
Himangi Saraogi [Mon, 14 Jul 2014 20:34:13 +0000 (02:04 +0530)] 
Bluetooth: cmtp: Remove unnecessary null test

This patch removes the null test on ctrl. ctrl is initialized at the
beginning of the function to &session->ctrl. Since session is
dereferenced prior to the null test, session must be a valid pointer,
and &session->ctrl cannot be null.

The following Coccinelle script is used for detecting the change:

@r@
expression e,f;
identifier g,y;
statement S1,S2;
@@

*e = &f->g
<+...
 f->y
 ...+>
*if (e != NULL || ...)
 S1 else S2

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
10 years agoath10k: fix unregister deadlock when fw probe fails
Michal Kazior [Mon, 14 Jul 2014 13:07:29 +0000 (16:07 +0300)] 
ath10k: fix unregister deadlock when fw probe fails

If firmware probing worker failed it called
device_release_driver() which synchronously called
remove() pci callback. The callback in turn waited
for the worker that called it to finish resulting
in a deadlock.

Waiting for a completion instead of a worker, like
some other drivers do, doesn't seem like the best
idea either:

  Syscall                 Worker

                          probe_fw()
  rmmod
  dev_lock()
  pci->remove()
  wait_for_completion()
                          complete_all()
                          device_release_driver()
                          dev_lock()
                          [sleep]
  free(ar)
  dev_unlock()
                          [resume]

There's no guarantee that Worker upon resuming can
still access any data/code of the module.

Leaving device bound to a driver is not as harmful
as deadlocking so remove the call to
device_release_driver() while a proper solution is
figured out.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath6kl: add support for ar6004 hw3.0
Jessica Wu [Tue, 17 Jun 2014 09:41:16 +0000 (12:41 +0300)] 
ath6kl: add support for ar6004 hw3.0

This change enables ath6kl driver to support ar6004 hw3.0. At the same time do
some fixes in firmware initialisation which applies to ar6004 hw1.3 as well.

Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath6kl: add support wmi rate tables with mcs15
Jessica Wu [Tue, 17 Jun 2014 09:41:10 +0000 (12:41 +0300)] 
ath6kl: add support wmi rate tables with mcs15

Some of the firmware versions support rate tables up to mcs15, add support for
that.

Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath6kl: don't set hi_refclk_hz if hardware version doesn't need it
Kalle Valo [Tue, 17 Jun 2014 09:41:04 +0000 (12:41 +0300)] 
ath6kl: don't set hi_refclk_hz if hardware version doesn't need it

Needed for ar6004 hw3.0 support.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath6kl: implement rx flush for htc pipe
Jessica Wu [Tue, 17 Jun 2014 09:40:58 +0000 (12:40 +0300)] 
ath6kl: implement rx flush for htc pipe

rx flush was not implemented for htc pipe, add that now. Doesn't fix any known
issues.

Also free the skb if htc control messages get canceled.

Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
10 years agoath6kl: convert ar6004 hardware flags to firmware feature flags
Kalle Valo [Tue, 17 Jun 2014 09:40:52 +0000 (12:40 +0300)] 
ath6kl: convert ar6004 hardware flags to firmware feature flags

The functionality defined through these flags were actually firmware features
which can change between firmware versions. To make it possible to support
different firmware versions with the same driver, convert the flags to firmware
feature flags.

For backwards compatibility support for old ar6004 firmware FW
API 3 or smaller images we forcefully set the feature bits in the driver.
Starting from FW API 5 the firmware image needs to set them.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This page took 0.043465 seconds and 5 git commands to generate.