Larry Finger [Mon, 14 Dec 2015 22:34:31 +0000 (16:34 -0600)]
rtlwifi: rtl8723be: Fix module parameter initialization
This driver has a number of errors in the module initialization. These
include the following:
Parameter msi_support is stored in two places - one is removed.
Paramters sw_crypto and disable_watchdog were never stored in the final
locations, nor were they initialized properly.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
chunfan chen [Mon, 14 Dec 2015 12:15:15 +0000 (04:15 -0800)]
mwifiex: fix WPA connection problem
Device fails to connect to some AP's configured in WPA
security mode. Currently IE buffer parsing logic in driver
expects WPA IE to be present at the beginning of IE buffer.
Otherwise connection is failed with 'incompatible network
setting' error.
This patch fixes the problem by improving IE buffer parsing
logic.
Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:14 +0000 (04:15 -0800)]
mwifiex: use world for unidentified region code
It's better to use world if region code from EEPROM is
unidentied instead of forcing it to FCC
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:13 +0000 (04:15 -0800)]
mwifiex: update region_code_index array
This array contains list of supported region codes.
It is changed to make it aligned with region code
to country mapping table in driver.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
chunfan chen [Mon, 14 Dec 2015 12:15:12 +0000 (04:15 -0800)]
mwifiex: fix wake on disconnect feature
Default gpio and gap is downloaded to firmware while
configuring host sleep for wake on disconnect. We may
have gpio and gap modified by user.
This patch fixes the problem.
Signed-off-by: chunfan chen <jeffc@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:11 +0000 (04:15 -0800)]
mwifiex: fix AMPDU not setup on TDLS link problem
Sometimes AP sends TDLS setup response as AMSDU packet.
As driver doesn't parse it and update peer station's 11n
capability in this case, AMPDU doesn't get setup.
This patch calls mwifiex_process_tdls_action_frame() in
AMSDU Rx path to fix the problem.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:10 +0000 (04:15 -0800)]
mwifiex: add debugfs file for testing reset of card
This provides an option for user to power cycle the card.
It will be used to change the firmware without actually
rebooting the system.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:09 +0000 (04:15 -0800)]
mwifiex: remove redundant timestamp assignment
During AMSDU aggregation, we are already using timestamp
value of a first packet being aggregated. This patch removes
redundant ktime_get_real() call.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Mon, 14 Dec 2015 12:15:08 +0000 (04:15 -0800)]
mwifiex: suppress "Rx of mgmt packet failed" message
Block ACK action frames are dropped in driver. This error
is expected in this case. Let's lower the priority of this
message.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 14 Dec 2015 12:15:07 +0000 (04:15 -0800)]
mwifiex: abort cac in del_station() handler
When hostapd is killed with Ctrl+C before cac get completed,
stop_ap handler will not be called, thus priv->wdev.cac_started
flag remains set.
Hostapd restart attempt will be failed in this case with device
busy error. This patch aborts cac in del_station handler to
handle this corner case.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 14 Dec 2015 12:15:06 +0000 (04:15 -0800)]
mwifiex: increase supported wowlan pattern length
Maximum supported wowlan pattern length has been increased
from 20 to 40.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Xinming Hu [Mon, 14 Dec 2015 12:15:05 +0000 (04:15 -0800)]
mwifiex: fix bug for wildcard-prefix wowlan pattern
Wildcard prefix bytes are ignored while downloading packet
pattern to firmware. As packet offset is not adjusted
accordingly firmware end up matching the pattern at wrong
offset. The packet offset is corrected in this patch.
Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Zhaoyang Liu [Mon, 14 Dec 2015 12:15:04 +0000 (04:15 -0800)]
mwifiex: advertise SMS4 cipher suite
This is needed to support WAPI functionality.
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Shengzhen Li [Mon, 14 Dec 2015 12:15:03 +0000 (04:15 -0800)]
mwifiex: multiple bss support
This patch fixes issues observed while starting 3 different
bss simultaneously, eg, 2 AP + 1 STA or 3 AP
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Shengzhen Li [Mon, 14 Dec 2015 12:15:02 +0000 (04:15 -0800)]
mwifiex: change ap and station interface limits
ap/station interface limit has been changed to allow
creating maximum 3 interfaces.
Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Tue, 29 Dec 2015 16:44:19 +0000 (18:44 +0200)]
Merge tag 'iwlwifi-next-for-kalle-2015-12-21' of https://git./linux/kernel/git/iwlwifi/iwlwifi-next
* Make scan parameters low latency aware (Avi Stern)
* Fix in the NL80211_FEATURE_FULL_AP_CLIENT_STATE state case (Ayala)
* Fix enable injection mode (Chaya Rachel)
* Various cleanups (Dan / Julia / myself)
* Allow to stay more time on popular channels (David Spinadel)
* Bug fixes for D0i3 (Eliad / Luca)
* Fixes for GO uAPSD (myself)
* Start of TSO support (myself)
* Rate control bug fixes (Eyal / Gregory)
* Start the work on 9000 devices (Johannes / Sara / Oren)
* Start the work on a new Tx queue allocation model (Liad)
* Debug infrastructure enhancements (Golan)
Eliad Peller [Thu, 17 Dec 2015 11:02:56 +0000 (13:02 +0200)]
iwlwifi: bail out in case of bad trans state
In case of bad trans state (i.e. fw is not loaded) bail
out immediately instead of calling the trans, which might
not be fully initialized yet.
Also add WARN_ON_ONCE to help debugging where the errorneous
call is coming from.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Thu, 17 Dec 2015 08:41:49 +0000 (10:41 +0200)]
iwlwifi: fix printf specifier
Smatch warned about a bad specifier being used. Fix that.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Thu, 17 Dec 2015 09:55:13 +0000 (11:55 +0200)]
iwlwifi: remove unused parameter from grab_nic_access
All the callers used silent = false.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Wed, 11 Nov 2015 15:23:59 +0000 (17:23 +0200)]
iwlwifi: update key params on d0i3 entrance/exit
In order to let the fw do offloading properly, we need
to provide various key data (e.g. PN).
Configure the params on d0i3 entrance, and update them
back on d0i3 exit.
Since d3 code is now called in d0i3 which requires runtime
pm only, make d3.0 depend on CONFIG_PM (rather than
CONFIG_PM_SLEEP), and add required #ifdefs and wrappers
where needed, so both CONFIG_PM=n and CONFIG_PM_RUNTIME=n
configurations will build correctly.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Ayala Beker [Tue, 15 Dec 2015 22:32:07 +0000 (00:32 +0200)]
iwlwifi: mvm: Change number of associated stations when station becomes associated
Currently, the number of associated stations gets updated when adding
a new station or removing it. This is incorrect as it's possible that
a station was inserted before it was associated
Fix this by increasing/decreasing ap_assoc_sta_count whenever
a station transitions in/out the associated state.
Signed-off-by: Ayala Beker <ayala.beker@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Oren Givon [Thu, 17 Dec 2015 11:44:06 +0000 (13:44 +0200)]
iwlwifi: Update PCI IDs for 8000 and 9000 series
A new PCI IDs update to the 8000 and 9000 series.
type=feature
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 16 Dec 2015 11:42:17 +0000 (13:42 +0200)]
iwlwifi: mvm: dump more registers upon error
These registers can help to debug PHY issues. Since this
adds a significant amount of work to the debug collection
phase, dump the periphery registers only if the firmware
is stopped.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Tue, 1 Dec 2015 11:48:18 +0000 (13:48 +0200)]
iwlwifi: mvm: infrastructure for frame-release message
Incoming hardware will send frame release notifications to
the reorder buffer in order to update with the BA session
status and up to date NSSN.
This patch enables the API.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 3 Sep 2015 12:56:10 +0000 (14:56 +0200)]
iwlwifi: mvm: add 9000 series RX processing
Convert the convert the new infrastructure added by previous
patches to actually use the new RX descriptor layout.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 11 Dec 2015 08:36:10 +0000 (09:36 +0100)]
iwlwifi: mvm: change iwl_mvm_get_key_sta_id() to return the station
The code in iwl_mvm_update_tkip_key() is now pretty much duplicated
with the code in iwl_mvm_get_key_sta_id() doing the station ID lookup
again after it was already done. Change iwl_mvm_get_key_sta_id() to
iwl_mvm_get_key_sta(), returning the mvm_sta pointer, to allow that
duplicate code to be removed.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Chaya Rachel Ivgi [Thu, 3 Dec 2015 13:51:46 +0000 (15:51 +0200)]
iwlwifi: mvm: Add a station in monitor mode
Currently when creating a new vif in monitor mode the driver doesn't
allocate a specific station. This causes that in the situation that
tx traffic is injected, the tx queues are not scheduled,
with the result of a TFD queue hang.
Fix that by allocating a station and ensuring its tx queues
are scheduled.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=104591
Signed-off-by: Chaya Rachel Ivgi <chaya.rachel.ivgi@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
David Spinadel [Sun, 22 Nov 2015 14:37:36 +0000 (16:37 +0200)]
iwlwifi: mvm: add extended dwell time
When doing active scan on crowded channels we are likely to miss probe
responses due to collisions. To overcome this issue we use an extended
dwell time on channels 1, 6 and 11; this dwell time is set to 100.
In case of fragmented scan extended dwell time is the maximum out of
channel time - 44 msec. Fragmented active scan will be addressed later.
Extended dwell time isn't used in sched scan or p2p find.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 16 Dec 2015 09:26:09 +0000 (11:26 +0200)]
iwlwifi: mvm: small update in the firmware API
Small change in firmware API, no functional change.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Golan Ben-Ami [Mon, 30 Nov 2015 12:30:21 +0000 (14:30 +0200)]
iwlwifi: mvm: support description for user triggered fw dbg collection
Add to the user triggered fw debug collection support for describing
the reason of the trigger.
This could be useful for identifying a dump by a unique id, passed as
a description.
Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Thu, 19 Nov 2015 11:12:15 +0000 (13:12 +0200)]
iwlwifi: mvm: enable L3 filtering
Firmware will support filtering multicast L3 packets.
The L3 filtering is configured by the WOWLAN_CONFIG command.
All flags should be enabled by default.
Older firmware is not affected as it does not look into
this field.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luca Coelho [Tue, 10 Nov 2015 23:06:17 +0000 (01:06 +0200)]
iwlwifi: mvm: refactor the way fw_key_table is handled
Instead of keeping the fw_key_table bits set when the keys are removed
(i.e. in D3 entry or HW_RESTART flows), clear them and set them again
only when the keys have been successfully re-added. This makes the
bitmask more closely tied to the actual firmware programming.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 16 Dec 2015 08:50:03 +0000 (10:50 +0200)]
iwlwifi: 9000: increase the number of queues
9000 family devices have 31 queues.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Sun, 18 Oct 2015 06:31:24 +0000 (09:31 +0300)]
iwlwifi: pcie: build an A-MSDU using TSO core
When the op_mode sends an skb whose payload is bigger than
MSS, PCIe will create an A-MSDU out of it. PCIe assumes
that the skb that is coming from the op_mode can fit in one
A-MSDU. It is the op_mode's responsibility to make sure
that this guarantee holds.
Additional headers need to be built for the subframes.
The TSO core code takes care of the IP / TCP headers and
the driver takes care of the 802.11 subframe headers.
These headers are stored on a per-cpu page that is re-used
for all the packets handled on that same CPU. Each skb
holds a reference to that page and releases the page when
it is reclaimed. When the page gets full, it is released
and a new one is allocated.
Since any SKB that doesn't go through the fast-xmit path
of mac80211 will be segmented, we can assume here that the
packet is not WEP / TKIP and has a proper SNAP header.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Mon, 26 Oct 2015 13:39:22 +0000 (15:39 +0200)]
iwlwifi: clear ieee80211_tx_info->driver_data in the op_mode
The transport will need to use the info->driver_data
pointers. Since the op_mode has this memory hot in cache,
clear it there.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 14 Oct 2015 19:10:50 +0000 (22:10 +0300)]
iwlwifi: pcie: re-organize code towards TSO
The code that handles the TBs that contain the WiFi payload
will be changed for TSO. Move the current code into a
separate function.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 14 Oct 2015 11:16:35 +0000 (14:16 +0300)]
iwlwifi: mvm: prepare the code towards TSO implementation
Differentiate between the cases where the skb is a large
send and the other cases.
Advertise TSO even if, at this stage, skb_gso_segment will
be called and it will do all the work.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 21 Oct 2015 06:00:07 +0000 (09:00 +0300)]
iwlwifi: pcie: allow to pretend to have Tx CSUM for debug
Allow to configure the driver to pretend to have TX CSUM
offload support. This will be useful to test the TSO flows
that will come in further patches.
This configuration is disabled by default.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 17 Nov 2015 13:39:56 +0000 (15:39 +0200)]
iwlwifi: change the Intel Wireless email address
ilw@linux.intel.com is not available anymore.
linuxwifi@intel.com should be used instead.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Sun, 20 Dec 2015 12:48:08 +0000 (14:48 +0200)]
Merge tag 'iwlwifi-for-kalle-2015-12-16' into next
* don't load firmware that won't exist for 7260
* fix RCU splat
Rafał Miłecki [Wed, 9 Dec 2015 22:36:51 +0000 (23:36 +0100)]
ssb: pick SoC invariants code from MIPS BCM47xx arch
There is code in ssb fetching "invariants" that is basically a set of
board specific data. Every host requires its own implementation of
reading function. In ssb we have support for PCI, PCMCIA & SDIO.
For some (historical?) reason code reading "invariants" for SoC was
placed in arch code and provided by a callback. This is not needed
nowadays, so lets move that into ssb. This way we keep all "invariants"
functions in a single module making code cleaner.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kalle Valo [Wed, 16 Dec 2015 14:28:20 +0000 (16:28 +0200)]
Merge ath-next from ath.git
Major changes:
ath9k
* add random number generator support (CONFIG_ATH9K_HWRNG)
Julia Lawall [Fri, 27 Nov 2015 16:10:58 +0000 (17:10 +0100)]
iwlwifi: dvm: fix compare_const_fl.cocci warnings
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
type=cleanup
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Sara Sharon [Thu, 19 Nov 2015 09:53:49 +0000 (11:53 +0200)]
iwlwifi: mvm: change protocol offload flows
RFC4862 states that "In all cases, a node MUST NOT respond to
a Neighbor Solicitation for a tentative address".
Currently the driver configures the NS offload and does not wait
for address to become permanent, thus violating the RFC.
Just removing the address from the address list is not good enough
for all cases, since the NS messages are needed for the duplicate
address detection and should not be discarded.
For d0i3 disable NS offload. Put tentative address in the address
list so the NS packet will not be filtered out by ucode.
For D3 the platform will not wake from NS packets - so enable
NS offload while removing the tentative address from the list.
Given that now NS offload might be disabled, and that the ucode
uses the IP data for other puroposes (L3 filtering) add two
independent flags indicating if IPv4\IPv6 data is valid.
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Golan Ben-Ami [Sun, 30 Aug 2015 14:41:36 +0000 (17:41 +0300)]
iwlwifi: expose fw usniffer mode to more utilities
Today, in order to configure fw in usniffer mode, the ucode
must have the corresponding tlv, which is revealed to the driver
while parsing the ucode.
Expose the mode of the usniffer to other utilities in the driver
(other than the ucode parser) by passing back a pointer to the value.
This can be very useful for allowing configuring the fw dbg data
using an external configuration file, because this configuration
depends on the fw usniffer mode.
Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Peter Oh [Thu, 3 Dec 2015 17:50:55 +0000 (09:50 -0800)]
ath10k: allow Mesh Point to install peer security key
Mesh Point requires peer security key install when running
in secured mode since it's a type of peer links, otherwise peer
link will be removed due to key install failure.
MFP feature set is required to run Mesh in secured mode and
QCA988X firmware, 10.2.4.70.14-2 and above, is the only one
supporting secured Mesh at this moment.
Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Johannes Berg [Fri, 11 Dec 2015 08:06:25 +0000 (09:06 +0100)]
iwlwifi: mvm: protect RCU dereference in iwl_mvm_get_key_sta_id
Properly protect the RCU dereference in iwl_mvm_get_key_sta_id() when
coming from iwl_mvm_update_tkip_key() which cannot hold the mvm->mutex
by moving the call into the RCU critical section.
Modify the check to use rcu_dereference_check() to permit this.
Fixes:
9513c5e18a0d ("iwlwifi: mvm: Avoid dereferencing sta if it was already flushed")
Reported-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 3 Dec 2015 16:26:59 +0000 (17:26 +0100)]
iwlwifi: separate firmware version for 7260 devices
The 7260 devices aren't going to be updated for completely new
firmware versions any more (only bugfixes), and haven't been
since API version 17. Encode that in the data structures to
avoid trying to load FW images that will never exist.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luca Coelho [Thu, 17 Sep 2015 20:44:14 +0000 (23:44 +0300)]
iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variables
The d0i3_mode variable is used to distinguish between transports that
handle d0i3 entry during suspend by themselves (i.e. the slave
transports) and those which rely on the op_mode layer to do it. The
reason why the former do it by themselves is that they need to
transition from d0i3 in runtime_suspend into d0i3 in system-wide
suspend and this transition needs to happen before the op_mode's
suspend flow is called.
The wowlan_d0i3 element is also a bit confusing, because it just
reflects the wowlan->any value for the trans to understand. This is a
bit unclear in the code and not generic enough for future use.
To make it clearer and to generalize the platform power mode settings,
introduce two variables to indicate the platform power management
modes used by the transport.
Additionally, in order not to take too big a step in one patch, treat
this new variables semantically in the same way as the old d0i3_mode
element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to
help with that.
This commit also adds the foundation for a new concept where the
firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from
the platform PM mode we are in (i.e. runtime suspend or system-wide
suspend).
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Thu, 3 Dec 2015 14:10:07 +0000 (16:10 +0200)]
iwlwifi: mvm: remove the vif parameter of iwl_mvm_configure_bcast_filter()
Remove the vif parameter of iwl_mvm_configure_bcast_filter()
as it's not being used.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Thu, 10 Dec 2015 13:47:11 +0000 (15:47 +0200)]
iwlwifi: avoid d0i3 commands when no/init ucode is loaded
d0i3 commands are not supported in the init image, so take
a reference to ensure we don't enter d0i3 during init image,
and additional checks to prevent d0i3 commands when no
fw image is loaded.
Add a few WARN_ON_ONCE to the d0i3 enter/exit commands
to ensure we send d0i3 commands only when the normal
ucode is loaded.
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Thu, 5 Nov 2015 08:32:31 +0000 (10:32 +0200)]
iwlwifi: mvm: close the SP if we send fewer frames than expected in SP
When we have holes in the BA window, there might be frames
that have been ACKed between the read and the right
pointers. This means that these frames won't be scheduled
again by the SCD and the firwmare won't see them.
This invalidates the number of frames we tell the firmware
to send. When we detect this case, tell mac80211 to close
the SP and to send an EOSP so that the firmware can be in
sync.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Sun, 13 Dec 2015 07:41:59 +0000 (09:41 +0200)]
Merge tag 'mac80211-next-for-davem-2015-12-07' into next
This pull request got a bit bigger than I wanted, due to
needing to reshuffle and fix some bugs. I merged mac80211
to get the right base for some of these changes.
* new mac80211 API for upcoming driver changes: EOSP handling,
key iteration
* scan abort changes allowing to cancel an ongoing scan
* VHT IBSS 80+80 MHz support
* re-enable full AP client state tracking after fixes
* various small fixes (that weren't relevant for mac80211)
* various cleanups
Sharon Dvir [Thu, 15 Oct 2015 15:18:09 +0000 (18:18 +0300)]
iwlwifi: update host command messages to new format
Host commands now have a group id, express this in printed messages.
Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 1 Dec 2015 11:45:37 +0000 (13:45 +0200)]
iwlwifi: uninline iwl_trans_send_cmd
This function got too big to be inlined. Uninline it.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 24 Nov 2015 12:55:18 +0000 (14:55 +0200)]
iwlwifi: block the queues when we send ADD_STA for uAPSD
We send an ADD_STA to instruct the firmware to release
frames despite the peer being in PS.
Since the ADD_STA command and the Tx frame that comes
immediately afterwards can be reordered by the DMA engine,
we need to block the Tx queues until the firmware replies
with the ADD_STA response.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 24 Nov 2015 13:17:37 +0000 (15:17 +0200)]
iwlwifi: trans: support a callback for ASYNC commands
This allows the op_mode to request from the transport to
call a callback when an ASYNC commands is completed by
the firmware. The same callback will be called for all the
commands. Pass the command whose response triggers the
callback as a parameter to the callback itself.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Tue, 24 Nov 2015 11:24:24 +0000 (13:24 +0200)]
iwlwifi: pcie: allow the op_mode to block the tx queues
In certain flows (see next patches), the op_mode may need to
block the Tx queues for a short period. Provide an API for
that. The transport is in charge of counting the number of
times the queues are blocked since the op_mode may block the
queues several times in a row before unblocking them.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Sun, 15 Nov 2015 13:44:17 +0000 (15:44 +0200)]
iwlwifi: mvm: check iwl_mvm_wowlan_config_key_params() return value
commit
9a4c830007817e ("iwlwifi: mvm: refactor d3 key
update functions") refactored some code into
iwl_mvm_wowlan_config_key_params() function, but the
return value was never checked, and not all the function
flows returned valid values. fix it.
Fixes:
ac8ef0ce38de ("iwlwifi: mvm: refactor d3 key update functions")
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Wed, 9 Dec 2015 14:33:20 +0000 (16:33 +0200)]
iwlwifi: mvm: cleanup roc te on restart cleanup
iwl_mvm_restart_cleanup() calls ieee80211_remain_on_channel_expired()
on cleanup, but it doesn't clean the actual roc time
events, resulting in failure of further ROC attempts.
Refactor iwl_mvm_stop_roc() a bit, and add a new function
to only cleanup the roc time events (without sending further
commands).
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Dan Carpenter [Wed, 9 Dec 2015 10:26:08 +0000 (13:26 +0300)]
iwlwifi: mvm: remove an extra tab
Smatch prints a static checker warning here:
drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c:386 iwl_dump_prph()
warn: curly braces intended?
Curly braces are NOT intended, the extra tab was added by mistake in
commit
1a616dd2f171 ('iwlwifi: dump prph registers in a common place
for all transports').
type=cleanup
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 17 Apr 2015 14:39:12 +0000 (16:39 +0200)]
iwlwifi: dvm: advertise NETIF_F_SG
If the transport supports it, advertise NETIF_F_SG to mac80211 to
be able to use frag SKBs. This will already improve performance by
allowing software GSO to be used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 17 Apr 2015 14:39:12 +0000 (16:39 +0200)]
iwlwifi: mvm: advertise NETIF_F_SG
If the transport supports it, advertise NETIF_F_SG to mac80211 to
be able to use frag SKBs. This will already improve performance by
allowing software GSO to be used.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Thu, 19 Nov 2015 16:37:31 +0000 (18:37 +0200)]
iwlwifi: mvm: rs: fix a potential out of bounds access
Klocwork pointed these out. There is a theoretical possibility
that rate->index might be set to IWL_RATE_INVALID (15).
This could trigger an out of bounds access on ht_vht_rates or
legacy_rates arrays. Fix it by adding some checks.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avraham Stern [Thu, 26 Nov 2015 09:22:33 +0000 (11:22 +0200)]
iwlwifi: mvm: configure scheduled scan according to traffic conditions
Change scan configuration (dwell time, suspend time etc.) according
to traffic conditions. This is useful for scans that are managed by
the FW (e.g. scheduled scan).
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Liad Kaufman [Thu, 24 Sep 2015 08:44:12 +0000 (10:44 +0200)]
iwlwifi: mvm: set default new STA as non-aggregated
When sending the first ADD_STA HCMD for a STA, the %add_modify
field indicates an addition of a STA and not a modification
of one. In such a case, all fields of the HCMD are used to
initialize the corresponding fields in the FW, regardless of
what bits are set in %modify_mask.
Set the %tid_disable_tx field to mvm_sta->tid_disable_agg in
iwl_mvm_sta_send_to_fw(). If the STA is only updated this will
have no effect, but if it is added - it will make sure the
STA starts with the correct queues - if any - configured as
non-aggregated by default (until told otherwise).
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Gregory Greenman [Tue, 24 Nov 2015 17:13:27 +0000 (19:13 +0200)]
iwlwifi: mvm: add an option to start rs from HT/VHT rates
Extend the configurable option of setting initial rate to RSSI based.
Make the initial rate to be set to VHT/HT SISO or legacy depending on
the AP capabilities.
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Colin Ian King [Tue, 8 Dec 2015 23:49:31 +0000 (23:49 +0000)]
ath9k: fix inconsistent indenting on return statement
minor change, indenting is one tab out.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Miaoqing Pan [Fri, 9 Oct 2015 09:06:45 +0000 (17:06 +0800)]
ath9k: feeding entropy in kernel from ADC capture
This patch is derived from
commit
6301566e0b2d ("ath9k: export HW random number generator"),
We evaluated the entropy of the ADC data on QCA9531, QCA9561, QCA955x,
and AR9340, and it has sufficient quality random data (at least 10 bits
and up to 22 bits of min-entropy for a 32-bit value). We conservatively
assume the min-entropy is 10 bits out of 32 bits. Thus, ATH9K_RNG_BUF_SIZE
is set to 320 (u32) i.e., 1.25 kilobytes of data is inserted to fill up
the pool as soon as the entropy counter becomes 896/4096 (set by random.c).
Since ADC was not designed to be a dedicated HW RNG, we do not want to bind
it to /dev/hwrng framework directly. This patch feeds the entropy directly
from the WiFi driver to the input pool. The ADC register output is only
used as a seed for the Linux entropy pool. No conditioning is needed,
since all the conditioning is performed by the pool itself.
Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Miaoqing Pan [Thu, 20 Aug 2015 01:21:38 +0000 (09:21 +0800)]
ath9k: fix AR_RX_FILTER for ar9462/ar9565 when rx stopped
When rx stopped, AR_RX_FILTER should be cleared, but in
ath9k_hw_setrxfilter(), ATH9K_RX_FILTER_CONTROL_WRAPPER will always
be set for ar9462/ar9565.
Fix this by moving the code in ath9k_hw_setrxfilter() to
ath_calcrxfilter().
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 30 Nov 2015 23:01:48 +0000 (15:01 -0800)]
ath6kl: add log messages for firmware failure cases.
This gives a user a chance to know why a firmware load
is failing.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Ben Greear [Mon, 30 Nov 2015 23:01:47 +0000 (15:01 -0800)]
ath6kl: fix tx/rx antenna reporting for 2x2 devices
My previous patch incorrectly reported the antenna
for 2x2 devices. It should be a mask instead of
a numeric count. This patch fixes that.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Uri Mashiach [Thu, 10 Dec 2015 13:12:56 +0000 (15:12 +0200)]
wlcore/wl12xx: spi: fix oops on firmware load
The maximum chunks used by the function is
(SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE + 1).
The original commands array had space for
(SPI_AGGR_BUFFER_SIZE / WSPI_MAX_CHUNK_SIZE) commands.
When the last chunk is used (len > 4 * WSPI_MAX_CHUNK_SIZE), the last
command is stored outside the bounds of the commands array.
Oops 5 (page fault) is generated during current wl1271 firmware load
attempt:
root@debian-armhf:~# ifconfig wlan0 up
[ 294.312399] Unable to handle kernel paging request at virtual address
00203fc4
[ 294.320173] pgd =
de528000
[ 294.323028] [
00203fc4] *pgd=
00000000
[ 294.326916] Internal error: Oops: 5 [#1] SMP ARM
[ 294.331789] Modules linked in: bnep rfcomm bluetooth ipv6 arc4 wl12xx
wlcore mac80211 musb_dsps cfg80211 musb_hdrc usbcore usb_common
wlcore_spi omap_rng rng_core musb_am335x omap_wdt cpufreq_dt thermal_sys
hwmon
[ 294.351838] CPU: 0 PID: 1827 Comm: ifconfig Not tainted
4.2.0-00002-g3e9ad27-dirty #78
[ 294.360154] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 294.366557] task:
dc9d6d40 ti:
de550000 task.ti:
de550000
[ 294.372236] PC is at __spi_validate+0xa8/0x2ac
[ 294.376902] LR is at __spi_sync+0x78/0x210
[ 294.381200] pc : [<
c049c760>] lr : [<
c049ebe0>] psr:
60000013
[ 294.381200] sp :
de551998 ip :
de5519d8 fp :
00200000
[ 294.393242] r10:
de551c8c r9 :
de5519d8 r8 :
de3a9000
[ 294.398730] r7 :
de3a9258 r6 :
de3a9400 r5 :
de551a48 r4 :
00203fbc
[ 294.405577] r3 :
00000000 r2 :
00000000 r1 :
00000000 r0 :
de3a9000
[ 294.412420] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM
Segment user
[ 294.419918] Control:
10c5387d Table:
9e528019 DAC:
00000015
[ 294.425954] Process ifconfig (pid: 1827, stack limit = 0xde550218)
[ 294.432437] Stack: (0xde551998 to 0xde552000)
...
[ 294.883613] [<
c049c760>] (__spi_validate) from [<
c049ebe0>]
(__spi_sync+0x78/0x210)
[ 294.891670] [<
c049ebe0>] (__spi_sync) from [<
bf036598>]
(wl12xx_spi_raw_write+0xfc/0x148 [wlcore_spi])
[ 294.901661] [<
bf036598>] (wl12xx_spi_raw_write [wlcore_spi]) from
[<
bf21c694>] (wlcore_boot_upload_firmware+0x1ec/0x458 [wlcore])
[ 294.914038] [<
bf21c694>] (wlcore_boot_upload_firmware [wlcore]) from
[<
bf24532c>] (wl12xx_boot+0xc10/0xfac [wl12xx])
[ 294.925161] [<
bf24532c>] (wl12xx_boot [wl12xx]) from [<
bf20d5cc>]
(wl1271_op_add_interface+0x5b0/0x910 [wlcore])
[ 294.936364] [<
bf20d5cc>] (wl1271_op_add_interface [wlcore]) from
[<
bf15c4ac>] (ieee80211_do_open+0x44c/0xf7c [mac80211])
[ 294.947963] [<
bf15c4ac>] (ieee80211_do_open [mac80211]) from
[<
c0537978>] (__dev_open+0xa8/0x110)
[ 294.957307] [<
c0537978>] (__dev_open) from [<
c0537bf8>]
(__dev_change_flags+0x88/0x148)
[ 294.965713] [<
c0537bf8>] (__dev_change_flags) from [<
c0537cd0>]
(dev_change_flags+0x18/0x48)
[ 294.974576] [<
c0537cd0>] (dev_change_flags) from [<
c05a55a0>]
(devinet_ioctl+0x6b4/0x7d0)
[ 294.983191] [<
c05a55a0>] (devinet_ioctl) from [<
c0517040>]
(sock_ioctl+0x1e4/0x2bc)
[ 294.991244] [<
c0517040>] (sock_ioctl) from [<
c017d378>]
(do_vfs_ioctl+0x420/0x6b0)
[ 294.999208] [<
c017d378>] (do_vfs_ioctl) from [<
c017d674>]
(SyS_ioctl+0x6c/0x7c)
[ 295.006880] [<
c017d674>] (SyS_ioctl) from [<
c000f4c0>]
(ret_fast_syscall+0x0/0x54)
[ 295.014835] Code:
e1550004 e2444034 0a00007d e5953018 (
e5942008)
[ 295.021544] ---[ end trace
66ed188198f4e24e ]---
Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: stable@vger.kernel.org
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:11 +0000 (13:43 +0100)]
brcmfmac: Move scheduled scan related interface layer structs
All interface layer related to scheduled scan are moved in
fwil_types.h
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:10 +0000 (13:43 +0100)]
brcmfmac: Change error print in debug print
The pcie suspend and resume routines contain some error prints,
which should have been debug prints.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend van Spriel [Thu, 10 Dec 2015 12:43:09 +0000 (13:43 +0100)]
brcmfmac: add 43242 device id for LG dongle
Got a hint on IRC that a 43242 dongle for LG smart TV's works with
brcmfmac:
> Hello - I recently got a LG AN-WF500 wireless dongle for LG's SmartTVs.
> From the information I gathered it uses a Broadcom chipset BCM43242.
> The device should have been supported by brcmfmac kernel driver if it used
> USB IDs 0a5c:bd1f.
> My device however identifies itself as "ID 043e:3101 LG Electronics USA, Inc.".
> I then tried adding the USB ID to the driver with
> "echo "043e 3101" > /sys/bus/usb/drivers/brcmfmac/new_id" and it just works.
> The kernel provides the following information.
> [15958.851291] usb 3-1.1.3: new high-speed USB device number 53 using ehci-pci
> [15958.946723] usb 3-1.1.3: New USB device found, idVendor=043e, idProduct=3101
> [15958.946728] usb 3-1.1.3: New USB device strings: Mfr=1, Product=4, SerialNumber=3
> [15958.946731] usb 3-1.1.3: Product: Composite Wireless Adapter
> [15958.946733] usb 3-1.1.3: Manufacturer: Broadcom
> [15958.946735] usb 3-1.1.3: SerialNumber: 28458
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Kosuke Tatsukawa [Thu, 10 Dec 2015 12:43:08 +0000 (13:43 +0100)]
brcmfmac: fix waitqueue_active without memory barrier in brcmfmac driver
brcmf_msgbuf_ioctl_resp_wake() seems to be missing a memory barrier
which might cause the waker to not notice the waiter and miss sending a
wake_up as in the following figure.
brcmf_msgbuf_ioctl_resp_wake brcmf_msgbuf_ioctl_resp_wait
------------------------------------------------------------------------
if (waitqueue_active(&msgbuf->ioctl_resp_wait))
/* The CPU might reorder the test for
the waitqueue up here, before
prior writes complete */
/* wait_event_timeout */
/* __wait_event_timeout */
/* ___wait_event */
prepare_to_wait_event(&wq, &__wait,
state);
if (msgbuf->ctl_completed)
...
msgbuf->ctl_completed = true;
schedule_timeout(__ret))
------------------------------------------------------------------------
There are three other place in drivers/net/wireless/brcm80211/brcmfmac/
which have similar code. The attached patch removes the call to
waitqueue_active() leaving just wake_up() behind. This fixes the
problem because the call to spin_lock_irqsave() in wake_up() will be an
ACQUIRE operation.
I found this issue when I was looking through the linux source code
for places calling waitqueue_active() before wake_up*(), but without
preceding memory barriers, after sending a patch to fix a similar
issue in drivers/tty/n_tty.c (Details about the original issue can be
found here: https://lkml.org/lkml/2015/9/28/849).
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: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:07 +0000 (13:43 +0100)]
brcmfmac: Fix IBSS setup
IBSS got broken over time. Disconnect events should not be given
for IBSS mode and connect events for IBSS need to have channel
information.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arend van Spriel [Thu, 10 Dec 2015 12:43:06 +0000 (13:43 +0100)]
brcmfmac: no interface combination check for single interface
The interface combinations are intended for use-case in which the driver
handles multiple interface concurrently. This means that the combinations
do not need to be checked when there is only a single interface active.
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: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:05 +0000 (13:43 +0100)]
brcmfmac: Add support for PCIE 4350 revision 5 device
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:04 +0000 (13:43 +0100)]
brcmfmac: Make TDLS a detectable feature
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:03 +0000 (13:43 +0100)]
brcmfmac: Cleanup pmksa cache handling code
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:02 +0000 (13:43 +0100)]
brcmfmac: Remove some redundant cfg80211 data
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:01 +0000 (13:43 +0100)]
brcmfmac: Use local storage for ssid iovar
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Hante Meuleman [Thu, 10 Dec 2015 12:43:00 +0000 (13:43 +0100)]
brcmfmac: Simplify scan timing configuration
No need to pass timing configuration in local functions as they are
static anyway.
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Arnd Bergmann [Wed, 9 Dec 2015 16:42:41 +0000 (17:42 +0100)]
iwlegacy: mark il_adjust_beacon_interval as noinline
With the new optimized do_div() code, some versions of gcc
produce obviously incorrect code that leads to a link error
in iwlegacy/common.o:
drivers/built-in.o: In function `il_send_rxon_timing':
:(.text+0xa6b4d4): undefined reference to `____ilog2_NaN'
:(.text+0xa6b4f0): undefined reference to `__aeabi_uldivmod'
In a few thousand randconfig builds, I have seen this problem
a couple of times in this file, but never anywhere else in the
kernel, so we can try to work around this in the only file
that shows the behavior, by marking the il_adjust_beacon_interval
function as noinline, which convinces gcc to use the unoptimized
do_div() all the time.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Peter Wu [Mon, 7 Dec 2015 00:07:31 +0000 (01:07 +0100)]
rtlwifi: fix memory leak for USB device
Free skb for received frames with a wrong checksum. This can happen
pretty rapidly, exhausting all memory.
This fixes a memleak (detected with kmemleak). Originally found while
using monitor mode, but it also appears during managed mode (once the
link is up).
Cc: stable@vger.kernel.org
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Julia Lawall [Mon, 7 Dec 2015 09:55:33 +0000 (10:55 +0100)]
prism54: fix compare_const_fl.cocci warnings
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Julia Lawall [Sun, 6 Dec 2015 21:56:21 +0000 (22:56 +0100)]
mwifiex: fix semicolon.cocci warnings
Remove unneeded semicolon.
Generated by: scripts/coccinelle/misc/semicolon.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Julia Lawall [Sun, 6 Dec 2015 06:03:26 +0000 (07:03 +0100)]
brcm80211: fix compare_const_fl.cocci warnings
Move constants to the right of binary operators.
Generated by: scripts/coccinelle/misc/compare_const_fl.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Fri, 4 Dec 2015 14:13:07 +0000 (06:13 -0800)]
mwifiex: correction in region code to country mapping
EU is not a valid country in db.txt file. Hence regulatory_hint
returns failure if EEPROM provides region code as 0x30. Let's
use FR for 0x30.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Fri, 4 Dec 2015 14:13:05 +0000 (06:13 -0800)]
mwifiex: don't follow AP if country code received from EEPROM
If device has already received country information from
EEPROM, we won't parse AP's country IE and download it to
firmware. We will also set regulatory flags to disable beacon
hints and ignore country IE.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Fri, 4 Dec 2015 14:13:04 +0000 (06:13 -0800)]
mwifiex: set regulatory info from EEPROM
Driver gets country information from EEPROM during
initialization. We will call regulatory_hint to update
current regulatory domain.
As by default world regulatory domain is selected by
cfg80211, country '00' from EEPROM is ignored.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Fri, 4 Dec 2015 14:13:03 +0000 (06:13 -0800)]
mwifiex: handle start AP error paths correctly
It's been observed that even if firmware returns an error
for a configuration command, we go ahead and start AP.
This patch changes the command type from async to sync
so that threads waits for command response and return
failure start AP.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Amitkumar Karwar [Fri, 4 Dec 2015 14:13:02 +0000 (06:13 -0800)]
mwifiex: parse adhoc start/join result
Even if ADHOC start or join attempt is failed, these commands
are returned with success status by firmware. Actual connection
result is provided inside command response.
This patch parses the adhoc connection result and resets
connection state variables if connection is not successful.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Fri, 4 Dec 2015 13:19:49 +0000 (16:19 +0300)]
prism54: off by one BUG_ON() test
This code was supposed to trigger a BUG() if we truncate the output but
it's off by one so it allows one character to be truncated. Really
drivers shouldn't call BUG_ON() and especially for something minor like
this so I've changed it to a WARN_ON().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Fri, 4 Dec 2015 13:17:46 +0000 (16:17 +0300)]
hostap: fix an error code in prism2_config()
The current code returns success if prism2_init_local_data() fails, but
we want to return an error code. Also we can remove the bogus
ret initializer because it is wrong and never used.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Fri, 4 Dec 2015 13:17:15 +0000 (16:17 +0300)]
mwifiex: remove an unneeded condition
We already know that "wep_key->key_length" is set so there is no need to
check again. Also the last curly brace was indented too far.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Fri, 4 Dec 2015 13:16:45 +0000 (16:16 +0300)]
iwlegacy: cleanup end of il_send_add_sta()
This code causes a static checker warning because we check for
"if (ret == 0)" but we have already had verified that was true. Clean
it up a little.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Dan Carpenter [Fri, 4 Dec 2015 13:15:23 +0000 (16:15 +0300)]
cw1200: remove some dead code
If the mode is NL80211_IFTYPE_UNSPECIFIED then we return success at the
start of the function so this condition is never true.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>