* [PATCH 4/5] mac80211: remove Hi16, Lo16 helpers
@ 2008-03-08 9:23 Harvey Harrison
2008-03-12 14:54 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Harvey Harrison @ 2008-03-08 9:23 UTC (permalink / raw)
To: Jiri Benc; +Cc: linux-wireless
They were only used in one place, just open-code it there.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
---
net/mac80211/tkip.c | 19 ++-----------------
1 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c
index 9a36e83..264e392 100644
--- a/net/mac80211/tkip.c
+++ b/net/mac80211/tkip.c
@@ -65,31 +65,16 @@ static inline u8 Hi8(u16 v)
return v >> 8;
}
-
static inline u8 Lo8(u16 v)
{
return v & 0xff;
}
-
-static inline u16 Hi16(u32 v)
-{
- return v >> 16;
-}
-
-
-static inline u16 Lo16(u32 v)
-{
- return v & 0xffff;
-}
-
static u16 tkip_S(u16 val)
{
return tkip_sbox[val & 0xff] ^ swab16(tkip_sbox[val >> 8]);
}
-
-
/* P1K := Phase1(TA, TK, TSC)
* TA = transmitter address (48 bits)
* TK = dot11DefaultKeyValue or dot11KeyMappingValue (128 bits)
@@ -102,8 +87,8 @@ static void tkip_mixing_phase1(const u8 *ta, const u8 *tk, u32 tsc_IV32,
int i, j;
__le16 *leptr = (__le16 *)ta;
- p1k[0] = Lo16(tsc_IV32);
- p1k[1] = Hi16(tsc_IV32);
+ p1k[0] = tsc_IV32 & 0xffff;
+ p1k[1] = tsc_IV32 >> 16;
p1k[2] = le16_to_cpup(leptr++);
p1k[3] = le16_to_cpup(leptr++);
p1k[4] = le16_to_cpup(leptr++);
--
1.5.4.GIT
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 4/5] mac80211: remove Hi16, Lo16 helpers
2008-03-08 9:23 [PATCH 4/5] mac80211: remove Hi16, Lo16 helpers Harvey Harrison
@ 2008-03-12 14:54 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2008-03-12 14:54 UTC (permalink / raw)
To: Harvey Harrison; +Cc: Jiri Benc, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 203 bytes --]
On Sat, 2008-03-08 at 01:23 -0800, Harvey Harrison wrote:
> They were only used in one place, just open-code it there.
This depends on the previous patches removing a few uses, right?
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:[~2008-03-12 14:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-08 9:23 [PATCH 4/5] mac80211: remove Hi16, Lo16 helpers Harvey Harrison
2008-03-12 14: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).