* [PATCH] mac80211: fix printk warning on 64-bit
@ 2007-10-22 12:51 Johannes Berg
0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2007-10-22 12:51 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless
My AID message patch introduced a warning on 64-bit machines because ~
extends to unsigned long:
| net/mac80211/ieee80211_sta.c: In function =E2=80=98ieee80211_rx_mgmt_=
assoc_resp=E2=80=99:
| net/mac80211/ieee80211_sta.c:1187: warning: format =E2=80=98%d=E2=80=99=
expects type =E2=80=98int=E2=80=99, but argument 7 has type =E2=80=98l=
ong unsigned int=E2=80=99
This fixes it by explicitly casting the result to u16 (which 'aid' is).
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.=
c
index f7ffeec..db3cf23 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -1184,7 +1184,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct n=
et_device *dev,
printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=3D0x%x "
"status=3D%d aid=3D%d)\n",
dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa),
- capab_info, status_code, aid & ~(BIT(15) | BIT(14)));
+ capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14))));
=20
if (status_code !=3D WLAN_STATUS_SUCCESS) {
printk(KERN_DEBUG "%s: AP denied association (code=3D%d)\n",
-
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-10-22 14:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-22 12:51 [PATCH] mac80211: fix printk warning on 64-bit Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox