Lines Matching full:vif

167 	struct wilc_vif *vif = netdev_priv(dev);  in cfg_connect_result()  local
168 struct wilc *wl = vif->wilc; in cfg_connect_result()
173 vif->connecting = false; in cfg_connect_result()
183 if (vif->iftype != WILC_CLIENT_MODE) in cfg_connect_result()
193 cfg80211_ref_bss(wiphy, vif->bss); in cfg_connect_result()
194 cfg80211_connect_bss(dev, conn_info->bssid, vif->bss, in cfg_connect_result()
202 vif->bss = NULL; in cfg_connect_result()
209 if (vif->iftype != WILC_CLIENT_MODE) { in cfg_connect_result()
224 struct wilc_vif *vif; in wilc_get_wl_to_vif() local
226 vif = list_first_or_null_rcu(&wl->vif_list, typeof(*vif), list); in wilc_get_wl_to_vif()
227 if (!vif) in wilc_get_wl_to_vif()
230 return vif; in wilc_get_wl_to_vif()
237 struct wilc_vif *vif; in set_channel() local
243 vif = wilc_get_wl_to_vif(wl); in set_channel()
244 if (IS_ERR(vif)) { in set_channel()
246 return PTR_ERR(vif); in set_channel()
252 result = wilc_set_mac_chnl_num(vif, channelnum); in set_channel()
254 netdev_err(vif->ndev, "Error in setting channel\n"); in set_channel()
262 struct wilc_vif *vif = netdev_priv(request->wdev->netdev); in scan() local
263 struct wilc_priv *priv = &vif->priv; in scan()
270 netdev_err(vif->ndev, "Requested scanned channels over\n"); in scan()
287 ret = wilc_scan(vif, WILC_FW_USER_SCAN, scan_type, in scan()
301 struct wilc_vif *vif = netdev_priv(dev); in connect() local
302 struct wilc_priv *priv = &vif->priv; in connect()
314 vif->connecting = true; in connect()
356 memcpy(vif->auth.ssid.ssid, sme->ssid, sme->ssid_len); in connect()
357 vif->auth.ssid.ssid_len = sme->ssid_len; in connect()
359 vif->auth.key_mgmt_suite = sme->crypto.akm_suites[0]; in connect()
360 ether_addr_copy(vif->auth.bssid, sme->bssid); in connect()
377 netdev_err(vif->ndev, "%s: Scan in progress\n", __func__); in connect()
390 if (ether_addr_equal_unaligned(vif->bssid, bss->bssid)) { in connect()
404 vif->wilc->op_ch = ch; in connect()
405 if (vif->iftype != WILC_CLIENT_MODE) in connect()
406 vif->wilc->sta_ch = ch; in connect()
423 ret = wilc_set_join_req(vif, bss->bssid, sme->ie, sme->ie_len); in connect()
427 if (vif->iftype != WILC_CLIENT_MODE) in connect()
428 vif->wilc->sta_ch = WILC_INVALID_CHANNEL; in connect()
435 vif->bss = bss; in connect()
443 vif->connecting = false; in connect()
450 struct wilc_vif *vif = netdev_priv(dev); in disconnect() local
451 struct wilc_priv *priv = &vif->priv; in disconnect()
452 struct wilc *wilc = vif->wilc; in disconnect()
455 vif->connecting = false; in disconnect()
466 if (vif->iftype != WILC_CLIENT_MODE) in disconnect()
472 ret = wilc_disconnect(vif); in disconnect()
478 vif->bss = NULL; in disconnect()
549 struct wilc_vif *vif = netdev_priv(netdev); in add_key() local
550 struct wilc_priv *priv = &vif->priv; in add_key()
605 ret = wilc_add_rx_gtk(vif, params->key, keylen, in add_key()
610 ret = wilc_add_ptk(vif, params->key, keylen, mac_addr, in add_key()
631 ret = wilc_add_igtk(vif, params->key, keylen, params->seq, in add_key()
649 struct wilc_vif *vif = netdev_priv(netdev); in del_key() local
650 struct wilc_priv *priv = &vif->priv; in del_key()
690 struct wilc_vif *vif = netdev_priv(netdev); in get_key() local
691 struct wilc_priv *priv = &vif->priv; in get_key()
733 struct wilc_vif *vif = netdev_priv(netdev); in set_default_mgmt_key() local
735 return wilc_set_default_mgmt_key_index(vif, key_index); in set_default_mgmt_key()
741 struct wilc_vif *vif = netdev_priv(dev); in get_station() local
742 struct wilc_priv *priv = &vif->priv; in get_station()
743 struct wilc *wilc = vif->wilc; in get_station()
748 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in get_station()
765 wilc_get_inactive_time(vif, mac, &inactive_time); in get_station()
767 } else if (vif->iftype == WILC_STATION_MODE) { in get_station()
773 wilc_get_statistics(vif, &stats); in get_station()
789 wilc_enable_tcp_ack_filter(vif, true); in get_station()
791 wilc_enable_tcp_ack_filter(vif, false); in get_station()
807 struct wilc_vif *vif; in set_wiphy_params() local
812 vif = wilc_get_wl_to_vif(wl); in set_wiphy_params()
813 if (IS_ERR(vif)) in set_wiphy_params()
816 priv = &vif->priv; in set_wiphy_params()
820 netdev_dbg(vif->ndev, in set_wiphy_params()
827 netdev_dbg(vif->ndev, in set_wiphy_params()
836 netdev_dbg(vif->ndev, in set_wiphy_params()
842 netdev_err(vif->ndev, in set_wiphy_params()
850 netdev_dbg(vif->ndev, in set_wiphy_params()
856 netdev_err(vif->ndev, "RTS threshold out of range\n"); in set_wiphy_params()
861 ret = wilc_hif_set_cfg(vif, &cfg_param_val); in set_wiphy_params()
873 struct wilc_vif *vif = netdev_priv(netdev); in set_pmksa() local
874 struct wilc_priv *priv = &vif->priv; in set_pmksa()
899 ret = wilc_set_pmkid_info(vif, &priv->pmkid_list); in set_pmksa()
908 struct wilc_vif *vif = netdev_priv(netdev); in del_pmksa() local
909 struct wilc_priv *priv = &vif->priv; in del_pmksa()
938 struct wilc_vif *vif = netdev_priv(netdev); in flush_pmksa() local
940 memset(&vif->priv.pmkid_list, 0, sizeof(struct wilc_pmkid_attr)); in flush_pmksa()
1013 bool wilc_wfi_mgmt_frame_rx(struct wilc_vif *vif, u8 *buff, u32 size) in wilc_wfi_mgmt_frame_rx() argument
1015 struct wilc *wl = vif->wilc; in wilc_wfi_mgmt_frame_rx()
1016 struct wilc_priv *priv = &vif->priv; in wilc_wfi_mgmt_frame_rx()
1024 void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size) in wilc_wfi_p2p_rx() argument
1026 struct wilc *wl = vif->wilc; in wilc_wfi_p2p_rx()
1027 struct wilc_priv *priv = &vif->priv; in wilc_wfi_p2p_rx()
1061 netdev_dbg(vif->ndev, "Receiving action wrong ch\n"); in wilc_wfi_p2p_rx()
1079 wilc_wfi_cfg_parse_ch_attr(p->attr, p->tag_len - 4, vif->wilc->sta_ch); in wilc_wfi_p2p_rx()
1093 static void wilc_wfi_remain_on_channel_expired(struct wilc_vif *vif, u64 cookie) in wilc_wfi_remain_on_channel_expired() argument
1095 struct wilc_priv *priv = &vif->priv; in wilc_wfi_remain_on_channel_expired()
1113 struct wilc_vif *vif = netdev_priv(wdev->netdev); in remain_on_channel() local
1114 struct wilc_priv *priv = &vif->priv; in remain_on_channel()
1118 netdev_dbg(vif->ndev, "Required while in AP mode\n"); in remain_on_channel()
1126 ret = wilc_remain_on_channel(vif, id, chan->hw_value, in remain_on_channel()
1131 vif->wilc->op_ch = chan->hw_value; in remain_on_channel()
1140 mod_timer(&vif->hif_drv->remain_on_ch_timer, in remain_on_channel()
1150 struct wilc_vif *vif = netdev_priv(wdev->netdev); in cancel_remain_on_channel() local
1151 struct wilc_priv *priv = &vif->priv; in cancel_remain_on_channel()
1156 return wilc_listen_state_expired(vif, cookie); in cancel_remain_on_channel()
1170 struct wilc_vif *vif = netdev_priv(wdev->netdev); in mgmt_tx() local
1171 struct wilc_priv *priv = &vif->priv; in mgmt_tx()
1202 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1203 vif->wilc->op_ch = chan->hw_value; in mgmt_tx()
1209 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1211 wilc_set_mac_chnl_num(vif, vif->wilc->op_ch); in mgmt_tx()
1219 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1220 vif->wilc->op_ch = chan->hw_value; in mgmt_tx()
1233 wilc_wfi_cfg_parse_ch_attr(p->attr, p->tag_len - 4, vif->wilc->sta_ch); in mgmt_tx()
1253 struct wilc_vif *vif = netdev_priv(wdev->netdev); in mgmt_tx_cancel_wait() local
1254 struct wilc_priv *priv = &vif->priv; in mgmt_tx_cancel_wait()
1278 struct wilc_vif *vif = netdev_priv(wdev->netdev); in wilc_update_mgmt_frame_registrations() local
1284 bool prev = vif->mgmt_reg_stypes & presp_bit; in wilc_update_mgmt_frame_registrations()
1288 wilc_frame_register(vif, IEEE80211_STYPE_PROBE_REQ, now); in wilc_update_mgmt_frame_registrations()
1290 prev = vif->mgmt_reg_stypes & action_bit; in wilc_update_mgmt_frame_registrations()
1294 wilc_frame_register(vif, IEEE80211_STYPE_ACTION, now); in wilc_update_mgmt_frame_registrations()
1296 prev = vif->mgmt_reg_stypes & pauth_bit; in wilc_update_mgmt_frame_registrations()
1299 wilc_frame_register(vif, IEEE80211_STYPE_AUTH, now); in wilc_update_mgmt_frame_registrations()
1302 vif->mgmt_reg_stypes = in wilc_update_mgmt_frame_registrations()
1309 struct wilc_vif *vif = netdev_priv(dev); in external_auth() local
1312 wilc_set_external_auth_param(vif, auth); in external_auth()
1326 struct wilc_vif *vif = netdev_priv(dev); in dump_station() local
1332 ret = wilc_get_rssi(vif, &sinfo->signal); in dump_station()
1337 memcpy(mac, vif->priv.associated_bss, ETH_ALEN); in dump_station()
1344 struct wilc_vif *vif = netdev_priv(dev); in set_power_mgmt() local
1345 struct wilc_priv *priv = &vif->priv; in set_power_mgmt()
1350 wilc_set_power_mgmt(vif, enabled, timeout); in set_power_mgmt()
1360 struct wilc_vif *vif = netdev_priv(dev); in change_virtual_intf() local
1361 struct wilc_priv *priv = &vif->priv; in change_virtual_intf()
1365 vif->connecting = false; in change_virtual_intf()
1368 vif->monitor_flag = 0; in change_virtual_intf()
1369 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) in change_virtual_intf()
1371 vif->iftype = WILC_STATION_MODE; in change_virtual_intf()
1374 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1375 WILC_STATION_MODE, vif->idx); in change_virtual_intf()
1382 vif->connecting = false; in change_virtual_intf()
1385 vif->monitor_flag = 0; in change_virtual_intf()
1386 vif->iftype = WILC_CLIENT_MODE; in change_virtual_intf()
1389 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1390 WILC_STATION_MODE, vif->idx); in change_virtual_intf()
1396 vif->iftype = WILC_AP_MODE; in change_virtual_intf()
1399 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1400 WILC_AP_MODE, vif->idx); in change_virtual_intf()
1406 vif->iftype = WILC_GO_MODE; in change_virtual_intf()
1409 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1410 WILC_AP_MODE, vif->idx); in change_virtual_intf()
1424 struct wilc_vif *vif = netdev_priv(dev); in start_ap() local
1433 return wilc_add_beacon(vif, settings->beacon_interval, in start_ap()
1440 struct wilc_vif *vif = netdev_priv(dev); in change_beacon() local
1442 return wilc_add_beacon(vif, 0, 0, &params->beacon); in change_beacon()
1449 struct wilc_vif *vif = netdev_priv(dev); in stop_ap() local
1453 ret = wilc_del_beacon(vif); in stop_ap()
1465 struct wilc_vif *vif = netdev_priv(dev); in add_station() local
1466 struct wilc_priv *priv = &vif->priv; in add_station()
1468 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in add_station()
1472 ret = wilc_add_station(vif, mac, params); in add_station()
1485 struct wilc_vif *vif = netdev_priv(dev); in del_station() local
1486 struct wilc_priv *priv = &vif->priv; in del_station()
1489 if (!(vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE)) in del_station()
1495 ret = wilc_del_allstation(vif, info->sta_associated_bss); in del_station()
1497 ret = wilc_del_station(vif, mac); in del_station()
1507 struct wilc_vif *vif = netdev_priv(dev); in change_station() local
1509 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in change_station()
1510 ret = wilc_edit_station(vif, mac, params); in change_station()
1519 struct wilc_vif *vif; in wilc_get_vif_from_type() local
1521 wilc_for_each_vif(wl, vif) { in wilc_get_vif_from_type()
1522 if (vif->iftype == type) in wilc_get_vif_from_type()
1523 return vif; in wilc_get_vif_from_type()
1536 struct wilc_vif *vif; in add_virtual_intf() local
1545 vif = wilc_get_vif_from_type(wl, WILC_AP_MODE); in add_virtual_intf()
1546 if (!vif) { in add_virtual_intf()
1547 vif = wilc_get_vif_from_type(wl, WILC_GO_MODE); in add_virtual_intf()
1548 if (!vif) { in add_virtual_intf()
1554 if (vif->monitor_flag) { in add_virtual_intf()
1559 ndev = wilc_wfi_init_mon_interface(wl, name, vif->ndev); in add_virtual_intf()
1561 vif->monitor_flag = 1; in add_virtual_intf()
1567 wdev = &vif->priv.wdev; in add_virtual_intf()
1592 vif = wilc_netdev_ifc_init(wl, name, iftype, type, true); in add_virtual_intf()
1593 if (IS_ERR(vif)) in add_virtual_intf()
1594 return ERR_CAST(vif); in add_virtual_intf()
1596 return &vif->priv.wdev; in add_virtual_intf()
1602 struct wilc_vif *vif; in del_virtual_intf() local
1607 vif = netdev_priv(wdev->netdev); in del_virtual_intf()
1609 cfg80211_unregister_netdevice(vif->ndev); in del_virtual_intf()
1610 vif->monitor_flag = 0; in del_virtual_intf()
1613 list_del_rcu(&vif->list); in del_virtual_intf()
1623 struct wilc_vif *vif; in wilc_set_wakeup() local
1627 vif = wilc_get_wl_to_vif(wl); in wilc_set_wakeup()
1628 if (IS_ERR(vif)) { in wilc_set_wakeup()
1633 netdev_info(vif->ndev, "cfg set wake up = %d\n", enabled); in wilc_set_wakeup()
1634 wilc_set_wowlan_trigger(vif, enabled); in wilc_set_wakeup()
1645 struct wilc_vif *vif; in set_tx_power() local
1651 vif = wilc_get_wl_to_vif(wl); in set_tx_power()
1652 if (IS_ERR(vif)) { in set_tx_power()
1657 netdev_info(vif->ndev, "Setting tx power %d\n", tx_power); in set_tx_power()
1662 ret = wilc_set_tx_power(vif, tx_power); in set_tx_power()
1664 netdev_err(vif->ndev, "Failed to set tx power\n"); in set_tx_power()
1674 struct wilc_vif *vif = netdev_priv(wdev->netdev); in get_tx_power() local
1675 struct wilc *wl = vif->wilc; in get_tx_power()
1681 ret = wilc_get_tx_power(vif, (u8 *)dbm); in get_tx_power()
1683 netdev_err(vif->ndev, "Failed to get tx power\n"); in get_tx_power()
1867 struct wilc_vif *vif = netdev_priv(net); in wilc_init_host_int() local
1868 struct wilc_priv *priv = &vif->priv; in wilc_init_host_int()
1883 struct wilc_vif *vif = netdev_priv(net); in wilc_deinit_host_int() local
1884 struct wilc_priv *priv = &vif->priv; in wilc_deinit_host_int()
1888 flush_workqueue(vif->wilc->hif_workqueue); in wilc_deinit_host_int()
1890 ret = wilc_deinit(vif); in wilc_deinit_host_int()