aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRoland Vossen <rvossen@broadcom.com>2011-10-18 08:03:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-11-08 15:54:05 -0500
commit0527781eb00550226d638b9be23d246c7ba796f6 (patch)
tree30a8a9d6597236dc7fa012f12f8d0212caa71e3a /drivers/net
parent6f09be0ad534160a1931f0c0f92e18a48bd888f9 (diff)
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')
-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 {
466 u32 buflen; 466 u32 buflen;
467 u32 version; 467 u32 version;
468 u32 count; 468 u32 count;
469 struct brcmf_bss_info_le bss_info_le[1]; 469 struct brcmf_bss_info_le bss_info_le[];
470}; 470};
471 471
472struct brcmf_scan_results_le { 472struct brcmf_scan_results_le {
473 __le32 buflen; 473 __le32 buflen;
474 __le32 version; 474 __le32 version;
475 __le32 count; 475 __le32 count;
476 struct brcmf_bss_info_le bss_info_le[1];
477}; 476};
478 477
479/* used for association with a specific BSSID and chanspec list */ 478/* used for association with a specific BSSID and chanspec list */
@@ -493,10 +492,6 @@ struct brcmf_join_params {
493 struct brcmf_assoc_params_le params_le; 492 struct brcmf_assoc_params_le params_le;
494}; 493};
495 494
496/* size of brcmf_scan_results not including variable length array */
497#define BRCMF_SCAN_RESULTS_FIXED_SIZE \
498 (sizeof(struct brcmf_scan_results) - sizeof(struct brcmf_bss_info_le))
499
500/* incremental scan results struct */ 495/* incremental scan results struct */
501struct brcmf_iscan_results { 496struct brcmf_iscan_results {
502 union { 497 union {
@@ -511,7 +506,7 @@ struct brcmf_iscan_results {
511 506
512/* size of brcmf_iscan_results not including variable length array */ 507/* size of brcmf_iscan_results not including variable length array */
513#define BRCMF_ISCAN_RESULTS_FIXED_SIZE \ 508#define BRCMF_ISCAN_RESULTS_FIXED_SIZE \
514 (BRCMF_SCAN_RESULTS_FIXED_SIZE + \ 509 (sizeof(struct brcmf_scan_results) + \
515 offsetof(struct brcmf_iscan_results, results)) 510 offsetof(struct brcmf_iscan_results, results))
516 511
517struct brcmf_wsec_key { 512struct brcmf_wsec_key {