Lines Matching refs:vif

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