Commit 536619e8 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg

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: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 6ed971ca
...@@ -71,13 +71,13 @@ ...@@ -71,13 +71,13 @@
#define AMP_TYPE_80211 0x01 #define AMP_TYPE_80211 0x01
/* AMP controller status */ /* AMP controller status */
#define AMP_CTRL_POWERED_DOWN 0x00 #define AMP_STATUS_POWERED_DOWN 0x00
#define AMP_CTRL_BLUETOOTH_ONLY 0x01 #define AMP_STATUS_BLUETOOTH_ONLY 0x01
#define AMP_CTRL_NO_CAPACITY 0x02 #define AMP_STATUS_NO_CAPACITY 0x02
#define AMP_CTRL_LOW_CAPACITY 0x03 #define AMP_STATUS_LOW_CAPACITY 0x03
#define AMP_CTRL_MEDIUM_CAPACITY 0x04 #define AMP_STATUS_MEDIUM_CAPACITY 0x04
#define AMP_CTRL_HIGH_CAPACITY 0x05 #define AMP_STATUS_HIGH_CAPACITY 0x05
#define AMP_CTRL_FULL_CAPACITY 0x06 #define AMP_STATUS_FULL_CAPACITY 0x06
/* HCI device quirks */ /* HCI device quirks */
enum { enum {
......
...@@ -79,7 +79,7 @@ static inline void __a2mp_cl_bredr(struct a2mp_cl *cl) ...@@ -79,7 +79,7 @@ static inline void __a2mp_cl_bredr(struct a2mp_cl *cl)
{ {
cl->id = AMP_ID_BREDR; cl->id = AMP_ID_BREDR;
cl->type = AMP_TYPE_BREDR; cl->type = AMP_TYPE_BREDR;
cl->status = 1; cl->status = AMP_STATUS_BLUETOOTH_ONLY;
} }
/* hci_dev_list shall be locked */ /* hci_dev_list shall be locked */
......
...@@ -1381,7 +1381,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) ...@@ -1381,7 +1381,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
} }
/* Controller radio is available but is currently powered down */ /* 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->eir, 0, sizeof(hdev->eir));
memset(hdev->dev_class, 0, sizeof(hdev->dev_class)); memset(hdev->dev_class, 0, sizeof(hdev->dev_class));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment