Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=70500f5443be1b27ea2c9ab71ce9dc2250af7b19
Commit:     70500f5443be1b27ea2c9ab71ce9dc2250af7b19
Parent:     794760f750655d987499d7a5034519afc84af63b
Author:     Marek VaĊĦut <[EMAIL PROTECTED]>
AuthorDate: Mon Aug 20 12:55:41 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:50:36 2007 -0700

    [PATCH] libertas: region code values specified as 8bit
    
    This patch strips away possible mess in regioncode (eg. on my card - 88W8305
    chipset - I get 0x3031 instead of expected 0x0031 and as a result the driver
    defaults to USA region which is obviously incorrect). Following patch fixes
    the issue.
    
    Signed-off-by: Marek Vasut <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/cmdresp.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/libertas/cmdresp.c 
b/drivers/net/wireless/libertas/cmdresp.c
index 4c36e63..d64ad87 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -174,7 +174,11 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
        lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 
0x%04x\n",
               hwspec->hwifversion, hwspec->version);
 
-       adapter->regioncode = le16_to_cpu(hwspec->regioncode);
+       /* Clamp region code to 8-bit since FW spec indicates that it should
+        * only ever be 8-bit, even though the field size is 16-bit.  Some 
firmware
+        * returns non-zero high 8 bits here.
+        */
+       adapter->regioncode = le16_to_cpu(hwspec->regioncode) & 0xFF;
 
        for (i = 0; i < MRVDRV_MAX_REGION_CODE; i++) {
                /* use the region code to search for the index */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to