[PATCH] Marvell CF8381

Johannes Berg johannes at sipsolutions.net
Sun Mar 22 04:04:08 EDT 2009


On Sun, 2009-03-22 at 05:11 +0100, Marek Vasut wrote:

> One more thing - I also had to apply the following patch in order to get 
> region code detected properly.
> 
> le16_to_cpu(cmd.regioncode) = 0x3031 for me and Im definitelly not in spain, 
> but 0x30 (eu) looks reasonable.
> 
> diff --git a/drivers/net/wireless/libertas/cmd.c 
> b/drivers/net/wireless/libertas/cmd.c
> index 639dd02..ce32bc9 100644
> --- a/drivers/net/wireless/libertas/cmd.c
> +++ b/drivers/net/wireless/libertas/cmd.c
> @@ -123,7 +123,7 @@ int lbs_update_hw_spec(struct lbs_private *priv)
>          * only ever be 8-bit, even though the field size is 16-bit.  Some 
> firmware
>          * returns non-zero high 8 bits here.
>          */
> -       priv->regioncode = le16_to_cpu(cmd.regioncode) & 0xFF;
> +       priv->regioncode = (le16_to_cpu(cmd.regioncode) & 0xFF00) >> 8;

I'd be more inclined to think that this was an endian bug? Does your
machine happen to be big endian?

johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libertas-dev/attachments/20090322/d3fe4a1d/attachment.bin>


More information about the libertas-dev mailing list