Skip to contentSkip to conversation

compat-wireless: Fix USHRT_MAX undefine before 2.6.35

PATCH Luis R. Rodriguez 1 participant 1 message Nov 17, 2010 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 14 lines · Youquan Song

Since 2.6.35, USHORT_MAX change to USHRT_MAX, which also need be updated in compat-wireless

---

net/mac80211/sta_info.c +0 -0
index 6d8f897..d7ff02f 100644
@@ -258,7 +258,11 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
 	skb_queue_head_init(&sta->tx_filtered);

net/mac80211/sta_info.c struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata, · line 268

Quoted 10 lines
net/mac80211/sta_info.c +4 -0
 
 	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