summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-10-18 16:03:03 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-09 00:54:05 +0400
commit0527781eb00550226d638b9be23d246c7ba796f6 (patch)
tree30a8a9d6597236dc7fa012f12f8d0212caa71e3a /drivers/net/wireless/brcm80211/brcmfmac/dhd.h
parent6f09be0ad534160a1931f0c0f92e18a48bd888f9 (diff)
downloadlinux-0527781eb00550226d638b9be23d246c7ba796f6.tar.xz
brcm80211: fmac: changed two scan related structures
struct brcmf_scan_results contained a 1 element array, but in reality the number of scan results can be 0 or more, as indicated by the count field in the same struct. Array has be redefined to be 0 elements length to indicate the array is purely for reference. Reported-by: Johannes Berg <johannes@sipsolutions.net> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd.h')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
index cf7cc9a44e25..54b055b6d5a2 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd.h
@@ -466,14 +466,13 @@ struct brcmf_scan_results {
u32 buflen;
u32 version;
u32 count;
- struct brcmf_bss_info_le bss_info_le[1];
+ struct brcmf_bss_info_le bss_info_le[];
};
struct brcmf_scan_results_le {
__le32 buflen;
__le32 version;
__le32 count;
- struct brcmf_bss_info_le bss_info_le[1];
};
/* used for association with a specific BSSID and chanspec list */
@@ -493,10 +492,6 @@ struct brcmf_join_params {
struct brcmf_assoc_params_le params_le;
};
-/* size of brcmf_scan_results not including variable length array */
-#define BRCMF_SCAN_RESULTS_FIXED_SIZE \
- (sizeof(struct brcmf_scan_results) - sizeof(struct brcmf_bss_info_le))
-
/* incremental scan results struct */
struct brcmf_iscan_results {
union {
@@ -511,7 +506,7 @@ struct brcmf_iscan_results {
/* size of brcmf_iscan_results not including variable length array */
#define BRCMF_ISCAN_RESULTS_FIXED_SIZE \
- (BRCMF_SCAN_RESULTS_FIXED_SIZE + \
+ (sizeof(struct brcmf_scan_results) + \
offsetof(struct brcmf_iscan_results, results))
struct brcmf_wsec_key {