summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'for-linville-20140717' of git://github.com/kvalo/athJohn W. Linville2014-07-1819-71/+388
|\
| * ath10k: sanitize tx ring index access properlyMichal Kazior2014-07-151-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>
| * ath10k: fix bmi exchange tx/rx raceMichal Kazior2014-07-152-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>
| * ath10k: fix unregister deadlock when fw probe failsMichal Kazior2014-07-141-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>
| * ath6kl: add support for ar6004 hw3.0Jessica Wu2014-07-144-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>
| * ath6kl: add support wmi rate tables with mcs15Jessica Wu2014-07-145-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>
| * ath6kl: don't set hi_refclk_hz if hardware version doesn't need itKalle Valo2014-07-141-3/+6
| | | | | | | | | | | | Needed for ar6004 hw3.0 support. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath6kl: implement rx flush for htc pipeJessica Wu2014-07-141-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>
| * ath6kl: convert ar6004 hardware flags to firmware feature flagsKalle Valo2014-07-146-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>
| * ath6kl: Fix ath6kl_bmi_read_hi32 macroFrederic Danis2014-07-142-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>
| * ath10k: add implementation for configure max amsdu, ampduJanusz Dziedzic2014-07-144-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>
| * ath10k: print Kconfig optionsJanusz Dziedzic2014-06-021-1/+7
| | | | | | | | | | | | | | Print Kconfig options enabled/disabled in the build. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
| * ath10k: remove unused len variables from wmi process rx functionsKalle Valo2014-06-021-6/+0
| | | | | | | | | | | | These len variables are not used anywhere. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
* | Merge branch 'for-upstream' of ↵John W. Linville2014-07-1825-459/+492
|\ \ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
| * | Bluetooth: cmtp: Remove unnecessary null testHimangi Saraogi2014-07-141-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>
| * | Bluetooth: Fix trying LTK re-encryption when we don't have an LTKJohan Hedberg2014-07-141-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>
| * | Bluetooth: Remove sco_chan_get helper functionMarcel Holtmann2014-07-141-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>
| * | Bluetooth: Convert L2CAP ident spinlock into a mutexMarcel Holtmann2014-07-132-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>
| * | Bluetooth: Remove unneeded forward declaration of sco_chan_delMarcel Holtmann2014-07-131-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>
| * | Bluetooth: Remove unneeded forward declaration of __sco_chan_addMarcel Holtmann2014-07-131-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>
| * | Bluetooth: Allocate struct inquiry_entry with GFP_KERNELMarcel Holtmann2014-07-131-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>
| * | Bluetooth: Enable LE Long Term Key Request event only when supportedMarcel Holtmann2014-07-131-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>
| * | Bluetooth: Enable LE encryption events only when supportedMarcel Holtmann2014-07-132-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>
| * | Bluetooth: Read LE Advertising Channel TX Power only when availableMarcel Holtmann2014-07-131-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>
| * | Bluetooth: Fix HCIUARTGETDEVICE ioctl when UART is not registeredMarcel Holtmann2014-07-121-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>
| * | MAINTAINERS: add net/6lowpan/ maintainer entryAlexander Aring2014-07-121-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>
| * | 6lowpan: introduce new net/6lowpan directoryAlexander Aring2014-07-128-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>
| * | Bluetooth: Fix tracking local SSP authentication requirementJohan Hedberg2014-07-111-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
| * | Bluetooth: Add support for external configuration with UART driverMarcel Holtmann2014-07-112-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>
| * | Bluetooth: Check for valid HCI UART driver flagsMarcel Holtmann2014-07-111-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>
| * | Bluetooth: Move SCO timeout constants into net/bluetooth/sco.cMarcel Holtmann2014-07-112-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>
| * | Bluetooth: Remove unused SCO_DEFAULT_FLUSH_TO constantMarcel Holtmann2014-07-111-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>
| * | Bluetooth: Move struct sco_conn into net/bluetooth/sco.cMarcel Holtmann2014-07-112-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>
| * | Bluetooth: Move struct sco_pinfo into net/bluetooth/sco.cMarcel Holtmann2014-07-112-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | There exists no external user of struct sco_pinfo and sco_pi 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>
| * | Bluetooth: Update the list of L2CAP fixed channelsMarcel Holtmann2014-07-112-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | The list of L2CAP fixed channels increased with newer versions of the specification. This just updates the constants for it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Move HCI request internals to net/bluetooth/hci_core.cMarcel Holtmann2014-07-113-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The internals of the HCI request framework should not be leaking to its users. Move them all into net/bluetooth/hci_core.c and provide a simple hci_req_pending helper function for the one user outside the framework. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Move struct hci_pinfo into net/bluetooth/hci_sock.cMarcel Holtmann2014-07-112-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | There exists no external user of struct hci_pinfo and hci_pi 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>
| * | Bluetooth: Delcare the hci_sec_filter as constMarcel Holtmann2014-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The hci_sec_filter socket filter details do not change. They are fixed and with that they can also be delcared as const. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Move struct hci_sec_filter next to its userMarcel Holtmann2014-07-112-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is only single location using struct hci_sec_filter and with that there is no point in putting this declaration into a global header file. So move it right next to its user and make the code a lot more simpler. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Move HCI socket definitions into its own header fileMarcel Holtmann2014-07-114-150/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the HCI sockets and ioctl based definitions have been in a global header file that also includes all the HCI protocol structures. To make this a bit cleaner, move them into its own file. This also adjusts fs/compat_ioctl.c to only include this new file and not all the protocol structures that are not needed. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Set HCI_PAIRABLE during power on for legacy ioctlMarcel Holtmann2014-07-101-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the controller is brought up using legacy ioctl, the setting of the HCI_PAIRABLE flag should happen then. Previously it was set during enumeration and when retrieving device information. This change also will not set the HCI_PAIRABLE flag when the controller is used with the HCI User Channel operation. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Mark controller is down when HCI_AUTO_OFF is setMarcel Holtmann2014-07-101-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the initial setup phase, the controller is powered on and will be powered off again if it is not used within the auto-off timeout. Userspace using ioctl does not know about the difference between the initial setup phase and a controller being present. It is a bad idea to keep the controller powered by just looking at the device list or device information. Instead just tell userspace that the controller is still down. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
| * | Bluetooth: Remove unneeded mgmt_write_scan_failed functionJohan Hedberg2014-07-103-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Set Connectable/Discoverable mgmt handlers use a hci_request with a proper callback to handle the HCI command sending. It makes therefore little sense to have this extra function to be called from hci_event.c for command failures. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Remove unneeded mgmt_discoverable functionJohan Hedberg2014-07-104-62/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the HCISETSCAN ioctl is the only non-mgmt user we care about for setting the right discoverable state we can simply do the necessary updates in the ioctl handler function instead. This then allows the removal of the mgmt_discoverable function and should simplify that state handling considerably. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Refactor ioctl scan state update to its own functionJohan Hedberg2014-07-101-13/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | With subsequent patches we'll also need to update the discoverable state. As the code grows bigger it's better to move this out from the switch statement into its own function. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Remove unneeded mgmt_connectable functionJohan Hedberg2014-07-104-41/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mgmt_connectable function has been used to ensure that the right actions to HCI_CONNECTABLE are taken when the HCI_Write_Scan_Enable command is triggered by something else than mgmt. The only other user that we really care about is the HCISETSCAN ioctl code, so we can actually more simply perform the needed changes there instead. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Fix using test_and_clear instead of test_and_setJohan Hedberg2014-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code for updating the HCI_CONNECTABLE flag was incorrectly using test_and_set_bit instead of test_and_clear_bit when HCI_CONNECTABLE is to be cleared. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluteooth: Reject SMP bonding if HCI_PAIRABLE is not setJohan Hedberg2014-07-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the remote device tries to initiate bonding with us and we don't have HCI_PAIRABLE set we should just flat out reject the request. This brings SMP in line with how the flag is used for BR/EDR SSP. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Fix advertising parameter update when toggling connectableJohan Hedberg2014-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we change the connectable state and have advertising enabled we should update the advertising parameters no matter what. The code was incorrectly only updating them if advertising was not already active. This patch fixes the issue. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * | Bluetooth: Fix incorrect clearing of SMP_FLAG_INITIATORJohan Hedberg2014-07-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the SMP context is created all flags default to zero. To determine that we are the initiators it's therefore best to simply change the flag value when we know we're sending the first SMP PDU. Clearing the flag when receiving a Pairing Request is not correct since the request may be a response to a previous Security Request from us (for which we would already have correctly set the flag). Same goes for receiving a Security Request which may be coming after us already starting pairing by sending a Pairing Request. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
OpenPOWER on IntegriCloud