[PATCH 11/12] mesh: Send peering open frame again if beacon from listen state peer is received

Bob Copeland me
Tue Nov 4 06:12:35 PST 2014


On Tue, Nov 04, 2014 at 02:36:52PM +0900, Masashi Honma wrote:
> Signed-off-by: Kenzoh Nishikawa <Kenzoh.Nishikawa at jp.sony.com>
> Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
> ---

This patch probably contains some valid stuff, but there are a few
changes which I don't think belong --

> @@ -411,7 +412,7 @@ static void plink_timer(void *eloop_ctx, void *user_data)
>  		/* confirm timer */
>  		if (!reason)
>  			reason = WLAN_REASON_MESH_CONFIRM_TIMEOUT;
> -		sta->plink_state = PLINK_HOLDING;
> +		wpa_mesh_set_plink_state(wpa_s, sta, PLINK_HOLDING);
>  		eloop_register_timeout(conf->dot11MeshHoldingTimeout / 1000,
>  			(conf->dot11MeshHoldingTimeout % 1000) * 1000,
>  			plink_timer, wpa_s, sta);

I think this is an unrelated change?

> @@ -537,11 +538,12 @@ void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
>  	int ret = 0;
>  
>  	sta = ap_get_sta(data, addr);
> -	if (!sta) {
> -		sta = ap_sta_add(data, addr);
> -		if (!sta)
> -			return;
> -	}
> +	if (sta != NULL)
> +		return;
> +
> +	sta = ap_sta_add(data, addr);
> +	if (sta == NULL)
> +		return;

This is an unrelated change.

>  #ifdef CONFIG_IEEE80211N
>  	copy_sta_ht_capab(data, sta, elems->ht_capabilities,
> -			elems->ht_capabilities_len);
> +			  elems->ht_capabilities_len);
>  	update_ht_state(data, sta);
>  #endif /* CONFIG_IEEE80211N */

Unrelated change.


> @@ -588,10 +590,15 @@ void wpa_mesh_new_mesh_peer(struct wpa_supplicant *wpa_s, const u8 *addr,
>  		return;
>  	}
>  
> -	if (conf->security == MESH_CONF_SEC_NONE)
> -		mesh_mpm_plink_open(wpa_s, sta, PLINK_OPEN_SENT);
> -	else
> -		mesh_rsn_auth_sae_sta(wpa_s, sta);
> +	if (sta->plink_state == PLINK_LISTEN) {
> +		if (!sta->my_lid)
> +			mesh_mpm_init_link(wpa_s, sta);
> +		if (conf->security == MESH_CONF_SEC_NONE) {
> +			mesh_mpm_plink_open(wpa_s, sta, PLINK_OPEN_SENT);
> +		} else {
> +			mesh_rsn_auth_sae_sta(wpa_s, sta);
> +		}
> +	}
>  }

I guess this, plus masking off the ASSOC flag, are the functionality
changes of interest.  Hmm, I would expect plink_state to always be
LISTEN at this point.  We already call mesh_mpm_init_link()
unconditionally at the top of this function.

-- 
Bob Copeland %% www.bobcopeland.com



More information about the Hostap mailing list