Lines Matching +full:sense +full:- +full:freq

2  * Copyright (c) 2004-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2012 Qualcomm Atheros, Inc.
111 /* 802.1d to AC mapping. Refer pg 57 of WMM-test-plan-v1.2 */
128 wmi->ep_id = ep_id; in ath6kl_wmi_set_control_ep()
133 return wmi->ep_id; in ath6kl_wmi_get_control_ep()
140 if (WARN_ON(if_idx > (ar->vif_max - 1))) in ath6kl_get_vif_by_index()
144 spin_lock_bh(&ar->list_lock); in ath6kl_get_vif_by_index()
145 list_for_each_entry(vif, &ar->vif_list, list) { in ath6kl_get_vif_by_index()
146 if (vif->fw_vif_idx == if_idx) { in ath6kl_get_vif_by_index()
151 spin_unlock_bh(&ar->list_lock); in ath6kl_get_vif_by_index()
170 return -EINVAL; in ath6kl_wmi_dix_2_dot3()
174 return -ENOMEM; in ath6kl_wmi_dix_2_dot3()
176 eth_hdr = (struct ethhdr *) skb->data; in ath6kl_wmi_dix_2_dot3()
177 type = eth_hdr->h_proto; in ath6kl_wmi_dix_2_dot3()
185 new_len = skb->len - sizeof(*eth_hdr) + sizeof(*llc_hdr); in ath6kl_wmi_dix_2_dot3()
188 datap = skb->data; in ath6kl_wmi_dix_2_dot3()
190 eth_hdr->h_proto = cpu_to_be16(new_len); in ath6kl_wmi_dix_2_dot3()
195 llc_hdr->dsap = 0xAA; in ath6kl_wmi_dix_2_dot3()
196 llc_hdr->ssap = 0xAA; in ath6kl_wmi_dix_2_dot3()
197 llc_hdr->cntl = 0x03; in ath6kl_wmi_dix_2_dot3()
198 llc_hdr->org_code[0] = 0x0; in ath6kl_wmi_dix_2_dot3()
199 llc_hdr->org_code[1] = 0x0; in ath6kl_wmi_dix_2_dot3()
200 llc_hdr->org_code[2] = 0x0; in ath6kl_wmi_dix_2_dot3()
201 llc_hdr->eth_type = type; in ath6kl_wmi_dix_2_dot3()
213 return -EINVAL; in ath6kl_wmi_meta_add()
218 v1 = (struct wmi_tx_meta_v1 *) skb->data; in ath6kl_wmi_meta_add()
219 v1->pkt_id = 0; in ath6kl_wmi_meta_add()
220 v1->rate_plcy_id = 0; in ath6kl_wmi_meta_add()
225 v2 = (struct wmi_tx_meta_v2 *) skb->data; in ath6kl_wmi_meta_add()
242 if (WARN_ON(skb == NULL || (if_idx > wmi->parent_dev->vif_max - 1))) in ath6kl_wmi_data_hdr_add()
243 return -EINVAL; in ath6kl_wmi_data_hdr_add()
253 data_hdr = (struct wmi_data_hdr *)skb->data; in ath6kl_wmi_data_hdr_add()
256 data_hdr->info = msg_type << WMI_DATA_HDR_MSG_TYPE_SHIFT; in ath6kl_wmi_data_hdr_add()
257 data_hdr->info |= data_type << WMI_DATA_HDR_DATA_TYPE_SHIFT; in ath6kl_wmi_data_hdr_add()
260 data_hdr->info |= WMI_DATA_HDR_MORE; in ath6kl_wmi_data_hdr_add()
263 data_hdr->info3 |= cpu_to_le16(WMI_DATA_HDR_EOSP); in ath6kl_wmi_data_hdr_add()
265 data_hdr->info2 |= cpu_to_le16(meta_ver << WMI_DATA_HDR_META_SHIFT); in ath6kl_wmi_data_hdr_add()
266 data_hdr->info3 |= cpu_to_le16(if_idx & WMI_DATA_HDR_IF_IDX_MASK); in ath6kl_wmi_data_hdr_add()
279 * IP-TOS - 8bits in ath6kl_wmi_determine_user_priority()
280 * : DSCP(6-bits) ECN(2-bits) in ath6kl_wmi_determine_user_priority()
281 * : DSCP - P2 P1 P0 X X X in ath6kl_wmi_determine_user_priority()
284 ip_pri = ip_hdr->tos >> 5; in ath6kl_wmi_determine_user_priority()
313 return -EINVAL; in ath6kl_wmi_implicit_create_pstream()
315 datap = skb->data; in ath6kl_wmi_implicit_create_pstream()
318 meta_size = ((le16_to_cpu(data_hdr->info2) >> WMI_DATA_HDR_META_SHIFT) & in ath6kl_wmi_implicit_create_pstream()
332 if (llc_hdr->eth_type == htons(ip_type)) { in ath6kl_wmi_implicit_create_pstream()
349 if (skb->protocol == cpu_to_be16(ETH_P_PAE)) in ath6kl_wmi_implicit_create_pstream()
356 * FIXME: wmi->traffic_class is always 100 so this test doesn't in ath6kl_wmi_implicit_create_pstream()
357 * make sense in ath6kl_wmi_implicit_create_pstream()
359 if ((wmi->traffic_class == WMM_AC_VI) && in ath6kl_wmi_implicit_create_pstream()
368 spin_lock_bh(&wmi->lock); in ath6kl_wmi_implicit_create_pstream()
369 stream_exist = wmi->fat_pipe_exist; in ath6kl_wmi_implicit_create_pstream()
370 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_implicit_create_pstream()
398 return -EINVAL; in ath6kl_wmi_dot11_hdr_remove()
400 datap = skb->data; in ath6kl_wmi_dot11_hdr_remove()
403 sub_type = pwh->frame_control & cpu_to_le16(IEEE80211_FCTL_STYPE); in ath6kl_wmi_dot11_hdr_remove()
416 datap = skb->data; in ath6kl_wmi_dot11_hdr_remove()
420 eth_hdr.h_proto = llc_hdr->eth_type; in ath6kl_wmi_dot11_hdr_remove()
443 datap = skb->data; in ath6kl_wmi_dot11_hdr_remove()
461 return -EINVAL; in ath6kl_wmi_dot3_2_dix()
463 datap = skb->data; in ath6kl_wmi_dot3_2_dix()
468 eth_hdr.h_proto = llc_hdr->eth_type; in ath6kl_wmi_dot3_2_dix()
471 datap = skb->data; in ath6kl_wmi_dot3_2_dix()
488 evt->num_msg, evt->msg_len, evt->msg_type); in ath6kl_wmi_tx_complete_event_rx()
490 for (index = 0; index < evt->num_msg; index++) { in ath6kl_wmi_tx_complete_event_rx()
496 msg_v1->status, msg_v1->pkt_id, in ath6kl_wmi_tx_complete_event_rx()
497 msg_v1->rate_idx, msg_v1->ack_failures); in ath6kl_wmi_tx_complete_event_rx()
507 u32 freq; in ath6kl_wmi_remain_on_chnl_event_rx() local
510 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_remain_on_chnl_event_rx()
514 return -EINVAL; in ath6kl_wmi_remain_on_chnl_event_rx()
517 freq = le32_to_cpu(ev->freq); in ath6kl_wmi_remain_on_chnl_event_rx()
518 dur = le32_to_cpu(ev->duration); in ath6kl_wmi_remain_on_chnl_event_rx()
519 ath6kl_dbg(ATH6KL_DBG_WMI, "remain_on_chnl: freq=%u dur=%u\n", in ath6kl_wmi_remain_on_chnl_event_rx()
520 freq, dur); in ath6kl_wmi_remain_on_chnl_event_rx()
521 chan = ieee80211_get_channel(ar->wiphy, freq); in ath6kl_wmi_remain_on_chnl_event_rx()
524 "remain_on_chnl: Unknown channel (freq=%u)\n", in ath6kl_wmi_remain_on_chnl_event_rx()
525 freq); in ath6kl_wmi_remain_on_chnl_event_rx()
526 return -EINVAL; in ath6kl_wmi_remain_on_chnl_event_rx()
528 id = vif->last_roc_id; in ath6kl_wmi_remain_on_chnl_event_rx()
529 cfg80211_ready_on_channel(&vif->wdev, id, chan, in ath6kl_wmi_remain_on_chnl_event_rx()
540 u32 freq; in ath6kl_wmi_cancel_remain_on_chnl_event_rx() local
543 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
547 return -EINVAL; in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
550 freq = le32_to_cpu(ev->freq); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
551 dur = le32_to_cpu(ev->duration); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
553 "cancel_remain_on_chnl: freq=%u dur=%u status=%u\n", in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
554 freq, dur, ev->status); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
555 chan = ieee80211_get_channel(ar->wiphy, freq); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
558 "cancel_remain_on_chnl: Unknown channel (freq=%u)\n", in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
559 freq); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
560 return -EINVAL; in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
562 if (vif->last_cancel_roc_id && in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
563 vif->last_cancel_roc_id + 1 == vif->last_roc_id) in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
564 id = vif->last_cancel_roc_id; /* event for cancel command */ in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
566 id = vif->last_roc_id; /* timeout on uncanceled r-o-c */ in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
567 vif->last_cancel_roc_id = 0; in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
568 cfg80211_remain_on_channel_expired(&vif->wdev, id, chan, GFP_ATOMIC); in ath6kl_wmi_cancel_remain_on_chnl_event_rx()
580 return -EINVAL; in ath6kl_wmi_tx_status_event_rx()
583 id = le32_to_cpu(ev->id); in ath6kl_wmi_tx_status_event_rx()
585 id, ev->ack_status); in ath6kl_wmi_tx_status_event_rx()
586 if (wmi->last_mgmt_tx_frame) { in ath6kl_wmi_tx_status_event_rx()
587 cfg80211_mgmt_tx_status(&vif->wdev, id, in ath6kl_wmi_tx_status_event_rx()
588 wmi->last_mgmt_tx_frame, in ath6kl_wmi_tx_status_event_rx()
589 wmi->last_mgmt_tx_frame_len, in ath6kl_wmi_tx_status_event_rx()
590 !!ev->ack_status, GFP_ATOMIC); in ath6kl_wmi_tx_status_event_rx()
591 kfree(wmi->last_mgmt_tx_frame); in ath6kl_wmi_tx_status_event_rx()
592 wmi->last_mgmt_tx_frame = NULL; in ath6kl_wmi_tx_status_event_rx()
593 wmi->last_mgmt_tx_frame_len = 0; in ath6kl_wmi_tx_status_event_rx()
603 u32 freq; in ath6kl_wmi_rx_probe_req_event_rx() local
607 return -EINVAL; in ath6kl_wmi_rx_probe_req_event_rx()
610 freq = le32_to_cpu(ev->freq); in ath6kl_wmi_rx_probe_req_event_rx()
611 dlen = le16_to_cpu(ev->len); in ath6kl_wmi_rx_probe_req_event_rx()
612 if (datap + len < ev->data + dlen) { in ath6kl_wmi_rx_probe_req_event_rx()
615 return -EINVAL; in ath6kl_wmi_rx_probe_req_event_rx()
618 "rx_probe_req: len=%u freq=%u probe_req_report=%d\n", in ath6kl_wmi_rx_probe_req_event_rx()
619 dlen, freq, vif->probe_req_report); in ath6kl_wmi_rx_probe_req_event_rx()
621 if (vif->probe_req_report || vif->nw_type == AP_NETWORK) in ath6kl_wmi_rx_probe_req_event_rx()
622 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0); in ath6kl_wmi_rx_probe_req_event_rx()
633 return -EINVAL; in ath6kl_wmi_p2p_capabilities_event_rx()
636 dlen = le16_to_cpu(ev->len); in ath6kl_wmi_p2p_capabilities_event_rx()
646 u32 freq; in ath6kl_wmi_rx_action_event_rx() local
650 return -EINVAL; in ath6kl_wmi_rx_action_event_rx()
653 freq = le32_to_cpu(ev->freq); in ath6kl_wmi_rx_action_event_rx()
654 dlen = le16_to_cpu(ev->len); in ath6kl_wmi_rx_action_event_rx()
655 if (datap + len < ev->data + dlen) { in ath6kl_wmi_rx_action_event_rx()
658 return -EINVAL; in ath6kl_wmi_rx_action_event_rx()
660 ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); in ath6kl_wmi_rx_action_event_rx()
661 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0); in ath6kl_wmi_rx_action_event_rx()
673 return -EINVAL; in ath6kl_wmi_p2p_info_event_rx()
676 flags = le32_to_cpu(ev->info_req_flags); in ath6kl_wmi_p2p_info_event_rx()
677 dlen = le16_to_cpu(ev->len); in ath6kl_wmi_p2p_info_event_rx()
683 return -EINVAL; in ath6kl_wmi_p2p_info_event_rx()
684 cap = (struct wmi_p2p_capabilities *) ev->data; in ath6kl_wmi_p2p_info_event_rx()
686 cap->go_power_save); in ath6kl_wmi_p2p_info_event_rx()
692 return -EINVAL; in ath6kl_wmi_p2p_info_event_rx()
693 mac = (struct wmi_p2p_macaddr *) ev->data; in ath6kl_wmi_p2p_info_event_rx()
695 mac->mac_addr); in ath6kl_wmi_p2p_info_event_rx()
701 return -EINVAL; in ath6kl_wmi_p2p_info_event_rx()
702 mod = (struct wmi_p2p_hmodel *) ev->data; in ath6kl_wmi_p2p_info_event_rx()
704 mod->p2p_model, in ath6kl_wmi_p2p_info_event_rx()
705 mod->p2p_model ? "host" : "firmware"); in ath6kl_wmi_p2p_info_event_rx()
720 memset(skb->data, 0, size); in ath6kl_wmi_get_new_buf()
725 /* Send a "simple" wmi command -- one with no arguments */
734 return -ENOMEM; in ath6kl_wmi_simple_cmd()
746 return -EINVAL; in ath6kl_wmi_ready_event_rx()
748 ath6kl_ready_event(wmi->parent_dev, ev->mac_addr, in ath6kl_wmi_ready_event_rx()
749 le32_to_cpu(ev->sw_version), in ath6kl_wmi_ready_event_rx()
750 le32_to_cpu(ev->abi_version), ev->phy_cap); in ath6kl_wmi_ready_event_rx()
768 return -ENOMEM; in ath6kl_wmi_set_roam_lrssi_cmd()
770 cmd = (struct roam_ctrl_cmd *) skb->data; in ath6kl_wmi_set_roam_lrssi_cmd()
772 cmd->info.params.lrssi_scan_period = cpu_to_le16(DEF_LRSSI_SCAN_PERIOD); in ath6kl_wmi_set_roam_lrssi_cmd()
773 cmd->info.params.lrssi_scan_threshold = a_cpu_to_sle16(lrssi + in ath6kl_wmi_set_roam_lrssi_cmd()
775 cmd->info.params.lrssi_roam_threshold = a_cpu_to_sle16(lrssi); in ath6kl_wmi_set_roam_lrssi_cmd()
776 cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR; in ath6kl_wmi_set_roam_lrssi_cmd()
777 cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS; in ath6kl_wmi_set_roam_lrssi_cmd()
790 return -ENOMEM; in ath6kl_wmi_force_roam_cmd()
792 cmd = (struct roam_ctrl_cmd *) skb->data; in ath6kl_wmi_force_roam_cmd()
794 memcpy(cmd->info.bssid, bssid, ETH_ALEN); in ath6kl_wmi_force_roam_cmd()
795 cmd->roam_ctrl = WMI_FORCE_ROAM; in ath6kl_wmi_force_roam_cmd()
810 return -ENOMEM; in ath6kl_wmi_ap_set_beacon_intvl_cmd()
812 cmd = (struct set_beacon_int_cmd *) skb->data; in ath6kl_wmi_ap_set_beacon_intvl_cmd()
814 cmd->beacon_intvl = cpu_to_le32(beacon_intvl); in ath6kl_wmi_ap_set_beacon_intvl_cmd()
826 return -ENOMEM; in ath6kl_wmi_ap_set_dtim_cmd()
828 cmd = (struct set_dtim_cmd *) skb->data; in ath6kl_wmi_ap_set_dtim_cmd()
830 cmd->dtim_period = cpu_to_le32(dtim_period); in ath6kl_wmi_ap_set_dtim_cmd()
842 return -ENOMEM; in ath6kl_wmi_set_roam_mode_cmd()
844 cmd = (struct roam_ctrl_cmd *) skb->data; in ath6kl_wmi_set_roam_mode_cmd()
846 cmd->info.roam_mode = mode; in ath6kl_wmi_set_roam_mode_cmd()
847 cmd->roam_ctrl = WMI_SET_ROAM_MODE; in ath6kl_wmi_set_roam_mode_cmd()
861 return -EINVAL; in ath6kl_wmi_connect_event_rx()
865 if (vif->nw_type == AP_NETWORK) { in ath6kl_wmi_connect_event_rx()
867 struct net_device *dev = vif->ndev; in ath6kl_wmi_connect_event_rx()
868 if (memcmp(dev->dev_addr, ev->u.ap_bss.bssid, ETH_ALEN) == 0) { in ath6kl_wmi_connect_event_rx()
870 "%s: freq %d bssid %pM (AP started)\n", in ath6kl_wmi_connect_event_rx()
871 __func__, le16_to_cpu(ev->u.ap_bss.ch), in ath6kl_wmi_connect_event_rx()
872 ev->u.ap_bss.bssid); in ath6kl_wmi_connect_event_rx()
874 vif, le16_to_cpu(ev->u.ap_bss.ch)); in ath6kl_wmi_connect_event_rx()
878 __func__, ev->u.ap_sta.aid, in ath6kl_wmi_connect_event_rx()
879 ev->u.ap_sta.mac_addr, in ath6kl_wmi_connect_event_rx()
880 ev->u.ap_sta.auth, in ath6kl_wmi_connect_event_rx()
881 ev->u.ap_sta.keymgmt, in ath6kl_wmi_connect_event_rx()
882 le16_to_cpu(ev->u.ap_sta.cipher), in ath6kl_wmi_connect_event_rx()
883 ev->u.ap_sta.apsd_info); in ath6kl_wmi_connect_event_rx()
886 vif, ev->u.ap_sta.aid, ev->u.ap_sta.mac_addr, in ath6kl_wmi_connect_event_rx()
887 ev->u.ap_sta.keymgmt, in ath6kl_wmi_connect_event_rx()
888 le16_to_cpu(ev->u.ap_sta.cipher), in ath6kl_wmi_connect_event_rx()
889 ev->u.ap_sta.auth, ev->assoc_req_len, in ath6kl_wmi_connect_event_rx()
890 ev->assoc_info + ev->beacon_ie_len, in ath6kl_wmi_connect_event_rx()
891 ev->u.ap_sta.apsd_info); in ath6kl_wmi_connect_event_rx()
899 "wmi event connect freq %d bssid %pM listen_intvl %d beacon_intvl %d type %d\n", in ath6kl_wmi_connect_event_rx()
900 le16_to_cpu(ev->u.sta.ch), ev->u.sta.bssid, in ath6kl_wmi_connect_event_rx()
901 le16_to_cpu(ev->u.sta.listen_intvl), in ath6kl_wmi_connect_event_rx()
902 le16_to_cpu(ev->u.sta.beacon_intvl), in ath6kl_wmi_connect_event_rx()
903 le32_to_cpu(ev->u.sta.nw_type)); in ath6kl_wmi_connect_event_rx()
906 pie = ev->assoc_info + ev->beacon_ie_len + in ath6kl_wmi_connect_event_rx()
907 ev->assoc_req_len + (sizeof(u16) * 3); /* capinfo, status, aid */ in ath6kl_wmi_connect_event_rx()
910 peie = ev->assoc_info + ev->beacon_ie_len + ev->assoc_req_len + in ath6kl_wmi_connect_event_rx()
911 ev->assoc_resp_len; in ath6kl_wmi_connect_event_rx()
921 wmi->is_wmm_enabled = true; in ath6kl_wmi_connect_event_rx()
926 if (wmi->is_wmm_enabled) in ath6kl_wmi_connect_event_rx()
932 ath6kl_connect_event(vif, le16_to_cpu(ev->u.sta.ch), in ath6kl_wmi_connect_event_rx()
933 ev->u.sta.bssid, in ath6kl_wmi_connect_event_rx()
934 le16_to_cpu(ev->u.sta.listen_intvl), in ath6kl_wmi_connect_event_rx()
935 le16_to_cpu(ev->u.sta.beacon_intvl), in ath6kl_wmi_connect_event_rx()
936 le32_to_cpu(ev->u.sta.nw_type), in ath6kl_wmi_connect_event_rx()
937 ev->beacon_ie_len, ev->assoc_req_len, in ath6kl_wmi_connect_event_rx()
938 ev->assoc_resp_len, ev->assoc_info); in ath6kl_wmi_connect_event_rx()
994 reg_code = le32_to_cpu(ev->reg_code); in ath6kl_wmi_regdomain_event()
1003 regpair->reg_domain); in ath6kl_wmi_regdomain_event()
1009 if (country && wmi->parent_dev->wiphy_registered) { in ath6kl_wmi_regdomain_event()
1010 alpha2[0] = country->isoName[0]; in ath6kl_wmi_regdomain_event()
1011 alpha2[1] = country->isoName[1]; in ath6kl_wmi_regdomain_event()
1013 regulatory_hint(wmi->parent_dev->wiphy, alpha2); in ath6kl_wmi_regdomain_event()
1024 wmi->traffic_class = 100; in ath6kl_wmi_disconnect_event_rx()
1027 return -EINVAL; in ath6kl_wmi_disconnect_event_rx()
1033 le16_to_cpu(ev->proto_reason_status), ev->bssid, in ath6kl_wmi_disconnect_event_rx()
1034 ev->disconn_reason, ev->assoc_resp_len); in ath6kl_wmi_disconnect_event_rx()
1036 wmi->is_wmm_enabled = false; in ath6kl_wmi_disconnect_event_rx()
1038 ath6kl_disconnect_event(vif, ev->disconn_reason, in ath6kl_wmi_disconnect_event_rx()
1039 ev->bssid, ev->assoc_resp_len, ev->assoc_info, in ath6kl_wmi_disconnect_event_rx()
1040 le16_to_cpu(ev->proto_reason_status)); in ath6kl_wmi_disconnect_event_rx()
1050 return -EINVAL; in ath6kl_wmi_peer_node_event_rx()
1054 if (ev->event_code == PEER_NODE_JOIN_EVENT) in ath6kl_wmi_peer_node_event_rx()
1056 ev->peer_mac_addr); in ath6kl_wmi_peer_node_event_rx()
1057 else if (ev->event_code == PEER_NODE_LEAVE_EVENT) in ath6kl_wmi_peer_node_event_rx()
1059 ev->peer_mac_addr); in ath6kl_wmi_peer_node_event_rx()
1070 return -EINVAL; in ath6kl_wmi_tkip_micerr_event_rx()
1074 ath6kl_tkip_micerr_event(vif, ev->key_id, ev->is_mcast); in ath6kl_wmi_tkip_micerr_event_rx()
1083 cfg80211_sched_scan_results(vif->ar->wiphy, 0); in ath6kl_wmi_sscan_timer()
1092 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_bssinfo_event_rx()
1096 return -EINVAL; in ath6kl_wmi_bssinfo_event_rx()
1100 len -= sizeof(struct wmi_bss_info_hdr2); in ath6kl_wmi_bssinfo_event_rx()
1103 "bss info evt - ch %u, snr %d, rssi %d, bssid \"%pM\" " in ath6kl_wmi_bssinfo_event_rx()
1105 bih->ch, bih->snr, bih->snr - 95, bih->bssid, in ath6kl_wmi_bssinfo_event_rx()
1106 bih->frame_type); in ath6kl_wmi_bssinfo_event_rx()
1108 if (bih->frame_type != BEACON_FTYPE && in ath6kl_wmi_bssinfo_event_rx()
1109 bih->frame_type != PROBERESP_FTYPE) in ath6kl_wmi_bssinfo_event_rx()
1112 if (bih->frame_type == BEACON_FTYPE && in ath6kl_wmi_bssinfo_event_rx()
1113 test_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags)) { in ath6kl_wmi_bssinfo_event_rx()
1114 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); in ath6kl_wmi_bssinfo_event_rx()
1115 ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_wmi_bssinfo_event_rx()
1119 channel = ieee80211_get_channel(ar->wiphy, le16_to_cpu(bih->ch)); in ath6kl_wmi_bssinfo_event_rx()
1121 return -EINVAL; in ath6kl_wmi_bssinfo_event_rx()
1124 return -EINVAL; in ath6kl_wmi_bssinfo_event_rx()
1126 if (bih->frame_type == BEACON_FTYPE && in ath6kl_wmi_bssinfo_event_rx()
1127 test_bit(CONNECTED, &vif->flags) && in ath6kl_wmi_bssinfo_event_rx()
1128 memcmp(bih->bssid, vif->bssid, ETH_ALEN) == 0) { in ath6kl_wmi_bssinfo_event_rx()
1131 len - 8 - 2 - 2); in ath6kl_wmi_bssinfo_event_rx()
1133 vif->assoc_bss_dtim_period = tim[3]; in ath6kl_wmi_bssinfo_event_rx()
1134 set_bit(DTIM_PERIOD_AVAIL, &vif->flags); in ath6kl_wmi_bssinfo_event_rx()
1138 bss = cfg80211_inform_bss(ar->wiphy, channel, in ath6kl_wmi_bssinfo_event_rx()
1139 bih->frame_type == BEACON_FTYPE ? in ath6kl_wmi_bssinfo_event_rx()
1142 bih->bssid, get_unaligned_le64((__le64 *)buf), in ath6kl_wmi_bssinfo_event_rx()
1145 buf + 8 + 2 + 2, len - 8 - 2 - 2, in ath6kl_wmi_bssinfo_event_rx()
1146 (bih->snr - 95) * 100, GFP_ATOMIC); in ath6kl_wmi_bssinfo_event_rx()
1148 return -ENOMEM; in ath6kl_wmi_bssinfo_event_rx()
1149 cfg80211_put_bss(ar->wiphy, bss); in ath6kl_wmi_bssinfo_event_rx()
1160 if (test_bit(SCHED_SCANNING, &vif->flags) && in ath6kl_wmi_bssinfo_event_rx()
1161 !timer_pending(&vif->sched_scan_timer)) { in ath6kl_wmi_bssinfo_event_rx()
1162 mod_timer(&vif->sched_scan_timer, jiffies + in ath6kl_wmi_bssinfo_event_rx()
1176 return -EINVAL; in ath6kl_wmi_pstream_timeout_event_rx()
1179 if (ev->traffic_class >= WMM_NUM_AC) { in ath6kl_wmi_pstream_timeout_event_rx()
1180 ath6kl_err("invalid traffic class: %d\n", ev->traffic_class); in ath6kl_wmi_pstream_timeout_event_rx()
1181 return -EINVAL; in ath6kl_wmi_pstream_timeout_event_rx()
1190 spin_lock_bh(&wmi->lock); in ath6kl_wmi_pstream_timeout_event_rx()
1191 wmi->stream_exist_for_ac[ev->traffic_class] = 0; in ath6kl_wmi_pstream_timeout_event_rx()
1192 wmi->fat_pipe_exist &= ~(1 << ev->traffic_class); in ath6kl_wmi_pstream_timeout_event_rx()
1193 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_pstream_timeout_event_rx()
1196 ath6kl_indicate_tx_activity(wmi->parent_dev, ev->traffic_class, false); in ath6kl_wmi_pstream_timeout_event_rx()
1207 return -EINVAL; in ath6kl_wmi_bitrate_reply_rx()
1211 ath6kl_dbg(ATH6KL_DBG_WMI, "rateindex %d\n", reply->rate_index); in ath6kl_wmi_bitrate_reply_rx()
1213 if (reply->rate_index != (s8) RATE_AUTO) { in ath6kl_wmi_bitrate_reply_rx()
1214 index = reply->rate_index & 0x7f; in ath6kl_wmi_bitrate_reply_rx()
1216 return -EINVAL; in ath6kl_wmi_bitrate_reply_rx()
1219 ath6kl_wakeup_event(wmi->parent_dev); in ath6kl_wmi_bitrate_reply_rx()
1226 ath6kl_tm_rx_event(wmi->parent_dev, datap, len); in ath6kl_wmi_test_rx()
1234 return -EINVAL; in ath6kl_wmi_ratemask_reply_rx()
1236 ath6kl_wakeup_event(wmi->parent_dev); in ath6kl_wmi_ratemask_reply_rx()
1244 return -EINVAL; in ath6kl_wmi_ch_list_reply_rx()
1246 ath6kl_wakeup_event(wmi->parent_dev); in ath6kl_wmi_ch_list_reply_rx()
1256 return -EINVAL; in ath6kl_wmi_tx_pwr_reply_rx()
1259 ath6kl_txpwr_rx_evt(wmi->parent_dev, reply->dbM); in ath6kl_wmi_tx_pwr_reply_rx()
1267 return -EINVAL; in ath6kl_wmi_keepalive_reply_rx()
1269 ath6kl_wakeup_event(wmi->parent_dev); in ath6kl_wmi_keepalive_reply_rx()
1281 ath6kl_scan_complete_evt(vif, a_sle32_to_cpu(ev->status)); in ath6kl_wmi_scan_complete_rx()
1282 wmi->is_probe_ssid = false; in ath6kl_wmi_scan_complete_rx()
1294 return -EINVAL; in ath6kl_wmi_neighbor_report_event_rx()
1296 if (struct_size(ev, neighbor, ev->num_neighbors) > len) { in ath6kl_wmi_neighbor_report_event_rx()
1299 ev->num_neighbors, len); in ath6kl_wmi_neighbor_report_event_rx()
1300 return -EINVAL; in ath6kl_wmi_neighbor_report_event_rx()
1302 for (i = 0; i < ev->num_neighbors; i++) { in ath6kl_wmi_neighbor_report_event_rx()
1303 ath6kl_dbg(ATH6KL_DBG_WMI, "neighbor %d/%d - %pM 0x%x\n", in ath6kl_wmi_neighbor_report_event_rx()
1304 i + 1, ev->num_neighbors, ev->neighbor[i].bssid, in ath6kl_wmi_neighbor_report_event_rx()
1305 ev->neighbor[i].bss_flags); in ath6kl_wmi_neighbor_report_event_rx()
1306 cfg80211_pmksa_candidate_notify(vif->ndev, i, in ath6kl_wmi_neighbor_report_event_rx()
1307 ev->neighbor[i].bssid, in ath6kl_wmi_neighbor_report_event_rx()
1308 !!(ev->neighbor[i].bss_flags & in ath6kl_wmi_neighbor_report_event_rx()
1329 switch (ev->err_code) { in ath6kl_wmi_error_event_rx()
1342 ev->cmd_id, type); in ath6kl_wmi_error_event_rx()
1360 u8 threshold = (u8) sq_thresh->upper_threshold[size - 1]; in ath6kl_wmi_get_upper_threshold()
1364 if (rssi < sq_thresh->upper_threshold[index]) { in ath6kl_wmi_get_upper_threshold()
1365 threshold = (u8) sq_thresh->upper_threshold[index]; in ath6kl_wmi_get_upper_threshold()
1378 u8 threshold = (u8) sq_thresh->lower_threshold[size - 1]; in ath6kl_wmi_get_lower_threshold()
1382 if (rssi > sq_thresh->lower_threshold[index]) { in ath6kl_wmi_get_lower_threshold()
1383 threshold = (u8) sq_thresh->lower_threshold[index]; in ath6kl_wmi_get_lower_threshold()
1399 return -ENOMEM; in ath6kl_wmi_send_rssi_threshold_params()
1401 cmd = (struct wmi_rssi_threshold_params_cmd *) skb->data; in ath6kl_wmi_send_rssi_threshold_params()
1420 return -EINVAL; in ath6kl_wmi_rssi_threshold_event_rx()
1423 new_threshold = (enum wmi_rssi_threshold_val) reply->range; in ath6kl_wmi_rssi_threshold_event_rx()
1424 rssi = a_sle16_to_cpu(reply->rssi); in ath6kl_wmi_rssi_threshold_event_rx()
1426 sq_thresh = &wmi->sq_threshld[SIGNAL_QUALITY_METRICS_RSSI]; in ath6kl_wmi_rssi_threshold_event_rx()
1435 if (rssi < sq_thresh->upper_threshold[0]) { in ath6kl_wmi_rssi_threshold_event_rx()
1439 } else if ((rssi < sq_thresh->upper_threshold[1]) && in ath6kl_wmi_rssi_threshold_event_rx()
1440 (rssi >= sq_thresh->upper_threshold[0])) { in ath6kl_wmi_rssi_threshold_event_rx()
1442 } else if ((rssi < sq_thresh->upper_threshold[2]) && in ath6kl_wmi_rssi_threshold_event_rx()
1443 (rssi >= sq_thresh->upper_threshold[1])) { in ath6kl_wmi_rssi_threshold_event_rx()
1445 } else if ((rssi < sq_thresh->upper_threshold[3]) && in ath6kl_wmi_rssi_threshold_event_rx()
1446 (rssi >= sq_thresh->upper_threshold[2])) { in ath6kl_wmi_rssi_threshold_event_rx()
1448 } else if ((rssi < sq_thresh->upper_threshold[4]) && in ath6kl_wmi_rssi_threshold_event_rx()
1449 (rssi >= sq_thresh->upper_threshold[3])) { in ath6kl_wmi_rssi_threshold_event_rx()
1451 } else if ((rssi < sq_thresh->upper_threshold[5]) && in ath6kl_wmi_rssi_threshold_event_rx()
1452 (rssi >= sq_thresh->upper_threshold[4])) { in ath6kl_wmi_rssi_threshold_event_rx()
1454 } else if (rssi >= sq_thresh->upper_threshold[5]) { in ath6kl_wmi_rssi_threshold_event_rx()
1459 if (rssi > sq_thresh->lower_threshold[0]) { in ath6kl_wmi_rssi_threshold_event_rx()
1462 rssi, sq_thresh->lower_threshold[0]); in ath6kl_wmi_rssi_threshold_event_rx()
1463 } else if ((rssi > sq_thresh->lower_threshold[1]) && in ath6kl_wmi_rssi_threshold_event_rx()
1464 (rssi <= sq_thresh->lower_threshold[0])) { in ath6kl_wmi_rssi_threshold_event_rx()
1466 } else if ((rssi > sq_thresh->lower_threshold[2]) && in ath6kl_wmi_rssi_threshold_event_rx()
1467 (rssi <= sq_thresh->lower_threshold[1])) { in ath6kl_wmi_rssi_threshold_event_rx()
1469 } else if ((rssi > sq_thresh->lower_threshold[3]) && in ath6kl_wmi_rssi_threshold_event_rx()
1470 (rssi <= sq_thresh->lower_threshold[2])) { in ath6kl_wmi_rssi_threshold_event_rx()
1472 } else if ((rssi > sq_thresh->lower_threshold[4]) && in ath6kl_wmi_rssi_threshold_event_rx()
1473 (rssi <= sq_thresh->lower_threshold[3])) { in ath6kl_wmi_rssi_threshold_event_rx()
1475 } else if ((rssi > sq_thresh->lower_threshold[5]) && in ath6kl_wmi_rssi_threshold_event_rx()
1476 (rssi <= sq_thresh->lower_threshold[4])) { in ath6kl_wmi_rssi_threshold_event_rx()
1478 } else if (rssi <= sq_thresh->lower_threshold[5]) { in ath6kl_wmi_rssi_threshold_event_rx()
1485 sq_thresh->lower_threshold_valid_count); in ath6kl_wmi_rssi_threshold_event_rx()
1487 sq_thresh->upper_threshold_valid_count); in ath6kl_wmi_rssi_threshold_event_rx()
1492 cmd.weight = sq_thresh->weight; in ath6kl_wmi_rssi_threshold_event_rx()
1493 cmd.poll_time = cpu_to_le32(sq_thresh->polling_interval); in ath6kl_wmi_rssi_threshold_event_rx()
1498 return -EIO; in ath6kl_wmi_rssi_threshold_event_rx()
1514 return -EINVAL; in ath6kl_wmi_cac_event_rx()
1517 if (reply->ac >= WMM_NUM_AC) { in ath6kl_wmi_cac_event_rx()
1518 ath6kl_err("invalid AC: %d\n", reply->ac); in ath6kl_wmi_cac_event_rx()
1519 return -EINVAL; in ath6kl_wmi_cac_event_rx()
1522 if ((reply->cac_indication == CAC_INDICATION_ADMISSION_RESP) && in ath6kl_wmi_cac_event_rx()
1523 (reply->status_code != IEEE80211_TSPEC_STATUS_ADMISS_ACCEPTED)) { in ath6kl_wmi_cac_event_rx()
1524 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion); in ath6kl_wmi_cac_event_rx()
1525 tsinfo = le16_to_cpu(ts->tsinfo); in ath6kl_wmi_cac_event_rx()
1529 ath6kl_wmi_delete_pstream_cmd(wmi, vif->fw_vif_idx, in ath6kl_wmi_cac_event_rx()
1530 reply->ac, tsid); in ath6kl_wmi_cac_event_rx()
1531 } else if (reply->cac_indication == CAC_INDICATION_NO_RESP) { in ath6kl_wmi_cac_event_rx()
1536 spin_lock_bh(&wmi->lock); in ath6kl_wmi_cac_event_rx()
1537 active_tsids = wmi->stream_exist_for_ac[reply->ac]; in ath6kl_wmi_cac_event_rx()
1538 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_cac_event_rx()
1545 ath6kl_wmi_delete_pstream_cmd(wmi, vif->fw_vif_idx, in ath6kl_wmi_cac_event_rx()
1546 reply->ac, index); in ath6kl_wmi_cac_event_rx()
1553 else if (reply->cac_indication == CAC_INDICATION_DELETE) { in ath6kl_wmi_cac_event_rx()
1554 ts = (struct ieee80211_tspec_ie *) &(reply->tspec_suggestion); in ath6kl_wmi_cac_event_rx()
1555 tsinfo = le16_to_cpu(ts->tsinfo); in ath6kl_wmi_cac_event_rx()
1559 spin_lock_bh(&wmi->lock); in ath6kl_wmi_cac_event_rx()
1560 wmi->stream_exist_for_ac[reply->ac] &= ~(1 << ts_id); in ath6kl_wmi_cac_event_rx()
1561 active_tsids = wmi->stream_exist_for_ac[reply->ac]; in ath6kl_wmi_cac_event_rx()
1562 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_cac_event_rx()
1568 ath6kl_indicate_tx_activity(wmi->parent_dev, reply->ac, in ath6kl_wmi_cac_event_rx()
1570 wmi->fat_pipe_exist &= ~(1 << reply->ac); in ath6kl_wmi_cac_event_rx()
1584 return -EINVAL; in ath6kl_wmi_txe_notify_event_rx()
1586 if (vif->nw_type != INFRA_NETWORK || in ath6kl_wmi_txe_notify_event_rx()
1588 vif->ar->fw_capabilities)) in ath6kl_wmi_txe_notify_event_rx()
1589 return -EOPNOTSUPP; in ath6kl_wmi_txe_notify_event_rx()
1591 if (vif->sme_state != SME_CONNECTED) in ath6kl_wmi_txe_notify_event_rx()
1592 return -ENOTCONN; in ath6kl_wmi_txe_notify_event_rx()
1595 rate = le32_to_cpu(ev->rate); in ath6kl_wmi_txe_notify_event_rx()
1596 pkts = le32_to_cpu(ev->pkts); in ath6kl_wmi_txe_notify_event_rx()
1599 vif->bssid, rate, pkts, vif->txe_intvl); in ath6kl_wmi_txe_notify_event_rx()
1601 cfg80211_cqm_txe_notify(vif->ndev, vif->bssid, pkts, in ath6kl_wmi_txe_notify_event_rx()
1602 rate, vif->txe_intvl, GFP_KERNEL); in ath6kl_wmi_txe_notify_event_rx()
1615 return -ENOMEM; in ath6kl_wmi_set_txe_notify()
1617 cmd = (struct wmi_txe_notify_cmd *) skb->data; in ath6kl_wmi_set_txe_notify()
1618 cmd->rate = cpu_to_le32(rate); in ath6kl_wmi_set_txe_notify()
1619 cmd->pkts = cpu_to_le32(pkts); in ath6kl_wmi_set_txe_notify()
1620 cmd->intvl = cpu_to_le32(intvl); in ath6kl_wmi_set_txe_notify()
1634 return -ENOMEM; in ath6kl_wmi_set_rssi_filter_cmd()
1636 cmd = (struct wmi_set_rssi_filter_cmd *) skb->data; in ath6kl_wmi_set_rssi_filter_cmd()
1637 cmd->rssi = rssi; in ath6kl_wmi_set_rssi_filter_cmd()
1652 return -ENOMEM; in ath6kl_wmi_send_snr_threshold_params()
1654 cmd = (struct wmi_snr_threshold_params_cmd *) skb->data; in ath6kl_wmi_send_snr_threshold_params()
1673 return -EINVAL; in ath6kl_wmi_snr_threshold_event_rx()
1677 new_threshold = (enum wmi_snr_threshold_val) reply->range; in ath6kl_wmi_snr_threshold_event_rx()
1678 snr = reply->snr; in ath6kl_wmi_snr_threshold_event_rx()
1680 sq_thresh = &wmi->sq_threshld[SIGNAL_QUALITY_METRICS_SNR]; in ath6kl_wmi_snr_threshold_event_rx()
1689 if (snr < sq_thresh->upper_threshold[0]) { in ath6kl_wmi_snr_threshold_event_rx()
1693 } else if ((snr < sq_thresh->upper_threshold[1]) && in ath6kl_wmi_snr_threshold_event_rx()
1694 (snr >= sq_thresh->upper_threshold[0])) { in ath6kl_wmi_snr_threshold_event_rx()
1696 } else if ((snr < sq_thresh->upper_threshold[2]) && in ath6kl_wmi_snr_threshold_event_rx()
1697 (snr >= sq_thresh->upper_threshold[1])) { in ath6kl_wmi_snr_threshold_event_rx()
1699 } else if ((snr < sq_thresh->upper_threshold[3]) && in ath6kl_wmi_snr_threshold_event_rx()
1700 (snr >= sq_thresh->upper_threshold[2])) { in ath6kl_wmi_snr_threshold_event_rx()
1702 } else if (snr >= sq_thresh->upper_threshold[3]) { in ath6kl_wmi_snr_threshold_event_rx()
1707 if (snr > sq_thresh->lower_threshold[0]) { in ath6kl_wmi_snr_threshold_event_rx()
1710 sq_thresh->lower_threshold[0]); in ath6kl_wmi_snr_threshold_event_rx()
1711 } else if ((snr > sq_thresh->lower_threshold[1]) && in ath6kl_wmi_snr_threshold_event_rx()
1712 (snr <= sq_thresh->lower_threshold[0])) { in ath6kl_wmi_snr_threshold_event_rx()
1714 } else if ((snr > sq_thresh->lower_threshold[2]) && in ath6kl_wmi_snr_threshold_event_rx()
1715 (snr <= sq_thresh->lower_threshold[1])) { in ath6kl_wmi_snr_threshold_event_rx()
1717 } else if ((snr > sq_thresh->lower_threshold[3]) && in ath6kl_wmi_snr_threshold_event_rx()
1718 (snr <= sq_thresh->lower_threshold[2])) { in ath6kl_wmi_snr_threshold_event_rx()
1720 } else if (snr <= sq_thresh->lower_threshold[3]) { in ath6kl_wmi_snr_threshold_event_rx()
1727 sq_thresh->lower_threshold_valid_count); in ath6kl_wmi_snr_threshold_event_rx()
1729 sq_thresh->upper_threshold_valid_count); in ath6kl_wmi_snr_threshold_event_rx()
1734 cmd.weight = sq_thresh->weight; in ath6kl_wmi_snr_threshold_event_rx()
1735 cmd.poll_time = cpu_to_le32(sq_thresh->polling_interval); in ath6kl_wmi_snr_threshold_event_rx()
1745 return -EIO; in ath6kl_wmi_snr_threshold_event_rx()
1759 ev->ap_list_ver != APLIST_VER1) in ath6kl_wmi_aplist_event_rx()
1760 return -EINVAL; in ath6kl_wmi_aplist_event_rx()
1763 ap_info_v1 = (struct wmi_ap_info_v1 *) ev->ap_list; in ath6kl_wmi_aplist_event_rx()
1766 "number of APs in aplist event: %d\n", ev->num_ap); in ath6kl_wmi_aplist_event_rx()
1769 (ev->num_ap - 1) * ap_info_entry_size)) in ath6kl_wmi_aplist_event_rx()
1770 return -EINVAL; in ath6kl_wmi_aplist_event_rx()
1773 for (index = 0; index < ev->num_ap; index++) { in ath6kl_wmi_aplist_event_rx()
1775 index, ap_info_v1->bssid, ap_info_v1->channel); in ath6kl_wmi_aplist_event_rx()
1786 enum htc_endpoint_id ep_id = wmi->ep_id; in ath6kl_wmi_cmd_send()
1791 (if_idx > (wmi->parent_dev->vif_max - 1)))) { in ath6kl_wmi_cmd_send()
1793 return -EINVAL; in ath6kl_wmi_cmd_send()
1797 cmd_id, skb->len, sync_flag); in ath6kl_wmi_cmd_send()
1799 skb->data, skb->len); in ath6kl_wmi_cmd_send()
1803 return -EINVAL; in ath6kl_wmi_cmd_send()
1817 cmd_hdr = (struct wmi_cmd_hdr *) skb->data; in ath6kl_wmi_cmd_send()
1818 cmd_hdr->cmd_id = cpu_to_le16(cmd_id); in ath6kl_wmi_cmd_send()
1820 cmd_hdr->info1 = cpu_to_le16(info1); in ath6kl_wmi_cmd_send()
1830 ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev, WMM_AC_BE); in ath6kl_wmi_cmd_send()
1833 ath6kl_control_tx(wmi->parent_dev, skb, ep_id); in ath6kl_wmi_cmd_send()
1863 "wmi connect bssid %pM freq %d flags 0x%x ssid_len %d " in ath6kl_wmi_connect_cmd()
1869 wmi->traffic_class = 100; in ath6kl_wmi_connect_cmd()
1872 return -EINVAL; in ath6kl_wmi_connect_cmd()
1875 return -EINVAL; in ath6kl_wmi_connect_cmd()
1879 return -ENOMEM; in ath6kl_wmi_connect_cmd()
1881 cc = (struct wmi_connect_cmd *) skb->data; in ath6kl_wmi_connect_cmd()
1884 memcpy(cc->ssid, ssid, ssid_len); in ath6kl_wmi_connect_cmd()
1886 cc->ssid_len = ssid_len; in ath6kl_wmi_connect_cmd()
1887 cc->nw_type = nw_type; in ath6kl_wmi_connect_cmd()
1888 cc->dot11_auth_mode = dot11_auth_mode; in ath6kl_wmi_connect_cmd()
1889 cc->auth_mode = auth_mode; in ath6kl_wmi_connect_cmd()
1890 cc->prwise_crypto_type = pairwise_crypto; in ath6kl_wmi_connect_cmd()
1891 cc->prwise_crypto_len = pairwise_crypto_len; in ath6kl_wmi_connect_cmd()
1892 cc->grp_crypto_type = group_crypto; in ath6kl_wmi_connect_cmd()
1893 cc->grp_crypto_len = group_crypto_len; in ath6kl_wmi_connect_cmd()
1894 cc->ch = cpu_to_le16(channel); in ath6kl_wmi_connect_cmd()
1895 cc->ctrl_flags = cpu_to_le32(ctrl_flags); in ath6kl_wmi_connect_cmd()
1896 cc->nw_subtype = nw_subtype; in ath6kl_wmi_connect_cmd()
1899 memcpy(cc->bssid, bssid, ETH_ALEN); in ath6kl_wmi_connect_cmd()
1914 ath6kl_dbg(ATH6KL_DBG_WMI, "wmi reconnect bssid %pM freq %d\n", in ath6kl_wmi_reconnect_cmd()
1917 wmi->traffic_class = 100; in ath6kl_wmi_reconnect_cmd()
1921 return -ENOMEM; in ath6kl_wmi_reconnect_cmd()
1923 cc = (struct wmi_reconnect_cmd *) skb->data; in ath6kl_wmi_reconnect_cmd()
1924 cc->channel = cpu_to_le16(channel); in ath6kl_wmi_reconnect_cmd()
1927 memcpy(cc->bssid, bssid, ETH_ALEN); in ath6kl_wmi_reconnect_cmd()
1941 wmi->traffic_class = 100; in ath6kl_wmi_disconnect_cmd()
1968 return -EINVAL; in ath6kl_wmi_startscan_cmd()
1971 return -EINVAL; in ath6kl_wmi_startscan_cmd()
1974 size += sizeof(u16) * (num_chan - 1); in ath6kl_wmi_startscan_cmd()
1978 return -ENOMEM; in ath6kl_wmi_startscan_cmd()
1980 sc = (struct wmi_start_scan_cmd *) skb->data; in ath6kl_wmi_startscan_cmd()
1981 sc->scan_type = scan_type; in ath6kl_wmi_startscan_cmd()
1982 sc->force_fg_scan = cpu_to_le32(force_fgscan); in ath6kl_wmi_startscan_cmd()
1983 sc->is_legacy = cpu_to_le32(is_legacy); in ath6kl_wmi_startscan_cmd()
1984 sc->home_dwell_time = cpu_to_le32(home_dwell_time); in ath6kl_wmi_startscan_cmd()
1985 sc->force_scan_intvl = cpu_to_le32(force_scan_interval); in ath6kl_wmi_startscan_cmd()
1986 sc->num_ch = num_chan; in ath6kl_wmi_startscan_cmd()
1989 sc->ch_list[i] = cpu_to_le16(ch_list[i]); in ath6kl_wmi_startscan_cmd()
2013 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_beginscan_cmd()
2018 ar->fw_capabilities)) { in ath6kl_wmi_beginscan_cmd()
2029 return -EINVAL; in ath6kl_wmi_beginscan_cmd()
2032 return -EINVAL; in ath6kl_wmi_beginscan_cmd()
2035 size += sizeof(u16) * (num_chan - 1); in ath6kl_wmi_beginscan_cmd()
2039 return -ENOMEM; in ath6kl_wmi_beginscan_cmd()
2041 sc = (struct wmi_begin_scan_cmd *) skb->data; in ath6kl_wmi_beginscan_cmd()
2042 sc->scan_type = scan_type; in ath6kl_wmi_beginscan_cmd()
2043 sc->force_fg_scan = cpu_to_le32(force_fgscan); in ath6kl_wmi_beginscan_cmd()
2044 sc->is_legacy = cpu_to_le32(is_legacy); in ath6kl_wmi_beginscan_cmd()
2045 sc->home_dwell_time = cpu_to_le32(home_dwell_time); in ath6kl_wmi_beginscan_cmd()
2046 sc->force_scan_intvl = cpu_to_le32(force_scan_interval); in ath6kl_wmi_beginscan_cmd()
2047 sc->no_cck = cpu_to_le32(no_cck); in ath6kl_wmi_beginscan_cmd()
2048 sc->num_ch = num_chan; in ath6kl_wmi_beginscan_cmd()
2051 sband = ar->wiphy->bands[band]; in ath6kl_wmi_beginscan_cmd()
2060 supp_rates = sc->supp_rates[band].rates; in ath6kl_wmi_beginscan_cmd()
2063 for (i = 0; i < sband->n_bitrates; i++) { in ath6kl_wmi_beginscan_cmd()
2067 (u8) (sband->bitrates[i].bitrate / 5); in ath6kl_wmi_beginscan_cmd()
2069 sc->supp_rates[band].nrates = num_rates; in ath6kl_wmi_beginscan_cmd()
2073 sc->ch_list[i] = cpu_to_le16(ch_list[i]); in ath6kl_wmi_beginscan_cmd()
2089 return -ENOMEM; in ath6kl_wmi_enable_sched_scan_cmd()
2093 sc = (struct wmi_enable_sched_scan_cmd *) skb->data; in ath6kl_wmi_enable_sched_scan_cmd()
2094 sc->enable = enable ? 1 : 0; in ath6kl_wmi_enable_sched_scan_cmd()
2116 return -ENOMEM; in ath6kl_wmi_scanparams_cmd()
2118 sc = (struct wmi_scan_params_cmd *) skb->data; in ath6kl_wmi_scanparams_cmd()
2119 sc->fg_start_period = cpu_to_le16(fg_start_sec); in ath6kl_wmi_scanparams_cmd()
2120 sc->fg_end_period = cpu_to_le16(fg_end_sec); in ath6kl_wmi_scanparams_cmd()
2121 sc->bg_period = cpu_to_le16(bg_sec); in ath6kl_wmi_scanparams_cmd()
2122 sc->minact_chdwell_time = cpu_to_le16(minact_chdw_msec); in ath6kl_wmi_scanparams_cmd()
2123 sc->maxact_chdwell_time = cpu_to_le16(maxact_chdw_msec); in ath6kl_wmi_scanparams_cmd()
2124 sc->pas_chdwell_time = cpu_to_le16(pas_chdw_msec); in ath6kl_wmi_scanparams_cmd()
2125 sc->short_scan_ratio = short_scan_ratio; in ath6kl_wmi_scanparams_cmd()
2126 sc->scan_ctrl_flags = scan_ctrl_flag; in ath6kl_wmi_scanparams_cmd()
2127 sc->max_dfsch_act_time = cpu_to_le32(max_dfsch_act_time); in ath6kl_wmi_scanparams_cmd()
2128 sc->maxact_scan_per_ssid = cpu_to_le16(maxact_scan_per_ssid); in ath6kl_wmi_scanparams_cmd()
2142 return -EINVAL; in ath6kl_wmi_bssfilter_cmd()
2146 return -ENOMEM; in ath6kl_wmi_bssfilter_cmd()
2148 cmd = (struct wmi_bss_filter_cmd *) skb->data; in ath6kl_wmi_bssfilter_cmd()
2149 cmd->bss_filter = filter; in ath6kl_wmi_bssfilter_cmd()
2150 cmd->ie_mask = cpu_to_le32(ie_mask); in ath6kl_wmi_bssfilter_cmd()
2165 return -EINVAL; in ath6kl_wmi_probedssid_cmd()
2167 if (ssid_len > sizeof(cmd->ssid)) in ath6kl_wmi_probedssid_cmd()
2168 return -EINVAL; in ath6kl_wmi_probedssid_cmd()
2171 return -EINVAL; in ath6kl_wmi_probedssid_cmd()
2174 return -EINVAL; in ath6kl_wmi_probedssid_cmd()
2177 wmi->is_probe_ssid = true; in ath6kl_wmi_probedssid_cmd()
2181 return -ENOMEM; in ath6kl_wmi_probedssid_cmd()
2183 cmd = (struct wmi_probed_ssid_cmd *) skb->data; in ath6kl_wmi_probedssid_cmd()
2184 cmd->entry_index = index; in ath6kl_wmi_probedssid_cmd()
2185 cmd->flag = flag; in ath6kl_wmi_probedssid_cmd()
2186 cmd->ssid_len = ssid_len; in ath6kl_wmi_probedssid_cmd()
2187 memcpy(cmd->ssid, ssid, ssid_len); in ath6kl_wmi_probedssid_cmd()
2204 return -ENOMEM; in ath6kl_wmi_listeninterval_cmd()
2206 cmd = (struct wmi_listen_int_cmd *) skb->data; in ath6kl_wmi_listeninterval_cmd()
2207 cmd->listen_intvl = cpu_to_le16(listen_interval); in ath6kl_wmi_listeninterval_cmd()
2208 cmd->num_beacons = cpu_to_le16(listen_beacons); in ath6kl_wmi_listeninterval_cmd()
2224 return -ENOMEM; in ath6kl_wmi_bmisstime_cmd()
2226 cmd = (struct wmi_bmiss_time_cmd *) skb->data; in ath6kl_wmi_bmisstime_cmd()
2227 cmd->bmiss_time = cpu_to_le16(bmiss_time); in ath6kl_wmi_bmisstime_cmd()
2228 cmd->num_beacons = cpu_to_le16(num_beacons); in ath6kl_wmi_bmisstime_cmd()
2243 return -ENOMEM; in ath6kl_wmi_powermode_cmd()
2245 cmd = (struct wmi_power_mode_cmd *) skb->data; in ath6kl_wmi_powermode_cmd()
2246 cmd->pwr_mode = pwr_mode; in ath6kl_wmi_powermode_cmd()
2247 wmi->pwr_mode = pwr_mode; in ath6kl_wmi_powermode_cmd()
2265 return -ENOMEM; in ath6kl_wmi_pmparams_cmd()
2267 pm = (struct wmi_power_params_cmd *)skb->data; in ath6kl_wmi_pmparams_cmd()
2268 pm->idle_period = cpu_to_le16(idle_period); in ath6kl_wmi_pmparams_cmd()
2269 pm->pspoll_number = cpu_to_le16(ps_poll_num); in ath6kl_wmi_pmparams_cmd()
2270 pm->dtim_policy = cpu_to_le16(dtim_policy); in ath6kl_wmi_pmparams_cmd()
2271 pm->tx_wakeup_policy = cpu_to_le16(tx_wakeup_policy); in ath6kl_wmi_pmparams_cmd()
2272 pm->num_tx_to_wakeup = cpu_to_le16(num_tx_to_wakeup); in ath6kl_wmi_pmparams_cmd()
2273 pm->ps_fail_event_policy = cpu_to_le16(ps_fail_event_policy); in ath6kl_wmi_pmparams_cmd()
2288 return -ENOMEM; in ath6kl_wmi_disctimeout_cmd()
2290 cmd = (struct wmi_disc_timeout_cmd *) skb->data; in ath6kl_wmi_disctimeout_cmd()
2291 cmd->discon_timeout = timeout; in ath6kl_wmi_disctimeout_cmd()
2297 ath6kl_debug_set_disconnect_timeout(wmi->parent_dev, timeout); in ath6kl_wmi_disctimeout_cmd()
2320 return -EINVAL; in ath6kl_wmi_addkey_cmd()
2323 return -EINVAL; in ath6kl_wmi_addkey_cmd()
2327 return -ENOMEM; in ath6kl_wmi_addkey_cmd()
2329 cmd = (struct wmi_add_cipher_key_cmd *) skb->data; in ath6kl_wmi_addkey_cmd()
2330 cmd->key_index = key_index; in ath6kl_wmi_addkey_cmd()
2331 cmd->key_type = key_type; in ath6kl_wmi_addkey_cmd()
2332 cmd->key_usage = key_usage; in ath6kl_wmi_addkey_cmd()
2333 cmd->key_len = key_len; in ath6kl_wmi_addkey_cmd()
2334 memcpy(cmd->key, key_material, key_len); in ath6kl_wmi_addkey_cmd()
2337 memcpy(cmd->key_rsc, key_rsc, key_rsc_len); in ath6kl_wmi_addkey_cmd()
2339 cmd->key_op_ctrl = key_op_ctrl; in ath6kl_wmi_addkey_cmd()
2342 memcpy(cmd->key_mac_addr, mac_addr, ETH_ALEN); in ath6kl_wmi_addkey_cmd()
2358 return -ENOMEM; in ath6kl_wmi_add_krk_cmd()
2360 cmd = (struct wmi_add_krk_cmd *) skb->data; in ath6kl_wmi_add_krk_cmd()
2361 memcpy(cmd->krk, krk, WMI_KRK_LEN); in ath6kl_wmi_add_krk_cmd()
2376 return -EINVAL; in ath6kl_wmi_deletekey_cmd()
2380 return -ENOMEM; in ath6kl_wmi_deletekey_cmd()
2382 cmd = (struct wmi_delete_cipher_key_cmd *) skb->data; in ath6kl_wmi_deletekey_cmd()
2383 cmd->key_index = key_index; in ath6kl_wmi_deletekey_cmd()
2399 return -EINVAL; in ath6kl_wmi_setpmkid_cmd()
2402 return -EINVAL; in ath6kl_wmi_setpmkid_cmd()
2406 return -ENOMEM; in ath6kl_wmi_setpmkid_cmd()
2408 cmd = (struct wmi_setpmkid_cmd *) skb->data; in ath6kl_wmi_setpmkid_cmd()
2409 memcpy(cmd->bssid, bssid, ETH_ALEN); in ath6kl_wmi_setpmkid_cmd()
2411 memcpy(cmd->pmkid, pmkid, sizeof(cmd->pmkid)); in ath6kl_wmi_setpmkid_cmd()
2412 cmd->enable = PMKID_ENABLE; in ath6kl_wmi_setpmkid_cmd()
2414 memset(cmd->pmkid, 0, sizeof(cmd->pmkid)); in ath6kl_wmi_setpmkid_cmd()
2415 cmd->enable = PMKID_DISABLE; in ath6kl_wmi_setpmkid_cmd()
2430 if (WARN_ON(skb == NULL || ep_id == wmi->ep_id)) { in ath6kl_wmi_data_sync_send()
2432 return -EINVAL; in ath6kl_wmi_data_sync_send()
2437 data_hdr = (struct wmi_data_hdr *) skb->data; in ath6kl_wmi_data_sync_send()
2438 data_hdr->info = SYNC_MSGTYPE << WMI_DATA_HDR_MSG_TYPE_SHIFT; in ath6kl_wmi_data_sync_send()
2439 data_hdr->info3 = cpu_to_le16(if_idx & WMI_DATA_HDR_IF_IDX_MASK); in ath6kl_wmi_data_sync_send()
2441 ret = ath6kl_control_tx(wmi->parent_dev, skb, ep_id); in ath6kl_wmi_data_sync_send()
2457 spin_lock_bh(&wmi->lock); in ath6kl_wmi_sync_point()
2460 if (wmi->fat_pipe_exist & (1 << index)) { in ath6kl_wmi_sync_point()
2462 data_sync_bufs[num_pri_streams - 1].traffic_class = in ath6kl_wmi_sync_point()
2467 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_sync_point()
2471 return -ENOMEM; in ath6kl_wmi_sync_point()
2473 cmd = (struct wmi_sync_cmd *) skb->data; in ath6kl_wmi_sync_point()
2479 cmd->data_sync_map = wmi->fat_pipe_exist; in ath6kl_wmi_sync_point()
2484 ret = -ENOMEM; in ath6kl_wmi_sync_point()
2510 ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev, in ath6kl_wmi_sync_point()
2546 if (!((params->user_pri <= 0x7) && in ath6kl_wmi_create_pstream_cmd()
2547 (up_to_ac[params->user_pri & 0x7] == params->traffic_class) && in ath6kl_wmi_create_pstream_cmd()
2548 (params->traffic_direc == UPLINK_TRAFFIC || in ath6kl_wmi_create_pstream_cmd()
2549 params->traffic_direc == DNLINK_TRAFFIC || in ath6kl_wmi_create_pstream_cmd()
2550 params->traffic_direc == BIDIR_TRAFFIC) && in ath6kl_wmi_create_pstream_cmd()
2551 (params->traffic_type == TRAFFIC_TYPE_APERIODIC || in ath6kl_wmi_create_pstream_cmd()
2552 params->traffic_type == TRAFFIC_TYPE_PERIODIC) && in ath6kl_wmi_create_pstream_cmd()
2553 (params->voice_psc_cap == DISABLE_FOR_THIS_AC || in ath6kl_wmi_create_pstream_cmd()
2554 params->voice_psc_cap == ENABLE_FOR_THIS_AC || in ath6kl_wmi_create_pstream_cmd()
2555 params->voice_psc_cap == ENABLE_FOR_ALL_AC) && in ath6kl_wmi_create_pstream_cmd()
2556 (params->tsid == WMI_IMPLICIT_PSTREAM || in ath6kl_wmi_create_pstream_cmd()
2557 params->tsid <= WMI_MAX_THINSTREAM))) { in ath6kl_wmi_create_pstream_cmd()
2558 return -EINVAL; in ath6kl_wmi_create_pstream_cmd()
2567 min_phy = ((le32_to_cpu(params->min_phy_rate) / 1000) / 1000); in ath6kl_wmi_create_pstream_cmd()
2570 if (params->nominal_phy >= min_phy) { in ath6kl_wmi_create_pstream_cmd()
2572 nominal_phy = (params->nominal_phy * 1000) / 500; in ath6kl_wmi_create_pstream_cmd()
2574 "TSRS IE enabled::MinPhy %x->NominalPhy ===> %x\n", in ath6kl_wmi_create_pstream_cmd()
2577 params->nominal_phy = nominal_phy; in ath6kl_wmi_create_pstream_cmd()
2579 params->nominal_phy = 0; in ath6kl_wmi_create_pstream_cmd()
2584 return -ENOMEM; in ath6kl_wmi_create_pstream_cmd()
2588 params->traffic_class, params->tsid); in ath6kl_wmi_create_pstream_cmd()
2590 cmd = (struct wmi_create_pstream_cmd *) skb->data; in ath6kl_wmi_create_pstream_cmd()
2594 if ((u32) params->tsid == (u32) WMI_IMPLICIT_PSTREAM) { in ath6kl_wmi_create_pstream_cmd()
2595 spin_lock_bh(&wmi->lock); in ath6kl_wmi_create_pstream_cmd()
2596 fatpipe_exist_for_ac = (wmi->fat_pipe_exist & in ath6kl_wmi_create_pstream_cmd()
2597 (1 << params->traffic_class)); in ath6kl_wmi_create_pstream_cmd()
2598 wmi->fat_pipe_exist |= (1 << params->traffic_class); in ath6kl_wmi_create_pstream_cmd()
2599 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_create_pstream_cmd()
2602 spin_lock_bh(&wmi->lock); in ath6kl_wmi_create_pstream_cmd()
2603 fatpipe_exist_for_ac = (wmi->fat_pipe_exist & in ath6kl_wmi_create_pstream_cmd()
2604 (1 << params->traffic_class)); in ath6kl_wmi_create_pstream_cmd()
2605 wmi->stream_exist_for_ac[params->traffic_class] |= in ath6kl_wmi_create_pstream_cmd()
2606 (1 << params->tsid); in ath6kl_wmi_create_pstream_cmd()
2611 wmi->fat_pipe_exist |= (1 << params->traffic_class); in ath6kl_wmi_create_pstream_cmd()
2612 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_create_pstream_cmd()
2621 ath6kl_indicate_tx_activity(wmi->parent_dev, in ath6kl_wmi_create_pstream_cmd()
2622 params->traffic_class, true); in ath6kl_wmi_create_pstream_cmd()
2639 return -EINVAL; in ath6kl_wmi_delete_pstream_cmd()
2644 return -EINVAL; in ath6kl_wmi_delete_pstream_cmd()
2649 return -ENOMEM; in ath6kl_wmi_delete_pstream_cmd()
2651 cmd = (struct wmi_delete_pstream_cmd *) skb->data; in ath6kl_wmi_delete_pstream_cmd()
2652 cmd->traffic_class = traffic_class; in ath6kl_wmi_delete_pstream_cmd()
2653 cmd->tsid = tsid; in ath6kl_wmi_delete_pstream_cmd()
2655 spin_lock_bh(&wmi->lock); in ath6kl_wmi_delete_pstream_cmd()
2656 active_tsids = wmi->stream_exist_for_ac[traffic_class]; in ath6kl_wmi_delete_pstream_cmd()
2657 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_delete_pstream_cmd()
2664 return -ENODATA; in ath6kl_wmi_delete_pstream_cmd()
2674 spin_lock_bh(&wmi->lock); in ath6kl_wmi_delete_pstream_cmd()
2675 wmi->stream_exist_for_ac[traffic_class] &= ~(1 << tsid); in ath6kl_wmi_delete_pstream_cmd()
2676 active_tsids = wmi->stream_exist_for_ac[traffic_class]; in ath6kl_wmi_delete_pstream_cmd()
2677 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_delete_pstream_cmd()
2684 ath6kl_indicate_tx_activity(wmi->parent_dev, in ath6kl_wmi_delete_pstream_cmd()
2686 wmi->fat_pipe_exist &= ~(1 << traffic_class); in ath6kl_wmi_delete_pstream_cmd()
2702 return -EINVAL; in ath6kl_wmi_set_ip_cmd()
2706 return -ENOMEM; in ath6kl_wmi_set_ip_cmd()
2708 cmd = (struct wmi_set_ip_cmd *) skb->data; in ath6kl_wmi_set_ip_cmd()
2709 cmd->ips[0] = ips0; in ath6kl_wmi_set_ip_cmd()
2710 cmd->ips[1] = ips1; in ath6kl_wmi_set_ip_cmd()
2729 spin_lock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2730 stream_exist = wmi->fat_pipe_exist; in ath6kl_wmi_relinquish_implicit_pstream_credits()
2731 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2739 spin_lock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2740 active_tsids = wmi->stream_exist_for_ac[i]; in ath6kl_wmi_relinquish_implicit_pstream_credits()
2741 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2753 ath6kl_indicate_tx_activity(wmi->parent_dev, in ath6kl_wmi_relinquish_implicit_pstream_credits()
2760 spin_lock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2761 wmi->fat_pipe_exist = stream_exist; in ath6kl_wmi_relinquish_implicit_pstream_credits()
2762 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_relinquish_implicit_pstream_credits()
2778 ratemask[band] = mask->control[band].legacy; in ath6kl_set_bitrate_mask64()
2781 mask->control[band].legacy << 4; in ath6kl_set_bitrate_mask64()
2784 mcsrate = mask->control[band].ht_mcs[1]; in ath6kl_set_bitrate_mask64()
2786 mcsrate |= mask->control[band].ht_mcs[0]; in ath6kl_set_bitrate_mask64()
2797 return -ENOMEM; in ath6kl_set_bitrate_mask64()
2799 cmd = (struct wmi_set_tx_select_rates64_cmd *) skb->data; in ath6kl_set_bitrate_mask64()
2808 cmd->ratemask[mode] = cpu_to_le64(ratemask[band]); in ath6kl_set_bitrate_mask64()
2830 ratemask[band] = mask->control[band].legacy; in ath6kl_set_bitrate_mask32()
2833 mask->control[band].legacy << 4; in ath6kl_set_bitrate_mask32()
2836 mcsrate = mask->control[band].ht_mcs[0]; in ath6kl_set_bitrate_mask32()
2847 return -ENOMEM; in ath6kl_set_bitrate_mask32()
2849 cmd = (struct wmi_set_tx_select_rates32_cmd *) skb->data; in ath6kl_set_bitrate_mask32()
2858 cmd->ratemask[mode] = cpu_to_le32(ratemask[band]); in ath6kl_set_bitrate_mask32()
2870 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_set_bitrate_mask()
2873 ar->fw_capabilities)) in ath6kl_wmi_set_bitrate_mask()
2889 return -EINVAL; in ath6kl_wmi_set_host_sleep_mode_cmd()
2894 return -ENOMEM; in ath6kl_wmi_set_host_sleep_mode_cmd()
2896 cmd = (struct wmi_set_host_sleep_mode_cmd *) skb->data; in ath6kl_wmi_set_host_sleep_mode_cmd()
2900 cmd->asleep = cpu_to_le32(1); in ath6kl_wmi_set_host_sleep_mode_cmd()
2902 cmd->awake = cpu_to_le32(1); in ath6kl_wmi_set_host_sleep_mode_cmd()
2915 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
2917 set_bit(HOST_SLEEP_MODE_CMD_PROCESSED, &vif->flags); in ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
2918 wake_up(&ar->event_wq); in ath6kl_wmi_host_sleep_mode_cmd_prcd_evt_rx()
2934 return -EINVAL; in ath6kl_wmi_set_wow_mode_cmd()
2939 return -ENOMEM; in ath6kl_wmi_set_wow_mode_cmd()
2941 cmd = (struct wmi_set_wow_mode_cmd *) skb->data; in ath6kl_wmi_set_wow_mode_cmd()
2942 cmd->enable_wow = cpu_to_le32(wow_mode); in ath6kl_wmi_set_wow_mode_cmd()
2943 cmd->filter = cpu_to_le32(filter); in ath6kl_wmi_set_wow_mode_cmd()
2944 cmd->host_req_delay = cpu_to_le16(host_req_delay); in ath6kl_wmi_set_wow_mode_cmd()
2970 return -ENOMEM; in ath6kl_wmi_add_wow_pattern_cmd()
2972 cmd = (struct wmi_add_wow_pattern_cmd *) skb->data; in ath6kl_wmi_add_wow_pattern_cmd()
2973 cmd->filter_list_id = list_id; in ath6kl_wmi_add_wow_pattern_cmd()
2974 cmd->filter_size = filter_size; in ath6kl_wmi_add_wow_pattern_cmd()
2975 cmd->filter_offset = filter_offset; in ath6kl_wmi_add_wow_pattern_cmd()
2977 memcpy(cmd->filter, filter, filter_size); in ath6kl_wmi_add_wow_pattern_cmd()
2979 filter_mask = (u8 *) (cmd->filter + filter_size); in ath6kl_wmi_add_wow_pattern_cmd()
2997 return -ENOMEM; in ath6kl_wmi_del_wow_pattern_cmd()
2999 cmd = (struct wmi_del_wow_pattern_cmd *) skb->data; in ath6kl_wmi_del_wow_pattern_cmd()
3000 cmd->filter_list_id = cpu_to_le16(list_id); in ath6kl_wmi_del_wow_pattern_cmd()
3001 cmd->filter_id = cpu_to_le16(filter_id); in ath6kl_wmi_del_wow_pattern_cmd()
3017 cmd_hdr = (struct wmix_cmd_hdr *) skb->data; in ath6kl_wmi_cmd_send_xtnd()
3018 cmd_hdr->cmd_id = cpu_to_le32(cmd_id); in ath6kl_wmi_cmd_send_xtnd()
3033 return -ENOMEM; in ath6kl_wmi_get_challenge_resp_cmd()
3035 cmd = (struct wmix_hb_challenge_resp_cmd *) skb->data; in ath6kl_wmi_get_challenge_resp_cmd()
3036 cmd->cookie = cpu_to_le32(cookie); in ath6kl_wmi_get_challenge_resp_cmd()
3037 cmd->source = cpu_to_le32(source); in ath6kl_wmi_get_challenge_resp_cmd()
3052 return -ENOMEM; in ath6kl_wmi_config_debug_module_cmd()
3054 cmd = (struct ath6kl_wmix_dbglog_cfg_module_cmd *) skb->data; in ath6kl_wmi_config_debug_module_cmd()
3055 cmd->valid = cpu_to_le32(valid); in ath6kl_wmi_config_debug_module_cmd()
3056 cmd->config = cpu_to_le32(config); in ath6kl_wmi_config_debug_module_cmd()
3076 return -ENOMEM; in ath6kl_wmi_set_tx_pwr_cmd()
3078 cmd = (struct wmi_set_tx_pwr_cmd *) skb->data; in ath6kl_wmi_set_tx_pwr_cmd()
3079 cmd->dbM = dbM; in ath6kl_wmi_set_tx_pwr_cmd()
3106 return -ENOMEM; in ath6kl_wmi_set_lpreamble_cmd()
3108 cmd = (struct wmi_set_lpreamble_cmd *) skb->data; in ath6kl_wmi_set_lpreamble_cmd()
3109 cmd->status = status; in ath6kl_wmi_set_lpreamble_cmd()
3110 cmd->preamble_policy = preamble_policy; in ath6kl_wmi_set_lpreamble_cmd()
3125 return -ENOMEM; in ath6kl_wmi_set_rts_cmd()
3127 cmd = (struct wmi_set_rts_cmd *) skb->data; in ath6kl_wmi_set_rts_cmd()
3128 cmd->threshold = cpu_to_le16(threshold); in ath6kl_wmi_set_rts_cmd()
3142 return -EINVAL; in ath6kl_wmi_set_wmm_txop()
3146 return -ENOMEM; in ath6kl_wmi_set_wmm_txop()
3148 cmd = (struct wmi_set_wmm_txop_cmd *) skb->data; in ath6kl_wmi_set_wmm_txop()
3149 cmd->txop_enable = cfg; in ath6kl_wmi_set_wmm_txop()
3165 return -ENOMEM; in ath6kl_wmi_set_keepalive_cmd()
3167 cmd = (struct wmi_set_keepalive_cmd *) skb->data; in ath6kl_wmi_set_keepalive_cmd()
3168 cmd->keep_alive_intvl = keep_alive_intvl; in ath6kl_wmi_set_keepalive_cmd()
3174 ath6kl_debug_set_keepalive(wmi->parent_dev, keep_alive_intvl); in ath6kl_wmi_set_keepalive_cmd()
3188 return -ENOMEM; in ath6kl_wmi_set_htcap_cmd()
3190 cmd = (struct wmi_set_htcap_cmd *) skb->data; in ath6kl_wmi_set_htcap_cmd()
3197 cmd->band = band; in ath6kl_wmi_set_htcap_cmd()
3198 cmd->ht_enable = !!htcap->ht_enable; in ath6kl_wmi_set_htcap_cmd()
3199 cmd->ht20_sgi = !!(htcap->cap_info & IEEE80211_HT_CAP_SGI_20); in ath6kl_wmi_set_htcap_cmd()
3200 cmd->ht40_supported = in ath6kl_wmi_set_htcap_cmd()
3201 !!(htcap->cap_info & IEEE80211_HT_CAP_SUP_WIDTH_20_40); in ath6kl_wmi_set_htcap_cmd()
3202 cmd->ht40_sgi = !!(htcap->cap_info & IEEE80211_HT_CAP_SGI_40); in ath6kl_wmi_set_htcap_cmd()
3203 cmd->intolerant_40mhz = in ath6kl_wmi_set_htcap_cmd()
3204 !!(htcap->cap_info & IEEE80211_HT_CAP_40MHZ_INTOLERANT); in ath6kl_wmi_set_htcap_cmd()
3205 cmd->max_ampdu_len_exp = htcap->ampdu_factor; in ath6kl_wmi_set_htcap_cmd()
3209 cmd->band, cmd->ht_enable, cmd->ht40_supported, in ath6kl_wmi_set_htcap_cmd()
3210 cmd->ht20_sgi, cmd->ht40_sgi, cmd->intolerant_40mhz, in ath6kl_wmi_set_htcap_cmd()
3211 cmd->max_ampdu_len_exp); in ath6kl_wmi_set_htcap_cmd()
3223 return -ENOMEM; in ath6kl_wmi_test_cmd()
3225 memcpy(skb->data, buf, len); in ath6kl_wmi_test_cmd()
3240 return -ENOMEM; in ath6kl_wmi_mcast_filter_cmd()
3242 cmd = (struct wmi_mcast_filter_cmd *) skb->data; in ath6kl_wmi_mcast_filter_cmd()
3243 cmd->mcast_all_enable = mc_all_on; in ath6kl_wmi_mcast_filter_cmd()
3261 return -EINVAL; in ath6kl_wmi_add_del_mcast_filter_cmd()
3266 return -ENOMEM; in ath6kl_wmi_add_del_mcast_filter_cmd()
3268 cmd = (struct wmi_mcast_filter_add_del_cmd *) skb->data; in ath6kl_wmi_add_del_mcast_filter_cmd()
3269 memcpy(cmd->mcast_mac, filter, ATH6KL_MCAST_FILTER_MAC_ADDR_SIZE); in ath6kl_wmi_add_del_mcast_filter_cmd()
3286 return -ENOMEM; in ath6kl_wmi_sta_bmiss_enhance_cmd()
3288 cmd = (struct wmi_sta_bmiss_enhance_cmd *) skb->data; in ath6kl_wmi_sta_bmiss_enhance_cmd()
3289 cmd->enable = enhance ? 1 : 0; in ath6kl_wmi_sta_bmiss_enhance_cmd()
3304 return -ENOMEM; in ath6kl_wmi_set_regdomain_cmd()
3306 cmd = (struct wmi_set_regdomain_cmd *) skb->data; in ath6kl_wmi_set_regdomain_cmd()
3307 memcpy(cmd->iso_name, alpha2, 2); in ath6kl_wmi_set_regdomain_cmd()
3316 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_get_rate()
3330 ar->fw_capabilities)) { in ath6kl_wmi_get_rate()
3352 return -EINVAL; in ath6kl_wmi_get_pmkid_list_event_rx()
3355 expected_len = sizeof(reply->num_pmkid) + in ath6kl_wmi_get_pmkid_list_event_rx()
3356 le32_to_cpu(reply->num_pmkid) * WMI_PMKID_LEN; in ath6kl_wmi_get_pmkid_list_event_rx()
3359 return -EINVAL; in ath6kl_wmi_get_pmkid_list_event_rx()
3369 aggr_recv_addba_req_evt(vif, cmd->tid, in ath6kl_wmi_addba_req_event_rx()
3370 le16_to_cpu(cmd->st_seq_no), cmd->win_sz); in ath6kl_wmi_addba_req_event_rx()
3380 aggr_recv_delba_req_evt(vif, cmd->tid); in ath6kl_wmi_delba_req_event_rx()
3396 return -ENOMEM; in ath6kl_wmi_ap_profile_commit()
3398 cm = (struct wmi_connect_cmd *) skb->data; in ath6kl_wmi_ap_profile_commit()
3404 "%s: nw_type=%u auth_mode=%u ch=%u ctrl_flags=0x%x-> res=%d\n", in ath6kl_wmi_ap_profile_commit()
3405 __func__, p->nw_type, p->auth_mode, le16_to_cpu(p->ch), in ath6kl_wmi_ap_profile_commit()
3406 le32_to_cpu(p->ctrl_flags), res); in ath6kl_wmi_ap_profile_commit()
3418 return -ENOMEM; in ath6kl_wmi_ap_set_mlme()
3420 cm = (struct wmi_ap_set_mlme_cmd *) skb->data; in ath6kl_wmi_ap_set_mlme()
3421 memcpy(cm->mac, mac, ETH_ALEN); in ath6kl_wmi_ap_set_mlme()
3422 cm->reason = cpu_to_le16(reason); in ath6kl_wmi_ap_set_mlme()
3423 cm->cmd = cmd; in ath6kl_wmi_ap_set_mlme()
3425 ath6kl_dbg(ATH6KL_DBG_WMI, "ap_set_mlme: cmd=%d reason=%d\n", cm->cmd, in ath6kl_wmi_ap_set_mlme()
3426 cm->reason); in ath6kl_wmi_ap_set_mlme()
3439 return -ENOMEM; in ath6kl_wmi_ap_hidden_ssid()
3441 cmd = (struct wmi_ap_hidden_ssid_cmd *) skb->data; in ath6kl_wmi_ap_hidden_ssid()
3442 cmd->hidden_ssid = enable ? 1 : 0; in ath6kl_wmi_ap_hidden_ssid()
3456 return -ENOMEM; in ath6kl_wmi_ap_set_apsd()
3458 cmd = (struct wmi_ap_set_apsd_cmd *)skb->data; in ath6kl_wmi_ap_set_apsd()
3459 cmd->enable = enable; in ath6kl_wmi_ap_set_apsd()
3473 return -ENOMEM; in ath6kl_wmi_set_apsd_bfrd_traf()
3475 cmd = (struct wmi_ap_apsd_buffered_traffic_cmd *)skb->data; in ath6kl_wmi_set_apsd_bfrd_traf()
3476 cmd->aid = cpu_to_le16(aid); in ath6kl_wmi_set_apsd_bfrd_traf()
3477 cmd->bitmap = cpu_to_le16(bitmap); in ath6kl_wmi_set_apsd_bfrd_traf()
3478 cmd->flags = cpu_to_le32(flags); in ath6kl_wmi_set_apsd_bfrd_traf()
3491 return -EINVAL; in ath6kl_wmi_pspoll_event_rx()
3495 ath6kl_pspoll_event(vif, le16_to_cpu(ev->aid)); in ath6kl_wmi_pspoll_event_rx()
3517 return -ENOMEM; in ath6kl_wmi_set_pvb_cmd()
3519 cmd = (struct wmi_ap_set_pvb_cmd *) skb->data; in ath6kl_wmi_set_pvb_cmd()
3520 cmd->aid = cpu_to_le16(aid); in ath6kl_wmi_set_pvb_cmd()
3521 cmd->rsvd = cpu_to_le16(0); in ath6kl_wmi_set_pvb_cmd()
3522 cmd->flag = cpu_to_le32(flag); in ath6kl_wmi_set_pvb_cmd()
3540 return -ENOMEM; in ath6kl_wmi_set_rx_frame_format_cmd()
3542 cmd = (struct wmi_rx_frame_format_cmd *) skb->data; in ath6kl_wmi_set_rx_frame_format_cmd()
3543 cmd->dot11_hdr = rx_dot11_hdr ? 1 : 0; in ath6kl_wmi_set_rx_frame_format_cmd()
3544 cmd->defrag_on_host = defrag_on_host ? 1 : 0; in ath6kl_wmi_set_rx_frame_format_cmd()
3545 cmd->meta_ver = rx_meta_ver; in ath6kl_wmi_set_rx_frame_format_cmd()
3562 return -ENOMEM; in ath6kl_wmi_set_appie_cmd()
3567 p = (struct wmi_set_appie_cmd *) skb->data; in ath6kl_wmi_set_appie_cmd()
3568 p->mgmt_frm_type = mgmt_frm_type; in ath6kl_wmi_set_appie_cmd()
3569 p->ie_len = ie_len; in ath6kl_wmi_set_appie_cmd()
3572 memcpy(p->ie_info, ie, ie_len); in ath6kl_wmi_set_appie_cmd()
3586 return -ENOMEM; in ath6kl_wmi_set_ie_cmd()
3590 p = (struct wmi_set_ie_cmd *) skb->data; in ath6kl_wmi_set_ie_cmd()
3591 p->ie_id = ie_id; in ath6kl_wmi_set_ie_cmd()
3592 p->ie_field = ie_field; in ath6kl_wmi_set_ie_cmd()
3593 p->ie_len = ie_len; in ath6kl_wmi_set_ie_cmd()
3595 memcpy(p->ie_info, ie_info, ie_len); in ath6kl_wmi_set_ie_cmd()
3608 return -ENOMEM; in ath6kl_wmi_disable_11b_rates_cmd()
3612 cmd = (struct wmi_disable_11b_rates_cmd *) skb->data; in ath6kl_wmi_disable_11b_rates_cmd()
3613 cmd->disable = disable ? 1 : 0; in ath6kl_wmi_disable_11b_rates_cmd()
3619 int ath6kl_wmi_remain_on_chnl_cmd(struct wmi *wmi, u8 if_idx, u32 freq, u32 dur) in ath6kl_wmi_remain_on_chnl_cmd() argument
3626 return -ENOMEM; in ath6kl_wmi_remain_on_chnl_cmd()
3628 ath6kl_dbg(ATH6KL_DBG_WMI, "remain_on_chnl_cmd: freq=%u dur=%u\n", in ath6kl_wmi_remain_on_chnl_cmd()
3629 freq, dur); in ath6kl_wmi_remain_on_chnl_cmd()
3630 p = (struct wmi_remain_on_chnl_cmd *) skb->data; in ath6kl_wmi_remain_on_chnl_cmd()
3631 p->freq = cpu_to_le32(freq); in ath6kl_wmi_remain_on_chnl_cmd()
3632 p->duration = cpu_to_le32(dur); in ath6kl_wmi_remain_on_chnl_cmd()
3642 u32 freq, u32 wait, const u8 *data, in ath6kl_wmi_send_action_cmd() argument
3650 return -EINVAL; /* Offload for wait not supported */ in ath6kl_wmi_send_action_cmd()
3654 return -ENOMEM; in ath6kl_wmi_send_action_cmd()
3659 return -ENOMEM; in ath6kl_wmi_send_action_cmd()
3662 kfree(wmi->last_mgmt_tx_frame); in ath6kl_wmi_send_action_cmd()
3663 wmi->last_mgmt_tx_frame = buf; in ath6kl_wmi_send_action_cmd()
3664 wmi->last_mgmt_tx_frame_len = data_len; in ath6kl_wmi_send_action_cmd()
3667 "send_action_cmd: id=%u freq=%u wait=%u len=%u\n", in ath6kl_wmi_send_action_cmd()
3668 id, freq, wait, data_len); in ath6kl_wmi_send_action_cmd()
3669 p = (struct wmi_send_action_cmd *) skb->data; in ath6kl_wmi_send_action_cmd()
3670 p->id = cpu_to_le32(id); in ath6kl_wmi_send_action_cmd()
3671 p->freq = cpu_to_le32(freq); in ath6kl_wmi_send_action_cmd()
3672 p->wait = cpu_to_le32(wait); in ath6kl_wmi_send_action_cmd()
3673 p->len = cpu_to_le16(data_len); in ath6kl_wmi_send_action_cmd()
3674 memcpy(p->data, data, data_len); in ath6kl_wmi_send_action_cmd()
3680 u32 freq, u32 wait, const u8 *data, in __ath6kl_wmi_send_mgmt_cmd() argument
3688 return -EINVAL; /* Offload for wait not supported */ in __ath6kl_wmi_send_mgmt_cmd()
3692 return -ENOMEM; in __ath6kl_wmi_send_mgmt_cmd()
3697 return -ENOMEM; in __ath6kl_wmi_send_mgmt_cmd()
3700 kfree(wmi->last_mgmt_tx_frame); in __ath6kl_wmi_send_mgmt_cmd()
3701 wmi->last_mgmt_tx_frame = buf; in __ath6kl_wmi_send_mgmt_cmd()
3702 wmi->last_mgmt_tx_frame_len = data_len; in __ath6kl_wmi_send_mgmt_cmd()
3705 "send_action_cmd: id=%u freq=%u wait=%u len=%u\n", in __ath6kl_wmi_send_mgmt_cmd()
3706 id, freq, wait, data_len); in __ath6kl_wmi_send_mgmt_cmd()
3707 p = (struct wmi_send_mgmt_cmd *) skb->data; in __ath6kl_wmi_send_mgmt_cmd()
3708 p->id = cpu_to_le32(id); in __ath6kl_wmi_send_mgmt_cmd()
3709 p->freq = cpu_to_le32(freq); in __ath6kl_wmi_send_mgmt_cmd()
3710 p->wait = cpu_to_le32(wait); in __ath6kl_wmi_send_mgmt_cmd()
3711 p->no_cck = cpu_to_le32(no_cck); in __ath6kl_wmi_send_mgmt_cmd()
3712 p->len = cpu_to_le16(data_len); in __ath6kl_wmi_send_mgmt_cmd()
3713 memcpy(p->data, data, data_len); in __ath6kl_wmi_send_mgmt_cmd()
3718 int ath6kl_wmi_send_mgmt_cmd(struct wmi *wmi, u8 if_idx, u32 id, u32 freq, in ath6kl_wmi_send_mgmt_cmd() argument
3723 struct ath6kl *ar = wmi->parent_dev; in ath6kl_wmi_send_mgmt_cmd()
3726 ar->fw_capabilities)) { in ath6kl_wmi_send_mgmt_cmd()
3733 status = __ath6kl_wmi_send_mgmt_cmd(ar->wmi, if_idx, id, freq, in ath6kl_wmi_send_mgmt_cmd()
3737 status = ath6kl_wmi_send_action_cmd(ar->wmi, if_idx, id, freq, in ath6kl_wmi_send_mgmt_cmd()
3744 int ath6kl_wmi_send_probe_response_cmd(struct wmi *wmi, u8 if_idx, u32 freq, in ath6kl_wmi_send_probe_response_cmd() argument
3757 return -ENOMEM; in ath6kl_wmi_send_probe_response_cmd()
3760 "send_probe_response_cmd: freq=%u dst=%pM len=%u\n", in ath6kl_wmi_send_probe_response_cmd()
3761 freq, dst, data_len); in ath6kl_wmi_send_probe_response_cmd()
3762 p = (struct wmi_p2p_probe_response_cmd *) skb->data; in ath6kl_wmi_send_probe_response_cmd()
3763 p->freq = cpu_to_le32(freq); in ath6kl_wmi_send_probe_response_cmd()
3764 memcpy(p->destination_addr, dst, ETH_ALEN); in ath6kl_wmi_send_probe_response_cmd()
3765 p->len = cpu_to_le16(data_len); in ath6kl_wmi_send_probe_response_cmd()
3766 memcpy(p->data, data, data_len); in ath6kl_wmi_send_probe_response_cmd()
3779 return -ENOMEM; in ath6kl_wmi_probe_report_req_cmd()
3783 p = (struct wmi_probe_req_report_cmd *) skb->data; in ath6kl_wmi_probe_report_req_cmd()
3784 p->enable = enable ? 1 : 0; in ath6kl_wmi_probe_report_req_cmd()
3796 return -ENOMEM; in ath6kl_wmi_info_req_cmd()
3800 p = (struct wmi_get_p2p_info *) skb->data; in ath6kl_wmi_info_req_cmd()
3801 p->info_req_flags = cpu_to_le32(info_req_flags); in ath6kl_wmi_info_req_cmd()
3820 return -ENOMEM; in ath6kl_wmi_set_inact_period()
3822 cmd = (struct wmi_set_inact_period_cmd *) skb->data; in ath6kl_wmi_set_inact_period()
3823 cmd->inact_period = cpu_to_le32(inact_timeout); in ath6kl_wmi_set_inact_period()
3824 cmd->num_null_func = 0; in ath6kl_wmi_set_inact_period()
3839 ath6kl_recovery_hb_event(wmi->parent_dev, in ath6kl_wmi_hb_challenge_resp_event()
3840 le32_to_cpu(cmd->cookie)); in ath6kl_wmi_hb_challenge_resp_event()
3851 if (skb->len < sizeof(struct wmix_cmd_hdr)) { in ath6kl_wmi_control_rx_xtnd()
3853 return -EINVAL; in ath6kl_wmi_control_rx_xtnd()
3856 cmd = (struct wmix_cmd_hdr *) skb->data; in ath6kl_wmi_control_rx_xtnd()
3857 id = le32_to_cpu(cmd->cmd_id); in ath6kl_wmi_control_rx_xtnd()
3861 datap = skb->data; in ath6kl_wmi_control_rx_xtnd()
3862 len = skb->len; in ath6kl_wmi_control_rx_xtnd()
3871 ath6kl_debug_fwlog_event(wmi->parent_dev, datap, len); in ath6kl_wmi_control_rx_xtnd()
3875 ret = -EINVAL; in ath6kl_wmi_control_rx_xtnd()
3884 return ath6kl_debug_roam_tbl_event(wmi->parent_dev, datap, len); in ath6kl_wmi_roam_tbl_event_rx()
3893 vif = ath6kl_get_vif_by_index(wmi->parent_dev, if_idx); in ath6kl_wmi_proc_events_vif()
3898 return -EINVAL; in ath6kl_wmi_proc_events_vif()
3965 return -EINVAL; in ath6kl_wmi_proc_events_vif()
3980 cmd = (struct wmi_cmd_hdr *) skb->data; in ath6kl_wmi_proc_events()
3981 id = le16_to_cpu(cmd->cmd_id); in ath6kl_wmi_proc_events()
3982 if_idx = le16_to_cpu(cmd->info1) & WMI_CMD_HDR_IF_ID_MASK; in ath6kl_wmi_proc_events()
3985 datap = skb->data; in ath6kl_wmi_proc_events()
3986 len = skb->len; in ath6kl_wmi_proc_events()
4123 return -EINVAL; in ath6kl_wmi_control_rx()
4125 if (skb->len < sizeof(struct wmi_cmd_hdr)) { in ath6kl_wmi_control_rx()
4128 return -EINVAL; in ath6kl_wmi_control_rx()
4131 trace_ath6kl_wmi_event(skb->data, skb->len); in ath6kl_wmi_control_rx()
4138 spin_lock_bh(&wmi->lock); in ath6kl_wmi_reset()
4140 wmi->fat_pipe_exist = 0; in ath6kl_wmi_reset()
4141 memset(wmi->stream_exist_for_ac, 0, sizeof(wmi->stream_exist_for_ac)); in ath6kl_wmi_reset()
4143 spin_unlock_bh(&wmi->lock); in ath6kl_wmi_reset()
4154 spin_lock_init(&wmi->lock); in ath6kl_wmi_init()
4156 wmi->parent_dev = dev; in ath6kl_wmi_init()
4158 wmi->pwr_mode = REC_POWER; in ath6kl_wmi_init()
4170 kfree(wmi->last_mgmt_tx_frame); in ath6kl_wmi_shutdown()