summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Holtmann2013-10-05 20:47:45 +0200
committerJohan Hedberg2013-10-06 10:24:30 +0200
commit536619e86d9398a20063f7c3d15deb9dcc234097 (patch)
tree7219061b5b6b063f0e3e0be389c696ea74732e5e
parentBluetooth: Use explicit AMP controller id value for BR/EDR (diff)
downloadkernel-qcow2-linux-536619e86d9398a20063f7c3d15deb9dcc234097.tar.gz
kernel-qcow2-linux-536619e86d9398a20063f7c3d15deb9dcc234097.tar.xz
kernel-qcow2-linux-536619e86d9398a20063f7c3d15deb9dcc234097.zip
Bluetooth: Rename AMP status constants and use them
The AMP controller status constants need to be actually used to avoid crypted hardcoded numbers. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r--include/net/bluetooth/hci.h14
-rw-r--r--net/bluetooth/a2mp.c2
-rw-r--r--net/bluetooth/hci_core.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 393eabc0d21f..9f8d1c1f0414 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -71,13 +71,13 @@
#define AMP_TYPE_80211 0x01
/* AMP controller status */
-#define AMP_CTRL_POWERED_DOWN 0x00
-#define AMP_CTRL_BLUETOOTH_ONLY 0x01
-#define AMP_CTRL_NO_CAPACITY 0x02
-#define AMP_CTRL_LOW_CAPACITY 0x03
-#define AMP_CTRL_MEDIUM_CAPACITY 0x04
-#define AMP_CTRL_HIGH_CAPACITY 0x05
-#define AMP_CTRL_FULL_CAPACITY 0x06
+#define AMP_STATUS_POWERED_DOWN 0x00
+#define AMP_STATUS_BLUETOOTH_ONLY 0x01
+#define AMP_STATUS_NO_CAPACITY 0x02
+#define AMP_STATUS_LOW_CAPACITY 0x03
+#define AMP_STATUS_MEDIUM_CAPACITY 0x04
+#define AMP_STATUS_HIGH_CAPACITY 0x05
+#define AMP_STATUS_FULL_CAPACITY 0x06
/* HCI device quirks */
enum {
diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index 6d62d3140cf8..6dfef731825f 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -79,7 +79,7 @@ static inline void __a2mp_cl_bredr(struct a2mp_cl *cl)
{
cl->id = AMP_ID_BREDR;
cl->type = AMP_TYPE_BREDR;
- cl->status = 1;
+ cl->status = AMP_STATUS_BLUETOOTH_ONLY;
}
/* hci_dev_list shall be locked */
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index aa63ebb114d4..0d5fe0843f5e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1381,7 +1381,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
}
/* Controller radio is available but is currently powered down */
- hdev->amp_status = 0;
+ hdev->amp_status = AMP_STATUS_POWERED_DOWN;
memset(hdev->eir, 0, sizeof(hdev->eir));
memset(hdev->dev_class, 0, sizeof(hdev->dev_class));