diff options
author | Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> | 2015-01-25 03:52:42 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-29 02:53:14 -0500 |
commit | 8c6796758f0abd8ee2b4d7e8c6ca5f7adf737ee6 (patch) | |
tree | 99353c6fb79b5c18935b8713ff700f84774dcff1 /drivers/net/wireless/ath/wil6210 | |
parent | 314112e0023acddaae1b43d549bc03be29a146ce (diff) |
wil6210: sync WMI with firmware
Incorporate changes from firmware.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.h | 58 |
2 files changed, 59 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index b2b0fe1faa96..097d78bca2f0 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c | |||
@@ -1133,12 +1133,13 @@ int wmi_rx_chain_add(struct wil6210_priv *wil, struct vring *vring) | |||
1133 | return rc; | 1133 | return rc; |
1134 | } | 1134 | } |
1135 | 1135 | ||
1136 | int wmi_get_temperature(struct wil6210_priv *wil, u32 *t_m, u32 *t_r) | 1136 | int wmi_get_temperature(struct wil6210_priv *wil, u32 *t_bb, u32 *t_rf) |
1137 | { | 1137 | { |
1138 | int rc; | 1138 | int rc; |
1139 | struct wmi_temp_sense_cmd cmd = { | 1139 | struct wmi_temp_sense_cmd cmd = { |
1140 | .measure_marlon_m_en = cpu_to_le32(!!t_m), | 1140 | .measure_baseband_en = cpu_to_le32(!!t_bb), |
1141 | .measure_marlon_r_en = cpu_to_le32(!!t_r), | 1141 | .measure_rf_en = cpu_to_le32(!!t_rf), |
1142 | .measure_mode = cpu_to_le32(TEMPERATURE_MEASURE_NOW), | ||
1142 | }; | 1143 | }; |
1143 | struct { | 1144 | struct { |
1144 | struct wil6210_mbox_hdr_wmi wmi; | 1145 | struct wil6210_mbox_hdr_wmi wmi; |
@@ -1150,10 +1151,10 @@ int wmi_get_temperature(struct wil6210_priv *wil, u32 *t_m, u32 *t_r) | |||
1150 | if (rc) | 1151 | if (rc) |
1151 | return rc; | 1152 | return rc; |
1152 | 1153 | ||
1153 | if (t_m) | 1154 | if (t_bb) |
1154 | *t_m = le32_to_cpu(reply.evt.marlon_m_t1000); | 1155 | *t_bb = le32_to_cpu(reply.evt.baseband_t1000); |
1155 | if (t_r) | 1156 | if (t_rf) |
1156 | *t_r = le32_to_cpu(reply.evt.marlon_r_t1000); | 1157 | *t_rf = le32_to_cpu(reply.evt.rf_t1000); |
1157 | 1158 | ||
1158 | return 0; | 1159 | return 0; |
1159 | } | 1160 | } |
diff --git a/drivers/net/wireless/ath/wil6210/wmi.h b/drivers/net/wireless/ath/wil6210/wmi.h index b5102f0b97f4..8a4af613e191 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.h +++ b/drivers/net/wireless/ath/wil6210/wmi.h | |||
@@ -29,8 +29,10 @@ | |||
29 | 29 | ||
30 | /* General */ | 30 | /* General */ |
31 | #define WILOCITY_MAX_ASSOC_STA (8) | 31 | #define WILOCITY_MAX_ASSOC_STA (8) |
32 | #define WILOCITY_DEFAULT_ASSOC_STA (1) | ||
32 | #define WMI_MAC_LEN (6) | 33 | #define WMI_MAC_LEN (6) |
33 | #define WMI_PROX_RANGE_NUM (3) | 34 | #define WMI_PROX_RANGE_NUM (3) |
35 | #define WMI_MAX_LOSS_DMG_BEACONS (32) | ||
34 | 36 | ||
35 | /* List of Commands */ | 37 | /* List of Commands */ |
36 | enum wmi_command_id { | 38 | enum wmi_command_id { |
@@ -48,7 +50,7 @@ enum wmi_command_id { | |||
48 | WMI_SET_WSC_STATUS_CMDID = 0x0041, | 50 | WMI_SET_WSC_STATUS_CMDID = 0x0041, |
49 | WMI_PXMT_RANGE_CFG_CMDID = 0x0042, | 51 | WMI_PXMT_RANGE_CFG_CMDID = 0x0042, |
50 | WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x0043, | 52 | WMI_PXMT_SNR2_RANGE_CFG_CMDID = 0x0043, |
51 | WMI_FAST_MEM_ACC_MODE_CMDID = 0x0300, | 53 | /* WMI_FAST_MEM_ACC_MODE_CMDID = 0x0300, */ |
52 | WMI_MEM_READ_CMDID = 0x0800, | 54 | WMI_MEM_READ_CMDID = 0x0800, |
53 | WMI_MEM_WR_CMDID = 0x0801, | 55 | WMI_MEM_WR_CMDID = 0x0801, |
54 | WMI_ECHO_CMDID = 0x0803, | 56 | WMI_ECHO_CMDID = 0x0803, |
@@ -102,6 +104,8 @@ enum wmi_command_id { | |||
102 | WMI_MAINTAIN_RESUME_CMDID = 0x0851, | 104 | WMI_MAINTAIN_RESUME_CMDID = 0x0851, |
103 | WMI_RS_MGMT_CMDID = 0x0852, | 105 | WMI_RS_MGMT_CMDID = 0x0852, |
104 | WMI_RF_MGMT_CMDID = 0x0853, | 106 | WMI_RF_MGMT_CMDID = 0x0853, |
107 | WMI_THERMAL_THROTTLING_CTRL_CMDID = 0x0854, | ||
108 | WMI_THERMAL_THROTTLING_GET_STATUS_CMDID = 0x0855, | ||
105 | /* Performance monitoring commands */ | 109 | /* Performance monitoring commands */ |
106 | WMI_BF_CTRL_CMDID = 0x0862, | 110 | WMI_BF_CTRL_CMDID = 0x0862, |
107 | WMI_NOTIFY_REQ_CMDID = 0x0863, | 111 | WMI_NOTIFY_REQ_CMDID = 0x0863, |
@@ -136,6 +140,7 @@ enum wmi_command_id { | |||
136 | WMI_EAPOL_TX_CMDID = 0xf04c, | 140 | WMI_EAPOL_TX_CMDID = 0xf04c, |
137 | WMI_MAC_ADDR_REQ_CMDID = 0xf04d, | 141 | WMI_MAC_ADDR_REQ_CMDID = 0xf04d, |
138 | WMI_FW_VER_CMDID = 0xf04e, | 142 | WMI_FW_VER_CMDID = 0xf04e, |
143 | WMI_PMC_CMDID = 0xf04f, | ||
139 | }; | 144 | }; |
140 | 145 | ||
141 | /* | 146 | /* |
@@ -283,8 +288,8 @@ enum wmi_scan_type { | |||
283 | WMI_LONG_SCAN = 0, | 288 | WMI_LONG_SCAN = 0, |
284 | WMI_SHORT_SCAN = 1, | 289 | WMI_SHORT_SCAN = 1, |
285 | WMI_PBC_SCAN = 2, | 290 | WMI_PBC_SCAN = 2, |
286 | WMI_ACTIVE_SCAN = 3, | 291 | WMI_DIRECT_SCAN = 3, |
287 | WMI_DIRECT_SCAN = 4, | 292 | WMI_ACTIVE_SCAN = 4, |
288 | }; | 293 | }; |
289 | 294 | ||
290 | struct wmi_start_scan_cmd { | 295 | struct wmi_start_scan_cmd { |
@@ -375,6 +380,17 @@ struct wmi_rf_mgmt_cmd { | |||
375 | } __packed; | 380 | } __packed; |
376 | 381 | ||
377 | /* | 382 | /* |
383 | * WMI_THERMAL_THROTTLING_CTRL_CMDID | ||
384 | */ | ||
385 | #define THERMAL_THROTTLING_USE_DEFAULT_MAX_TXOP_LENGTH (0xFFFFFFFF) | ||
386 | |||
387 | struct wmi_thermal_throttling_ctrl_cmd { | ||
388 | __le32 time_on_usec; | ||
389 | __le32 time_off_usec; | ||
390 | __le32 max_txop_length_usec; | ||
391 | } __packed; | ||
392 | |||
393 | /* | ||
378 | * WMI_RF_RX_TEST_CMDID | 394 | * WMI_RF_RX_TEST_CMDID |
379 | */ | 395 | */ |
380 | struct wmi_rf_rx_test_cmd { | 396 | struct wmi_rf_rx_test_cmd { |
@@ -648,6 +664,7 @@ enum wmi_cfg_rx_chain_cmd_action { | |||
648 | enum wmi_cfg_rx_chain_cmd_decap_trans_type { | 664 | enum wmi_cfg_rx_chain_cmd_decap_trans_type { |
649 | WMI_DECAP_TYPE_802_3 = 0, | 665 | WMI_DECAP_TYPE_802_3 = 0, |
650 | WMI_DECAP_TYPE_NATIVE_WIFI = 1, | 666 | WMI_DECAP_TYPE_NATIVE_WIFI = 1, |
667 | WMI_DECAP_TYPE_NONE = 2, | ||
651 | }; | 668 | }; |
652 | 669 | ||
653 | enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { | 670 | enum wmi_cfg_rx_chain_cmd_nwifi_ds_trans_type { |
@@ -785,9 +802,17 @@ struct wmi_echo_cmd { | |||
785 | * | 802 | * |
786 | * Measure MAC and radio temperatures | 803 | * Measure MAC and radio temperatures |
787 | */ | 804 | */ |
805 | |||
806 | /* Possible modes for temperature measurement */ | ||
807 | enum wmi_temperature_measure_mode { | ||
808 | TEMPERATURE_USE_OLD_VALUE = 0x1, | ||
809 | TEMPERATURE_MEASURE_NOW = 0x2, | ||
810 | }; | ||
811 | |||
788 | struct wmi_temp_sense_cmd { | 812 | struct wmi_temp_sense_cmd { |
789 | __le32 measure_marlon_m_en; | 813 | __le32 measure_baseband_en; |
790 | __le32 measure_marlon_r_en; | 814 | __le32 measure_rf_en; |
815 | __le32 measure_mode; | ||
791 | } __packed; | 816 | } __packed; |
792 | 817 | ||
793 | /* | 818 | /* |
@@ -843,6 +868,7 @@ enum wmi_event_id { | |||
843 | WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, | 868 | WMI_BF_RXSS_MGMT_DONE_EVENTID = 0x1839, |
844 | WMI_RS_MGMT_DONE_EVENTID = 0x1852, | 869 | WMI_RS_MGMT_DONE_EVENTID = 0x1852, |
845 | WMI_RF_MGMT_STATUS_EVENTID = 0x1853, | 870 | WMI_RF_MGMT_STATUS_EVENTID = 0x1853, |
871 | WMI_THERMAL_THROTTLING_STATUS_EVENTID = 0x1855, | ||
846 | WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, | 872 | WMI_BF_SM_MGMT_DONE_EVENTID = 0x1838, |
847 | WMI_RX_MGMT_PACKET_EVENTID = 0x1840, | 873 | WMI_RX_MGMT_PACKET_EVENTID = 0x1840, |
848 | WMI_TX_MGMT_PACKET_EVENTID = 0x1841, | 874 | WMI_TX_MGMT_PACKET_EVENTID = 0x1841, |
@@ -859,6 +885,7 @@ enum wmi_event_id { | |||
859 | WMI_FLASH_READ_DONE_EVENTID = 0x1902, | 885 | WMI_FLASH_READ_DONE_EVENTID = 0x1902, |
860 | WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, | 886 | WMI_FLASH_WRITE_DONE_EVENTID = 0x1903, |
861 | /*P2P*/ | 887 | /*P2P*/ |
888 | WMI_P2P_CFG_DONE_EVENTID = 0x1910, | ||
862 | WMI_PORT_ALLOCATED_EVENTID = 0x1911, | 889 | WMI_PORT_ALLOCATED_EVENTID = 0x1911, |
863 | WMI_PORT_DELETED_EVENTID = 0x1912, | 890 | WMI_PORT_DELETED_EVENTID = 0x1912, |
864 | WMI_LISTEN_STARTED_EVENTID = 0x1914, | 891 | WMI_LISTEN_STARTED_EVENTID = 0x1914, |
@@ -899,6 +926,15 @@ struct wmi_rf_mgmt_status_event { | |||
899 | } __packed; | 926 | } __packed; |
900 | 927 | ||
901 | /* | 928 | /* |
929 | * WMI_THERMAL_THROTTLING_STATUS_EVENTID | ||
930 | */ | ||
931 | struct wmi_thermal_throttling_status_event { | ||
932 | __le32 time_on_usec; | ||
933 | __le32 time_off_usec; | ||
934 | __le32 max_txop_length_usec; | ||
935 | } __packed; | ||
936 | |||
937 | /* | ||
902 | * WMI_GET_STATUS_DONE_EVENTID | 938 | * WMI_GET_STATUS_DONE_EVENTID |
903 | */ | 939 | */ |
904 | struct wmi_get_status_done_event { | 940 | struct wmi_get_status_done_event { |
@@ -1155,6 +1191,14 @@ struct wmi_get_pcp_channel_event { | |||
1155 | } __packed; | 1191 | } __packed; |
1156 | 1192 | ||
1157 | /* | 1193 | /* |
1194 | * WMI_P2P_CFG_DONE_EVENTID | ||
1195 | */ | ||
1196 | struct wmi_p2p_cfg_done_event { | ||
1197 | u8 status; /* wmi_fw_status */ | ||
1198 | u8 reserved[3]; | ||
1199 | } __packed; | ||
1200 | |||
1201 | /* | ||
1158 | * WMI_PORT_ALLOCATED_EVENTID | 1202 | * WMI_PORT_ALLOCATED_EVENTID |
1159 | */ | 1203 | */ |
1160 | struct wmi_port_allocated_event { | 1204 | struct wmi_port_allocated_event { |
@@ -1282,8 +1326,8 @@ struct wmi_echo_event { | |||
1282 | * Measure MAC and radio temperatures | 1326 | * Measure MAC and radio temperatures |
1283 | */ | 1327 | */ |
1284 | struct wmi_temp_sense_done_event { | 1328 | struct wmi_temp_sense_done_event { |
1285 | __le32 marlon_m_t1000; | 1329 | __le32 baseband_t1000; |
1286 | __le32 marlon_r_t1000; | 1330 | __le32 rf_t1000; |
1287 | } __packed; | 1331 | } __packed; |
1288 | 1332 | ||
1289 | #endif /* __WILOCITY_WMI_H__ */ | 1333 | #endif /* __WILOCITY_WMI_H__ */ |