* Re: [PATCH] compat-wireless: Fix USHRT_MAX undefine before 2.6.35
[not found] <20101117201723.GA29982@linux-youquan.bj.intel.com>
@ 2010-11-17 19:39 ` Luis R. Rodriguez
0 siblings, 0 replies; only message in thread
From: Luis R. Rodriguez @ 2010-11-17 19:39 UTC (permalink / raw)
To: Youquan Song
Cc: Luis Rodriguez, hui.xiao@intel.com, chaohong.guo@intel.com,
youquan.song@intel.com, linux-wireless
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@intel.com>
> Signed-off-by: Hui Xiao <hui.xiao@intel.com>
> ---
>
>
> 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
^ permalink raw reply [flat|nested] only message in thread