Lines Matching refs: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);
922 if (vif->scan_request || vif->p2p.discovery_started) {
938 vif->scan_request = request;
939 if (vif->mid == 0)
941 rc = wil_p2p_search(vif, request);
943 if (vif->mid == 0)
946 vif->scan_request = NULL;
952 (void)wil_p2p_stop_discovery(vif);
965 rc = wmi_set_ssid(vif, request->ssids[0].ssid_len,
968 rc = wmi_set_ssid(vif, 0, NULL);
975 vif->scan_request = request;
976 mod_timer(&vif->scan_timer, jiffies + WIL6210_SCAN_TO);
1003 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_REQ,
1013 if (vif->mid == 0)
1015 rc = wmi_send(wil, WMI_START_SCAN_CMDID, vif->mid,
1020 del_timer_sync(&vif->scan_timer);
1021 if (vif->mid == 0)
1023 vif->scan_request = NULL;
1034 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1041 if (!vif->scan_request)
1044 if (wdev != vif->scan_request->wdev) {
1052 wil_abort_scan(vif, true);
1130 struct wil6210_vif *vif = ndev_to_vif(ndev);
1149 if (!test_bit(wil_vif_fwconnected, vif->status)) {
1154 if (vif->privacy != sme->privacy) {
1156 vif->privacy, sme->privacy);
1171 set_bit(wil_vif_ft_roam, vif->status);
1172 rc = wmi_send(wil, WMI_FT_AUTH_CMDID, vif->mid,
1175 mod_timer(&vif->connect_timer,
1178 clear_bit(wil_vif_ft_roam, vif->status);
1215 struct wil6210_vif *vif = ndev_to_vif(ndev);
1226 wil_dbg_misc(wil, "connect, mid=%d\n", vif->mid);
1232 test_bit(wil_vif_fwconnected, vif->status))
1236 if (test_bit(wil_vif_fwconnecting, vif->status) ||
1237 test_bit(wil_vif_fwconnected, vif->status))
1273 vif->privacy = sme->privacy;
1274 vif->pbss = sme->pbss;
1276 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_REQ, sme->ie_len, sme->ie);
1311 vif->bss = bss;
1315 if (vif->privacy) {
1317 rc = wmi_del_cipher_key(vif, 0, bss->bssid,
1323 rc = wmi_del_cipher_key(vif, 0, bss->bssid,
1334 if (vif->privacy) {
1363 set_bit(wil_vif_fwconnecting, vif->status);
1365 rc = wmi_send(wil, WMI_CONNECT_CMDID, vif->mid, &conn, sizeof(conn));
1370 vif->bss = bss;
1372 mod_timer(&vif->connect_timer,
1375 clear_bit(wil_vif_fwconnecting, vif->status);
1390 struct wil6210_vif *vif = ndev_to_vif(ndev);
1393 reason_code, vif->mid);
1395 if (!(test_bit(wil_vif_fwconnecting, vif->status) ||
1396 test_bit(wil_vif_fwconnected, vif->status))) {
1401 vif->locally_generated_disc = true;
1402 rc = wmi_call(wil, WMI_DISCONNECT_CMDID, vif->mid, NULL, 0,
1438 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1460 rc = wmi_mgmt_tx(vif, buf, len);
1464 if (!params->chan || params->chan->hw_value == vif->channel) {
1467 rc = wmi_mgmt_tx(vif, buf, len);
1474 vif->channel, params->chan->hw_value);
1479 rc = wmi_mgmt_tx_ext(vif, buf, len, params->chan->hw_value,
1626 struct wil6210_vif *vif = ndev_to_vif(ndev);
1628 struct wireless_dev *wdev = vif_to_wdev(vif);
1630 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid,
1647 if (!test_bit(wil_vif_ft_roam, vif->status)) {
1668 (vif->ptk_rekey_state == WIL_REKEY_M3_RECEIVED ||
1669 vif->ptk_rekey_state == WIL_REKEY_WAIT_M4_SENT)) {
1671 vif->ptk_rekey_state = WIL_REKEY_WAIT_M4_SENT;
1676 rc = wmi_add_cipher_key(vif, key_index, mac_addr, params->key_len,
1682 vif->gtk_index = key_index;
1683 memcpy(vif->gtk, params->key, params->key_len);
1684 vif->gtk_len = params->key_len;
1700 struct wil6210_vif *vif = ndev_to_vif(ndev);
1702 struct wireless_dev *wdev = vif_to_wdev(vif);
1704 struct wil_sta_info *cs = wil_find_sta_by_key_usage(wil, vif->mid,
1718 return wmi_del_cipher_key(vif, key_index, mac_addr, key_usage);
1755 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
1759 return wil_p2p_cancel_listen(vif, cookie);
1880 static int _wil_cfg80211_set_ies(struct wil6210_vif *vif,
1888 wil_memdup_ie(&vif->proberesp, &vif->proberesp_len, bcon->probe_resp,
1890 wil_memdup_ie(&vif->proberesp_ies, &vif->proberesp_ies_len,
1892 wil_memdup_ie(&vif->assocresp_ies, &vif->assocresp_ies_len,
1907 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_RESP, len, ies);
1912 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_RESP,
1915 rc = wmi_set_ie(vif, WMI_FRAME_ASSOC_RESP, len, ies);
1920 rc = wmi_set_ie(vif, WMI_FRAME_BEACON,
1936 struct wil6210_vif *vif = ndev_to_vif(ndev);
1948 wil_dbg_misc(wil, "start_ap: mid=%d, is_go=%d\n", vif->mid, is_go);
1972 set_bit(wil_vif_ft_roam, vif->status);
1984 rc = wmi_set_ssid(vif, ssid_len, ssid);
1988 rc = _wil_cfg80211_set_ies(vif, bcon);
1992 vif->privacy = privacy;
1993 vif->channel = chan;
1994 vif->wmi_edmg_channel = wmi_edmg_channel;
1995 vif->hidden_ssid = hidden_ssid;
1996 vif->pbss = pbss;
1997 vif->bi = bi;
1998 memcpy(vif->ssid, ssid, ssid_len);
1999 vif->ssid_len = ssid_len;
2005 rc = wmi_pcp_start(vif, bi, wmi_nettype, chan, wmi_edmg_channel,
2010 rc = wil_bcast_init(vif);
2017 wmi_pcp_stop(vif);
2033 struct wil6210_vif *vif = wil->vifs[i];
2038 if (!vif || vif->ssid_len == 0)
2041 ndev = vif_to_ndev(vif);
2042 bcon.proberesp_ies = vif->proberesp_ies;
2043 bcon.assocresp_ies = vif->assocresp_ies;
2044 bcon.probe_resp = vif->proberesp;
2045 bcon.proberesp_ies_len = vif->proberesp_ies_len;
2046 bcon.assocresp_ies_len = vif->assocresp_ies_len;
2047 bcon.probe_resp_len = vif->proberesp_len;
2050 "AP (vif %d) recovery: privacy %d, bi %d, channel %d, hidden %d, pbss %d\n",
2051 i, vif->privacy, vif->bi, vif->channel,
2052 vif->hidden_ssid, vif->pbss);
2054 vif->ssid, vif->ssid_len, true);
2056 vif->ssid, vif->ssid_len,
2057 vif->privacy, vif->bi,
2058 vif->channel,
2059 vif->wmi_edmg_channel, &bcon,
2060 vif->hidden_ssid, vif->pbss);
2062 wil_err(wil, "vif %d recovery failed (%d)\n", i, rc);
2066 if (!vif->privacy || vif->gtk_len == 0)
2069 key_params.key = vif->gtk;
2070 key_params.key_len = vif->gtk_len;
2072 rc = wil_cfg80211_add_key(wiphy, ndev, -1, vif->gtk_index,
2075 wil_err(wil, "vif %d recovery add key failed (%d)\n",
2086 struct wil6210_vif *vif = ndev_to_vif(ndev);
2091 wil_dbg_misc(wil, "change_beacon, mid=%d\n", vif->mid);
2099 memcpy(vif->ssid, wdev->u.ap.ssid, wdev->u.ap.ssid_len);
2100 vif->ssid_len = wdev->u.ap.ssid_len;
2103 if (vif->privacy != privacy) {
2105 vif->privacy, privacy);
2107 rc = _wil_cfg80211_start_ap(wiphy, ndev, vif->ssid,
2108 vif->ssid_len, privacy,
2110 vif->channel,
2111 vif->wmi_edmg_channel, bcon,
2112 vif->hidden_ssid,
2113 vif->pbss);
2115 rc = _wil_cfg80211_set_ies(vif, bcon);
2191 struct wil6210_vif *vif = ndev_to_vif(ndev);
2194 wil_dbg_misc(wil, "stop_ap, mid=%d\n", vif->mid);
2206 wmi_pcp_stop(vif);
2207 clear_bit(wil_vif_ft_roam, vif->status);
2208 vif->ssid_len = 0;
2209 wil_memdup_ie(&vif->proberesp, &vif->proberesp_len, NULL, 0);
2210 wil_memdup_ie(&vif->proberesp_ies, &vif->proberesp_ies_len, NULL, 0);
2211 wil_memdup_ie(&vif->assocresp_ies, &vif->assocresp_ies_len, NULL, 0);
2212 memset(vif->gtk, 0, WMI_MAX_KEY_LEN);
2213 vif->gtk_len = 0;
2218 wil_bcast_fini(vif);
2230 struct wil6210_vif *vif = ndev_to_vif(dev);
2234 mac, params->aid, vif->mid,
2247 return wmi_new_sta(vif, mac, params->aid);
2254 struct wil6210_vif *vif = ndev_to_vif(dev);
2258 params->mac, params->reason_code, vif->mid);
2261 wil6210_disconnect(vif, params->mac, params->reason_code);
2272 struct wil6210_vif *vif = ndev_to_vif(dev);
2280 vif->mid);
2290 cid = wil_find_cid(wil, vif->mid, mac);
2317 struct wil6210_vif *vif,
2320 struct net_device *ndev = vif_to_ndev(vif);
2331 static struct list_head *next_probe_client(struct wil6210_vif *vif)
2335 mutex_lock(&vif->probe_client_mutex);
2337 if (!list_empty(&vif->probe_client_pending)) {
2338 ret = vif->probe_client_pending.next;
2342 mutex_unlock(&vif->probe_client_mutex);
2349 struct wil6210_vif *vif = container_of(work, struct wil6210_vif,
2351 struct wil6210_priv *wil = vif_to_wil(vif);
2355 while ((lh = next_probe_client(vif)) != NULL) {
2358 wil_probe_client_handle(wil, vif, req);
2363 void wil_probe_client_flush(struct wil6210_vif *vif)
2366 struct wil6210_priv *wil = vif_to_wil(vif);
2370 mutex_lock(&vif->probe_client_mutex);
2372 list_for_each_entry_safe(req, t, &vif->probe_client_pending, list) {
2377 mutex_unlock(&vif->probe_client_mutex);
2385 struct wil6210_vif *vif = ndev_to_vif(dev);
2387 int cid = wil_find_cid(wil, vif->mid, peer);
2390 peer, cid, vif->mid);
2402 mutex_lock(&vif->probe_client_mutex);
2403 list_add_tail(&req->list, &vif->probe_client_pending);
2404 mutex_unlock(&vif->probe_client_mutex);
2407 queue_work(wil->wq_service, &vif->probe_client_worker);
2416 struct wil6210_vif *vif = ndev_to_vif(dev);
2420 vif->mid, vif->ap_isolate, params->ap_isolate);
2421 vif->ap_isolate = params->ap_isolate;
2490 struct wil6210_vif *vif = ndev_to_vif(dev);
2493 if (vif->mid != 0)
2529 rc = wmi_set_ie(vif, WMI_FRAME_PROBE_REQ,
2541 struct wil6210_vif *vif = ndev_to_vif(dev);
2544 if (vif->mid != 0)
2561 struct wil6210_vif *vif = ndev_to_vif(dev);
2566 wil_dbg_misc(wil, "update ft ies, mid=%d\n", vif->mid);
2575 rc = wmi_update_ft_ies(vif, ftie->ie_len, ftie->ie);
2579 if (!test_bit(wil_vif_ft_roam, vif->status))
2580 /* vif is not roaming */
2587 bss = vif->bss;
2596 rc = wmi_send(wil, WMI_FT_REASSOC_CMDID, vif->mid,
2871 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
2929 rc = wmi_call(wil, WMI_GET_RF_SECTOR_PARAMS_CMDID, vif->mid,
2992 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3090 rc = wmi_call(wil, WMI_SET_RF_SECTOR_PARAMS_CMDID, vif->mid,
3104 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3140 cid = wil_find_cid(wil, vif->mid, mac_addr);
3146 if (test_bit(wil_vif_fwconnected, vif->status)) {
3155 rc = wmi_call(wil, WMI_GET_SELECTED_RF_SECTOR_INDEX_CMDID, vif->mid,
3219 struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
3259 cid = wil_find_cid(wil, vif->mid, mac_addr);
3273 if (test_bit(wil_vif_fwconnected, vif->status)) {
3281 rc = wil_rf_sector_wmi_set_selected(wil, vif->mid, sector_index,
3286 wil, vif->mid, WMI_INVALID_RF_SECTOR_INDEX,
3290 if (wil->sta[i].mid != vif->mid)
3293 wil, vif->mid,