Search Linux Wireless

Re: [PATCH RFC] d80211: Fix TKIP phase1 key mixing for hwcrypto

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Feb 2007 16:02:45 +0100, Michael Buesch wrote:
> On Monday 05 February 2007 22:19, Jiri Benc wrote:
> > On Sat, 3 Feb 2007 18:32:48 +0100, Michael Buesch wrote:
> > > @@ -192,10 +192,15 @@ u8 * ieee80211_tkip_add_iv(u8 *pos, stru
> > >  
> > >  
> > >  void ieee80211_tkip_gen_phase1key(struct ieee80211_key *key, u8 *ta,
> > > -				  u16 *phase1key)
> > > +				  u8 *phase1key)
> > >  {
> > > +	__le16 *k = (__le16 *)phase1key;
> > > +	int i;
> > > +
> > >  	tkip_mixing_phase1(ta, &key->key[ALG_TKIP_TEMP_ENCR_KEY],
> > > -			   key->u.tkip.iv32, phase1key);
> > > +			   key->u.tkip.iv32, (u16 *)k);
> > > +	for (i = 0; i < 5; i++)
> > > +		k[i] = cpu_to_le16(k[i]);
> > >  }
> > 
> > Maybe a slightly better type checking but still looks ugly:
> 
> Hm, well. I don't really see how typechecking is better in this case,

cpu_to_le16 with a __le16 variable as a parameter always looks
suspicious. In the version I sent it is at least clear that it's
intended.

> but if you like it more, I'm ok with it. ;)

I dislike both of them but have no better idea.

> Yeah, I was going to check this and was going to add #ifdefs if it doesn't.
> But that was not my major concern at this point.
> It was more that people agree to me that it _is_ broken on BE platforms.

Looks like it is.

Thanks,

 Jiri

-- 
Jiri Benc
SUSE Labs
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux