aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c136
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.h61
2 files changed, 117 insertions, 80 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 24bb97face30..cc0c9e0ff457 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -610,9 +610,8 @@ static struct wmi_cmd_map wmi_10_2_cmd_map = {
610 .gpio_output_cmdid = WMI_10_2_GPIO_OUTPUT_CMDID, 610 .gpio_output_cmdid = WMI_10_2_GPIO_OUTPUT_CMDID,
611}; 611};
612 612
613static void 613void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
614ath10k_wmi_put_wmi_channel(struct wmi_channel *ch, 614 const struct wmi_channel_arg *arg)
615 const struct wmi_channel_arg *arg)
616{ 615{
617 u32 flags = 0; 616 u32 flags = 0;
618 617
@@ -987,7 +986,7 @@ static int ath10k_wmi_op_pull_scan_ev(struct ath10k *ar, struct sk_buff *skb,
987 return 0; 986 return 0;
988} 987}
989 988
990static int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb) 989int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb)
991{ 990{
992 struct wmi_scan_ev_arg arg = {}; 991 struct wmi_scan_ev_arg arg = {};
993 enum wmi_scan_event_type event_type; 992 enum wmi_scan_event_type event_type;
@@ -1206,7 +1205,7 @@ static int ath10k_wmi_op_pull_mgmt_rx_ev(struct ath10k *ar, struct sk_buff *skb,
1206 return 0; 1205 return 0;
1207} 1206}
1208 1207
1209static int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) 1208int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb)
1210{ 1209{
1211 struct wmi_mgmt_rx_ev_arg arg = {}; 1210 struct wmi_mgmt_rx_ev_arg arg = {};
1212 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); 1211 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
@@ -1359,7 +1358,7 @@ static int ath10k_wmi_op_pull_ch_info_ev(struct ath10k *ar, struct sk_buff *skb,
1359 return 0; 1358 return 0;
1360} 1359}
1361 1360
1362static void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb) 1361void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb)
1363{ 1362{
1364 struct wmi_ch_info_ev_arg arg = {}; 1363 struct wmi_ch_info_ev_arg arg = {};
1365 struct survey_info *survey; 1364 struct survey_info *survey;
@@ -1427,12 +1426,12 @@ exit:
1427 spin_unlock_bh(&ar->data_lock); 1426 spin_unlock_bh(&ar->data_lock);
1428} 1427}
1429 1428
1430static void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb) 1429void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb)
1431{ 1430{
1432 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_ECHO_EVENTID\n"); 1431 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_ECHO_EVENTID\n");
1433} 1432}
1434 1433
1435static int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb) 1434int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb)
1436{ 1435{
1437 ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi event debug mesg len %d\n", 1436 ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi event debug mesg len %d\n",
1438 skb->len); 1437 skb->len);
@@ -1442,8 +1441,8 @@ static int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb)
1442 return 0; 1441 return 0;
1443} 1442}
1444 1443
1445static void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src, 1444void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src,
1446 struct ath10k_fw_stats_pdev *dst) 1445 struct ath10k_fw_stats_pdev *dst)
1447{ 1446{
1448 const struct wal_dbg_tx_stats *tx = &src->wal.tx; 1447 const struct wal_dbg_tx_stats *tx = &src->wal.tx;
1449 const struct wal_dbg_rx_stats *rx = &src->wal.rx; 1448 const struct wal_dbg_rx_stats *rx = &src->wal.rx;
@@ -1495,8 +1494,8 @@ static void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src,
1495 dst->mpdu_errs = __le32_to_cpu(rx->mpdu_errs); 1494 dst->mpdu_errs = __le32_to_cpu(rx->mpdu_errs);
1496} 1495}
1497 1496
1498static void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src, 1497void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
1499 struct ath10k_fw_stats_peer *dst) 1498 struct ath10k_fw_stats_peer *dst)
1500{ 1499{
1501 ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr); 1500 ether_addr_copy(dst->peer_macaddr, src->peer_macaddr.addr);
1502 dst->peer_rssi = __le32_to_cpu(src->peer_rssi); 1501 dst->peer_rssi = __le32_to_cpu(src->peer_rssi);
@@ -1618,8 +1617,7 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar,
1618 return 0; 1617 return 0;
1619} 1618}
1620 1619
1621static void ath10k_wmi_event_update_stats(struct ath10k *ar, 1620void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb)
1622 struct sk_buff *skb)
1623{ 1621{
1624 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_UPDATE_STATS_EVENTID\n"); 1622 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_UPDATE_STATS_EVENTID\n");
1625 ath10k_debug_fw_stats_process(ar, skb); 1623 ath10k_debug_fw_stats_process(ar, skb);
@@ -1643,8 +1641,7 @@ ath10k_wmi_op_pull_vdev_start_ev(struct ath10k *ar, struct sk_buff *skb,
1643 return 0; 1641 return 0;
1644} 1642}
1645 1643
1646static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, 1644void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb)
1647 struct sk_buff *skb)
1648{ 1645{
1649 struct wmi_vdev_start_ev_arg arg = {}; 1646 struct wmi_vdev_start_ev_arg arg = {};
1650 int ret; 1647 int ret;
@@ -1663,8 +1660,7 @@ static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar,
1663 complete(&ar->vdev_setup_done); 1660 complete(&ar->vdev_setup_done);
1664} 1661}
1665 1662
1666static void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, 1663void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb)
1667 struct sk_buff *skb)
1668{ 1664{
1669 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_STOPPED_EVENTID\n"); 1665 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_STOPPED_EVENTID\n");
1670 complete(&ar->vdev_setup_done); 1666 complete(&ar->vdev_setup_done);
@@ -1685,8 +1681,7 @@ ath10k_wmi_op_pull_peer_kick_ev(struct ath10k *ar, struct sk_buff *skb,
1685 return 0; 1681 return 0;
1686} 1682}
1687 1683
1688static void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, 1684void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb)
1689 struct sk_buff *skb)
1690{ 1685{
1691 struct wmi_peer_kick_ev_arg arg = {}; 1686 struct wmi_peer_kick_ev_arg arg = {};
1692 struct ieee80211_sta *sta; 1687 struct ieee80211_sta *sta;
@@ -1965,7 +1960,7 @@ static int ath10k_wmi_op_pull_swba_ev(struct ath10k *ar, struct sk_buff *skb,
1965 return 0; 1960 return 0;
1966} 1961}
1967 1962
1968static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) 1963void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
1969{ 1964{
1970 struct wmi_swba_ev_arg arg = {}; 1965 struct wmi_swba_ev_arg arg = {};
1971 u32 map; 1966 u32 map;
@@ -2086,8 +2081,7 @@ skip:
2086 } 2081 }
2087} 2082}
2088 2083
2089static void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, 2084void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb)
2090 struct sk_buff *skb)
2091{ 2085{
2092 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TBTTOFFSET_UPDATE_EVENTID\n"); 2086 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TBTTOFFSET_UPDATE_EVENTID\n");
2093} 2087}
@@ -2208,9 +2202,9 @@ static int ath10k_dfs_fft_report(struct ath10k *ar,
2208 return 0; 2202 return 0;
2209} 2203}
2210 2204
2211static void ath10k_wmi_event_dfs(struct ath10k *ar, 2205void ath10k_wmi_event_dfs(struct ath10k *ar,
2212 const struct wmi_phyerr *phyerr, 2206 const struct wmi_phyerr *phyerr,
2213 u64 tsf) 2207 u64 tsf)
2214{ 2208{
2215 int buf_len, tlv_len, res, i = 0; 2209 int buf_len, tlv_len, res, i = 0;
2216 const struct phyerr_tlv *tlv; 2210 const struct phyerr_tlv *tlv;
@@ -2273,10 +2267,9 @@ static void ath10k_wmi_event_dfs(struct ath10k *ar,
2273 } 2267 }
2274} 2268}
2275 2269
2276static void 2270void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
2277ath10k_wmi_event_spectral_scan(struct ath10k *ar, 2271 const struct wmi_phyerr *phyerr,
2278 const struct wmi_phyerr *phyerr, 2272 u64 tsf)
2279 u64 tsf)
2280{ 2273{
2281 int buf_len, tlv_len, res, i = 0; 2274 int buf_len, tlv_len, res, i = 0;
2282 struct phyerr_tlv *tlv; 2275 struct phyerr_tlv *tlv;
@@ -2345,7 +2338,7 @@ static int ath10k_wmi_op_pull_phyerr_ev(struct ath10k *ar, struct sk_buff *skb,
2345 return 0; 2338 return 0;
2346} 2339}
2347 2340
2348static void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb) 2341void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb)
2349{ 2342{
2350 struct wmi_phyerr_ev_arg arg = {}; 2343 struct wmi_phyerr_ev_arg arg = {};
2351 const struct wmi_phyerr *phyerr; 2344 const struct wmi_phyerr *phyerr;
@@ -2414,19 +2407,17 @@ static void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb)
2414 } 2407 }
2415} 2408}
2416 2409
2417static void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb) 2410void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb)
2418{ 2411{
2419 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_ROAM_EVENTID\n"); 2412 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_ROAM_EVENTID\n");
2420} 2413}
2421 2414
2422static void ath10k_wmi_event_profile_match(struct ath10k *ar, 2415void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb)
2423 struct sk_buff *skb)
2424{ 2416{
2425 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PROFILE_MATCH\n"); 2417 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PROFILE_MATCH\n");
2426} 2418}
2427 2419
2428static void ath10k_wmi_event_debug_print(struct ath10k *ar, 2420void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb)
2429 struct sk_buff *skb)
2430{ 2421{
2431 char buf[101], c; 2422 char buf[101], c;
2432 int i; 2423 int i;
@@ -2459,103 +2450,90 @@ static void ath10k_wmi_event_debug_print(struct ath10k *ar,
2459 ath10k_dbg(ar, ATH10K_DBG_WMI_PRINT, "wmi print '%s'\n", buf); 2450 ath10k_dbg(ar, ATH10K_DBG_WMI_PRINT, "wmi print '%s'\n", buf);
2460} 2451}
2461 2452
2462static void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb) 2453void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb)
2463{ 2454{
2464 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_QVIT_EVENTID\n"); 2455 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_QVIT_EVENTID\n");
2465} 2456}
2466 2457
2467static void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, 2458void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb)
2468 struct sk_buff *skb)
2469{ 2459{
2470 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_WLAN_PROFILE_DATA_EVENTID\n"); 2460 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_WLAN_PROFILE_DATA_EVENTID\n");
2471} 2461}
2472 2462
2473static void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar, 2463void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
2474 struct sk_buff *skb) 2464 struct sk_buff *skb)
2475{ 2465{
2476 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_RTT_MEASUREMENT_REPORT_EVENTID\n"); 2466 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_RTT_MEASUREMENT_REPORT_EVENTID\n");
2477} 2467}
2478 2468
2479static void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar, 2469void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
2480 struct sk_buff *skb) 2470 struct sk_buff *skb)
2481{ 2471{
2482 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TSF_MEASUREMENT_REPORT_EVENTID\n"); 2472 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TSF_MEASUREMENT_REPORT_EVENTID\n");
2483} 2473}
2484 2474
2485static void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, 2475void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb)
2486 struct sk_buff *skb)
2487{ 2476{
2488 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_RTT_ERROR_REPORT_EVENTID\n"); 2477 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_RTT_ERROR_REPORT_EVENTID\n");
2489} 2478}
2490 2479
2491static void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, 2480void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb)
2492 struct sk_buff *skb)
2493{ 2481{
2494 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_WOW_WAKEUP_HOST_EVENTID\n"); 2482 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_WOW_WAKEUP_HOST_EVENTID\n");
2495} 2483}
2496 2484
2497static void ath10k_wmi_event_dcs_interference(struct ath10k *ar, 2485void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb)
2498 struct sk_buff *skb)
2499{ 2486{
2500 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_DCS_INTERFERENCE_EVENTID\n"); 2487 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_DCS_INTERFERENCE_EVENTID\n");
2501} 2488}
2502 2489
2503static void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, 2490void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb)
2504 struct sk_buff *skb)
2505{ 2491{
2506 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_TPC_CONFIG_EVENTID\n"); 2492 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_TPC_CONFIG_EVENTID\n");
2507} 2493}
2508 2494
2509static void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, 2495void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb)
2510 struct sk_buff *skb)
2511{ 2496{
2512 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_FTM_INTG_EVENTID\n"); 2497 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_PDEV_FTM_INTG_EVENTID\n");
2513} 2498}
2514 2499
2515static void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar, 2500void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar, struct sk_buff *skb)
2516 struct sk_buff *skb)
2517{ 2501{
2518 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_GTK_OFFLOAD_STATUS_EVENTID\n"); 2502 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_GTK_OFFLOAD_STATUS_EVENTID\n");
2519} 2503}
2520 2504
2521static void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, 2505void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb)
2522 struct sk_buff *skb)
2523{ 2506{
2524 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_GTK_REKEY_FAIL_EVENTID\n"); 2507 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_GTK_REKEY_FAIL_EVENTID\n");
2525} 2508}
2526 2509
2527static void ath10k_wmi_event_delba_complete(struct ath10k *ar, 2510void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb)
2528 struct sk_buff *skb)
2529{ 2511{
2530 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TX_DELBA_COMPLETE_EVENTID\n"); 2512 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TX_DELBA_COMPLETE_EVENTID\n");
2531} 2513}
2532 2514
2533static void ath10k_wmi_event_addba_complete(struct ath10k *ar, 2515void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb)
2534 struct sk_buff *skb)
2535{ 2516{
2536 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TX_ADDBA_COMPLETE_EVENTID\n"); 2517 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_TX_ADDBA_COMPLETE_EVENTID\n");
2537} 2518}
2538 2519
2539static void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar, 2520void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
2540 struct sk_buff *skb) 2521 struct sk_buff *skb)
2541{ 2522{
2542 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\n"); 2523 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID\n");
2543} 2524}
2544 2525
2545static void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, 2526void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb)
2546 struct sk_buff *skb)
2547{ 2527{
2548 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_INST_RSSI_STATS_EVENTID\n"); 2528 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_INST_RSSI_STATS_EVENTID\n");
2549} 2529}
2550 2530
2551static void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, 2531void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb)
2552 struct sk_buff *skb)
2553{ 2532{
2554 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_STANDBY_REQ_EVENTID\n"); 2533 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_STANDBY_REQ_EVENTID\n");
2555} 2534}
2556 2535
2557static void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, 2536void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb)
2558 struct sk_buff *skb)
2559{ 2537{
2560 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n"); 2538 ath10k_dbg(ar, ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n");
2561} 2539}
@@ -2664,8 +2642,7 @@ ath10k_wmi_10x_op_pull_svc_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
2664 return 0; 2642 return 0;
2665} 2643}
2666 2644
2667static void ath10k_wmi_event_service_ready(struct ath10k *ar, 2645void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb)
2668 struct sk_buff *skb)
2669{ 2646{
2670 struct wmi_svc_rdy_ev_arg arg = {}; 2647 struct wmi_svc_rdy_ev_arg arg = {};
2671 u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i; 2648 u32 num_units, req_id, unit_size, num_mem_reqs, num_unit_info, i;
@@ -2790,7 +2767,7 @@ static int ath10k_wmi_op_pull_rdy_ev(struct ath10k *ar, struct sk_buff *skb,
2790 return 0; 2767 return 0;
2791} 2768}
2792 2769
2793static int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb) 2770int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb)
2794{ 2771{
2795 struct wmi_rdy_ev_arg arg = {}; 2772 struct wmi_rdy_ev_arg arg = {};
2796 int ret; 2773 int ret;
@@ -3311,8 +3288,8 @@ ath10k_wmi_op_gen_pdev_set_param(struct ath10k *ar, u32 id, u32 value)
3311 return skb; 3288 return skb;
3312} 3289}
3313 3290
3314static void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar, 3291void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
3315 struct wmi_host_mem_chunks *chunks) 3292 struct wmi_host_mem_chunks *chunks)
3316{ 3293{
3317 struct host_memory_chunk *chunk; 3294 struct host_memory_chunk *chunk;
3318 int i; 3295 int i;
@@ -3539,7 +3516,7 @@ static struct sk_buff *ath10k_wmi_10_2_op_gen_init(struct ath10k *ar)
3539 return buf; 3516 return buf;
3540} 3517}
3541 3518
3542static int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg) 3519int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg)
3543{ 3520{
3544 if (arg->ie_len && !arg->ie) 3521 if (arg->ie_len && !arg->ie)
3545 return -EINVAL; 3522 return -EINVAL;
@@ -3590,9 +3567,8 @@ ath10k_wmi_start_scan_tlvs_len(const struct wmi_start_scan_arg *arg)
3590 return len; 3567 return len;
3591} 3568}
3592 3569
3593static void 3570void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
3594ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn, 3571 const struct wmi_start_scan_arg *arg)
3595 const struct wmi_start_scan_arg *arg)
3596{ 3572{
3597 u32 scan_id; 3573 u32 scan_id;
3598 u32 scan_req_id; 3574 u32 scan_req_id;
@@ -4470,8 +4446,8 @@ ath10k_wmi_op_gen_beacon_dma(struct ath10k_vif *arvif)
4470 return skb; 4446 return skb;
4471} 4447}
4472 4448
4473static void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params, 4449void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params,
4474 const struct wmi_wmm_params_arg *arg) 4450 const struct wmi_wmm_params_arg *arg)
4475{ 4451{
4476 params->cwmin = __cpu_to_le32(arg->cwmin); 4452 params->cwmin = __cpu_to_le32(arg->cwmin);
4477 params->cwmax = __cpu_to_le32(arg->cwmax); 4453 params->cwmax = __cpu_to_le32(arg->cwmax);
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 7172f3cb772e..032a8bdb0420 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -4644,12 +4644,15 @@ struct wmi_rdy_ev_arg {
4644 4644
4645struct ath10k; 4645struct ath10k;
4646struct ath10k_vif; 4646struct ath10k_vif;
4647struct ath10k_fw_stats_pdev;
4648struct ath10k_fw_stats_peer;
4647 4649
4648int ath10k_wmi_attach(struct ath10k *ar); 4650int ath10k_wmi_attach(struct ath10k *ar);
4649void ath10k_wmi_detach(struct ath10k *ar); 4651void ath10k_wmi_detach(struct ath10k *ar);
4650int ath10k_wmi_wait_for_service_ready(struct ath10k *ar); 4652int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
4651int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar); 4653int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
4652 4654
4655struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
4653int ath10k_wmi_connect(struct ath10k *ar); 4656int ath10k_wmi_connect(struct ath10k *ar);
4654 4657
4655struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len); 4658struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
@@ -4658,4 +4661,62 @@ int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
4658 u32 cmd_id); 4661 u32 cmd_id);
4659void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *); 4662void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
4660 4663
4664void ath10k_wmi_pull_pdev_stats(const struct wmi_pdev_stats *src,
4665 struct ath10k_fw_stats_pdev *dst);
4666void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
4667 struct ath10k_fw_stats_peer *dst);
4668void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
4669 struct wmi_host_mem_chunks *chunks);
4670void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
4671 const struct wmi_start_scan_arg *arg);
4672void ath10k_wmi_pdev_set_wmm_param(struct wmi_wmm_params *params,
4673 const struct wmi_wmm_params_arg *arg);
4674void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
4675 const struct wmi_channel_arg *arg);
4676int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
4677
4678int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
4679int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
4680void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
4681void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
4682int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
4683void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
4684void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
4685void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
4686void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
4687void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
4688void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
4689void ath10k_wmi_event_dfs(struct ath10k *ar,
4690 const struct wmi_phyerr *phyerr, u64 tsf);
4691void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
4692 const struct wmi_phyerr *phyerr,
4693 u64 tsf);
4694void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
4695void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
4696void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
4697void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
4698void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
4699void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
4700void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
4701 struct sk_buff *skb);
4702void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
4703 struct sk_buff *skb);
4704void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
4705void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
4706void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
4707void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
4708void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
4709void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
4710 struct sk_buff *skb);
4711void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
4712void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
4713void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
4714void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
4715 struct sk_buff *skb);
4716void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
4717void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
4718void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
4719void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
4720int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
4721
4661#endif /* _WMI_H_ */ 4722#endif /* _WMI_H_ */