Search Linux Wireless

Re: [PATCH] mac80211: Add HT IE to IBSS beacons and probe responses.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> @@ -118,7 +119,10 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
>  		*pos++ = basic | (u8) (rate / 5);
>  	}
>  
> -	/* Build IBSS probe response */
> +	/* 
> +	 * Build IBSS probe response template (also used for beacon template
> +	 * in ieee80211_beacon_get_tim())
> +	 */

That change is wrong -- no way beacon code can call into IBSS code.

I think you meant to say "I need to create a common helper function that
I call here and in the beacon code."

> --- a/net/mac80211/util.c
> +++ b/net/mac80211/util.c
> @@ -967,7 +967,7 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
>  
>  	if (sband->ht_cap.ht_supported) {
>  		u16 cap = sband->ht_cap.cap;
> -		__le16 tmp;
> +		struct ieee80211_ht_cap ht_cap;
>  
>  		if (ieee80211_disable_40mhz_24ghz &&
>  		    sband->band == IEEE80211_BAND_2GHZ) {
> @@ -975,18 +975,19 @@ int ieee80211_build_preq_ies(struct ieee80211_local *local, u8 *buffer,
>  			cap &= ~IEEE80211_HT_CAP_SGI_40;
>  		}
>  
> +		ht_cap.cap_info = cpu_to_le16(cap);
> +		ht_cap.ampdu_params_info = sband->ht_cap.ampdu_factor |
> +			(sband->ht_cap.ampdu_density <<
> +			 IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
> +		ht_cap.mcs = sband->ht_cap.mcs;
> +		ht_cap.extended_ht_cap_info = cpu_to_le16(0);
> +		ht_cap.tx_BF_cap_info = cpu_to_le32(0);
> +		ht_cap.antenna_selection_info = 0;
> +
>  		*pos++ = WLAN_EID_HT_CAPABILITY;
>  		*pos++ = sizeof(struct ieee80211_ht_cap);
> -		memset(pos, 0, sizeof(struct ieee80211_ht_cap));
> -		tmp = cpu_to_le16(cap);
> -		memcpy(pos, &tmp, sizeof(u16));
> -		pos += sizeof(u16);
> -		*pos++ = sband->ht_cap.ampdu_factor |
> -			 (sband->ht_cap.ampdu_density <<
> -				IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
> -		memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
> -		pos += sizeof(sband->ht_cap.mcs);
> -		pos += 2 + 4 + 1; /* ext info, BF cap, antsel */
> +		memcpy(pos, &ht_cap, sizeof(struct ieee80211_ht_cap));
> +		pos += sizeof(struct ieee80211_ht_cap);

And this is an unrelated change that doesn't belong into this patch at
all.

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux