Lines Matching full:vif
169 struct wilc_vif *vif = netdev_priv(dev); in cfg_connect_result() local
170 struct wilc *wl = vif->wilc; in cfg_connect_result()
175 vif->connecting = false; in cfg_connect_result()
185 if (vif->iftype != WILC_CLIENT_MODE) in cfg_connect_result()
195 cfg80211_ref_bss(wiphy, vif->bss); in cfg_connect_result()
196 cfg80211_connect_bss(dev, conn_info->bssid, vif->bss, in cfg_connect_result()
204 vif->bss = NULL; in cfg_connect_result()
211 if (vif->iftype != WILC_CLIENT_MODE) { in cfg_connect_result()
226 struct wilc_vif *vif; in wilc_get_wl_to_vif() local
228 vif = list_first_or_null_rcu(&wl->vif_list, typeof(*vif), list); in wilc_get_wl_to_vif()
229 if (!vif) in wilc_get_wl_to_vif()
232 return vif; in wilc_get_wl_to_vif()
239 struct wilc_vif *vif; in set_channel() local
245 vif = wilc_get_wl_to_vif(wl); in set_channel()
246 if (IS_ERR(vif)) { in set_channel()
248 return PTR_ERR(vif); in set_channel()
254 result = wilc_set_mac_chnl_num(vif, channelnum); in set_channel()
256 netdev_err(vif->ndev, "Error in setting channel\n"); in set_channel()
264 struct wilc_vif *vif = netdev_priv(request->wdev->netdev); in scan() local
265 struct wilc_priv *priv = &vif->priv; in scan()
272 netdev_err(vif->ndev, "Requested scanned channels over\n"); in scan()
289 ret = wilc_scan(vif, WILC_FW_USER_SCAN, scan_type, scan_ch_list, in scan()
304 struct wilc_vif *vif = netdev_priv(dev); in connect() local
305 struct wilc_priv *priv = &vif->priv; in connect()
317 vif->connecting = true; in connect()
359 memcpy(vif->auth.ssid.ssid, sme->ssid, sme->ssid_len); in connect()
360 vif->auth.ssid.ssid_len = sme->ssid_len; in connect()
362 vif->auth.key_mgmt_suite = cpu_to_be32(sme->crypto.akm_suites[0]); in connect()
363 ether_addr_copy(vif->auth.bssid, sme->bssid); in connect()
380 netdev_err(vif->ndev, "%s: Scan in progress\n", __func__); in connect()
393 if (ether_addr_equal_unaligned(vif->bssid, bss->bssid)) { in connect()
407 vif->wilc->op_ch = ch; in connect()
408 if (vif->iftype != WILC_CLIENT_MODE) in connect()
409 vif->wilc->sta_ch = ch; in connect()
427 ret = wilc_set_join_req(vif, bss->bssid, sme->ie, sme->ie_len); in connect()
431 if (vif->iftype != WILC_CLIENT_MODE) in connect()
432 vif->wilc->sta_ch = WILC_INVALID_CHANNEL; in connect()
439 vif->bss = bss; in connect()
447 vif->connecting = false; in connect()
454 struct wilc_vif *vif = netdev_priv(dev); in disconnect() local
455 struct wilc_priv *priv = &vif->priv; in disconnect()
456 struct wilc *wilc = vif->wilc; in disconnect()
459 vif->connecting = false; in disconnect()
470 if (vif->iftype != WILC_CLIENT_MODE) in disconnect()
476 ret = wilc_disconnect(vif); in disconnect()
482 vif->bss = NULL; in disconnect()
553 struct wilc_vif *vif = netdev_priv(netdev); in add_key() local
554 struct wilc_priv *priv = &vif->priv; in add_key()
609 ret = wilc_add_rx_gtk(vif, params->key, keylen, in add_key()
614 ret = wilc_add_ptk(vif, params->key, keylen, mac_addr, in add_key()
635 ret = wilc_add_igtk(vif, params->key, keylen, params->seq, in add_key()
653 struct wilc_vif *vif = netdev_priv(netdev); in del_key() local
654 struct wilc_priv *priv = &vif->priv; in del_key()
694 struct wilc_vif *vif = netdev_priv(netdev); in get_key() local
695 struct wilc_priv *priv = &vif->priv; in get_key()
737 struct wilc_vif *vif = netdev_priv(netdev); in set_default_mgmt_key() local
739 return wilc_set_default_mgmt_key_index(vif, key_index); in set_default_mgmt_key()
745 struct wilc_vif *vif = netdev_priv(dev); in get_station() local
746 struct wilc_priv *priv = &vif->priv; in get_station()
747 struct wilc *wilc = vif->wilc; in get_station()
752 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in get_station()
769 wilc_get_inactive_time(vif, mac, &inactive_time); in get_station()
771 } else if (vif->iftype == WILC_STATION_MODE) { in get_station()
777 wilc_get_statistics(vif, &stats); in get_station()
793 wilc_enable_tcp_ack_filter(vif, true); in get_station()
795 wilc_enable_tcp_ack_filter(vif, false); in get_station()
811 struct wilc_vif *vif; in set_wiphy_params() local
816 vif = wilc_get_wl_to_vif(wl); in set_wiphy_params()
817 if (IS_ERR(vif)) in set_wiphy_params()
820 priv = &vif->priv; in set_wiphy_params()
824 netdev_dbg(vif->ndev, in set_wiphy_params()
831 netdev_dbg(vif->ndev, in set_wiphy_params()
840 netdev_dbg(vif->ndev, in set_wiphy_params()
846 netdev_err(vif->ndev, in set_wiphy_params()
854 netdev_dbg(vif->ndev, in set_wiphy_params()
860 netdev_err(vif->ndev, "RTS threshold out of range\n"); in set_wiphy_params()
865 ret = wilc_hif_set_cfg(vif, &cfg_param_val); in set_wiphy_params()
877 struct wilc_vif *vif = netdev_priv(netdev); in set_pmksa() local
878 struct wilc_priv *priv = &vif->priv; in set_pmksa()
903 ret = wilc_set_pmkid_info(vif, &priv->pmkid_list); in set_pmksa()
912 struct wilc_vif *vif = netdev_priv(netdev); in del_pmksa() local
913 struct wilc_priv *priv = &vif->priv; in del_pmksa()
942 struct wilc_vif *vif = netdev_priv(netdev); in flush_pmksa() local
944 memset(&vif->priv.pmkid_list, 0, sizeof(struct wilc_pmkid_attr)); in flush_pmksa()
1017 bool wilc_wfi_mgmt_frame_rx(struct wilc_vif *vif, u8 *buff, u32 size) in wilc_wfi_mgmt_frame_rx() argument
1019 struct wilc *wl = vif->wilc; in wilc_wfi_mgmt_frame_rx()
1020 struct wilc_priv *priv = &vif->priv; in wilc_wfi_mgmt_frame_rx()
1028 void wilc_wfi_p2p_rx(struct wilc_vif *vif, u8 *buff, u32 size) in wilc_wfi_p2p_rx() argument
1030 struct wilc *wl = vif->wilc; in wilc_wfi_p2p_rx()
1031 struct wilc_priv *priv = &vif->priv; in wilc_wfi_p2p_rx()
1065 netdev_dbg(vif->ndev, "Receiving action wrong ch\n"); in wilc_wfi_p2p_rx()
1083 wilc_wfi_cfg_parse_ch_attr(p->attr, p->tag_len - 4, vif->wilc->sta_ch); in wilc_wfi_p2p_rx()
1099 struct wilc_vif *vif = data; in wilc_wfi_remain_on_channel_expired() local
1100 struct wilc_priv *priv = &vif->priv; in wilc_wfi_remain_on_channel_expired()
1118 struct wilc_vif *vif = netdev_priv(wdev->netdev); in remain_on_channel() local
1119 struct wilc_priv *priv = &vif->priv; in remain_on_channel()
1123 netdev_dbg(vif->ndev, "Required while in AP mode\n"); in remain_on_channel()
1131 ret = wilc_remain_on_channel(vif, id, duration, chan->hw_value, in remain_on_channel()
1133 (void *)vif); in remain_on_channel()
1137 vif->wilc->op_ch = chan->hw_value; in remain_on_channel()
1146 mod_timer(&vif->hif_drv->remain_on_ch_timer, in remain_on_channel()
1156 struct wilc_vif *vif = netdev_priv(wdev->netdev); in cancel_remain_on_channel() local
1157 struct wilc_priv *priv = &vif->priv; in cancel_remain_on_channel()
1162 return wilc_listen_state_expired(vif, cookie); in cancel_remain_on_channel()
1176 struct wilc_vif *vif = netdev_priv(wdev->netdev); in mgmt_tx() local
1177 struct wilc_priv *priv = &vif->priv; in mgmt_tx()
1208 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1209 vif->wilc->op_ch = chan->hw_value; in mgmt_tx()
1215 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1217 wilc_set_mac_chnl_num(vif, vif->wilc->op_ch); in mgmt_tx()
1225 wilc_set_mac_chnl_num(vif, chan->hw_value); in mgmt_tx()
1226 vif->wilc->op_ch = chan->hw_value; in mgmt_tx()
1239 wilc_wfi_cfg_parse_ch_attr(p->attr, p->tag_len - 4, vif->wilc->sta_ch); in mgmt_tx()
1259 struct wilc_vif *vif = netdev_priv(wdev->netdev); in mgmt_tx_cancel_wait() local
1260 struct wilc_priv *priv = &vif->priv; in mgmt_tx_cancel_wait()
1284 struct wilc_vif *vif = netdev_priv(wdev->netdev); in wilc_update_mgmt_frame_registrations() local
1290 bool prev = vif->mgmt_reg_stypes & presp_bit; in wilc_update_mgmt_frame_registrations()
1294 wilc_frame_register(vif, IEEE80211_STYPE_PROBE_REQ, now); in wilc_update_mgmt_frame_registrations()
1296 prev = vif->mgmt_reg_stypes & action_bit; in wilc_update_mgmt_frame_registrations()
1300 wilc_frame_register(vif, IEEE80211_STYPE_ACTION, now); in wilc_update_mgmt_frame_registrations()
1302 prev = vif->mgmt_reg_stypes & pauth_bit; in wilc_update_mgmt_frame_registrations()
1305 wilc_frame_register(vif, IEEE80211_STYPE_AUTH, now); in wilc_update_mgmt_frame_registrations()
1308 vif->mgmt_reg_stypes = in wilc_update_mgmt_frame_registrations()
1315 struct wilc_vif *vif = netdev_priv(dev); in external_auth() local
1318 wilc_set_external_auth_param(vif, auth); in external_auth()
1332 struct wilc_vif *vif = netdev_priv(dev); in dump_station() local
1338 ret = wilc_get_rssi(vif, &sinfo->signal); in dump_station()
1343 memcpy(mac, vif->priv.associated_bss, ETH_ALEN); in dump_station()
1350 struct wilc_vif *vif = netdev_priv(dev); in set_power_mgmt() local
1351 struct wilc_priv *priv = &vif->priv; in set_power_mgmt()
1356 wilc_set_power_mgmt(vif, enabled, timeout); in set_power_mgmt()
1366 struct wilc_vif *vif = netdev_priv(dev); in change_virtual_intf() local
1367 struct wilc_priv *priv = &vif->priv; in change_virtual_intf()
1371 vif->connecting = false; in change_virtual_intf()
1374 vif->monitor_flag = 0; in change_virtual_intf()
1375 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) in change_virtual_intf()
1377 vif->iftype = WILC_STATION_MODE; in change_virtual_intf()
1380 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1381 WILC_STATION_MODE, vif->idx); in change_virtual_intf()
1388 vif->connecting = false; in change_virtual_intf()
1391 vif->monitor_flag = 0; in change_virtual_intf()
1392 vif->iftype = WILC_CLIENT_MODE; in change_virtual_intf()
1395 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1396 WILC_STATION_MODE, vif->idx); in change_virtual_intf()
1402 vif->iftype = WILC_AP_MODE; in change_virtual_intf()
1405 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1406 WILC_AP_MODE, vif->idx); in change_virtual_intf()
1412 vif->iftype = WILC_GO_MODE; in change_virtual_intf()
1415 wilc_set_operation_mode(vif, wilc_get_vif_idx(vif), in change_virtual_intf()
1416 WILC_AP_MODE, vif->idx); in change_virtual_intf()
1430 struct wilc_vif *vif = netdev_priv(dev); in start_ap() local
1439 return wilc_add_beacon(vif, settings->beacon_interval, in start_ap()
1446 struct wilc_vif *vif = netdev_priv(dev); in change_beacon() local
1448 return wilc_add_beacon(vif, 0, 0, beacon); in change_beacon()
1455 struct wilc_vif *vif = netdev_priv(dev); in stop_ap() local
1459 ret = wilc_del_beacon(vif); in stop_ap()
1471 struct wilc_vif *vif = netdev_priv(dev); in add_station() local
1472 struct wilc_priv *priv = &vif->priv; in add_station()
1474 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in add_station()
1478 ret = wilc_add_station(vif, mac, params); in add_station()
1491 struct wilc_vif *vif = netdev_priv(dev); in del_station() local
1492 struct wilc_priv *priv = &vif->priv; in del_station()
1495 if (!(vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE)) in del_station()
1501 ret = wilc_del_allstation(vif, info->sta_associated_bss); in del_station()
1503 ret = wilc_del_station(vif, mac); in del_station()
1513 struct wilc_vif *vif = netdev_priv(dev); in change_station() local
1515 if (vif->iftype == WILC_AP_MODE || vif->iftype == WILC_GO_MODE) { in change_station()
1516 ret = wilc_edit_station(vif, mac, params); in change_station()
1525 struct wilc_vif *vif; in wilc_get_vif_from_type() local
1527 list_for_each_entry_rcu(vif, &wl->vif_list, list) { in wilc_get_vif_from_type()
1528 if (vif->iftype == type) in wilc_get_vif_from_type()
1529 return vif; in wilc_get_vif_from_type()
1542 struct wilc_vif *vif; in add_virtual_intf() local
1551 vif = wilc_get_vif_from_type(wl, WILC_AP_MODE); in add_virtual_intf()
1552 if (!vif) { in add_virtual_intf()
1553 vif = wilc_get_vif_from_type(wl, WILC_GO_MODE); in add_virtual_intf()
1554 if (!vif) { in add_virtual_intf()
1560 if (vif->monitor_flag) { in add_virtual_intf()
1565 ndev = wilc_wfi_init_mon_interface(wl, name, vif->ndev); in add_virtual_intf()
1567 vif->monitor_flag = 1; in add_virtual_intf()
1573 wdev = &vif->priv.wdev; in add_virtual_intf()
1598 vif = wilc_netdev_ifc_init(wl, name, iftype, type, true); in add_virtual_intf()
1599 if (IS_ERR(vif)) in add_virtual_intf()
1600 return ERR_CAST(vif); in add_virtual_intf()
1602 return &vif->priv.wdev; in add_virtual_intf()
1608 struct wilc_vif *vif; in del_virtual_intf() local
1613 vif = netdev_priv(wdev->netdev); in del_virtual_intf()
1615 cfg80211_unregister_netdevice(vif->ndev); in del_virtual_intf()
1616 vif->monitor_flag = 0; in del_virtual_intf()
1618 wilc_set_operation_mode(vif, 0, 0, 0); in del_virtual_intf()
1620 list_del_rcu(&vif->list); in del_virtual_intf()
1647 struct wilc_vif *vif; in wilc_set_wakeup() local
1651 vif = wilc_get_wl_to_vif(wl); in wilc_set_wakeup()
1652 if (IS_ERR(vif)) { in wilc_set_wakeup()
1657 netdev_info(vif->ndev, "cfg set wake up = %d\n", enabled); in wilc_set_wakeup()
1658 wilc_set_wowlan_trigger(vif, enabled); in wilc_set_wakeup()
1669 struct wilc_vif *vif; in set_tx_power() local
1675 vif = wilc_get_wl_to_vif(wl); in set_tx_power()
1676 if (IS_ERR(vif)) { in set_tx_power()
1681 netdev_info(vif->ndev, "Setting tx power %d\n", tx_power); in set_tx_power()
1686 ret = wilc_set_tx_power(vif, tx_power); in set_tx_power()
1688 netdev_err(vif->ndev, "Failed to set tx power\n"); in set_tx_power()
1698 struct wilc_vif *vif = netdev_priv(wdev->netdev); in get_tx_power() local
1699 struct wilc *wl = vif->wilc; in get_tx_power()
1705 ret = wilc_get_tx_power(vif, (u8 *)dbm); in get_tx_power()
1707 netdev_err(vif->ndev, "Failed to get tx power\n"); in get_tx_power()
1790 struct wilc_vif *vif; in wilc_cfg80211_init() local
1813 vif = wilc_netdev_ifc_init(wl, "wlan%d", WILC_STATION_MODE, in wilc_cfg80211_init()
1815 if (IS_ERR(vif)) { in wilc_cfg80211_init()
1816 ret = PTR_ERR(vif); in wilc_cfg80211_init()
1894 struct wilc_vif *vif = netdev_priv(net); in wilc_init_host_int() local
1895 struct wilc_priv *priv = &vif->priv; in wilc_init_host_int()
1910 struct wilc_vif *vif = netdev_priv(net); in wilc_deinit_host_int() local
1911 struct wilc_priv *priv = &vif->priv; in wilc_deinit_host_int()
1915 flush_workqueue(vif->wilc->hif_workqueue); in wilc_deinit_host_int()
1917 ret = wilc_deinit(vif); in wilc_deinit_host_int()