mwifiex: fix static checker warnings
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 26 Apr 2012 20:02:57 +0000 (13:02 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 9 May 2012 01:53:41 +0000 (21:53 -0400)
"oui_type" in structure "ieee_types_vendor_header" is not used separately,
so include it in "oui" array. Now complete oui will be compared fixing
following warnings.

drivers/net/wireless/mwifiex/sta_ioctl.c:1410 mwifiex_set_gen_ie_helper()
        error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/sta_ioctl.c:1435 mwifiex_set_gen_ie_helper()
        error: memcmp() 'pvendor_ie->oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1177 mwifiex_update_bss_desc_with_ie()
        error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)
drivers/net/wireless/mwifiex/scan.c:1185 mwifiex_update_bss_desc_with_ie()
        error: memcmp() 'vendor_ie->vend_hdr.oui' too small (3 vs 4)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/fw.h

index 2a2cabadb9b590ac194dd1a8ccfab7c35a00b95e..5f6adeb9b950ca9e7c25a7c1cd591fa1dadd5f15 100644 (file)
@@ -993,8 +993,7 @@ struct mwifiex_ie_types_wmm_queue_status {
 struct ieee_types_vendor_header {
        u8 element_id;
        u8 len;
-       u8 oui[3];
-       u8 oui_type;
+       u8 oui[4];      /* 0~2: oui, 3: oui_type */
        u8 oui_subtype;
        u8 version;
 } __packed;