* warning in ieee80211 tkip code
@ 2007-08-13 6:35 Johannes Berg
2007-10-10 12:54 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2007-08-13 6:35 UTC (permalink / raw)
To: Zhu Yi; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
net/ieee80211/ieee80211_crypt_tkip.c: In function 'michael_mic_hdr':
net/ieee80211/ieee80211_crypt_tkip.c:587: warning: overflow in implicit
constant conversion
The reason is pretty obvious:
hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
where IEEE80211_QCTL_TID is 0xF, so that's made into 0xF00 on BE and
then truncated to 0x00. Not very useful.
This was introduced in this commit:
commit 65b6a2775102cd81e57158ef4b1cb89641f76cfd
Author: Zhu Yi <yi.zhu@intel.com>
Date: Mon Aug 21 11:32:31 2006 +0800
with the change
- hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID;
+ hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
The code before the change looks much saner since you're accessing the
header as bytes...
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: warning in ieee80211 tkip code
2007-08-13 6:35 warning in ieee80211 tkip code Johannes Berg
@ 2007-10-10 12:54 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2007-10-10 12:54 UTC (permalink / raw)
To: Zhu Yi; +Cc: linux-wireless, John W. Linville
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
On Mon, 2007-08-13 at 08:35 +0200, Johannes Berg wrote:
> net/ieee80211/ieee80211_crypt_tkip.c: In function 'michael_mic_hdr':
> net/ieee80211/ieee80211_crypt_tkip.c:587: warning: overflow in implicit
> constant conversion
>
> The reason is pretty obvious:
> hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
>
> where IEEE80211_QCTL_TID is 0xF, so that's made into 0xF00 on BE and
> then truncated to 0x00. Not very useful.
>
> This was introduced in this commit:
>
> commit 65b6a2775102cd81e57158ef4b1cb89641f76cfd
> Author: Zhu Yi <yi.zhu@intel.com>
> Date: Mon Aug 21 11:32:31 2006 +0800
Ping? Any comments on this? It's been two months.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-10-10 17:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-13 6:35 warning in ieee80211 tkip code Johannes Berg
2007-10-10 12:54 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).