1. 03 10月, 2013 15 次提交
    • M
      Bluetooth: Fix switch statement order for L2CAP fixed channels · a2877629
      Marcel Holtmann 提交于
      The switch statement for the various L2CAP fixed channel handlers
      is not really ordered.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      a2877629
    • M
      Bluetooth: Allow changing device class when BR/EDR is disabled · 6203fc98
      Marcel Holtmann 提交于
      Changing the device class when BR/EDR is disabled has no visible
      effect for remote devices. However to simplify the logic allow it
      as long as the controller supports BR/EDR operations.
      
      If it is not allowed, then the overall logic becomes rather
      complicated since the class of device values would need clearing
      or restoring when BR/EDR setting changes.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      6203fc98
    • M
      Bluetooth: Restrict loading of long term keys to LE capable controllers · cf99ba13
      Marcel Holtmann 提交于
      Loading long term keys into a BR/EDR only controller make no sense.
      The kernel would never use any of these keys. So instead of allowing
      userspace to waste memory, reject such operation with a not supported
      error message.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      cf99ba13
    • M
      Bluetooth: Restrict loading of link keys to BR/EDR capable controllers · 9060d5cf
      Marcel Holtmann 提交于
      Loading link keys into a LE only controller make no sense. The kernel
      would never use any of these keys. So instead of allowing userspace
      to waste memory, reject such operation with a not supported error
      message.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      9060d5cf
    • M
      Bluetooth: Allow setting static address even if LE is disabled · 62af4443
      Marcel Holtmann 提交于
      Setting the static address does not depend on LE beeing enabled. It
      only depends on a controller with LE support.
      
      When depending on LE enabled this command becomes really complicated
      since in case LE gets disabled, it would be required to clear the
      static address and also its random address representation inside
      the controller. With future support for private addresses such
      complex setup should be avoided.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      62af4443
    • M
      Bluetooth: Restrict SSP setting changes to BR/EDR enabled controllers · cdba5281
      Marcel Holtmann 提交于
      Only when BR/EDR is supported and enabled, allow changing of the SSP
      setting. Just checking if the hardware supports SSP is not enough
      since it might be the case that BR/EDR is disabled.
      
      In the case that BR/EDR is disabled, but SSP supported by the
      controller the not supported error message is now returned.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      cdba5281
    • M
      Bluetooth: Fix memory leak with L2CAP signal channels · 3b166295
      Marcel Holtmann 提交于
      The wrong type of L2CAP signalling packets on the wrong type of
      either BR/EDR or LE links need to be dropped. When that happens
      the packet is dropped, but the memory not freed. So actually
      free the memory as well.
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
      3b166295
    • D
      Bluetooth: Add the definition for Slave Page Response Timeout · 2ed01805
      DoHyun Pyun 提交于
      The Slave Page Response Timeout event indicates to the Host that a
      slave page response timeout has occurred in the BR/EDR Controller.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 110
      
      "7.7.72 Slave Page Response Timeout Event [New Section]
      ...
      Note: this event will be generated if the slave BR/EDR Controller
      responds to a page but does not receive the master FHS packet
      (see Baseband, Section 8.3.3) within pagerespTO.
      
      Event Parameters: NONE"
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2ed01805
    • D
      Bluetooth: Add the definition and stcuture for Sync Train Complete · 2b359445
      DoHyun Pyun 提交于
      The Synchronization Train Complete event indicates that the Start
      Synchronization Train command has completed.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 103
      
      "7.7.67 Synchronization Train Complete Event [New Section]
      ...
      
      Event Parameters:
      
      Status 0x00       Start Synchronization Train command completed
                        successfully.
             0x01-0xFF  Start Synchronization Train command failed.
                        See Part D, Error Codes, for error codes and
                        descriptions."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2b359445
    • D
      Bluetooth: Add the definition for Start Synchronization Train · cefded98
      DoHyun Pyun 提交于
      The Start_Synchronization_Train command controls the Synchronization
      Train functionality in the BR/EDR Controller.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 86
      
      "7.1.51 Start Synchronization Train Command [New Section]
      ...
      If connectionless slave broadcast mode is not enabled, the Command
      Disallowed (0x0C) error code shall be returned. After receiving this
      command and returning a Command Status event, the Baseband starts
      attempting to send synchronization train packets containing information
      related to the enabled Connectionless Slave Broadcast packet timing.
      
      Note: The AFH_Channel_Map used in the synchronization train packets is
      configured by the Set_AFH_Channel_Classification command and the local
      channel classification in the BR/EDR Controller.
      
      The synchronization train packets will be sent using the parameters
      specified by the latest Write_Synchronization_Train_Parameters command.
      The Synchronization Train will continue until synchronization_trainTO
      slots (as specified in the last Write_Synchronization_Train command)
      have passed or until the Host disables the Connectionless Slave Broadcast
      logical transport."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      cefded98
    • D
      Bluetooth: Add the definition and structure for Set CSB · 8c9a041b
      DoHyun Pyun 提交于
      he Set_Connectionless_Slave_Broadcast command controls the
      Connectionless Slave Broadcast functionality in the BR/EDR
      Controller.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 78
      
      "7.1.49 Set Connectionless Slave Broadcast Command [New Section]
      ...
      The LT_ADDR indicated in the Set_Connectionless_Slave_Broadcast shall be
      pre-allocated using the HCI_Set_Reserved_LT_ADDR command. If the
      LT_ADDR has not been reserved, the Unknown Connection Identifier (0x02)
      error code shall be returned. If the controller is unable to reserve
      sufficient bandwidth for the requested activity, the Connection Rejected
      Due to Limited Resources (0x0D) error code shall be returned.
      
      The LPO_Allowed parameter informs the BR/EDR Controller whether it is
      allowed to sleep.
      
      The Packet_Type parameter specifies which packet types are allowed. The
      Host shall either enable BR packet types only, or shall enable EDR and DM1
      packet types only.
      
      The Interval_Min and Interval_Max parameters specify the range from which
      the BR/EDR Controller must select the Connectionless Slave Broadcast
      Interval. The selected Interval is returned."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      8c9a041b
    • D
      Bluetooth: Add the structure for Write Sync Train Parameters · a9b07a64
      DoHyun Pyun 提交于
      The Write_Synchronization_Train_Parameters command configures
      the Synchronization Train functionality in the BR/EDR Controller.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 97
      
      "7.3.90 Write Synchronization Train Parameters Command [New Section]
      ...
      Note: The AFH_Channel_Map used in the Synchronization Train packets is
      configured by the Set_AFH_Channel_Classification command and the local
      channel classification in the BR/EDR Controller.
      
      Interval_Min and Interval_Max specify the allowed range of
      Sync_Train_Interval. Refer to [Vol. 2], Part B, section 2.7.2 for
      a detailed description of Sync_Train_Interval. The BR/EDR Controller shall
      select an interval from this range and return it in Sync_Train_Interval.
      If the Controller is unable to select a value from this range, it shall
      return the Invalid HCI Command Parameters (0x12) error code.
      
      Once started (via the Start_Synchronization_Train Command) the
      Synchronization Train will continue until synchronization_trainTO slots have
      passed or Connectionless Slave Broadcast has been disabled."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      a9b07a64
    • D
      Bluetooth: Add the definition and structure for Set CSB Data · 7d1dab49
      DoHyun Pyun 提交于
      The Set_Connectionless_Slave_Broadcast_Data command provides the
      ability for the Host to set Connectionless Slave Broadcast data in
      the BR/EDR Controller.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 93
      
      "7.3.88 Set Connectionless Slave Broadcast Data Command [New Section]
      ...
      If connectionless slave broadcast mode is disabled, this data shall be
      kept by the BR/EDR Controller and used once connectionless slave broadcast
      mode is enabled. If connectionless slave broadcast mode is enabled,
      and this command is successful, this data will be sent starting with
      the next Connectionless Slave Broadcast instant.
      
      The Data_Length field may be zero, in which case no data needs to be
      provided.
      
      The Host may fragment the data using the Fragment field in the command. If
      the combined length of the fragments exceeds the capacity of the largest
      allowed packet size specified in the Set Connectionless Slave Broadcast
      command, all fragments associated with the data being assembled shall be
      discarded and the Invalid HCI Command Parameters error (0x12) shall be
      returned."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      7d1dab49
    • D
      Bluetooth: Add the definition and structure for Delete Reserved LT_ADDR · 6a20eaf4
      DoHyun Pyun 提交于
      The Delete_Reserved_LT_ADDR command requests that the BR/EDR
      Controller cancel the reservation for a specific LT_ADDR reserved for the
      purposes of Connectionless Slave Broadcast.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 92
      
      "7.3.87 Delete Reserved LT_ADDR Command [New Section]
      ...
      If the LT_ADDR indicated in the LT_ADDR parameter is not reserved by the
      BR/EDR Controller, it shall return the Unknown Connection Identifier (0x02)
      error code.
      If connectionless slave broadcast mode is still active, then the Controller
      shall return the Command Disallowed (0x0C) error code."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      6a20eaf4
    • D
      Bluetooth: Add the definition and structure for Set Reserved LT_ADDR · d0bf75a5
      DoHyun Pyun 提交于
      The Set_Reserved_LT_ADDR command allows the host to request that the
      BR/EDR Controller reserve a specific LT_ADDR for Connectionless Slave
      Broadcast.
      
      The Core Spec Addendum 4 adds this command in part B Connectionless
      Slave Broadcast.
      
      Bluetooth Core Specification Addendum 4 - Page 90
      
      "7.3.86 Set Reserved LT_ADDR Command [New Section]
      ...
      If the LT_ADDR indicated in the LT_ADDR parameter is already in use by the
      BR/EDR Controller, it shall return the ACL Connection Already Exists (0x0B)
      error code. If the LT_ADDR indicated in the LT_ADDR parameter is out of
      range, the controller shall return the Invalid HCI Command Parameters (0x12)
      error code. If the command succeeds, then the reserved LT_ADDR shall be
      used when issuing subsequent Set Connectionless Slave Broadcast Data and
      Set Connectionless Slave Broadcast commands.
      To ensure that the reserved LT_ADDR is not already allocated, it is
      recommended that this command be issued at some point after HCI_Reset is
      issued but before page scanning is enabled or paging is initiated."
      Signed-off-by: NDohyun Pyun <dh79.pyun@samsung.com>
      Signed-off-by: NC S Bhargava <cs.bhargava@samsung.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      d0bf75a5
  2. 02 10月, 2013 19 次提交
  3. 27 9月, 2013 1 次提交
  4. 26 9月, 2013 5 次提交