From: Johannes Berg <johannes@sipsolutions.net>
To: Zhu Yi <yi.zhu@intel.com>
Cc: linux-wireless@vger.kernel.org
Subject: warning in ieee80211 tkip code
Date: Mon, 13 Aug 2007 08:35:02 +0200 [thread overview]
Message-ID: <1186986902.27916.26.camel@johannes.berg> (raw)
[-- 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 --]
next reply other threads:[~2007-08-13 8:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-13 6:35 Johannes Berg [this message]
2007-10-10 12:54 ` warning in ieee80211 tkip code Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1186986902.27916.26.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=yi.zhu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox