aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/wmi-ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/wmi-ops.h')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi-ops.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-ops.h b/drivers/net/wireless/ath/ath10k/wmi-ops.h
index c35e45340b4f..7978a7783f90 100644
--- a/drivers/net/wireless/ath/ath10k/wmi-ops.h
+++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h
@@ -25,11 +25,14 @@ struct sk_buff;
25struct wmi_ops { 25struct wmi_ops {
26 void (*rx)(struct ath10k *ar, struct sk_buff *skb); 26 void (*rx)(struct ath10k *ar, struct sk_buff *skb);
27 void (*map_svc)(const __le32 *in, unsigned long *out, size_t len); 27 void (*map_svc)(const __le32 *in, unsigned long *out, size_t len);
28 void (*map_svc_ext)(const __le32 *in, unsigned long *out, size_t len);
28 29
29 int (*pull_scan)(struct ath10k *ar, struct sk_buff *skb, 30 int (*pull_scan)(struct ath10k *ar, struct sk_buff *skb,
30 struct wmi_scan_ev_arg *arg); 31 struct wmi_scan_ev_arg *arg);
31 int (*pull_mgmt_rx)(struct ath10k *ar, struct sk_buff *skb, 32 int (*pull_mgmt_rx)(struct ath10k *ar, struct sk_buff *skb,
32 struct wmi_mgmt_rx_ev_arg *arg); 33 struct wmi_mgmt_rx_ev_arg *arg);
34 int (*pull_mgmt_tx_compl)(struct ath10k *ar, struct sk_buff *skb,
35 struct wmi_tlv_mgmt_tx_compl_ev_arg *arg);
33 int (*pull_ch_info)(struct ath10k *ar, struct sk_buff *skb, 36 int (*pull_ch_info)(struct ath10k *ar, struct sk_buff *skb,
34 struct wmi_ch_info_ev_arg *arg); 37 struct wmi_ch_info_ev_arg *arg);
35 int (*pull_vdev_start)(struct ath10k *ar, struct sk_buff *skb, 38 int (*pull_vdev_start)(struct ath10k *ar, struct sk_buff *skb,
@@ -54,6 +57,11 @@ struct wmi_ops {
54 struct wmi_wow_ev_arg *arg); 57 struct wmi_wow_ev_arg *arg);
55 int (*pull_echo_ev)(struct ath10k *ar, struct sk_buff *skb, 58 int (*pull_echo_ev)(struct ath10k *ar, struct sk_buff *skb,
56 struct wmi_echo_ev_arg *arg); 59 struct wmi_echo_ev_arg *arg);
60 int (*pull_dfs_status_ev)(struct ath10k *ar, struct sk_buff *skb,
61 struct wmi_dfs_status_ev_arg *arg);
62 int (*pull_svc_avail)(struct ath10k *ar, struct sk_buff *skb,
63 struct wmi_svc_avail_ev_arg *arg);
64
57 enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar); 65 enum wmi_txbf_conf (*get_txbf_conf_scheme)(struct ath10k *ar);
58 66
59 struct sk_buff *(*gen_pdev_suspend)(struct ath10k *ar, u32 suspend_opt); 67 struct sk_buff *(*gen_pdev_suspend)(struct ath10k *ar, u32 suspend_opt);
@@ -115,6 +123,8 @@ struct wmi_ops {
115 u32 value); 123 u32 value);
116 struct sk_buff *(*gen_scan_chan_list)(struct ath10k *ar, 124 struct sk_buff *(*gen_scan_chan_list)(struct ath10k *ar,
117 const struct wmi_scan_chan_list_arg *arg); 125 const struct wmi_scan_chan_list_arg *arg);
126 struct sk_buff *(*gen_scan_prob_req_oui)(struct ath10k *ar,
127 u32 prob_req_oui);
118 struct sk_buff *(*gen_beacon_dma)(struct ath10k *ar, u32 vdev_id, 128 struct sk_buff *(*gen_beacon_dma)(struct ath10k *ar, u32 vdev_id,
119 const void *bcn, size_t bcn_len, 129 const void *bcn, size_t bcn_len,
120 u32 bcn_paddr, bool dtim_zero, 130 u32 bcn_paddr, bool dtim_zero,
@@ -182,6 +192,9 @@ struct wmi_ops {
182 const struct wmi_tdls_peer_update_cmd_arg *arg, 192 const struct wmi_tdls_peer_update_cmd_arg *arg,
183 const struct wmi_tdls_peer_capab_arg *cap, 193 const struct wmi_tdls_peer_capab_arg *cap,
184 const struct wmi_channel_arg *chan); 194 const struct wmi_channel_arg *chan);
195 struct sk_buff *(*gen_radar_found)
196 (struct ath10k *ar,
197 const struct ath10k_radar_found_info *arg);
185 struct sk_buff *(*gen_adaptive_qcs)(struct ath10k *ar, bool enable); 198 struct sk_buff *(*gen_adaptive_qcs)(struct ath10k *ar, bool enable);
186 struct sk_buff *(*gen_pdev_get_tpc_config)(struct ath10k *ar, 199 struct sk_buff *(*gen_pdev_get_tpc_config)(struct ath10k *ar,
187 u32 param); 200 u32 param);
@@ -197,6 +210,9 @@ struct wmi_ops {
197 u32 fw_feature_bitmap); 210 u32 fw_feature_bitmap);
198 int (*get_vdev_subtype)(struct ath10k *ar, 211 int (*get_vdev_subtype)(struct ath10k *ar,
199 enum wmi_vdev_subtype subtype); 212 enum wmi_vdev_subtype subtype);
213 struct sk_buff *(*gen_wow_config_pno)(struct ath10k *ar,
214 u32 vdev_id,
215 struct wmi_pno_scan_req *pno_scan);
200 struct sk_buff *(*gen_pdev_bss_chan_info_req) 216 struct sk_buff *(*gen_pdev_bss_chan_info_req)
201 (struct ath10k *ar, 217 (struct ath10k *ar,
202 enum wmi_bss_survey_req_type type); 218 enum wmi_bss_survey_req_type type);
@@ -230,6 +246,17 @@ ath10k_wmi_map_svc(struct ath10k *ar, const __le32 *in, unsigned long *out,
230} 246}
231 247
232static inline int 248static inline int
249ath10k_wmi_map_svc_ext(struct ath10k *ar, const __le32 *in, unsigned long *out,
250 size_t len)
251{
252 if (!ar->wmi.ops->map_svc_ext)
253 return -EOPNOTSUPP;
254
255 ar->wmi.ops->map_svc_ext(in, out, len);
256 return 0;
257}
258
259static inline int
233ath10k_wmi_pull_scan(struct ath10k *ar, struct sk_buff *skb, 260ath10k_wmi_pull_scan(struct ath10k *ar, struct sk_buff *skb,
234 struct wmi_scan_ev_arg *arg) 261 struct wmi_scan_ev_arg *arg)
235{ 262{
@@ -240,6 +267,16 @@ ath10k_wmi_pull_scan(struct ath10k *ar, struct sk_buff *skb,
240} 267}
241 268
242static inline int 269static inline int
270ath10k_wmi_pull_mgmt_tx_compl(struct ath10k *ar, struct sk_buff *skb,
271 struct wmi_tlv_mgmt_tx_compl_ev_arg *arg)
272{
273 if (!ar->wmi.ops->pull_mgmt_tx_compl)
274 return -EOPNOTSUPP;
275
276 return ar->wmi.ops->pull_mgmt_tx_compl(ar, skb, arg);
277}
278
279static inline int
243ath10k_wmi_pull_mgmt_rx(struct ath10k *ar, struct sk_buff *skb, 280ath10k_wmi_pull_mgmt_rx(struct ath10k *ar, struct sk_buff *skb,
244 struct wmi_mgmt_rx_ev_arg *arg) 281 struct wmi_mgmt_rx_ev_arg *arg)
245{ 282{
@@ -330,6 +367,15 @@ ath10k_wmi_pull_rdy(struct ath10k *ar, struct sk_buff *skb,
330} 367}
331 368
332static inline int 369static inline int
370ath10k_wmi_pull_svc_avail(struct ath10k *ar, struct sk_buff *skb,
371 struct wmi_svc_avail_ev_arg *arg)
372{
373 if (!ar->wmi.ops->pull_svc_avail)
374 return -EOPNOTSUPP;
375 return ar->wmi.ops->pull_svc_avail(ar, skb, arg);
376}
377
378static inline int
333ath10k_wmi_pull_fw_stats(struct ath10k *ar, struct sk_buff *skb, 379ath10k_wmi_pull_fw_stats(struct ath10k *ar, struct sk_buff *skb,
334 struct ath10k_fw_stats *stats) 380 struct ath10k_fw_stats *stats)
335{ 381{
@@ -369,6 +415,16 @@ ath10k_wmi_pull_echo_ev(struct ath10k *ar, struct sk_buff *skb,
369 return ar->wmi.ops->pull_echo_ev(ar, skb, arg); 415 return ar->wmi.ops->pull_echo_ev(ar, skb, arg);
370} 416}
371 417
418static inline int
419ath10k_wmi_pull_dfs_status(struct ath10k *ar, struct sk_buff *skb,
420 struct wmi_dfs_status_ev_arg *arg)
421{
422 if (!ar->wmi.ops->pull_dfs_status_ev)
423 return -EOPNOTSUPP;
424
425 return ar->wmi.ops->pull_dfs_status_ev(ar, skb, arg);
426}
427
372static inline enum wmi_txbf_conf 428static inline enum wmi_txbf_conf
373ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar) 429ath10k_wmi_get_txbf_conf_scheme(struct ath10k *ar)
374{ 430{
@@ -891,6 +947,26 @@ ath10k_wmi_scan_chan_list(struct ath10k *ar,
891} 947}
892 948
893static inline int 949static inline int
950ath10k_wmi_scan_prob_req_oui(struct ath10k *ar, const u8 mac_addr[ETH_ALEN])
951{
952 struct sk_buff *skb;
953 u32 prob_req_oui;
954
955 prob_req_oui = (((u32)mac_addr[0]) << 16) |
956 (((u32)mac_addr[1]) << 8) | mac_addr[2];
957
958 if (!ar->wmi.ops->gen_scan_prob_req_oui)
959 return -EOPNOTSUPP;
960
961 skb = ar->wmi.ops->gen_scan_prob_req_oui(ar, prob_req_oui);
962 if (IS_ERR(skb))
963 return PTR_ERR(skb);
964
965 return ath10k_wmi_cmd_send(ar, skb,
966 ar->wmi.cmd->scan_prob_req_oui_cmdid);
967}
968
969static inline int
894ath10k_wmi_peer_assoc(struct ath10k *ar, 970ath10k_wmi_peer_assoc(struct ath10k *ar,
895 const struct wmi_peer_assoc_complete_arg *arg) 971 const struct wmi_peer_assoc_complete_arg *arg)
896{ 972{
@@ -1288,6 +1364,24 @@ ath10k_wmi_wow_del_pattern(struct ath10k *ar, u32 vdev_id, u32 pattern_id)
1288} 1364}
1289 1365
1290static inline int 1366static inline int
1367ath10k_wmi_wow_config_pno(struct ath10k *ar, u32 vdev_id,
1368 struct wmi_pno_scan_req *pno_scan)
1369{
1370 struct sk_buff *skb;
1371 u32 cmd_id;
1372
1373 if (!ar->wmi.ops->gen_wow_config_pno)
1374 return -EOPNOTSUPP;
1375
1376 skb = ar->wmi.ops->gen_wow_config_pno(ar, vdev_id, pno_scan);
1377 if (IS_ERR(skb))
1378 return PTR_ERR(skb);
1379
1380 cmd_id = ar->wmi.cmd->network_list_offload_config_cmdid;
1381 return ath10k_wmi_cmd_send(ar, skb, cmd_id);
1382}
1383
1384static inline int
1291ath10k_wmi_update_fw_tdls_state(struct ath10k *ar, u32 vdev_id, 1385ath10k_wmi_update_fw_tdls_state(struct ath10k *ar, u32 vdev_id,
1292 enum wmi_tdls_state state) 1386 enum wmi_tdls_state state)
1293{ 1387{
@@ -1465,4 +1559,21 @@ ath10k_wmi_pdev_get_tpc_table_cmdid(struct ath10k *ar, u32 param)
1465 ar->wmi.cmd->pdev_get_tpc_table_cmdid); 1559 ar->wmi.cmd->pdev_get_tpc_table_cmdid);
1466} 1560}
1467 1561
1562static inline int
1563ath10k_wmi_report_radar_found(struct ath10k *ar,
1564 const struct ath10k_radar_found_info *arg)
1565{
1566 struct sk_buff *skb;
1567
1568 if (!ar->wmi.ops->gen_radar_found)
1569 return -EOPNOTSUPP;
1570
1571 skb = ar->wmi.ops->gen_radar_found(ar, arg);
1572 if (IS_ERR(skb))
1573 return PTR_ERR(skb);
1574
1575 return ath10k_wmi_cmd_send(ar, skb,
1576 ar->wmi.cmd->radar_found_cmdid);
1577}
1578
1468#endif 1579#endif