Lines Matching full:vif

19 qtnf_event_handle_sta_assoc(struct qtnf_wmac *mac, struct qtnf_vif *vif,  in qtnf_event_handle_sta_assoc()  argument
33 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_sta_assoc()
34 mac->macid, vif->vifid, len, sizeof(*sta_assoc)); in qtnf_event_handle_sta_assoc()
38 if (vif->wdev.iftype != NL80211_IFTYPE_AP) { in qtnf_event_handle_sta_assoc()
39 pr_err("VIF%u.%u: STA_ASSOC event when not in AP mode\n", in qtnf_event_handle_sta_assoc()
40 mac->macid, vif->vifid); in qtnf_event_handle_sta_assoc()
51 pr_debug("VIF%u.%u: MAC:%pM FC:%x\n", mac->macid, vif->vifid, sta_addr, in qtnf_event_handle_sta_assoc()
54 qtnf_sta_list_add(vif, sta_addr); in qtnf_event_handle_sta_assoc()
58 sinfo->generation = vif->generation; in qtnf_event_handle_sta_assoc()
93 cfg80211_new_sta(vif->netdev, sta_assoc->sta_addr, sinfo, in qtnf_event_handle_sta_assoc()
102 qtnf_event_handle_sta_deauth(struct qtnf_wmac *mac, struct qtnf_vif *vif, in qtnf_event_handle_sta_deauth() argument
110 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_sta_deauth()
111 mac->macid, vif->vifid, len, in qtnf_event_handle_sta_deauth()
116 if (vif->wdev.iftype != NL80211_IFTYPE_AP) { in qtnf_event_handle_sta_deauth()
117 pr_err("VIF%u.%u: STA_DEAUTH event when not in AP mode\n", in qtnf_event_handle_sta_deauth()
118 mac->macid, vif->vifid); in qtnf_event_handle_sta_deauth()
125 pr_debug("VIF%u.%u: MAC:%pM reason:%x\n", mac->macid, vif->vifid, in qtnf_event_handle_sta_deauth()
128 if (qtnf_sta_list_del(vif, sta_addr)) in qtnf_event_handle_sta_deauth()
129 cfg80211_del_sta(vif->netdev, sta_deauth->sta_addr, in qtnf_event_handle_sta_deauth()
136 qtnf_event_handle_bss_join(struct qtnf_vif *vif, in qtnf_event_handle_bss_join() argument
140 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_bss_join()
153 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_bss_join()
154 vif->mac->macid, vif->vifid, len, in qtnf_event_handle_bss_join()
159 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) { in qtnf_event_handle_bss_join()
160 pr_err("VIF%u.%u: BSS_JOIN event when not in STA mode\n", in qtnf_event_handle_bss_join()
161 vif->mac->macid, vif->vifid); in qtnf_event_handle_bss_join()
165 pr_debug("VIF%u.%u: BSSID:%pM chan:%u status:%u\n", in qtnf_event_handle_bss_join()
166 vif->mac->macid, vif->vifid, join_info->bssid, in qtnf_event_handle_bss_join()
175 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join()
188 pr_warn("VIF%u.%u: add missing BSS:%pM chan:%u\n", in qtnf_event_handle_bss_join()
189 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join()
192 if (!vif->wdev.u.client.ssid_len) { in qtnf_event_handle_bss_join()
193 pr_warn("VIF%u.%u: SSID unknown for BSS:%pM\n", in qtnf_event_handle_bss_join()
194 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join()
200 ie = kzalloc(2 + vif->wdev.u.client.ssid_len, GFP_KERNEL); in qtnf_event_handle_bss_join()
202 pr_warn("VIF%u.%u: IE alloc failed for BSS:%pM\n", in qtnf_event_handle_bss_join()
203 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join()
210 ie[1] = vif->wdev.u.client.ssid_len; in qtnf_event_handle_bss_join()
211 memcpy(ie + 2, vif->wdev.u.client.ssid, in qtnf_event_handle_bss_join()
212 vif->wdev.u.client.ssid_len); in qtnf_event_handle_bss_join()
218 ie, 2 + vif->wdev.u.client.ssid_len, in qtnf_event_handle_bss_join()
221 pr_warn("VIF%u.%u: can't connect to unknown BSS: %pM\n", in qtnf_event_handle_bss_join()
222 vif->mac->macid, vif->vifid, in qtnf_event_handle_bss_join()
268 cfg80211_connect_result(vif->netdev, join_info->bssid, NULL, 0, rsp_ies, in qtnf_event_handle_bss_join()
271 if (!ether_addr_equal(vif->bssid, join_info->bssid)) in qtnf_event_handle_bss_join()
272 ether_addr_copy(vif->bssid, join_info->bssid); in qtnf_event_handle_bss_join()
277 netif_carrier_on(vif->netdev); in qtnf_event_handle_bss_join()
284 qtnf_event_handle_bss_leave(struct qtnf_vif *vif, in qtnf_event_handle_bss_leave() argument
289 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_bss_leave()
290 vif->mac->macid, vif->vifid, len, in qtnf_event_handle_bss_leave()
295 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) { in qtnf_event_handle_bss_leave()
296 pr_err("VIF%u.%u: BSS_LEAVE event when not in STA mode\n", in qtnf_event_handle_bss_leave()
297 vif->mac->macid, vif->vifid); in qtnf_event_handle_bss_leave()
301 pr_debug("VIF%u.%u: disconnected\n", vif->mac->macid, vif->vifid); in qtnf_event_handle_bss_leave()
303 cfg80211_disconnected(vif->netdev, le16_to_cpu(leave_info->reason), in qtnf_event_handle_bss_leave()
305 netif_carrier_off(vif->netdev); in qtnf_event_handle_bss_leave()
311 qtnf_event_handle_mgmt_received(struct qtnf_vif *vif, in qtnf_event_handle_mgmt_received() argument
322 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_mgmt_received()
323 vif->mac->macid, vif->vifid, len, min_len); in qtnf_event_handle_mgmt_received()
330 pr_debug("%s LEN:%u FC:%.4X SA:%pM\n", vif->netdev->name, frame_len, in qtnf_event_handle_mgmt_received()
333 cfg80211_rx_mgmt(&vif->wdev, le32_to_cpu(rxmgmt->freq), rxmgmt->sig_dbm, in qtnf_event_handle_mgmt_received()
340 qtnf_event_handle_scan_results(struct qtnf_vif *vif, in qtnf_event_handle_scan_results() argument
346 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_scan_results()
356 pr_err("VIF%u.%u: payload is too short\n", vif->mac->macid, in qtnf_event_handle_scan_results()
357 vif->vifid); in qtnf_event_handle_scan_results()
363 pr_err("VIF%u.%u: channel at %u MHz not found\n", in qtnf_event_handle_scan_results()
364 vif->mac->macid, vif->vifid, le16_to_cpu(sr->freq)); in qtnf_event_handle_scan_results()
442 struct qtnf_vif *vif; in qtnf_event_handle_freq_change() local
468 vif = &mac->iflist[i]; in qtnf_event_handle_freq_change()
470 if (vif->wdev.iftype == NL80211_IFTYPE_UNSPECIFIED) in qtnf_event_handle_freq_change()
473 if (vif->wdev.iftype == NL80211_IFTYPE_STATION && in qtnf_event_handle_freq_change()
474 !vif->wdev.connected) in qtnf_event_handle_freq_change()
477 if (!vif->netdev) in qtnf_event_handle_freq_change()
480 wiphy_lock(priv_to_wiphy(vif->mac)); in qtnf_event_handle_freq_change()
481 cfg80211_ch_switch_notify(vif->netdev, &chandef, 0); in qtnf_event_handle_freq_change()
482 wiphy_unlock(priv_to_wiphy(vif->mac)); in qtnf_event_handle_freq_change()
488 static int qtnf_event_handle_radar(struct qtnf_vif *vif, in qtnf_event_handle_radar() argument
492 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_radar()
496 pr_err("MAC%u: payload is too short\n", vif->mac->macid); in qtnf_event_handle_radar()
500 if (!wiphy->registered || !vif->netdev) in qtnf_event_handle_radar()
507 vif->mac->macid, in qtnf_event_handle_radar()
514 vif->netdev->name, ev->event, in qtnf_event_handle_radar()
523 if (!vif->wdev.links[0].cac_started) in qtnf_event_handle_radar()
526 cfg80211_cac_event(vif->netdev, &chandef, in qtnf_event_handle_radar()
530 if (!vif->wdev.links[0].cac_started) in qtnf_event_handle_radar()
533 cfg80211_cac_event(vif->netdev, &chandef, in qtnf_event_handle_radar()
537 if (vif->wdev.links[0].cac_started) in qtnf_event_handle_radar()
544 cfg80211_cac_event(vif->netdev, &chandef, in qtnf_event_handle_radar()
549 vif->netdev->name, ev->event); in qtnf_event_handle_radar()
557 qtnf_event_handle_external_auth(struct qtnf_vif *vif, in qtnf_event_handle_external_auth() argument
562 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_external_auth()
566 pr_err("MAC%u: payload is too short\n", vif->mac->macid); in qtnf_event_handle_external_auth()
570 if (!wiphy->registered || !vif->netdev) in qtnf_event_handle_external_auth()
585 vif->netdev->name, auth.bssid, auth.action, in qtnf_event_handle_external_auth()
588 ret = cfg80211_external_auth_request(vif->netdev, &auth, GFP_KERNEL); in qtnf_event_handle_external_auth()
596 qtnf_event_handle_mic_failure(struct qtnf_vif *vif, in qtnf_event_handle_mic_failure() argument
600 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_mic_failure()
604 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_mic_failure()
605 vif->mac->macid, vif->vifid, len, in qtnf_event_handle_mic_failure()
610 if (!wiphy->registered || !vif->netdev) in qtnf_event_handle_mic_failure()
613 if (vif->wdev.iftype != NL80211_IFTYPE_STATION) { in qtnf_event_handle_mic_failure()
614 pr_err("VIF%u.%u: MIC_FAILURE event when not in STA mode\n", in qtnf_event_handle_mic_failure()
615 vif->mac->macid, vif->vifid); in qtnf_event_handle_mic_failure()
623 vif->netdev->name, mic_ev->src, mic_ev->key_index, pairwise); in qtnf_event_handle_mic_failure()
625 cfg80211_michael_mic_failure(vif->netdev, mic_ev->src, pairwise, in qtnf_event_handle_mic_failure()
632 qtnf_event_handle_update_owe(struct qtnf_vif *vif, in qtnf_event_handle_update_owe() argument
636 struct wiphy *wiphy = priv_to_wiphy(vif->mac); in qtnf_event_handle_update_owe()
642 pr_err("VIF%u.%u: payload is too short (%u < %zu)\n", in qtnf_event_handle_update_owe()
643 vif->mac->macid, vif->vifid, len, in qtnf_event_handle_update_owe()
648 if (!wiphy->registered || !vif->netdev) in qtnf_event_handle_update_owe()
651 if (vif->wdev.iftype != NL80211_IFTYPE_AP) { in qtnf_event_handle_update_owe()
652 pr_err("VIF%u.%u: UPDATE_OWE event when not in AP mode\n", in qtnf_event_handle_update_owe()
653 vif->mac->macid, vif->vifid); in qtnf_event_handle_update_owe()
668 vif->netdev->name, owe_ev->peer); in qtnf_event_handle_update_owe()
670 cfg80211_update_owe_info_event(vif->netdev, &owe_info, GFP_KERNEL); in qtnf_event_handle_update_owe()
680 struct qtnf_vif *vif = NULL; in qtnf_event_parse() local
691 pr_err("invalid vif(%u)\n", event->vifid); in qtnf_event_parse()
696 vif = &mac->iflist[vifid]; in qtnf_event_parse()
700 ret = qtnf_event_handle_sta_assoc(mac, vif, (const void *)event, in qtnf_event_parse()
704 ret = qtnf_event_handle_sta_deauth(mac, vif, in qtnf_event_parse()
709 ret = qtnf_event_handle_mgmt_received(vif, (const void *)event, in qtnf_event_parse()
713 ret = qtnf_event_handle_scan_results(vif, (const void *)event, in qtnf_event_parse()
721 ret = qtnf_event_handle_bss_join(vif, (const void *)event, in qtnf_event_parse()
725 ret = qtnf_event_handle_bss_leave(vif, (const void *)event, in qtnf_event_parse()
733 ret = qtnf_event_handle_radar(vif, (const void *)event, in qtnf_event_parse()
737 ret = qtnf_event_handle_external_auth(vif, (const void *)event, in qtnf_event_parse()
741 ret = qtnf_event_handle_mic_failure(vif, (const void *)event, in qtnf_event_parse()
745 ret = qtnf_event_handle_update_owe(vif, (const void *)event, in qtnf_event_parse()
772 pr_debug("new event id:%x len:%u mac:%u vif:%u\n", in qtnf_event_process_skb()