John W. Linville [Mon, 15 Sep 2014 18:37:07 +0000 (14:37 -0400)]
Merge branch 'for-john' of git://git./linux/kernel/git/iwlwifi/iwlwifi-next
Luciano Coelho [Tue, 26 Aug 2014 13:14:10 +0000 (16:14 +0300)]
iwlwifi: mvm: align CSA GO NOA time event naming with the firmware
The time event used for CSA GO will also be used by CSA client.
Rename the symbols to something more generic and aligned with the
firmware code.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eliad Peller [Wed, 6 Aug 2014 07:52:27 +0000 (10:52 +0300)]
iwlwifi: mvm: move IWL_MVM_UAPSD_QUEUES to constants.h
Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Arik Nemtsov [Wed, 3 Sep 2014 09:09:45 +0000 (12:09 +0300)]
iwlwifi: mvm: fix PSM disable during TDLS
Simplify the code and check for TDLS stations just before sending the
MAC_POWER_TABLE command. The previous version of the code still allowed
PM in some multi-interface scenarios even with TDLS connected.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman [Wed, 27 Aug 2014 16:58:56 +0000 (19:58 +0300)]
iwlwifi: mvm: Fix skip over dtim configuration in d0i3
There was some confusion concerning the units of the beacon interval.
The driver assumed that it was in msec where it was in TU - so fix that.
Skip over dtim was capped by 300TU where it should be by 306TU.
It should also be subjected to several conditions:
Not a DFS channel, dtim period < 10, and the multicast wake-lock
is off. Concerning multicast lock - there is an implementation gap
in the supplicant, so just leave a TODO.
Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Arik Nemtsov [Sun, 7 Sep 2014 16:18:31 +0000 (19:18 +0300)]
iwlwifi: mvm: move TDLS code to separate file
The upcoming TDLS channel-switch functionality is big enough to warrant
a separate file. Move existing related functions to the new file.
Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 9 Sep 2014 13:49:19 +0000 (15:49 +0200)]
iwlwifi: mvm: update QoS parameters when they change
The QoS parameters can change during the lifetime of the BSS,
and more importantly hostapd only sets up the correct ones
after having started the AP/GO. Resend the MAC context when
the parameters change, with the updated parameters.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
David Spinadel [Wed, 10 Sep 2014 13:40:41 +0000 (16:40 +0300)]
iwlwifi: mvm: reduce active dwell time
Reduce basic active dwell time from 30 ms on 2.4 GHz and 20 on 5.2 to
20 on 2.4 and 10 on 5.2.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Thu, 11 Sep 2014 12:12:06 +0000 (14:12 +0200)]
iwlwifi: mvm: fix quota update avoidance
When not updating the quota, the new command shouldn't be stored
as otherwise slowly drifting quota would never update the firmware.
Fix this by storing the command only when it was also sent.
Since the error message also only makes sense when attempting to
send the command, just short-circuit the function when there's no
need to send the command.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Thu, 11 Sep 2014 13:19:43 +0000 (16:19 +0300)]
iwlwifi: mvm: allow to collect debug data when restart is disabled
In some testing configuration, the firmware restart flow is
not enabled. Allow to collect logs even in this case.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Thu, 4 Sep 2014 09:29:15 +0000 (12:29 +0300)]
iwlwifi: mvm: use the firmware to get the temperature during CT kill
Reading the temperature directly from the hardware, without the help
of the firmware, is a complex process and is not entirely the same for
different hardware. Also, some NICs don't easily allow access to the
sensors when the firmware is not running, which would add even more
complexity to the code.
To reduce the code complexity and to avoid code duplication between
the firmware and the driver, boot the firmware briefly to read the
current temperature while in CT kill mode.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Fri, 12 Sep 2014 08:28:01 +0000 (10:28 +0200)]
iwlwifi: mvm: update d0i3 debugfs
A lot of the newer d0i3 ref additions weren't added to the
debugfs file, fix that and add a comment to remember to do
it in the future.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Avri Altman [Tue, 26 Aug 2014 04:09:52 +0000 (07:09 +0300)]
iwlwifi: mvm: remove unused static inline function
Signed-off-by: Avri Altman <avri.altman@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Toralf Förster [Tue, 9 Sep 2014 18:08:53 +0000 (20:08 +0200)]
iwlwifi/iwl-drv.c: fix typo defualt -> default
trivial, but this is user visible b/c it is in the help text
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Mon, 8 Sep 2014 14:42:54 +0000 (16:42 +0200)]
iwlwifi: mvm: don't update quota in firmware too often
When updating quota in the firmware, it has to reset quite a bit
of internal state, which apparently can have an adverse impact on
its operation.
Avoid that by only updating the quota command when there are any
signification changes, i.e. added/removed bindings or changes in
quota that are bigger than 8 TU within a binding.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 10 Sep 2014 08:00:16 +0000 (11:00 +0300)]
iwlwifi: define the non shared antenna per hardware
The sharing model will differ in new hardware. Define the
non shared antenna based on the device so that different
devices can have different names for the non shared antenna.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 9 Sep 2014 19:16:06 +0000 (21:16 +0200)]
iwlwifi: pcie: clear command data on freeing
When freeing the structures used for command data, clear their
memory as they may have contained key material at some point.
Also clear the duplicated buffer when freeing it to be safe;
currently key material is never put there but that may change.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Liad Kaufman [Sun, 7 Sep 2014 08:41:05 +0000 (11:41 +0300)]
iwlwifi: make hw rev checking more readable
Rather than ANDing with a mask - use existing macros, which
are more readable.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Wed, 10 Sep 2014 08:16:41 +0000 (11:16 +0300)]
iwlwifi: trans: don't configure the set_active in SCD for dvm
This configuration is not needed for dvm, and it actually
broke it.
Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Johannes Berg [Tue, 5 Aug 2014 13:24:44 +0000 (15:24 +0200)]
iwlwifi: mvm: disable aggregation queues in station DB in FW
When disabling aggregation, disable the queues in the station
DB in the firmware, otherwise we leave the tfd_queue_mask in
a wrong state after an aggregation session has been torn down.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Fri, 15 Aug 2014 22:30:30 +0000 (01:30 +0300)]
iwlwifi: mvm: rs: don't zero tx stats after idle
Move the tx stats to the persistent area of lq_sta to
avoid them being zeroed out every time rs reinitializes
which happens after tx idle for 5 secs for example.
The automatic zeroing out made them difficult to use.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Max Stepanov [Mon, 4 Aug 2014 10:55:01 +0000 (13:55 +0300)]
iwlwifi: mvm: add MVM_FW_MCAST_FILTER_PASS_ALL option
Add MVM_FW_MCAST_FILTER_PASS_ALL option to iwl-dbg-cfg.ini configuration file
to enable/disable FW multicast filtering.
Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Wed, 20 Aug 2014 07:21:07 +0000 (10:21 +0300)]
iwlwifi: mvm: fail temp test enabling if the ucode is not loaded
If the ucode is not loaded, don't allow the temperature test to be
started, but allow it to be changed or stopped if already running.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Luciano Coelho [Wed, 20 Aug 2014 08:49:11 +0000 (11:49 +0300)]
iwlwifi: mvm: reset ucode_loaded flag when mac80211 stop is called
We rely on the value of the mvm->ucode_loaded flag to decide whether
or not we can perform certain operations (e.g. access to some debugfs
entries), so we need to reset it when the mac80211 stop operation is
called and the hardware is shutdown.
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 30 Aug 2014 23:33:33 +0000 (02:33 +0300)]
iwlwifi: mvm: rs: remove max_rate_idx
max_rate_idx constraint is deprecated and it's handling is
faulty as well as it is relevant only for legacy rates but
was considered in HT/VHT. In most cases there was no side effect
as max_rate_idx was set to -1 but in certain cases like P2P
it got set to an actual rate idx which would limit the maximum
rate in HT/VHT by mistake.
max_rate_idx should be replaced by the masks fields but for
now remove it.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Wed, 27 Aug 2014 23:33:05 +0000 (02:33 +0300)]
iwlwifi: enable LDPC in 8000 chip family
This chip family supports LDPC so enable it.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eran Harary [Sun, 27 Jul 2014 05:03:06 +0000 (08:03 +0300)]
iwlwifi: mvm: allow preventing dummy notifications
The firwmare now allows the driver to disable dummy
notifications. These notifications sent by the firmware
are an overhead for slow buses. They are still useful for
fast buses.
Add a hardware switch to prevent these notifications only
on devices that work on slow buses.
Signed-off-by: Eran <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Oren Givon [Thu, 4 Sep 2014 07:16:49 +0000 (09:16 +0200)]
iwlwifi: add and edit 8000 series PCI IDs
Edit some 8000 series PCI IDs and add configuration to
Dual Band Wireless N 8260 devices.
Signed-off-by: Oren Givon <oren.givon@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Eyal Shapira [Sat, 9 Aug 2014 07:57:59 +0000 (10:57 +0300)]
iwlwifi: mvm: add LDPC support
Use LDPC for Tx and publish support for Rx in case the chip
supports LDPC. Enable it for the 7265 family.
Signed-off-by: Eyal Shapira <eyalx.shapira@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Emmanuel Grumbach [Sun, 14 Sep 2014 09:54:42 +0000 (12:54 +0300)]
Merge remote-tracking branch 'iwlwifi-fixes/master' into NEXT
Sujith Manoharan [Wed, 10 Sep 2014 13:46:00 +0000 (19:16 +0530)]
ath9k: Fix beacon miss handling
The NoA duration for a GO is half the beacon interval
and a concurrent context like a STA can be active only
for that duration, before switching back to the GO's
operating channel.
Currently, when multiple beacons are missed, the dwell
time for the STA context is extended to improve the
chances of receiving a beacon. But the NoA is not updated
and this will cause problems since the GO is offline
for a period that is longer than the advertised duration.
Fix this by ensuring that the NoA is updated first before
extending the time slot for the STA context. Also make
sure that non-periodic NoA is used for a one-time, longer
absence period.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 10 Sep 2014 13:45:59 +0000 (19:15 +0530)]
ath9k: Fix channel switch time duration
Since the NoA duration is the maximum time the GO interface
can be offline, it needs to include the time take to
switch channels in the HW.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 10 Sep 2014 13:45:58 +0000 (19:15 +0530)]
ath9k: Clear offchannel duration properly
Clearing the offchannel duration value in the
scheduler unconditionally breaks NoA when
multiple contexts are active and an offchannel
request is deferred, for example, in a scan run.
Fix this by clearing the duration only if there
is no pending offchannel request.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 10 Sep 2014 13:45:57 +0000 (19:15 +0530)]
ath9k: Fix Notice of Absence issues
* The index has to incremented only when advertising
a new NoA schedule.
* Switch to non-periodic NoA when starting a scan operation
and multiple channel contexts are active.
* Make sure that periodic NoA is advertised again when
scan ends. Since the offchannel timer moves the offchannel
state to IDLE after the GO operating channel becomes
active, use a flag "force_noa_update" to update the
NoA contents.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Wed, 10 Sep 2014 13:45:56 +0000 (19:15 +0530)]
ath9k: Assign offchannel duration properly
In multi-channel mode, an offchannel request will
be deferred if both contexts are active. The duration
of the offchannel operation is calculated but is
not stored in the scheduler state. Fix this.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:51 +0000 (16:34 +0300)]
wil6210: fix PTR_ERR() usage after initialization to constant
Reported by coccinelle:
tree: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git master
head:
6a5d088a923854569e20eac4f3f569926d5911ec
commit:
b7cde47009640b88cb3629ee7078a43bc2642459 [18/80] wil6210: convert debugfs to the table mode
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/wireless/ath/wil6210/debugfs.c:327:17-24: ERROR: PTR_ERR applied after initialization to constant on line 304
vim +327 drivers/net/wireless/ath/wil6210/debugfs.c
298 struct dentry *dbg, void *base,
299 const struct dbg_off * const tbl)
300 {
301 int i;
302
303 for (i = 0; tbl[i].name; i++) {
> 304 struct dentry *f = NULL;
305
306 switch (tbl[i].type) {
307 case doff_u32:
308 f = debugfs_create_u32(tbl[i].name, tbl[i].mode, dbg,
309 base + tbl[i].off);
310 break;
311 case doff_x32:
312 f = debugfs_create_x32(tbl[i].name, tbl[i].mode, dbg,
313 base + tbl[i].off);
314 break;
315 case doff_ulong:
316 f = wil_debugfs_create_ulong(tbl[i].name, tbl[i].mode,
317 dbg, base + tbl[i].off);
318 break;
319 case doff_io32:
320 f = wil_debugfs_create_iomem_x32(tbl[i].name,
321 tbl[i].mode, dbg,
322 base + tbl[i].off);
323 break;
324 }
325 if (IS_ERR_OR_NULL(f))
326 wil_err(wil, "Create file \"%s\": err %ld\n",
> 327 tbl[i].name, PTR_ERR(f));
328 }
329 }
330
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:50 +0000 (16:34 +0300)]
wil6210: fix for oops while stopping interface
When interface stopped while running intensive Rx traffic, the following oops
observed:
[89846.734683] Call trace:
[89846.737117] [<
ffffffc00083aa64>] dev_gro_receive+0xac/0x358
[89846.742674] [<
ffffffc00083ae94>] napi_gro_receive+0x24/0xa4
[89846.748251] [<
ffffffbffc1c2f88>] $x+0xec/0x1f8 [wil6210] wil_netif_rx_any
[89846.753547] [<
ffffffbffc1c4830>] $x+0x34/0x54 [wil6210] wil_release_reorder_frame
[89846.758755] [<
ffffffbffc1c48ac>] wil_release_reorder_frames+0x5c/0x78 [wil6210]
[89846.766044] [<
ffffffbffc1c4bf8>] wil_tid_ampdu_rx_free+0x20/0x48 [wil6210]
[89846.772901] [<
ffffffbffc1bedc8>] $x+0x190/0x1e8 [wil6210]
[89846.778285] [<
ffffffbffc1c0ed4>] wmi_event_worker+0x230/0x2f8 [wil6210]
[89846.784865] [<
ffffffc0000b0bc8>] process_one_work+0x278/0x3fc
[89846.790591] [<
ffffffc0000b1218>] worker_thread+0x200/0x330
[89846.796060] [<
ffffffc0000b6664>] kthread+0xac/0xb8
[89846.800836] Code:
b940c661 f9406a62 8b010041 f9400026 (
f8636882)
[89846.807008] ---[ end trace
d6fdc17cd27d18f6 ]---
Reason is the following: when removing Rx vring
(wil_netdev_ops.ndo_stop -> wil_stop -> wil_down -> __wil_down -> wil_rx_fini),
Rx interrupt occurs. It trigger Rx NAPI, calling wil_rx_handle() that reaps
(already cleaned) buffer, causing skb referring to garbage memory being set into reorder buffer.
Then, network stack trying to access this buffer and fails.
Prevent Rx NAPI from being scheduled if device going to stop. Bit wil_status_napi_en reflects
NAPI enablement state, check it when triggering Rx NAPI.
Testing shows that check for wil_status_napi_en sometimes gets negative, and new error message
get printed - in this case kernel oops would be observed. Original oops is no more reproducible.
This change requires also changes in the AP flows.
Properly enable/disable NAPI for the AP. Make sure Rx VRING is disabled
when resetting target.
For this, promote __wil_up() and __wil_down() to the module scope, and use it
in the relevant flows.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:49 +0000 (16:34 +0300)]
wil6210: rename [en|dis]able irq to [un]mask
To better reflect real action performed, rename:
s/wil6210_disable_irq/wil_mask_irq/
s/wil6210_enable_irq/wil_unmask_irq/
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:48 +0000 (16:34 +0300)]
wil6210: fix typo in comment
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:47 +0000 (16:34 +0300)]
wil6210: specify max. IE length
Expose firmware limit for the max_scan_ie_len;
also do actually set IE's for the probe request
max_scan_ie_len used to be 0, this blocks scan requests with non-zero IE's
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:46 +0000 (16:34 +0300)]
wil6210: introduce separate completion for WMI
re-use of wmi_ready for both FW ready event and for wmi_call was causing
false "FW not ready" indication in case wmi_call() was invoked while reset
took place.
add wmi_call completion variable instead of re-using wmi_ready.
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:45 +0000 (16:34 +0300)]
wil6210: enlarge TX/RX buffer length
HW supports upto 2304 packet size on the air.
HW is responsible for adding (Tx) or removing (Rx) the following headers:
802.11 hdr: 26B
SNAP: 8B
CRC: 4B
Security (optional): 24B
HW adds max 62B to the payload passed from driver. It means driver can use
max packet size of 2304-62 = 2242B
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:44 +0000 (16:34 +0300)]
wil6210: add change_beacon() driver callback
This allows updating IEs (e.g. from hostapd) when AP is already started
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:43 +0000 (16:34 +0300)]
wil6210: send connect request IEs to FW also for non-secure connection
Driver is sending connect request IEs to FW only for secure connection and
ignores them for non-secure connection.
This is fixed by always sending the IEs to FW upon connect request
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:42 +0000 (16:34 +0300)]
wil6210: fix race condition between BACK event and Rx data
While handling Rx packet, BACK event arrives and frees tid_ampdu_rx array.
This causes kernel panic while accessing already freed spinlock
The fix is to remove tid_ampdu_rx[]'s spinlock and instead use single
sta's spinlock to guard the whole tid_ampdu_rx array.
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:41 +0000 (16:34 +0300)]
wil6210: modify confusing printout
When WMI event received when driver not ready to accept it, the printed error
message is misleading and hints that HW is stuck. Modify the error message
to make it clearer
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:40 +0000 (16:34 +0300)]
wil6210: fix race condition of disconnect while BACK event
This race condition was causing double free of tid_ampdu_rx structures
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:39 +0000 (16:34 +0300)]
wil6210: fix usage of print_hex_dump_debug
When CONFIG_DYNAMIC_DEBUG is not defined, print_hex_dump_debug
is mapped directly to print_hex_dump which might cause
printout to exist all the time
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:38 +0000 (16:34 +0300)]
wil6210: fix for memory corruption upon rmmod
Driver disabled PCI master before making sure HW is idle.
This caused memory corruption in case HW access system memory after
PCI master got disabled.
The fix is to change uninit sequence. Make sure FW/HW is idle before
disabling PCI
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dedy Lansky [Wed, 10 Sep 2014 13:34:37 +0000 (16:34 +0300)]
wil6210: fix for memory corruption while insmod
After setting interrupt handler, driver enabled interrupts.
This caused stale (old) HW interrupts to fire before driver is
fully initialized.
The fix is to enable interrupts only when driver is fully initialized
and after FW/HW reset (to prevent any stale interrupts)
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:36 +0000 (16:34 +0300)]
wil6210: add more debug printouts
added misc printouts in some init/uninit functions for better traceability
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:35 +0000 (16:34 +0300)]
wil6210: platform specific module
New module (wil_platform) for handling platform specific tasks
Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:34 +0000 (16:34 +0300)]
wil6210: coding style fixes
- parentheses, indentation, typos
- seq_puts() instead of seq_printf() with single argument
- sizeof(var) vs. sizeof(type)
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:33 +0000 (16:34 +0300)]
wil6210: some more debug for the WMI mechanism
Log worker thread start/stop; as well as every handler invocation
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:32 +0000 (16:34 +0300)]
wil6210: print more information when connecting
when connecting, print some info about BSS
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:31 +0000 (16:34 +0300)]
wil6210: debug prints for vring de-allocation
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Vladimir Kondratiev [Wed, 10 Sep 2014 13:34:30 +0000 (16:34 +0300)]
wil6210: firmware download
Firmware download implemented but is still experimental feature;
flag controlling it added, no_fw_load. It is true by default,
use no_fw_load=N to activate feature.
Reset flows also got some adjustment for the fw download to work
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Wed, 10 Sep 2014 07:07:13 +0000 (09:07 +0200)]
b43: HT-PHY: Set MAC frequency to correct values
I misunderstood original Broadcom comment and used wrong values.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 9 Sep 2014 20:57:46 +0000 (15:57 -0500)]
rtlwifi: btcoexist: Fix "always true" warning from commit
ed364abffd6e
The 0-DAY kernel build testing backend reports the following warning:
drivers/net/wireless/rtlwifi/btcoexist/halbtcoutsrc.c:516 halbtc_bitmask_write_1byte()
warn: always true condition '(bit_mask !=
4294967295) => (0-255 != u32max)'
This problem was introduced in commit
ed364abffd6e19bec67b7ccda8237213b8b37640,
and arises because the caller of halbtc_bitmask_write_1byte() is using a
u8 rather than a u32 for the data.
Reported-by: Kbuild test robot <kbuild-all@01.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Kbuild test robot <kbuild-all@01.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 9 Sep 2014 19:17:09 +0000 (21:17 +0200)]
b43: HT-PHY: Complete radio init (add missing entries)
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 9 Sep 2014 19:17:08 +0000 (21:17 +0200)]
b43: HT-PHY: Define some regs for 0x2059 radio
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 9 Sep 2014 19:17:07 +0000 (21:17 +0200)]
b43: HT-PHY: Move radio calibration to separated functions
Also use b43_radio_wait_value to simplify the code and usleep_range when
needed.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Tue, 9 Sep 2014 19:17:06 +0000 (21:17 +0200)]
b43: HT-PHY: Move radio preparation into init function
Radio should be prepared only before initialization. We need this to be
able to call b43_radio_2059_init conditionally (in the future).
This also documents RF control register a bit.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hans Wennborg [Sat, 6 Sep 2014 03:19:50 +0000 (20:19 -0700)]
rtlwifi: fix %d confusingly prefixed with 0x in format strings
Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hans Wennborg [Sat, 6 Sep 2014 03:41:48 +0000 (20:41 -0700)]
iwl4965: fix %d confusingly prefixed with 0x in format string
Signed-off-by: Hans Wennborg <hans@hanshq.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 8 Sep 2014 20:53:36 +0000 (22:53 +0200)]
bcma: add support for chipcommon B core
This core is used on BCM4708 to configure the PCIe and USB3 PHYs and it
contains the addresses to the Device Management unit. This will be used
by the PCIe driver first.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Hauke Mehrtens [Mon, 8 Sep 2014 20:53:35 +0000 (22:53 +0200)]
bcma: store more alternative addresses
Each core could have more than one alternative address. There are cores
with 8 alternative addresses for different functions. The PHY control
in the Chip common B core is done through the 2. alternative address
and not the first one.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
CC: linux-usb@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 04:20:57 +0000 (09:50 +0530)]
ath9k: Fix MCC scanning
Scanning is curently broken when two channel contexts
are active. For example in a P2P-GO/STA setup, the
offchannel timer allows HZ / 10 to elapse before initiating
a switch to the next scan channel from the current operating
channel, which in this case would be the P2P-GO context.
But, the channel context timer might decide to switch
to the STA context when an SWBA comes early and a beacon
is sent out. Since pending offchannel requests are processed
in EVENT_BEACON_PREPARE, this causes inconsistent scanning.
Fix this by making sure that a context switch happens
before processing the pending offchannel request. This
also makes sure that active channel contexts will always
have higher priority than offchannel operations and the
scan sequence looks like this:
p2p-go, sta, p2p-go, offchannel, p2p-go, sta, p2p-go, offchannel,.....
The oper-channel is p2p-go, so the STA context has to
switch to p2p-go again before switching offchannel.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 04:20:56 +0000 (09:50 +0530)]
ath9k: Fix offchannel operation
When multiple channel contexts are active, an offchannel
request will not be handled immediately, but will be
queued to be handled later. But, currently, the channel definition
is not copied to the local offchannel state. This
breaks operation like scanning when MCC is active.
Fix this by storing the offchannel parameters properly.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 04:20:55 +0000 (09:50 +0530)]
ath9k: Use a subroutine to assign HW queues
Reduces code duplication.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:19 +0000 (08:03 +0530)]
ath9k: Fix interface accounting
Currently, the interface count is maintained globally,
but this causes problems in RX filter calculation.
Make the interface count a per-channel-context variable
to fix this.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:18 +0000 (08:03 +0530)]
ath9k: Fix RX filters in channel contexts
Maintain the RX filter on a per-channel-context
basis and not globally. Not doing so was resulting
in incorrect filter calculation.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:17 +0000 (08:03 +0530)]
ath9k: Fix COMP_BAR filter
ATH9K_RX_FILTER_COMP_BAR is used to receive BAR
completion frames and is set if the current channel
is HT. When channel contexts are enabled, instead of using
the mac80211 helpers, check if the current channel
definition is HT.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:16 +0000 (08:03 +0530)]
ath9k: Fix ath_startrecv()
Since ath_startrecv() doesn't return an error value,
cleanup the callsites.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:15 +0000 (08:03 +0530)]
ath9k: Fix RX filter calculation
If multiple channel contexts are active, then the opmode
can be different in each context. Since the RX filter is
calculated in ath_startrecv() before switching to the
new opmode, the wrong filters are chosen.
Fix this by calling ath9k_calculate_summary_state() before
the RX module is started.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:14 +0000 (08:03 +0530)]
ath9k: Add CTWindow support
Since CTWindow can be used for improving discoverability,
fill this field in the NoA Attribute properly.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:13 +0000 (08:03 +0530)]
ath9k: Fix offchannel duration calculation
Currently, different units are used for handling
sc->offchannel.duration. In scan mode, it contains jiffies and in RoC
mode, milliseconds is used. This causes confusion since in
ath_chanctx_switch(), TU_TO_USEC is used to determine the offchannel
duration, resulting in incorrect values. Fix this by using jiffies in
both modes.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:12 +0000 (08:03 +0530)]
ath9k: Fix NoA start time calculation
The start time field in the NoA attribute needs to be
updated based on the TSF timer when an absence notification
is sent by the P2P GO. When two channel contexts are active,
continuous, cyclic NoA is announced by setting the count value to 255,
but the start time is updated only once, for one beacon and
the same value is sent in all subsequent beacons, even
though the timestamp keeps moving.
Fix this by removing the check for 'periodic_noa_duration'
and assign the interface's start_time/duration values directly
when there is more than one active context.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:11 +0000 (08:03 +0530)]
ath9k: Fix panic when adding an AP interface
If a station interface is already assigned to a context
and is active and a second interface of type AP is added,
then beaconing on the new interface has to be begin only
after the BSS_CHANGED_BEACON_ENABLED flag is sent by mac80211
to the driver.
But, since we issue ATH_CHANCTX_EVENT_ENABLE_MULTICHANNEL as soon
as a new channel context is added, a switch occurs almost immediately
before BSS_CHANGED_BEACON_ENABLED is received. When a HW reset
is done for the new context, beacons are enabled for the
interface since "enable_beacon" in the BSS config maintained
in mac80211 is true - but the driver hasn't been notified yet.
This causes a panic, since the beacon interval is zero for this
interface and ath9k_cmn_beacon_config_ap() doesn't have a safety check.
Fix this panic by checking if the beacon params has been cached
for this context and use the "enable_beacon" flag maintained
locally in the driver. Also, recalculate the summary data
after the beacon params have been cached when BSS_CHANGED_BEACON_ENABLED
is received.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:10 +0000 (08:03 +0530)]
ath9k: Fix beacons for managed mode
If the current opmode is managed, the ATH_OP_BEACONS flag
needs to be set only when there is a primary station interface
and it is associated/active.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith Manoharan [Fri, 5 Sep 2014 02:33:09 +0000 (08:03 +0530)]
ath9k: Fix beacon configuration for channel contexts
In channel context mode, when a new context is added,
mac80211 issues a bss_info_changed() notfication when
preparing the connection for the new interface/context.
But, this is done prior to the mgd_prepare_tx() call which
is where we switch to the new context. Since the current
context will be different when the earlier bss_info_changed()
is handled, the beacon information for the VIF is not
updated, but discarded since the rules for the current context
disallows it.
In the subsequent association process for the new context/vif,
this becomes a problem because the beacon parameters are invalid.
This causes problems with the TSF timer, causing large jumps.
To fix this, check if the beacon info is being updated for a
different context and if so, allow it without any checks since
we limit the max. interfaces to two anyway.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 4 Sep 2014 22:18:49 +0000 (00:18 +0200)]
bcma: register NAND and QSPI cores early
On Northstar (ARM arch) we will use MTD subsystem to access NVRAM and
SPROM. To get access to flash device we need to register these cores
first.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Thu, 4 Sep 2014 22:18:48 +0000 (00:18 +0200)]
bcma: move code for core registration into separate function
This cleans code a bit and will us to register cores in other places as
well. The only difference with this patch is using "core_index" for
setting device name.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:46 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Update remaining old parts of the driver
This patch makes halbtcoutsrc.{c,h} work with the new pieces of the driver.
Also included are some modifications to various header files.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:45 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Add second part of BT coexistence routines for rtl8821ae
This code comes from the V062414 version of the drivers from Realtek.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:44 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Add BT coexistence routines for driver rtl8821ae
This patch adds the code needed for the new rtl8821ae driver.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:43 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Modify driver to support BT coexistence in rtl8723be
This patch adds the routines found in the V062814 Realtek version.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:42 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Modify driver for V062814 Realtek driver
This patch adds the routines needed to support BT coexistence with the
new rtl8192ee driver.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:41 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Modify rtl_btc for changes in latest Realtek code
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Thu, 4 Sep 2014 21:03:40 +0000 (16:03 -0500)]
rtlwifi: btcoexist: Modify btcoexist for changes in the V062814 Realtek version
This patch is the first of a set to bring this driver up to the latest Realtek code.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: troy_tan@realsil.com.cn
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 1 Sep 2014 21:11:07 +0000 (23:11 +0200)]
bcma: use separated function to initialize bus on SoC
This is required to split SoC bus init into two phases. The later one
(which includes scanning) should be called when kalloc is available.
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Rafał Miłecki [Mon, 1 Sep 2014 21:11:06 +0000 (23:11 +0200)]
bcma: move bus struct setup into early part of host specific code
This change is important for SoC host. In future we will want to know
chip ID (needed for early MIPS boot) before doing cores scanning.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Jukka Rissanen [Mon, 8 Sep 2014 09:11:45 +0000 (12:11 +0300)]
Bluetooth: 6lowpan: Route packets that are not meant to peer via correct device
Packets that are supposed to be delivered via the peer device need to
be checked and sent to correct device. This requires that user has set
the routes properly so that the 6lowpan module can then figure out
the destination gateway and the correct Bluetooth device.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.17.x
Jukka Rissanen [Mon, 8 Sep 2014 09:11:44 +0000 (12:11 +0300)]
Bluetooth: 6lowpan: Set the peer IPv6 address correctly
The peer IPv6 address contained wrong U/L bit in the EUI-64 part.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.17.x
Jukka Rissanen [Mon, 8 Sep 2014 09:11:43 +0000 (12:11 +0300)]
Bluetooth: 6lowpan: Increase the connection timeout value
Use the default connection timeout value defined in l2cap.h because
the current timeout was too short and most of the time the connection
attempts timed out.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org # 3.17.x
Champion Chen [Sat, 6 Sep 2014 19:06:08 +0000 (14:06 -0500)]
Bluetooth: Fix issue with USB suspend in btusb driver
Suspend could fail for some platforms because
btusb_suspend==> btusb_stop_traffic ==> usb_kill_anchored_urbs.
When btusb_bulk_complete returns before system suspend and resubmits
an URB, the system cannot enter suspend state.
Signed-off-by: Champion Chen <champion_chen@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Johan Hedberg [Tue, 9 Sep 2014 00:09:49 +0000 (17:09 -0700)]
Bluetooth: Fix mgmt pairing failure when authentication fails
Whether through HCI with BR/EDR or SMP with LE when authentication fails
we should also notify any pending Pair Device mgmt command. This patch
updates the mgmt_auth_failed function to take the actual hci_conn object
and makes sure that any pending pairing command is notified and cleaned
up appropriately.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg [Sat, 6 Sep 2014 03:59:10 +0000 (06:59 +0300)]
Bluetooth: Fix dereferencing conn variable before NULL check
This patch fixes the following type of static analyzer warning (and
probably a real bug as well as the NULL check should be there for a
reason):
net/bluetooth/smp.c:1182 smp_conn_security() warn: variable dereferenced before check 'conn' (see line 1174)
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Behan Webster [Fri, 5 Sep 2014 23:03:34 +0000 (16:03 -0700)]
Bluetooth: LLVMLinux: Remove VLAIS from bluetooth/amp.c
Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99
compliant equivalent. This patch allocates the appropriate amount of memory
using an char array.
The new code can be compiled with both gcc and clang.
struct shash_desc contains a flexible array member member ctx declared with
CRYPTO_MINALIGN_ATTR, so sizeof(struct shash_desc) aligns the beginning
of the array declared after struct shash_desc with long long.
No trailing padding is required because it is not a struct type that can
be used in an array.
The CRYPTO_MINALIGN_ATTR is required so that desc is aligned with long long
as would be the case for a struct containing a member with
CRYPTO_MINALIGN_ATTR.
Signed-off-by: Behan Webster <behanw@converseincode.com>
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg [Fri, 5 Sep 2014 19:19:55 +0000 (22:19 +0300)]
Bluetooth: Add strict checks for allowed SMP PDUs
SMP defines quite clearly when certain PDUs are to be expected/allowed
and when not, but doesn't have any explicit request/response definition.
So far the code has relied on each PDU handler to behave correctly if
receiving PDUs at an unexpected moment, however this requires many
different checks and is prone to errors.
This patch introduces a generic way to keep track of allowed PDUs and
thereby reduces the responsibility & load on individual command
handlers. The tracking is implemented using a simple bit-mask where each
opcode maps to its own bit. If the bit is set the corresponding PDU is
allow and if the bit is not set the PDU is not allowed.
As a simple example, when we send the Pairing Request we'd set the bit
for Pairing Response, and when we receive the Pairing Response we'd
clear the bit for Pairing Response.
Since the disallowed PDU rejection is now done in a single central place
we need to be a bit careful of which action makes most sense to all
cases. Previously some, such as Security Request, have been simply
ignored whereas others have caused an explicit disconnect.
The only PDU rejection action that keeps good interoperability and can
be used for all the applicable use cases is to drop the data. This may
raise some concerns of us now being more lenient for misbehaving (and
potentially malicious) devices, but the policy of simply dropping data
has been a successful one for many years e.g. in L2CAP (where this is
the *only* policy for such cases - we never request disconnection in
l2cap_core.c because of bad data). Furthermore, we cannot prevent
connected devices from creating the SMP context (through a Security or
Pairing Request), and once the context exists looking up the
corresponding bit for the received opcode and deciding to reject it is
essentially an equally lightweight operation as the kind of rejection
that l2cap_core.c already successfully does.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>