contrib/hostapd/hostapd/hostapd.c
static void hostapd_prune_associations(struct hostapd_data *hapd,
				       struct sta_info *sta)
{
	struct sta_info *osta;
	struct hostapd_data *ohapd;
	size_t i, j;
	struct hapd_interfaces *interfaces = eloop_get_user_data();

	for (i = 0; i < interfaces->count; i++) {
		for (j = 0; j < interfaces->iface[i]->num_bss; j++) {
			ohapd = interfaces->iface[i]->bss[j];
			if (ohapd == hapd)
				continue;
			osta = ap_get_sta(ohapd, sta->addr);
			if (!osta)
				continue;

			ap_sta_disassociate(ohapd, osta,
					    WLAN_REASON_UNSPECIFIED);
		}
	}
}
/**
 * hostapd_prune_associations - Remove extraneous associations
 * @hapd: Pointer to BSS data for the most recent association
 * @sta: Pointer to the associated STA data
 *
 * This function looks through all radios and BSS's for previous
 * (stale) associations of STA. If any are found they are removed.
 */
Remove extraneous associations
@hapd: Pointer to BSS data for the most recent association
@sta: Pointer to the associated STA data

This function looks through all radios and BSS's for previous
(stale) associations of STA. If any are found they are removed.
Remove extraneous associations @hapd : Pointer to BSS data for the most recent association @sta : Pointer to the associated STA data This function looks through all radios and BSS ' s for previous ( stale ) associations of STA . If any are found they are removed .
static void hostapd_prune_associations(struct hostapd_data *hapd,
				       struct sta_info *sta)
{
	struct sta_info *osta;
	struct hostapd_data *ohapd;
	size_t i, j;
	struct hapd_interfaces *interfaces = eloop_get_user_data();
	for (i = 0; i < interfaces->count; i++) {
		for (j = 0; j < interfaces->iface[i]->num_bss; j++) {
			ohapd = interfaces->iface[i]->bss[j];
			if (ohapd == hapd)
				continue;
			osta = ap_get_sta(ohapd, sta->addr);
			if (!osta)
				continue;
			ap_sta_disassociate(ohapd, osta,
					    WLAN_REASON_UNSPECIFIED);
		}
	}
}
static void hostapd_prune_associations ( struct hostapd_data * hapd , struct sta_info * sta ) { struct sta_info * osta ; struct hostapd_data * ohapd ; size_t i , j ; struct hapd_interfaces * interfaces = eloop_get_user_data ( ) ; for ( i = 0 ; i < interfaces -> count ; i ++ ) { for ( j = 0 ; j < interfaces -> iface [ i ] -> num_bss ; j ++ ) { ohapd = interfaces -> iface [ i ] -> bss [ j ] ; if ( ohapd == hapd ) continue ; osta = ap_get_sta ( ohapd , sta -> addr ) ; if ( ! osta ) continue ; ap_sta_disassociate ( ohapd , osta , WLAN_REASON_UNSPECIFIED ) ; } } }
hostapd_prune_associations - Remove extraneous associations
 @hapd: Pointer to BSS data for the most recent association
 @sta: Pointer to the associated STA data
hostapd_prune_associations - Remove extraneous associations @hapd : Pointer to BSS data for the most recent association @sta : Pointer to the associated STA data