Lines Matching refs:iter_data
1001 static void ath9k_vif_iter_set_beacon(struct ath9k_vif_iter_data *iter_data, in ath9k_vif_iter_set_beacon() argument
1005 if (!iter_data->primary_beacon_vif) { in ath9k_vif_iter_set_beacon()
1006 iter_data->primary_beacon_vif = vif; in ath9k_vif_iter_set_beacon()
1008 if (iter_data->primary_beacon_vif->type != NL80211_IFTYPE_AP && in ath9k_vif_iter_set_beacon()
1010 iter_data->primary_beacon_vif = vif; in ath9k_vif_iter_set_beacon()
1013 iter_data->beacons = true; in ath9k_vif_iter_set_beacon()
1014 iter_data->nbcnvifs += 1; in ath9k_vif_iter_set_beacon()
1017 static void ath9k_vif_iter(struct ath9k_vif_iter_data *iter_data, in ath9k_vif_iter() argument
1023 if (iter_data->has_hw_macaddr) { in ath9k_vif_iter()
1025 iter_data->mask[i] &= in ath9k_vif_iter()
1026 ~(iter_data->hw_macaddr[i] ^ mac[i]); in ath9k_vif_iter()
1028 memcpy(iter_data->hw_macaddr, mac, ETH_ALEN); in ath9k_vif_iter()
1029 iter_data->has_hw_macaddr = true; in ath9k_vif_iter()
1033 iter_data->slottime = 20; in ath9k_vif_iter()
1037 iter_data->naps++; in ath9k_vif_iter()
1039 ath9k_vif_iter_set_beacon(iter_data, vif); in ath9k_vif_iter()
1042 iter_data->nstations++; in ath9k_vif_iter()
1043 if (avp->assoc && !iter_data->primary_sta) in ath9k_vif_iter()
1044 iter_data->primary_sta = vif; in ath9k_vif_iter()
1047 iter_data->nocbs++; in ath9k_vif_iter()
1050 iter_data->nadhocs++; in ath9k_vif_iter()
1052 ath9k_vif_iter_set_beacon(iter_data, vif); in ath9k_vif_iter()
1055 iter_data->nmeshes++; in ath9k_vif_iter()
1057 ath9k_vif_iter_set_beacon(iter_data, vif); in ath9k_vif_iter()
1066 struct ath9k_vif_iter_data *iter_data) in ath9k_update_bssid_mask() argument
1079 if (!iter_data->has_hw_macaddr) in ath9k_update_bssid_mask()
1086 iter_data->mask[i] &= in ath9k_update_bssid_mask()
1087 ~(iter_data->hw_macaddr[i] ^ in ath9k_update_bssid_mask()
1095 struct ath9k_vif_iter_data *iter_data) in ath9k_calculate_iter_data() argument
1103 memset(iter_data, 0, sizeof(*iter_data)); in ath9k_calculate_iter_data()
1104 eth_broadcast_addr(iter_data->mask); in ath9k_calculate_iter_data()
1105 iter_data->slottime = 9; in ath9k_calculate_iter_data()
1108 ath9k_vif_iter(iter_data, avp->vif->addr, avp->vif); in ath9k_calculate_iter_data()
1110 ath9k_update_bssid_mask(sc, ctx, iter_data); in ath9k_calculate_iter_data()
1186 struct ath9k_vif_iter_data iter_data; in ath9k_calculate_summary_state() local
1199 ath9k_calculate_iter_data(sc, ctx, &iter_data); in ath9k_calculate_summary_state()
1201 if (iter_data.has_hw_macaddr) in ath9k_calculate_summary_state()
1202 memcpy(common->macaddr, iter_data.hw_macaddr, ETH_ALEN); in ath9k_calculate_summary_state()
1204 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); in ath9k_calculate_summary_state()
1207 if (iter_data.naps > 0) { in ath9k_calculate_summary_state()
1212 if (iter_data.beacons) in ath9k_calculate_summary_state()
1215 if (iter_data.nmeshes) in ath9k_calculate_summary_state()
1217 else if (iter_data.nocbs) in ath9k_calculate_summary_state()
1219 else if (iter_data.nadhocs) in ath9k_calculate_summary_state()
1228 if ((iter_data.nstations + iter_data.nadhocs + iter_data.nmeshes) > 0) in ath9k_calculate_summary_state()
1232 if (iter_data.naps == 1 && iter_data.beacons) in ath9k_calculate_summary_state()
1237 bool changed = (iter_data.primary_sta != ctx->primary_sta); in ath9k_calculate_summary_state()
1239 if (iter_data.primary_sta) { in ath9k_calculate_summary_state()
1240 iter_data.primary_beacon_vif = iter_data.primary_sta; in ath9k_calculate_summary_state()
1241 iter_data.beacons = true; in ath9k_calculate_summary_state()
1242 ath9k_set_assoc_state(sc, iter_data.primary_sta, in ath9k_calculate_summary_state()
1244 ctx->primary_sta = iter_data.primary_sta; in ath9k_calculate_summary_state()
1254 sc->nbcnvifs = iter_data.nbcnvifs; in ath9k_calculate_summary_state()
1255 ath9k_beacon_config(sc, iter_data.primary_beacon_vif, in ath9k_calculate_summary_state()
1256 iter_data.beacons); in ath9k_calculate_summary_state()
1259 if (ah->slottime != iter_data.slottime) { in ath9k_calculate_summary_state()
1260 ah->slottime = iter_data.slottime; in ath9k_calculate_summary_state()
1264 if (iter_data.primary_sta) in ath9k_calculate_summary_state()