Search Linux Wireless

Re: [PATCH] ssb: fix unaligned access to mac address

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

 



On Wed, 2013-02-20 at 11:56 -0600, Larry Finger wrote:

> I like the looks of sprom_get_mac() over that ugly
> *(((__be16 *)out->il0mac) 
> construct, but this patch breaks ssb.
> The resulting MAC address is all ones.
[]
> > @@ -539,10 +533,8 @@ static void sprom_extract_r8(struct ssb_sprom *out, const u16 *in)
> >   			ARRAY_SIZE(out->core_pwr_info));
> >
> >   	/* extract the MAC address */
> > -	for (i = 0; i < 3; i++) {
> > -		v = in[SPOFF(SSB_SPROM8_IL0MAC) + i];
> > -		*(((__be16 *)out->il0mac) + i) = cpu_to_be16(v);
> > -	}
> > +	sprom_get_mac(out->il0mac, &in[SSB_SPROM8_IL0MAC]);

Yup, I did a stupid.

This one should be:

	sprom_get_mac(out->il0mac, &in[SPOFF(SSB_SPROM8_IL0MAC)]);


--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux