Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
mgmt.c File Reference
#include <linux/module.h>
#include <asm/unaligned.h>
#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>
#include <net/bluetooth/mgmt.h>
#include <net/bluetooth/smp.h>

Go to the source code of this file.

Data Structures

struct  pending_cmd
 
struct  mgmt_handler
 
struct  cmd_lookup
 

Macros

#define MGMT_VERSION   1
 
#define MGMT_REVISION   2
 
#define LE_SCAN_TYPE   0x01
 
#define LE_SCAN_WIN   0x12
 
#define LE_SCAN_INT   0x12
 
#define LE_SCAN_TIMEOUT_LE_ONLY   10240 /* TGAP(gen_disc_scan_min) */
 
#define LE_SCAN_TIMEOUT_BREDR_LE   5120 /* TGAP(100)/2 */
 
#define INQUIRY_LEN_BREDR   0x08 /* TGAP(100) */
 
#define INQUIRY_LEN_BREDR_LE   0x04 /* TGAP(100)/2 */
 
#define CACHE_TIMEOUT   msecs_to_jiffies(2 * 1000)
 
#define hdev_is_powered(hdev)
 
#define PNP_INFO_SVCLASS_ID   0x1200
 

Functions

bool mgmt_valid_hdev (struct hci_dev *hdev)
 
int mgmt_interleaved_discovery (struct hci_dev *hdev)
 
int mgmt_control (struct sock *sk, struct msghdr *msg, size_t msglen)
 
int mgmt_index_added (struct hci_dev *hdev)
 
int mgmt_index_removed (struct hci_dev *hdev)
 
int mgmt_powered (struct hci_dev *hdev, u8 powered)
 
int mgmt_discoverable (struct hci_dev *hdev, u8 discoverable)
 
int mgmt_connectable (struct hci_dev *hdev, u8 connectable)
 
int mgmt_write_scan_failed (struct hci_dev *hdev, u8 scan, u8 status)
 
int mgmt_new_link_key (struct hci_dev *hdev, struct link_key *key, bool persistent)
 
int mgmt_new_ltk (struct hci_dev *hdev, struct smp_ltk *key, u8 persistent)
 
int mgmt_device_connected (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u32 flags, u8 *name, u8 name_len, u8 *dev_class)
 
int mgmt_device_disconnected (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 reason)
 
int mgmt_disconnect_failed (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_connect_failed (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_pin_code_request (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 secure)
 
int mgmt_pin_code_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 status)
 
int mgmt_pin_code_neg_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 status)
 
int mgmt_user_confirm_request (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, __le32 value, u8 confirm_hint)
 
int mgmt_user_passkey_request (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type)
 
int mgmt_user_confirm_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_user_confirm_neg_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_user_passkey_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_user_passkey_neg_reply_complete (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_user_passkey_notify (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u32 passkey, u8 entered)
 
int mgmt_auth_failed (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 status)
 
int mgmt_auth_enable_complete (struct hci_dev *hdev, u8 status)
 
int mgmt_ssp_enable_complete (struct hci_dev *hdev, u8 enable, u8 status)
 
int mgmt_set_class_of_dev_complete (struct hci_dev *hdev, u8 *dev_class, u8 status)
 
int mgmt_set_local_name_complete (struct hci_dev *hdev, u8 *name, u8 status)
 
int mgmt_read_local_oob_data_reply_complete (struct hci_dev *hdev, u8 *hash, u8 *randomizer, u8 status)
 
int mgmt_le_enable_complete (struct hci_dev *hdev, u8 enable, u8 status)
 
int mgmt_device_found (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, u8 *dev_class, s8 rssi, u8 cfm_name, u8 ssp, u8 *eir, u16 eir_len)
 
int mgmt_remote_name (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, u8 addr_type, s8 rssi, u8 *name, u8 name_len)
 
int mgmt_start_discovery_failed (struct hci_dev *hdev, u8 status)
 
int mgmt_stop_discovery_failed (struct hci_dev *hdev, u8 status)
 
int mgmt_discovering (struct hci_dev *hdev, u8 discovering)
 
int mgmt_device_blocked (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
 
int mgmt_device_unblocked (struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
 
 module_param (enable_hs, bool, 0644)
 
 MODULE_PARM_DESC (enable_hs,"Enable High Speed support")
 

Variables

bool enable_hs
 

Macro Definition Documentation

#define CACHE_TIMEOUT   msecs_to_jiffies(2 * 1000)

Definition at line 118 of file mgmt.c.

#define hdev_is_powered (   hdev)
Value:
(test_bit(HCI_UP, &hdev->flags) && \
!test_bit(HCI_AUTO_OFF, &hdev->dev_flags))

Definition at line 120 of file mgmt.c.

#define INQUIRY_LEN_BREDR   0x08 /* TGAP(100) */

Definition at line 115 of file mgmt.c.

#define INQUIRY_LEN_BREDR_LE   0x04 /* TGAP(100)/2 */

Definition at line 116 of file mgmt.c.

#define LE_SCAN_INT   0x12

Definition at line 111 of file mgmt.c.

#define LE_SCAN_TIMEOUT_BREDR_LE   5120 /* TGAP(100)/2 */

Definition at line 113 of file mgmt.c.

#define LE_SCAN_TIMEOUT_LE_ONLY   10240 /* TGAP(gen_disc_scan_min) */

Definition at line 112 of file mgmt.c.

#define LE_SCAN_TYPE   0x01

Definition at line 109 of file mgmt.c.

#define LE_SCAN_WIN   0x12

Definition at line 110 of file mgmt.c.

#define MGMT_REVISION   2

Definition at line 38 of file mgmt.c.

#define MGMT_VERSION   1

Definition at line 37 of file mgmt.c.

#define PNP_INFO_SVCLASS_ID   0x1200

Definition at line 436 of file mgmt.c.

Function Documentation

int mgmt_auth_enable_complete ( struct hci_dev hdev,
u8  status 
)

Definition at line 3326 of file mgmt.c.

int mgmt_auth_failed ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3314 of file mgmt.c.

int mgmt_connect_failed ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3147 of file mgmt.c.

int mgmt_connectable ( struct hci_dev hdev,
u8  connectable 
)

Definition at line 2955 of file mgmt.c.

int mgmt_control ( struct sock sk,
struct msghdr msg,
size_t  msglen 
)

Definition at line 2740 of file mgmt.c.

int mgmt_device_blocked ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  type 
)

Definition at line 3695 of file mgmt.c.

int mgmt_device_connected ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u32  flags,
u8 name,
u8  name_len,
u8 dev_class 
)

Definition at line 3036 of file mgmt.c.

int mgmt_device_disconnected ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  reason 
)

Definition at line 3098 of file mgmt.c.

int mgmt_device_found ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8 dev_class,
s8  rssi,
u8  cfm_name,
u8  ssp,
u8 eir,
u16  eir_len 
)

Definition at line 3572 of file mgmt.c.

int mgmt_device_unblocked ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  type 
)

Definition at line 3709 of file mgmt.c.

int mgmt_disconnect_failed ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3123 of file mgmt.c.

int mgmt_discoverable ( struct hci_dev hdev,
u8  discoverable 
)

Definition at line 2929 of file mgmt.c.

int mgmt_discovering ( struct hci_dev hdev,
u8  discovering 
)

Definition at line 3668 of file mgmt.c.

int mgmt_index_added ( struct hci_dev hdev)

Definition at line 2834 of file mgmt.c.

int mgmt_index_removed ( struct hci_dev hdev)

Definition at line 2842 of file mgmt.c.

int mgmt_interleaved_discovery ( struct hci_dev hdev)

Definition at line 2300 of file mgmt.c.

int mgmt_le_enable_complete ( struct hci_dev hdev,
u8  enable,
u8  status 
)

Definition at line 3534 of file mgmt.c.

int mgmt_new_link_key ( struct hci_dev hdev,
struct link_key key,
bool  persistent 
)

Definition at line 2996 of file mgmt.c.

int mgmt_new_ltk ( struct hci_dev hdev,
struct smp_ltk key,
u8  persistent 
)

Definition at line 3013 of file mgmt.c.

int mgmt_pin_code_neg_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  status 
)

Definition at line 3193 of file mgmt.c.

int mgmt_pin_code_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  status 
)

Definition at line 3171 of file mgmt.c.

int mgmt_pin_code_request ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  secure 
)

Definition at line 3159 of file mgmt.c.

int mgmt_powered ( struct hci_dev hdev,
u8  powered 
)

Definition at line 2876 of file mgmt.c.

int mgmt_read_local_oob_data_reply_complete ( struct hci_dev hdev,
u8 hash,
u8 randomizer,
u8  status 
)

Definition at line 3503 of file mgmt.c.

int mgmt_remote_name ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
s8  rssi,
u8 name,
u8  name_len 
)

Definition at line 3607 of file mgmt.c.

int mgmt_set_class_of_dev_complete ( struct hci_dev hdev,
u8 dev_class,
u8  status 
)

Definition at line 3433 of file mgmt.c.

int mgmt_set_local_name_complete ( struct hci_dev hdev,
u8 name,
u8  status 
)

Definition at line 3455 of file mgmt.c.

int mgmt_ssp_enable_complete ( struct hci_dev hdev,
u8  enable,
u8  status 
)

Definition at line 3373 of file mgmt.c.

int mgmt_start_discovery_failed ( struct hci_dev hdev,
u8  status 
)

Definition at line 3631 of file mgmt.c.

int mgmt_stop_discovery_failed ( struct hci_dev hdev,
u8  status 
)

Definition at line 3652 of file mgmt.c.

int mgmt_user_confirm_neg_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3275 of file mgmt.c.

int mgmt_user_confirm_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3268 of file mgmt.c.

int mgmt_user_confirm_request ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
__le32  value,
u8  confirm_hint 
)

Definition at line 3215 of file mgmt.c.

int mgmt_user_passkey_neg_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3290 of file mgmt.c.

int mgmt_user_passkey_notify ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u32  passkey,
u8  entered 
)

Definition at line 3298 of file mgmt.c.

int mgmt_user_passkey_reply_complete ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type,
u8  status 
)

Definition at line 3283 of file mgmt.c.

int mgmt_user_passkey_request ( struct hci_dev hdev,
bdaddr_t *  bdaddr,
u8  link_type,
u8  addr_type 
)

Definition at line 3232 of file mgmt.c.

bool mgmt_valid_hdev ( struct hci_dev hdev)

Definition at line 197 of file mgmt.c.

int mgmt_write_scan_failed ( struct hci_dev hdev,
u8  scan,
u8  status 
)

Definition at line 2981 of file mgmt.c.

module_param ( enable_hs  ,
bool  ,
0644   
)
MODULE_PARM_DESC ( enable_hs  ,
"Enable High Speed support  
)

Variable Documentation

bool enable_hs

Definition at line 35 of file mgmt.c.