[PATCH] libertas: fix mixed-case abuse in cmd_ds_802_11_scan
authorDan Williams <dcbw@redhat.com>
Thu, 2 Aug 2007 15:16:07 +0000 (11:16 -0400)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:49:41 +0000 (16:49 -0700)
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/hostcmd.h
drivers/net/wireless/libertas/scan.c

index 05ea54df71bd14440268eed06b1722304ec1eae0..e4fafbfa358dcee1fd68258430ded3dd4d7ae08d 100644 (file)
@@ -159,7 +159,7 @@ struct cmd_ds_802_11_subscribe_event {
  */
 struct cmd_ds_802_11_scan {
        u8 bsstype;
-       u8 BSSID[ETH_ALEN];
+       u8 bssid[ETH_ALEN];
        u8 tlvbuffer[1];
 #if 0
        mrvlietypes_ssidparamset_t ssidParamSet;
index a98feedf001c967fa6adfcf1656b4b239e9573d0..2937f79c4a015166cfcc545a7490c0aa7381b442 100644 (file)
@@ -1677,15 +1677,14 @@ int libertas_cmd_80211_scan(wlan_private * priv,
 
        /* Set fixed field variables in scan command */
        pscan->bsstype = pscancfg->bsstype;
-       memcpy(pscan->BSSID, pscancfg->bssid, sizeof(pscan->BSSID));
+       memcpy(pscan->bssid, pscancfg->bssid, ETH_ALEN);
        memcpy(pscan->tlvbuffer, pscancfg->tlvbuffer, pscancfg->tlvbufferlen);
 
        cmd->command = cpu_to_le16(cmd_802_11_scan);
 
        /* size is equal to the sizeof(fixed portions) + the TLV len + header */
-       cmd->size = cpu_to_le16(sizeof(pscan->bsstype)
-                                    + sizeof(pscan->BSSID)
-                                    + pscancfg->tlvbufferlen + S_DS_GEN);
+       cmd->size = cpu_to_le16(sizeof(pscan->bsstype) + ETH_ALEN
+                               + pscancfg->tlvbufferlen + S_DS_GEN);
 
        lbs_deb_scan("SCAN_CMD: command=%x, size=%x, seqnum=%x\n",
                     le16_to_cpu(cmd->command), le16_to_cpu(cmd->size),