diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-23 10:56:54 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-25 14:33:21 -0400 |
commit | 0288d237fff4cbe54879e3c3433ae5782874f98c (patch) | |
tree | cfda8733f951e1b16a89c843a7bba0890d2984bd /drivers | |
parent | 767d055d6a85435bf1d5e63a5097402a5399cfdc (diff) |
iwlwifi: add 6000g2b BT coexist API
The new 6000g2b hardware requires a different
bluetooth coexist implementation on the host,
this adds the command/notification definitions
for it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-commands.h | 76 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-hcmd.c | 3 |
2 files changed, 78 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index e2f3616f5b8f..78086ad6b72e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -173,6 +173,12 @@ enum { | |||
173 | REPLY_RX_MPDU_CMD = 0xc1, | 173 | REPLY_RX_MPDU_CMD = 0xc1, |
174 | REPLY_RX = 0xc3, | 174 | REPLY_RX = 0xc3, |
175 | REPLY_COMPRESSED_BA = 0xc5, | 175 | REPLY_COMPRESSED_BA = 0xc5, |
176 | |||
177 | /* BT Coex */ | ||
178 | REPLY_BT_COEX_PRIO_TABLE = 0xcc, | ||
179 | REPLY_BT_COEX_PROT_ENV = 0xcd, | ||
180 | REPLY_BT_COEX_PROFILE_NOTIF = 0xce, | ||
181 | |||
176 | REPLY_MAX = 0xff | 182 | REPLY_MAX = 0xff |
177 | }; | 183 | }; |
178 | 184 | ||
@@ -2896,6 +2902,12 @@ struct iwl_scanstart_notification { | |||
2896 | #define SCAN_OWNER_STATUS 0x1; | 2902 | #define SCAN_OWNER_STATUS 0x1; |
2897 | #define MEASURE_OWNER_STATUS 0x2; | 2903 | #define MEASURE_OWNER_STATUS 0x2; |
2898 | 2904 | ||
2905 | #define IWL_PROBE_STATUS_OK 0 | ||
2906 | #define IWL_PROBE_STATUS_TX_FAILED BIT(0) | ||
2907 | /* error statuses combined with TX_FAILED */ | ||
2908 | #define IWL_PROBE_STATUS_FAIL_TTL BIT(1) | ||
2909 | #define IWL_PROBE_STATUS_FAIL_BT BIT(2) | ||
2910 | |||
2899 | #define NUMBER_OF_STATISTICS 1 /* first __le32 is good CRC */ | 2911 | #define NUMBER_OF_STATISTICS 1 /* first __le32 is good CRC */ |
2900 | /* | 2912 | /* |
2901 | * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command) | 2913 | * SCAN_RESULTS_NOTIFICATION = 0x83 (notification only, not a command) |
@@ -2903,7 +2915,8 @@ struct iwl_scanstart_notification { | |||
2903 | struct iwl_scanresults_notification { | 2915 | struct iwl_scanresults_notification { |
2904 | u8 channel; | 2916 | u8 channel; |
2905 | u8 band; | 2917 | u8 band; |
2906 | u8 reserved[2]; | 2918 | u8 probe_status; |
2919 | u8 num_probe_not_sent; /* not enough time to send */ | ||
2907 | __le32 tsf_low; | 2920 | __le32 tsf_low; |
2908 | __le32 tsf_high; | 2921 | __le32 tsf_high; |
2909 | __le32 statistics[NUMBER_OF_STATISTICS]; | 2922 | __le32 statistics[NUMBER_OF_STATISTICS]; |
@@ -3969,6 +3982,66 @@ struct iwl_coex_event_resp { | |||
3969 | 3982 | ||
3970 | 3983 | ||
3971 | /****************************************************************************** | 3984 | /****************************************************************************** |
3985 | * Bluetooth Coexistence commands | ||
3986 | * | ||
3987 | *****************************************************************************/ | ||
3988 | |||
3989 | /* | ||
3990 | * BT Status notification | ||
3991 | * REPLY_BT_COEX_PROFILE_NOTIF = 0xcb | ||
3992 | */ | ||
3993 | enum iwl_bt_coex_profile_traffic_load { | ||
3994 | IWL_BT_COEX_TRAFFIC_LOAD_NONE = 0, | ||
3995 | IWL_BT_COEX_TRAFFIC_LOAD_LOW = 1, | ||
3996 | IWL_BT_COEX_TRAFFIC_LOAD_HIGH = 2, | ||
3997 | IWL_BT_COEX_TRAFFIC_LOAD_CONTINUOUS = 3, | ||
3998 | /* | ||
3999 | * There are no more even though below is a u8, the | ||
4000 | * indication from the BT device only has two bits. | ||
4001 | */ | ||
4002 | }; | ||
4003 | |||
4004 | struct iwl_bt_coex_profile_notif { | ||
4005 | u8 uart_msg[8]; | ||
4006 | u8 bt_status; /* 0 - off, 1 - on */ | ||
4007 | u8 bt_traffic_load; /* 0 .. 3? */ | ||
4008 | u8 bt_ci_compliance; /* 0 - not complied, 1 - complied */ | ||
4009 | u8 reserved; | ||
4010 | } __attribute__((packed)); | ||
4011 | |||
4012 | #define IWL_BT_COEX_PRIO_SHARED_ANTENNA 0x1 | ||
4013 | #define IWL_BT_COEX_PRIO_PRIO_MASK 0xe | ||
4014 | #define IWL_BT_COEX_PRIO_PRIO_SHIFT 1 | ||
4015 | |||
4016 | /* | ||
4017 | * BT Coexistence Priority table | ||
4018 | * REPLY_BT_COEX_PRIO_TABLE = 0xcc | ||
4019 | */ | ||
4020 | struct iwl_bt_coex_prio_table_cmd { | ||
4021 | u8 init_calib_protection_cfg1, | ||
4022 | init_calib_protection_cfg2, | ||
4023 | init_calib_protection_lowprio_cfg1, | ||
4024 | init_calib_protection_lowprio_cfg2, | ||
4025 | init_calib_protection_highprio_cfg1, | ||
4026 | init_calib_protection_highprio_cfg2, | ||
4027 | dtim_protection_prio_cfg, | ||
4028 | scan_52_protection_cfg, | ||
4029 | scan_24_protection_cfg, | ||
4030 | bc_mc_protection_cfg; | ||
4031 | u8 reserved[6]; | ||
4032 | } __attribute__((packed)); | ||
4033 | |||
4034 | /* | ||
4035 | * BT Protection Envelope | ||
4036 | * REPLY_BT_COEX_PROT_ENV = 0xcd | ||
4037 | */ | ||
4038 | struct iwl_bt_coex_prot_env_cmd { | ||
4039 | u8 open; /* 0 = closed, 1 = open */ | ||
4040 | u8 type; /* 0 .. 15 */ | ||
4041 | u8 reserved[2]; | ||
4042 | } __attribute__((packed)); | ||
4043 | |||
4044 | /****************************************************************************** | ||
3972 | * (13) | 4045 | * (13) |
3973 | * Union of all expected notifications/responses: | 4046 | * Union of all expected notifications/responses: |
3974 | * | 4047 | * |
@@ -4007,6 +4080,7 @@ struct iwl_rx_packet { | |||
4007 | struct iwl_missed_beacon_notif missed_beacon; | 4080 | struct iwl_missed_beacon_notif missed_beacon; |
4008 | struct iwl_coex_medium_notification coex_medium_notif; | 4081 | struct iwl_coex_medium_notification coex_medium_notif; |
4009 | struct iwl_coex_event_resp coex_event; | 4082 | struct iwl_coex_event_resp coex_event; |
4083 | struct iwl_bt_coex_profile_notif bt_coex_profile_notif; | ||
4010 | __le32 status; | 4084 | __le32 status; |
4011 | u8 raw[0]; | 4085 | u8 raw[0]; |
4012 | } u; | 4086 | } u; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c index 258d059ef41f..1f15b3aa8478 100644 --- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c | |||
@@ -97,6 +97,9 @@ const char *get_cmd_string(u8 cmd) | |||
97 | IWL_CMD(REPLY_TX_POWER_DBM_CMD); | 97 | IWL_CMD(REPLY_TX_POWER_DBM_CMD); |
98 | IWL_CMD(TEMPERATURE_NOTIFICATION); | 98 | IWL_CMD(TEMPERATURE_NOTIFICATION); |
99 | IWL_CMD(TX_ANT_CONFIGURATION_CMD); | 99 | IWL_CMD(TX_ANT_CONFIGURATION_CMD); |
100 | IWL_CMD(REPLY_BT_COEX_PROFILE_NOTIF); | ||
101 | IWL_CMD(REPLY_BT_COEX_PRIO_TABLE); | ||
102 | IWL_CMD(REPLY_BT_COEX_PROT_ENV); | ||
100 | default: | 103 | default: |
101 | return "UNKNOWN"; | 104 | return "UNKNOWN"; |
102 | 105 | ||