Lines Matching refs:vif
26 struct ath6kl_sta *ath6kl_find_sta(struct ath6kl_vif *vif, u8 *node_addr) in ath6kl_find_sta() argument
28 struct ath6kl *ar = vif->ar; in ath6kl_find_sta()
35 max_conn = (vif->nw_type == AP_NETWORK) ? AP_MAX_NUM_STA : 0; in ath6kl_find_sta()
61 static void ath6kl_add_new_sta(struct ath6kl_vif *vif, u8 *mac, u16 aid, in ath6kl_add_new_sta() argument
65 struct ath6kl *ar = vif->ar; in ath6kl_add_new_sta()
83 aggr_conn_init(vif, vif->aggr_cntxt, sta->aggr_conn); in ath6kl_add_new_sta()
350 static void ath6kl_install_static_wep_keys(struct ath6kl_vif *vif) in ath6kl_install_static_wep_keys() argument
356 if (vif->wep_key_list[index].key_len) { in ath6kl_install_static_wep_keys()
358 if (index == vif->def_txkey_index) in ath6kl_install_static_wep_keys()
361 ath6kl_wmi_addkey_cmd(vif->ar->wmi, vif->fw_vif_idx, in ath6kl_install_static_wep_keys()
365 vif->wep_key_list[index].key_len, in ath6kl_install_static_wep_keys()
367 vif->wep_key_list[index].key, in ath6kl_install_static_wep_keys()
374 void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel) in ath6kl_connect_ap_mode_bss() argument
376 struct ath6kl *ar = vif->ar; in ath6kl_connect_ap_mode_bss()
385 switch (vif->auth_mode) { in ath6kl_connect_ap_mode_bss()
387 if (vif->prwise_crypto == WEP_CRYPT) in ath6kl_connect_ap_mode_bss()
388 ath6kl_install_static_wep_keys(vif); in ath6kl_connect_ap_mode_bss()
403 ar->wmi, vif->fw_vif_idx, ik->key_index, ik->key_type, in ath6kl_connect_ap_mode_bss()
416 ath6kl_cfg80211_ch_switch_notify(vif, channel, WMI_11G_HT20); in ath6kl_connect_ap_mode_bss()
418 ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, NONE_BSS_FILTER, 0); in ath6kl_connect_ap_mode_bss()
419 set_bit(CONNECTED, &vif->flags); in ath6kl_connect_ap_mode_bss()
420 netif_carrier_on(vif->ndev); in ath6kl_connect_ap_mode_bss()
423 void ath6kl_connect_ap_mode_sta(struct ath6kl_vif *vif, u16 aid, u8 *mac_addr, in ath6kl_connect_ap_mode_sta() argument
483 ath6kl_add_new_sta(vif, mac_addr, aid, wpa_ie, in ath6kl_connect_ap_mode_sta()
497 cfg80211_new_sta(vif->ndev, mac_addr, sinfo, GFP_KERNEL); in ath6kl_connect_ap_mode_sta()
499 netif_wake_queue(vif->ndev); in ath6kl_connect_ap_mode_sta()
506 struct ath6kl_vif *vif = from_timer(vif, t, disconnect_timer); in disconnect_timer_handler() local
508 ath6kl_init_profile_info(vif); in disconnect_timer_handler()
509 ath6kl_disconnect(vif); in disconnect_timer_handler()
512 void ath6kl_disconnect(struct ath6kl_vif *vif) in ath6kl_disconnect() argument
514 if (test_bit(CONNECTED, &vif->flags) || in ath6kl_disconnect()
515 test_bit(CONNECT_PEND, &vif->flags)) { in ath6kl_disconnect()
516 ath6kl_wmi_disconnect_cmd(vif->ar->wmi, vif->fw_vif_idx); in ath6kl_disconnect()
522 clear_bit(CONNECT_PEND, &vif->flags); in ath6kl_disconnect()
558 void ath6kl_scan_complete_evt(struct ath6kl_vif *vif, int status) in ath6kl_scan_complete_evt() argument
560 struct ath6kl *ar = vif->ar; in ath6kl_scan_complete_evt()
566 ath6kl_cfg80211_scan_complete_event(vif, aborted); in ath6kl_scan_complete_evt()
569 clear_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); in ath6kl_scan_complete_evt()
570 ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_scan_complete_evt()
577 static int ath6kl_commit_ch_switch(struct ath6kl_vif *vif, u16 channel) in ath6kl_commit_ch_switch() argument
579 struct ath6kl *ar = vif->ar; in ath6kl_commit_ch_switch()
581 vif->profile.ch = cpu_to_le16(channel); in ath6kl_commit_ch_switch()
583 switch (vif->nw_type) { in ath6kl_commit_ch_switch()
589 if (vif->rsn_capab && in ath6kl_commit_ch_switch()
592 ath6kl_wmi_set_ie_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_commit_ch_switch()
594 (const u8 *) &vif->rsn_capab, in ath6kl_commit_ch_switch()
595 sizeof(vif->rsn_capab)); in ath6kl_commit_ch_switch()
597 return ath6kl_wmi_ap_profile_commit(ar->wmi, vif->fw_vif_idx, in ath6kl_commit_ch_switch()
598 &vif->profile); in ath6kl_commit_ch_switch()
600 ath6kl_err("won't switch channels nw_type=%d\n", vif->nw_type); in ath6kl_commit_ch_switch()
607 struct ath6kl_vif *vif; in ath6kl_check_ch_switch() local
614 list_for_each_entry(vif, &ar->vif_list, list) { in ath6kl_check_ch_switch()
615 if (ar->want_ch_switch & (1 << vif->fw_vif_idx)) in ath6kl_check_ch_switch()
616 res = ath6kl_commit_ch_switch(vif, channel); in ath6kl_check_ch_switch()
619 ar->want_ch_switch &= ~(1 << vif->fw_vif_idx); in ath6kl_check_ch_switch()
623 vif->nw_type, res); in ath6kl_check_ch_switch()
628 void ath6kl_connect_event(struct ath6kl_vif *vif, u16 channel, u8 *bssid, in ath6kl_connect_event() argument
634 struct ath6kl *ar = vif->ar; in ath6kl_connect_event()
636 ath6kl_cfg80211_connect_event(vif, channel, bssid, in ath6kl_connect_event()
642 memcpy(vif->bssid, bssid, sizeof(vif->bssid)); in ath6kl_connect_event()
643 vif->bss_ch = channel; in ath6kl_connect_event()
645 if (vif->nw_type == INFRA_NETWORK) { in ath6kl_connect_event()
646 ath6kl_wmi_listeninterval_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_connect_event()
647 vif->listen_intvl_t, 0); in ath6kl_connect_event()
651 netif_wake_queue(vif->ndev); in ath6kl_connect_event()
654 spin_lock_bh(&vif->if_lock); in ath6kl_connect_event()
655 set_bit(CONNECTED, &vif->flags); in ath6kl_connect_event()
656 clear_bit(CONNECT_PEND, &vif->flags); in ath6kl_connect_event()
657 netif_carrier_on(vif->ndev); in ath6kl_connect_event()
658 spin_unlock_bh(&vif->if_lock); in ath6kl_connect_event()
660 aggr_reset_state(vif->aggr_cntxt->aggr_conn); in ath6kl_connect_event()
661 vif->reconnect_flag = 0; in ath6kl_connect_event()
663 if ((vif->nw_type == ADHOC_NETWORK) && ar->ibss_ps_enable) { in ath6kl_connect_event()
670 set_bit(CLEAR_BSSFILTER_ON_BEACON, &vif->flags); in ath6kl_connect_event()
671 ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_connect_event()
676 void ath6kl_tkip_micerr_event(struct ath6kl_vif *vif, u8 keyid, bool ismcast) in ath6kl_tkip_micerr_event() argument
679 struct ath6kl *ar = vif->ar; in ath6kl_tkip_micerr_event()
686 if (vif->nw_type == AP_NETWORK) { in ath6kl_tkip_micerr_event()
695 cfg80211_michael_mic_failure(vif->ndev, sta->mac, in ath6kl_tkip_micerr_event()
699 ath6kl_cfg80211_tkip_micerr_event(vif, keyid, ismcast); in ath6kl_tkip_micerr_event()
703 static void ath6kl_update_target_stats(struct ath6kl_vif *vif, u8 *ptr, u32 len) in ath6kl_update_target_stats() argument
707 struct ath6kl *ar = vif->ar; in ath6kl_update_target_stats()
708 struct target_stats *stats = &vif->target_stats; in ath6kl_update_target_stats()
811 if (test_bit(STATS_UPDATE_PEND, &vif->flags)) { in ath6kl_update_target_stats()
812 clear_bit(STATS_UPDATE_PEND, &vif->flags); in ath6kl_update_target_stats()
822 void ath6kl_tgt_stats_event(struct ath6kl_vif *vif, u8 *ptr, u32 len) in ath6kl_tgt_stats_event() argument
825 struct ath6kl *ar = vif->ar; in ath6kl_tgt_stats_event()
830 if (vif->nw_type == AP_NETWORK) { in ath6kl_tgt_stats_event()
849 ath6kl_update_target_stats(vif, ptr, len); in ath6kl_tgt_stats_event()
868 void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid) in ath6kl_pspoll_event() argument
873 struct ath6kl *ar = vif->ar; in ath6kl_pspoll_event()
901 ath6kl_wmi_send_mgmt_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_pspoll_event()
912 ath6kl_data_tx(skb, vif->ndev); in ath6kl_pspoll_event()
921 ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, conn->aid, 0); in ath6kl_pspoll_event()
924 void ath6kl_dtimexpiry_event(struct ath6kl_vif *vif) in ath6kl_dtimexpiry_event() argument
928 struct ath6kl *ar = vif->ar; in ath6kl_dtimexpiry_event()
950 set_bit(DTIM_EXPIRED, &vif->flags); in ath6kl_dtimexpiry_event()
956 ath6kl_data_tx(skb, vif->ndev); in ath6kl_dtimexpiry_event()
962 clear_bit(DTIM_EXPIRED, &vif->flags); in ath6kl_dtimexpiry_event()
965 ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, MCAST_AID, 0); in ath6kl_dtimexpiry_event()
968 void ath6kl_disconnect_event(struct ath6kl_vif *vif, u8 reason, u8 *bssid, in ath6kl_disconnect_event() argument
972 struct ath6kl *ar = vif->ar; in ath6kl_disconnect_event()
974 if (vif->nw_type == AP_NETWORK) { in ath6kl_disconnect_event()
978 ar->want_ch_switch |= 1 << vif->fw_vif_idx; in ath6kl_disconnect_event()
980 ar->last_ch = le16_to_cpu(vif->profile.ch); in ath6kl_disconnect_event()
985 cfg80211_conn_failed(vif->ndev, bssid, in ath6kl_disconnect_event()
992 cfg80211_conn_failed(vif->ndev, bssid, in ath6kl_disconnect_event()
1008 ath6kl_wmi_set_pvb_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_disconnect_event()
1014 cfg80211_del_sta(vif->ndev, bssid, GFP_KERNEL); in ath6kl_disconnect_event()
1017 if (memcmp(vif->ndev->dev_addr, bssid, ETH_ALEN) == 0) { in ath6kl_disconnect_event()
1018 memset(vif->wep_key_list, 0, sizeof(vif->wep_key_list)); in ath6kl_disconnect_event()
1019 clear_bit(CONNECTED, &vif->flags); in ath6kl_disconnect_event()
1024 ath6kl_cfg80211_disconnect_event(vif, reason, bssid, in ath6kl_disconnect_event()
1028 aggr_reset_state(vif->aggr_cntxt->aggr_conn); in ath6kl_disconnect_event()
1030 del_timer(&vif->disconnect_timer); in ath6kl_disconnect_event()
1041 ath6kl_wmi_bssfilter_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_disconnect_event()
1044 set_bit(CONNECT_PEND, &vif->flags); in ath6kl_disconnect_event()
1048 (vif->reconnect_flag == 1))) { in ath6kl_disconnect_event()
1049 set_bit(CONNECTED, &vif->flags); in ath6kl_disconnect_event()
1058 spin_lock_bh(&vif->if_lock); in ath6kl_disconnect_event()
1059 clear_bit(CONNECTED, &vif->flags); in ath6kl_disconnect_event()
1060 netif_carrier_off(vif->ndev); in ath6kl_disconnect_event()
1061 spin_unlock_bh(&vif->if_lock); in ath6kl_disconnect_event()
1063 if ((reason != CSERV_DISCONNECT) || (vif->reconnect_flag != 1)) in ath6kl_disconnect_event()
1064 vif->reconnect_flag = 0; in ath6kl_disconnect_event()
1069 netif_stop_queue(vif->ndev); in ath6kl_disconnect_event()
1070 memset(vif->bssid, 0, sizeof(vif->bssid)); in ath6kl_disconnect_event()
1071 vif->bss_ch = 0; in ath6kl_disconnect_event()
1078 struct ath6kl_vif *vif; in ath6kl_vif_first() local
1086 vif = list_first_entry(&ar->vif_list, struct ath6kl_vif, list); in ath6kl_vif_first()
1090 return vif; in ath6kl_vif_first()
1095 struct ath6kl_vif *vif = netdev_priv(dev); in ath6kl_open() local
1097 set_bit(WLAN_ENABLED, &vif->flags); in ath6kl_open()
1099 if (test_bit(CONNECTED, &vif->flags)) { in ath6kl_open()
1111 struct ath6kl_vif *vif = netdev_priv(dev); in ath6kl_close() local
1115 ath6kl_cfg80211_stop(vif); in ath6kl_close()
1117 clear_bit(WLAN_ENABLED, &vif->flags); in ath6kl_close()
1125 struct ath6kl_vif *vif = netdev_priv(dev); in ath6kl_set_features() local
1126 struct ath6kl *ar = vif->ar; in ath6kl_set_features()
1133 vif->fw_vif_idx, in ath6kl_set_features()
1143 vif->fw_vif_idx, in ath6kl_set_features()
1156 struct ath6kl_vif *vif = netdev_priv(ndev); in ath6kl_set_multicast_list() local
1165 if (!test_bit(WMI_READY, &vif->ar->flag) || in ath6kl_set_multicast_list()
1166 !test_bit(WLAN_ENABLED, &vif->flags)) in ath6kl_set_multicast_list()
1175 set_bit(NETDEV_MCAST_ALL_ON, &vif->flags); in ath6kl_set_multicast_list()
1177 clear_bit(NETDEV_MCAST_ALL_ON, &vif->flags); in ath6kl_set_multicast_list()
1180 vif->ar->fw_capabilities)) { in ath6kl_set_multicast_list()
1181 mc_all_on = mc_all_on || (vif->ar->state == ATH6KL_STATE_ON); in ath6kl_set_multicast_list()
1186 set_bit(NETDEV_MCAST_ALL_OFF, &vif->flags); in ath6kl_set_multicast_list()
1188 clear_bit(NETDEV_MCAST_ALL_OFF, &vif->flags); in ath6kl_set_multicast_list()
1195 ret = ath6kl_wmi_mcast_filter_cmd(vif->ar->wmi, vif->fw_vif_idx, in ath6kl_set_multicast_list()
1203 if (test_bit(NETDEV_MCAST_ALL_ON, &vif->flags)) in ath6kl_set_multicast_list()
1207 list_for_each_entry_safe(mc_filter, tmp, &vif->mc_filter, list) { in ath6kl_set_multicast_list()
1225 ret = ath6kl_wmi_add_del_mcast_filter_cmd(vif->ar->wmi, in ath6kl_set_multicast_list()
1226 vif->fw_vif_idx, mc_filter->hw_addr, in ath6kl_set_multicast_list()
1243 list_for_each_entry(mc_filter, &vif->mc_filter, list) { in ath6kl_set_multicast_list()
1265 ret = ath6kl_wmi_add_del_mcast_filter_cmd(vif->ar->wmi, in ath6kl_set_multicast_list()
1266 vif->fw_vif_idx, mc_filter->hw_addr, in ath6kl_set_multicast_list()
1280 list_splice_tail(&mc_filter_new, &vif->mc_filter); in ath6kl_set_multicast_list()