Bluetooth: Rename LE_SCANNING_* macros
authorAndre Guedes <andre.guedes@openbossa.org>
Thu, 4 Apr 2013 23:21:02 +0000 (20:21 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 18 Apr 2013 04:17:27 +0000 (01:17 -0300)
This patch renames LE_SCANNING_ENABLED and LE_SCANNING_DISABLED
macros to LE_SCAN_ENABLE and LE_SCAN_DISABLE in order to keep
the same prefix others LE scan macros have.

It also fixes le_scan_enable_req function so it uses the LE_SCAN_
ENABLE macro instead of a magic number.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Acked-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
include/net/bluetooth/hci.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c

index 84c37abc48c133b29256698ee8e5a0a15eba1703..e0512aaef4b85df8d05c7f91983f1054ee6a7628 100644 (file)
@@ -996,8 +996,8 @@ struct hci_cp_le_set_scan_param {
        __u8    filter_policy;
 } __packed;
 
-#define LE_SCANNING_DISABLED           0x00
-#define LE_SCANNING_ENABLED            0x01
+#define LE_SCAN_DISABLE                        0x00
+#define LE_SCAN_ENABLE                 0x01
 #define LE_SCAN_FILTER_DUP_DISABLE     0x00
 #define LE_SCAN_FILTER_DUP_ENABLE      0x01
 
index d0ae237ff8194a0b47df6b5a2d017b28200dfad2..ce82265f56190af81092fe0fe8a0e0426b486051 100644 (file)
@@ -1989,7 +1989,7 @@ static void le_scan_enable_req(struct hci_request *req, unsigned long opt)
        struct hci_cp_le_set_scan_enable cp;
 
        memset(&cp, 0, sizeof(cp));
-       cp.enable = 1;
+       cp.enable = LE_SCAN_ENABLE;
        cp.filter_dup = LE_SCAN_FILTER_DUP_ENABLE;
 
        hci_req_add(req, HCI_OP_LE_SET_SCAN_ENABLE, sizeof(cp), &cp);
index 3b2c0e07b25b1c743848d9dcaa49f2098860204d..b93cd2eb5d58f1d2cfa9f8d0ea81967166747eca 100644 (file)
@@ -964,7 +964,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
                return;
 
        switch (cp->enable) {
-       case LE_SCANNING_ENABLED:
+       case LE_SCAN_ENABLE:
                if (status) {
                        hci_dev_lock(hdev);
                        mgmt_start_discovery_failed(hdev, status);
@@ -979,7 +979,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
                hci_dev_unlock(hdev);
                break;
 
-       case LE_SCANNING_DISABLED:
+       case LE_SCAN_DISABLE:
                if (status) {
                        hci_dev_lock(hdev);
                        mgmt_stop_discovery_failed(hdev, status);