summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-07-16wl18xx: change the number of WLAN addrs per chipArik Nemtsov1-1/+1
Each 18xx chip contains only 2 real MAC addresses usable for WLAN, forcing us to use the LAA bit approach to obtain a third MAC address. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-16wlcore: don't switch channels on disconnected STA vifsArik Nemtsov1-0/+7
Sending the FW a channel switch command on a disconnected vif may result in a beacon loss event. Avoid this corner case. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: register vendor commandsEliad Peller1-0/+4
All the smart config code is in place now, so register the relevant vendor commands. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: increase max roc duration to 30 secondsEliad Peller1-1/+1
we don't have any actual limitation in the driver, so increase it arbitrarily to 30 seconds. The long ROC is needed for the smart config.flow. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore/wl18xx: handle smart config eventsEliad Peller5-1/+93
add defintions and handling for smart config events (SMART_CONFIG_SYNC_EVENT_ID and SMART_CONFIG_DECODE_EVENT_ID) parse the relevant info and send it to userspace as vendor event. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: handle smart config vendor commandsEliad Peller3-1/+221
userspace can ask to perform various smart config actions via custom vendor commands. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore/wl18xx: add smart config commandsEliad Peller5-1/+127
These commands configures the fw to set key, enter smart config mode, and exit it. Add relevant hw ops as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: add smart config definitionsEliad Peller2-0/+17
Add definitions for the smart config commands. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: use correct LAA bitEliad Peller1-1/+1
The LAA bit is second bit of the MSB, not of the third byte. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wl18xx: fix last tx rate calculationEliad Peller1-2/+5
The last tx rate calculation didn't take into account the different indices of 11a and 11g rates tables. Add the required alignment (count only from the first 11a rate in case of 11a) Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: user smaller sqn padding for GEMEliad Peller3-4/+13
On recovery, we increase the current seq num by WL1271_TX_SQN_POST_RECOVERY_PADDING in order to compensate for packets we might have missed during recovery. It seems that some GEM APs have issues when the gap is too big, so use a smaller padding in this case. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15wlcore: save seq num only between recoveriesEliad Peller3-31/+68
We want seq num (freed_pkts) to be initialized on each new connection, but keep persistent between recoveries/suspends. Save the freed_pkts in the private block of the sta struct (we already do a similar thing for AP's stations). However, keep the old wlvif->total_freed_pkts in order to avoid too intrusive change. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: don't warn about no 5 GHz support on 2.4 GHz devicesRafał Miłecki1-8/+10
This could be a bit confusing to see warning about lacking support for 5 GHz band if your device supports 2.4 GHz only. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: enable radio 0x2057 rev 9 (AKA BCM43228) supportRafał Miłecki1-2/+22
Support for N-PHY rev 8 with 0x2057 rev 5 is almost ready, but we still need to figure out how to handle rev 9 first. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: N-PHY: implement channel switching of radio 0x2057 rev 5Rafał Miłecki1-0/+129
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: N-PHY: init and channel switching of radio 0x2057 rev 9Rafał Miłecki2-1/+234
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43; N-PHY: write most of the missing code for revs 7+Rafał Miłecki4-39/+290
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: N-PHY: add placeholders for new devices supportRafał Miłecki1-54/+231
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: N-PHY: add TX gain tables for devices with specific EPARafał Miłecki1-2/+72
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: N-PHY: drop reg 0x1 access restriction on new PHY revsRafał Miłecki1-2/+2
Initialization of N-PHY radio revs 5 and 7 requires writing to 0x1. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15b43: always print info about radio (manuf, id, revision)Rafał Miłecki1-4/+4
Type of radio has a major meaning for the driver. There is quite some code that does initialization/calibration depending on the radio rev. Knowing radio params is quite important to provide help to users, so print it even with debugging disabled. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2014-07-15ath10k: sanitize tx ring index access properlyMichal Kazior1-4/+7
The tx ring index was immediately trimmed with a bitmask. This discarded the 0xFFFFFFFF error case (which theoretically can happen when a device is abruptly disconnected) and led to using an invalid tx ring index. This could lead to memory corruption. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-15ath10k: fix bmi exchange tx/rx raceMichal Kazior2-9/+5
It was possible for tx completion not to be processed. In that case an old stack pointer was left on copy engine tx ring. Next bmi exchange would immediately pop it and use complete() on the completion struct there causing corruption. Make sure to wait for both tx and rx completions properly. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-15Bluetooth: cmtp: Remove unnecessary null testHimangi Saraogi1-6/+0
This patch removes the null test on ctrl. ctrl is initialized at the beginning of the function to &session->ctrl. Since session is dereferenced prior to the null test, session must be a valid pointer, and &session->ctrl cannot be null. The following Coccinelle script is used for detecting the change: @r@ expression e,f; identifier g,y; statement S1,S2; @@ *e = &f->g <+... f->y ...+> *if (e != NULL || ...) S1 else S2 Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-14ath10k: fix unregister deadlock when fw probe failsMichal Kazior1-1/+3
If firmware probing worker failed it called device_release_driver() which synchronously called remove() pci callback. The callback in turn waited for the worker that called it to finish resulting in a deadlock. Waiting for a completion instead of a worker, like some other drivers do, doesn't seem like the best idea either: Syscall Worker probe_fw() rmmod dev_lock() pci->remove() wait_for_completion() complete_all() device_release_driver() dev_lock() [sleep] free(ar) dev_unlock() [resume] There's no guarantee that Worker upon resuming can still access any data/code of the module. Leaving device bound to a driver is not as harmful as deadlocking so remove the call to device_release_driver() while a proper solution is figured out. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: add support for ar6004 hw3.0Jessica Wu4-7/+73
This change enables ath6kl driver to support ar6004 hw3.0. At the same time do some fixes in firmware initialisation which applies to ar6004 hw1.3 as well. Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: add support wmi rate tables with mcs15Jessica Wu5-9/+77
Some of the firmware versions support rate tables up to mcs15, add support for that. Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: don't set hi_refclk_hz if hardware version doesn't need itKalle Valo1-3/+6
Needed for ar6004 hw3.0 support. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: implement rx flush for htc pipeJessica Wu1-3/+29
rx flush was not implemented for htc pipe, add that now. Doesn't fix any known issues. Also free the skb if htc control messages get canceled. Signed-off-by: Jessica Wu <wjessica@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: convert ar6004 hardware flags to firmware feature flagsKalle Valo6-17/+42
The functionality defined through these flags were actually firmware features which can change between firmware versions. To make it possible to support different firmware versions with the same driver, convert the flags to firmware feature flags. For backwards compatibility support for old ar6004 firmware FW API 3 or smaller images we forcefully set the feature bits in the driver. Starting from FW API 5 the firmware image needs to set them. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath6kl: Fix ath6kl_bmi_read_hi32 macroFrederic Danis2-3/+12
tmp may be used uninitialized if ath6kl_bmi_read() returns an error. Signed-off-by: Frederic Danis <frederic.danis@linux.intel.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14ath10k: add implementation for configure max amsdu, ampduJanusz Dziedzic4-8/+127
Allow to setup maximum subframes for AMSDU and AMPDU aggregation via debugfs htt_max_amsdu_ampdu file. Eg. echo "2 64" > htt_max_amsdu_ampdu will setup maximum amsdu subframes equal 2 and maximum ampdu subframes equal to 64. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-07-14Bluetooth: Fix trying LTK re-encryption when we don't have an LTKJohan Hedberg1-2/+5
In the case that the key distribution bits cause us not to generate a local LTK we should not try to re-encrypt if we're currently encrypted with an STK. This patch fixes the check for this in the smp_sufficient_security function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-14Bluetooth: Remove sco_chan_get helper functionMarcel Holtmann1-11/+9
The sco_chan_get helper function is only used in two places and really only protects conn->sk with a lock. So instead of hiding that fact, just put the actual code in place where it is used. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Convert L2CAP ident spinlock into a mutexMarcel Holtmann2-5/+4
The spinlock protecting the L2CAP ident number can be converted into a mutex since the whole processing is run in a workqueue. So instead of using a spinlock, just use a mutex here. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Remove unneeded forward declaration of sco_chan_delMarcel Holtmann1-29/+27
The forward declaration of sco_chan_del is not needed and thus just remove it. Move sco_chan_del into the proper location. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Remove unneeded forward declaration of __sco_chan_addMarcel Holtmann1-12/+11
The forward declaration of __sco_chan_add is not needed and thus just remove it. Move __sco_chan_add into the proper location. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Allocate struct inquiry_entry with GFP_KERNELMarcel Holtmann1-1/+1
The allocation of inquiry cache entries is triggered as a result of processing HCI events. Since the processing is done in the context of a workqueue, there is no needed to allocate with GFP_ATOMIC in that case. Switch it to GFP_KERNEL. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Enable LE Long Term Key Request event only when supportedMarcel Holtmann1-1/+4
The support for LE encryption is optional and with that also the LE Long Term Key Request event. If encryption is not supported, then do not bother enabling this event. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Enable LE encryption events only when supportedMarcel Holtmann2-4/+8
The support for LE encryption is optional. When encryption is not supported then also do not enable the encryption related events. This moves the event mask setting to the third initialization stage to ensure that the LE features are available. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-13Bluetooth: Read LE Advertising Channel TX Power only when availableMarcel Holtmann1-3/+5
The Read LE Advertising Channel TX Power command is not mandatory for a Bluetooth HCI controller only supporting receiption. Move the command to the third stage of the controller initialization and only execute it when support for it has been indicated. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-12Bluetooth: Fix HCIUARTGETDEVICE ioctl when UART is not registeredMarcel Holtmann1-1/+1
The protocol for the UART might be configured, but that does not mean the HCI device is registered. Return an error in that case and only return the index number when HCI_UART_REGISTERED is set. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-12MAINTAINERS: add net/6lowpan/ maintainer entryAlexander Aring1-0/+7
This patch add a maintainer entry for "net/6lowpan". Also add the current IEEE 802.15.4 mailing list and bluetooth mailinglist to this branch, because this code is shared between them. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-126lowpan: introduce new net/6lowpan directoryAlexander Aring8-14/+16
This patch moves generic code which is used by bluetooth and ieee802154 6lowpan to a new net/6lowpan directory. This directory contains generic 6LoWPAN code which is shared between bluetooth and ieee802154 MAC-Layer. This is the IPHC - "IPv6 Header Compression" format at the moment. Which is described by RFC 6282 [0]. The BLTE 6LoWPAN draft describes that the IPHC is the same format like IEEE 802.15.4, see [1]. Futuremore we can put more code into this directory which is shared between BLTE and IEEE 802.15.4 6LoWPAN like RFC 6775 or the routing protocol RPL RFC 6550. To avoid naming conflicts I renamed 6lowpan-y to ieee802154_6lowpan-y in net/ieee802154/Makefile. [0] http://tools.ietf.org/html/rfc6282 [1] http://tools.ietf.org/html/draft-ietf-6lowpan-btle-12#section-3.2 [2] http://tools.ietf.org/html/rfc6775 [3] http://tools.ietf.org/html/rfc6550 Signed-off-by: Alexander Aring <alex.aring@gmail.com> Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2014-07-11Bluetooth: Fix tracking local SSP authentication requirementJohan Hedberg1-9/+8
When we need to make the decision whether to perform just-works or real user confirmation we need to know the exact local authentication requirement that was passed to the controller. So far conn->auth_type (the local requirement) wasn't in one case updated appropriately in fear of the user confirmation being rejected later. The real problem however was not really that conn->auth_type couldn't represent the true value but that we were checking the local MITM requirement in an incorrect way. It's perfectly fine to let auth_type follow what we tell the controller since we're still tracking the target security level with conn->pending_sec_level. This patch updates the check for local MITM requirement in the hci_user_confirm_request_evt function to use the locally requested security level and ensures that auth_type always represents what we tell the controller. All other code in hci_user_confirm_request_evt still uses the auth_type instead of pending_sec_level for determining whether to do just-works or not, since that's the only value that's in sync with what the remote device knows. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Tested-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Cc: stable@vger.kernel.org # 3.16
2014-07-11Bluetooth: Add support for external configuration with UART driverMarcel Holtmann2-1/+6
The quirk for enabling external configuration with UART needs to be provided via the HCI UART flags. Add a new flag for it and declare it as valid. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-11Bluetooth: Check for valid HCI UART driver flagsMarcel Holtmann1-1/+18
Providing unknown or invalid flags to the HCI UART driver should result in an error. So check which flags are valid and otherwise return an error. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-11Bluetooth: Move SCO timeout constants into net/bluetooth/sco.cMarcel Holtmann2-4/+3
There is no external user of the SCO timeout constants and thus move them into net/bluetooth/sco.c where they are actuallu used. In addition just remove SCO_CONN_IDLE_TIMEOUT since it is unused. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-11Bluetooth: Remove unused SCO_DEFAULT_FLUSH_TO constantMarcel Holtmann1-1/+0
The SCO_DEFAULT_FLUSH_TO constant has been defined, but it is not used anywhere and so just remove it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2014-07-11Bluetooth: Move struct sco_conn into net/bluetooth/sco.cMarcel Holtmann2-13/+13
There exists no external user of struct sco_conn and thus move it into the one place that is actually using it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>