Lines Matching defs:vif
430 int wil_cid_fill_sinfo(struct wil6210_vif *vif, int cid,
433 struct wil6210_priv *wil = vif_to_wil(vif);
450 rc = wmi_call(wil, WMI_NOTIFY_REQ_CMDID, vif->mid, &cmd, sizeof(cmd),
464 cid, vif->mid, WIL_EXTENDED_MCS_CHECK(tx_mcs),
523 if (test_bit(wil_vif_fwconnected, vif->status)) {
539 struct wil6210_vif *vif = ndev_to_vif(ndev);
543 int cid = wil_find_cid(wil, vif->mid, mac);
546 vif->mid);
550 rc = wil_cid_fill_sinfo(vif, cid, sinfo);
579 struct wil6210_vif *vif = ndev_to_vif(dev);
582 int cid = wil_find_cid_by_idx(wil, vif->mid, idx);
589 vif->mid);
591 rc = wil_cid_fill_sinfo(vif, cid, sinfo);
643 struct wil6210_vif *vif,
656 if (vif_pos && vif != vif_pos) {
678 struct wil6210_vif *vif;
719 vif = wil_vif_alloc(wil, name, name_assign_type, type);
720 if (IS_ERR(vif))
721 return ERR_CAST(vif);
723 ndev = vif_to_ndev(vif);
731 addr[0] = (addr[0] ^ (1 << vif->mid)) | 0x2; /* locally administered */
734 wdev = vif_to_wdev(vif);
737 rc = wil_vif_add(wil, vif);
742 vif->mid, type, wdev->address);
745 wil_vif_free(vif);
749 int wil_vif_prepare_stop(struct wil6210_vif *vif)
751 struct wil6210_priv *wil = vif_to_wil(vif);
752 struct wireless_dev *wdev = vif_to_wdev(vif);
759 ndev = vif_to_ndev(vif);
761 rc = wmi_pcp_stop(vif);
767 wil_bcast_fini(vif);
778 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
795 if (vif->mid == 0) {
800 rc = wil_vif_prepare_stop(vif);
805 vif->mid, wdev->iftype, wdev->address);
807 wil_vif_remove(wil, vif->mid);
828 struct wil6210_vif *vif = ndev_to_vif(ndev);
829 struct wireless_dev *wdev = vif_to_wdev(vif);
836 rc = wil_cfg80211_validate_change_iface(wil, vif, type);
874 if (vif->mid != 0 && wil_has_active_ifaces(wil, true, false)) {
876 wil_vif_prepare_stop(vif);
877 rc = wmi_port_delete(wil, vif->mid);
880 rc = wmi_port_allocate(wil, vif->mid, ndev->dev_addr, type);
894 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
924 if (vif->scan_request || vif->p2p.discovery_started) {
940 vif->scan_request = request;
941 if (vif->mid == 0)
943 rc = wil_p2p_search(vif, request);
945 if (vif->mid == 0)
948 vif->scan_request = NULL;
954 (void)wil_p2p_stop_discovery(vif);
967 rc = wmi_set_ssid(vif, request->ssids[0].ssid_len,
970 rc = wmi_set_ssid(vif, 0, NULL);
977 vif->scan_request = request;
978 mod_timer(&vif->scan_timer, jiffies + WIL6210_SCAN_TO);
1005 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_REQ,
1015 if (vif->mid == 0)
1017 rc = wmi_send(wil, WMI_START_SCAN_CMDID, vif->mid,
1023 del_timer_sync(&vif->scan_timer);
1024 if (vif->mid == 0)
1026 vif->scan_request = NULL;
1037 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1044 if (!vif->scan_request)
1047 if (wdev != vif->scan_request->wdev) {
1055 wil_abort_scan(vif, true);
1133 struct wil6210_vif *vif = ndev_to_vif(ndev);
1152 if (!test_bit(wil_vif_fwconnected, vif->status)) {
1157 if (vif->privacy != sme->privacy) {
1159 vif->privacy, sme->privacy);
1174 set_bit(wil_vif_ft_roam, vif->status);
1175 rc = wmi_send(wil, WMI_FT_AUTH_CMDID, vif->mid,
1178 mod_timer(&vif->connect_timer,
1181 clear_bit(wil_vif_ft_roam, vif->status);
1218 struct wil6210_vif *vif = ndev_to_vif(ndev);
1229 wil_dbg_misc(wil, "connect, mid=%d\n", vif->mid);
1235 test_bit(wil_vif_fwconnected, vif->status))
1239 if (test_bit(wil_vif_fwconnecting, vif->status) ||
1240 test_bit(wil_vif_fwconnected, vif->status))
1276 vif->privacy = sme->privacy;
1277 vif->pbss = sme->pbss;
1279 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_REQ, sme->ie_len, sme->ie);
1314 vif->bss = bss;
1318 if (vif->privacy) {
1320 rc = wmi_del_cipher_key(vif, 0, bss->bssid,
1326 rc = wmi_del_cipher_key(vif, 0, bss->bssid,
1337 if (vif->privacy) {
1366 set_bit(wil_vif_fwconnecting, vif->status);
1368 rc = wmi_send(wil, WMI_CONNECT_CMDID, vif->mid, &conn, sizeof(conn));
1373 vif->bss = bss;
1375 mod_timer(&vif->connect_timer,
1378 clear_bit(wil_vif_fwconnecting, vif->status);
1393 struct wil6210_vif *vif = ndev_to_vif(ndev);
1396 reason_code, vif->mid);
1398 if (!(test_bit(wil_vif_fwconnecting, vif->status) ||
1399 test_bit(wil_vif_fwconnected, vif->status))) {
1404 vif->locally_generated_disc = true;
1405 rc = wmi_call(wil, WMI_DISCONNECT_CMDID, vif->mid, NULL, 0,
1441 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1463 rc = wmi_mgmt_tx(vif, buf, len);
1467 if (!params->chan || params->chan->hw_value == vif->channel) {
1470 rc = wmi_mgmt_tx(vif, buf, len);
1477 vif->channel, params->chan->hw_value);
1482 rc = wmi_mgmt_tx_ext(vif, buf, len, params->chan->hw_value,
1629 struct wil6210_vif *vif = ndev_to_vif(ndev);
1631 struct wireless_dev *wdev = vif_to_wdev(vif);
1633 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid,
1650 if (!test_bit(wil_vif_ft_roam, vif->status)) {
1671 (vif->ptk_rekey_state == WIL_REKEY_M3_RECEIVED ||
1672 vif->ptk_rekey_state == WIL_REKEY_WAIT_M4_SENT)) {
1674 vif->ptk_rekey_state = WIL_REKEY_WAIT_M4_SENT;
1679 rc = wmi_add_cipher_key(vif, key_index, mac_addr, params->key_len,
1685 vif->gtk_index = key_index;
1686 memcpy(vif->gtk, params->key, params->key_len);
1687 vif->gtk_len = params->key_len;
1703 struct wil6210_vif *vif = ndev_to_vif(ndev);
1705 struct wireless_dev *wdev = vif_to_wdev(vif);
1707 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid,
1721 return wmi_del_cipher_key(vif, key_index, mac_addr, key_usage);
1758 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1762 return wil_p2p_cancel_listen(vif, cookie);
1883 static int _wil_cfg80211_set_ies(struct wil6210_vif *vif,
1891 wil_memdup_ie(&vif->proberesp, &vif->proberesp_len, bcon->probe_resp,
1893 wil_memdup_ie(&vif->proberesp_ies, &vif->proberesp_ies_len,
1895 wil_memdup_ie(&vif->assocresp_ies, &vif->assocresp_ies_len,
1910 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_RESP, len, ies);
1915 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_RESP,
1918 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_RESP, len, ies);
1923 rc = wmi_set_ie(vif, WMI_FRAME_BEACON,
1939 struct wil6210_vif *vif = ndev_to_vif(ndev);
1951 wil_dbg_misc(wil, "start_ap: mid=%d, is_go=%d\n", vif->mid, is_go);
1975 set_bit(wil_vif_ft_roam, vif->status);
1987 rc = wmi_set_ssid(vif, ssid_len, ssid);
1991 rc = _wil_cfg80211_set_ies(vif, bcon);
1995 vif->privacy = privacy;
1996 vif->channel = chan;
1997 vif->wmi_edmg_channel = wmi_edmg_channel;
1998 vif->hidden_ssid = hidden_ssid;
1999 vif->pbss = pbss;
2000 vif->bi = bi;
2001 memcpy(vif->ssid, ssid, ssid_len);
2002 vif->ssid_len = ssid_len;
2008 rc = wmi_pcp_start(vif, bi, wmi_nettype, chan, wmi_edmg_channel,
2013 rc = wil_bcast_init(vif);
2020 wmi_pcp_stop(vif);
2036 struct wil6210_vif *vif = wil->vifs[i];
2041 if (!vif || vif->ssid_len == 0)
2044 ndev = vif_to_ndev(vif);
2045 bcon.proberesp_ies = vif->proberesp_ies;
2046 bcon.assocresp_ies = vif->assocresp_ies;
2047 bcon.probe_resp = vif->proberesp;
2048 bcon.proberesp_ies_len = vif->proberesp_ies_len;
2049 bcon.assocresp_ies_len = vif->assocresp_ies_len;
2050 bcon.probe_resp_len = vif->proberesp_len;
2053 "AP (vif %d) recovery: privacy %d, bi %d, channel %d, hidden %d, pbss %d\n",
2054 i, vif->privacy, vif->bi, vif->channel,
2055 vif->hidden_ssid, vif->pbss);
2057 vif->ssid, vif->ssid_len, true);
2059 vif->ssid, vif->ssid_len,
2060 vif->privacy, vif->bi,
2061 vif->channel,
2062 vif->wmi_edmg_channel, &bcon,
2063 vif->hidden_ssid, vif->pbss);
2065 wil_err(wil, "vif %d recovery failed (%d)\n", i, rc);
2069 if (!vif->privacy || vif->gtk_len == 0)
2072 key_params.key = vif->gtk;
2073 key_params.key_len = vif->gtk_len;
2075 rc = wil_cfg80211_add_key(wiphy, ndev, -1, vif->gtk_index,
2078 wil_err(wil, "vif %d recovery add key failed (%d)\n",
2089 struct wil6210_vif *vif = ndev_to_vif(ndev);
2093 wil_dbg_misc(wil, "change_beacon, mid=%d\n", vif->mid);
2101 memcpy(vif->ssid, wdev->u.ap.ssid, wdev->u.ap.ssid_len);
2102 vif->ssid_len = wdev->u.ap.ssid_len;
2105 if (vif->privacy != privacy) {
2107 vif->privacy, privacy);
2109 rc = _wil_cfg80211_start_ap(wiphy, ndev, vif->ssid,
2110 vif->ssid_len, privacy,
2112 vif->channel,
2113 vif->wmi_edmg_channel, bcon,
2114 vif->hidden_ssid,
2115 vif->pbss);
2117 rc = _wil_cfg80211_set_ies(vif, bcon);
2193 struct wil6210_vif *vif = ndev_to_vif(ndev);
2196 wil_dbg_misc(wil, "stop_ap, mid=%d\n", vif->mid);
2208 wmi_pcp_stop(vif);
2209 clear_bit(wil_vif_ft_roam, vif->status);
2210 vif->ssid_len = 0;
2211 wil_memdup_ie(&vif->proberesp, &vif->proberesp_len, NULL, 0);
2212 wil_memdup_ie(&vif->proberesp_ies, &vif->proberesp_ies_len, NULL, 0);
2213 wil_memdup_ie(&vif->assocresp_ies, &vif->assocresp_ies_len, NULL, 0);
2214 memset(vif->gtk, 0, WMI_MAX_KEY_LEN);
2215 vif->gtk_len = 0;
2220 wil_bcast_fini(vif);
2232 struct wil6210_vif *vif = ndev_to_vif(dev);
2236 mac, params->aid, vif->mid,
2249 return wmi_new_sta(vif, mac, params->aid);
2256 struct wil6210_vif *vif = ndev_to_vif(dev);
2260 params->mac, params->reason_code, vif->mid);
2263 wil6210_disconnect(vif, params->mac, params->reason_code);
2274 struct wil6210_vif *vif = ndev_to_vif(dev);
2282 vif->mid);
2292 cid = wil_find_cid(wil, vif->mid, mac);
2319 struct wil6210_vif *vif,
2322 struct net_device *ndev = vif_to_ndev(vif);
2333 static struct list_head *next_probe_client(struct wil6210_vif *vif)
2337 mutex_lock(&vif->probe_client_mutex);
2339 if (!list_empty(&vif->probe_client_pending)) {
2340 ret = vif->probe_client_pending.next;
2344 mutex_unlock(&vif->probe_client_mutex);
2351 struct wil6210_vif *vif = container_of(work, struct wil6210_vif,
2353 struct wil6210_priv *wil = vif_to_wil(vif);
2357 while ((lh = next_probe_client(vif)) != NULL) {
2360 wil_probe_client_handle(wil, vif, req);
2365 void wil_probe_client_flush(struct wil6210_vif *vif)
2368 struct wil6210_priv *wil = vif_to_wil(vif);
2372 mutex_lock(&vif->probe_client_mutex);
2374 list_for_each_entry_safe(req, t, &vif->probe_client_pending, list) {
2379 mutex_unlock(&vif->probe_client_mutex);
2387 struct wil6210_vif *vif = ndev_to_vif(dev);
2389 int cid = wil_find_cid(wil, vif->mid, peer);
2392 peer, cid, vif->mid);
2404 mutex_lock(&vif->probe_client_mutex);
2405 list_add_tail(&req->list, &vif->probe_client_pending);
2406 mutex_unlock(&vif->probe_client_mutex);
2409 queue_work(wil->wq_service, &vif->probe_client_worker);
2418 struct wil6210_vif *vif = ndev_to_vif(dev);
2422 vif->mid, vif->ap_isolate, params->ap_isolate);
2423 vif->ap_isolate = params->ap_isolate;
2492 struct wil6210_vif *vif = ndev_to_vif(dev);
2495 if (vif->mid != 0)
2531 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_REQ,
2543 struct wil6210_vif *vif = ndev_to_vif(dev);
2546 if (vif->mid != 0)
2563 struct wil6210_vif *vif = ndev_to_vif(dev);
2568 wil_dbg_misc(wil, "update ft ies, mid=%d\n", vif->mid);
2577 rc = wmi_update_ft_ies(vif, ftie->ie_len, ftie->ie);
2581 if (!test_bit(wil_vif_ft_roam, vif->status))
2582 /* vif is not roaming */
2589 bss = vif->bss;
2598 rc = wmi_send(wil, WMI_FT_REASSOC_CMDID, vif->mid,
2873 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
2931 rc = wmi_call(wil, WMI_GET_RF_SECTOR_PARAMS_CMDID, vif->mid,
2994 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3092 rc = wmi_call(wil, WMI_SET_RF_SECTOR_PARAMS_CMDID, vif->mid,
3106 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3142 cid = wil_find_cid(wil, vif->mid, mac_addr);
3148 if (test_bit(wil_vif_fwconnected, vif->status)) {
3157 rc = wmi_call(wil, WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID, vif->mid,
3221 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3261 cid = wil_find_cid(wil, vif->mid, mac_addr);
3275 if (test_bit(wil_vif_fwconnected, vif->status)) {
3283 rc = wil_rf_sector_wmi_set_selected(wil, vif->mid, sector_index,
3288 wil, vif->mid, WMI_INVALID_RF_SECTOR_INDEX,
3292 if (wil->sta[i].mid != vif->mid)
3295 wil, vif->mid,