Search Linux Wireless

Re: [PATCH] compat-wireless: Fix USHRT_MAX undefine before 2.6.35

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

 



On Wed, Nov 17, 2010 at 12:17:24PM -0800, Youquan Song wrote:
> Since 2.6.35, USHORT_MAX change to USHRT_MAX, which also need be updated in
> compat-wireless
> 
> Signed-off-by: Youquan Song <youquan.song@xxxxxxxxx>
> Signed-off-by: Hui Xiao <hui.xiao@xxxxxxxxx>
> ---
> 
> 
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index 6d8f897..d7ff02f 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -258,7 +258,11 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
>  	skb_queue_head_init(&sta->tx_filtered);
>  
>  	for (i = 0; i < NUM_RX_DATA_QUEUES; i++)
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2.6.35))
>  		sta->last_seq_ctrl[i] = cpu_to_le16(USHRT_MAX);
> +#else
> +		sta->last_seq_ctrl[i] = cpu_to_le16(USHORT_MAX);
> +#endif
>  
>  #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
>  	wiphy_debug(local->hw.wiphy, "Allocated STA %pM\n", sta->sta.addr);

Can you just #define USHRT_MAX USHORT_MAX for older kernels through compat.git ?

git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/compat.git

  Luis
--
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