diff options
author | Greg Goldman <ggoldman@broadcom.com> | 2010-08-03 10:37:20 -0700 |
---|---|---|
committer | Howard M. Harte <hharte@broadcom.com> | 2010-08-03 10:37:20 -0700 |
commit | b8e11a0e73a65fea7f07df0e34f4bb5ac6105c2a (patch) | |
tree | be976e7dad1bf1b8d4f92f286f61d2fcfadae863 | |
parent | 45762b7e0c8813c6f27963d1f557f517aeab8369 (diff) | |
download | broadcom-b8e11a0e73a65fea7f07df0e34f4bb5ac6105c2a.tar.gz |
Change char to uint for proper band setting.
Change-Id: I443b99b60128f5522ec8975f4e557b44927a8a0c
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.c | 11 | ||||
-rw-r--r-- | bcm4329/src/wl/sys/wl_iw.h | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/bcm4329/src/wl/sys/wl_iw.c b/bcm4329/src/wl/sys/wl_iw.c index d817dcc..dafdaa8 100644 --- a/bcm4329/src/wl/sys/wl_iw.c +++ b/bcm4329/src/wl/sys/wl_iw.c @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: wl_iw.c,v 1.51.4.9.2.6.4.124 2010/07/27 20:46:02 Exp $ + * $Id: wl_iw.c,v 1.51.4.9.2.6.4.126 2010/07/30 21:23:11 Exp $ */ #include <wlioctl.h> @@ -923,11 +923,11 @@ wl_iw_set_band( { int error = -1; char *p = extra; - char band; + uint band; if (g_onoff == G_WLAN_SET_ON) { - band = *(extra + strlen(BAND_SET_CMD) + 1) - '0'; + band = htod32((uint)*(extra + strlen(BAND_SET_CMD) + 1) - '0'); if ((band == WLC_BAND_AUTO) || (band == WLC_BAND_5G) || (band == WLC_BAND_2G)) { @@ -941,7 +941,7 @@ wl_iw_set_band( else WL_ERROR(("%s: set band %d failed code %d\n", __FUNCTION__, \ band, error)); } - else WL_ERROR(("%s Incorrect band setting, ignored\n", __FUNCTION__)); + else WL_ERROR(("%s Incorrect band setting %d, ignored\n", __FUNCTION__, band)); } p += snprintf(p, MAX_WX_STRING, "FAIL"); @@ -2598,9 +2598,12 @@ wl_iw_add_bss_to_ss_cache(wl_scan_results_t *ss_list) if (node) { continue; } + leaf = kmalloc(bi->length + WLC_IW_SS_CACHE_CTRL_FIELD_MAXLEN, GFP_KERNEL); if (!leaf) { MUTEX_UNLOCK_WL_SCAN_SET(); + WL_ERROR(("Memory alloc failure %d\n", \ + bi->length + WLC_IW_SS_CACHE_CTRL_FIELD_MAXLEN)); return -ENOMEM; } diff --git a/bcm4329/src/wl/sys/wl_iw.h b/bcm4329/src/wl/sys/wl_iw.h index 6375e94..9a6400a 100644 --- a/bcm4329/src/wl/sys/wl_iw.h +++ b/bcm4329/src/wl/sys/wl_iw.h @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: wl_iw.h,v 1.5.34.1.6.24 2010/07/27 20:46:02 Exp $ + * $Id: wl_iw.h,v 1.5.34.1.6.25 2010/07/29 22:46:56 Exp $ */ @@ -110,13 +110,14 @@ int wl_control_wl_start(struct net_device *dev); #define WLC_IW_BSS_INFO_MAXLEN \ (WLC_IW_SS_CACHE_MAXLEN - WLC_IW_SS_CACHE_CTRL_FIELD_MAXLEN) -typedef struct wl_iw_ss_cache { - struct wl_iw_ss_cache *next; +typedef struct wl_iw_ss_cache{ uint32 buflen; uint32 version; uint32 count; - int dirty; wl_bss_info_t bss_info[1]; + char dummy[WLC_IW_BSS_INFO_MAXLEN - sizeof(wl_bss_info_t)]; + int dirty; + struct wl_iw_ss_cache *next; } wl_iw_ss_cache_t; typedef struct wl_iw_ss_cache_ctrl { @@ -128,6 +129,7 @@ typedef struct wl_iw_ss_cache_ctrl { uint m_cons_br_scan_cnt; struct timer_list *m_timer; } wl_iw_ss_cache_ctrl_t; + typedef enum broadcast_first_scan { BROADCAST_SCAN_FIRST_IDLE = 0, BROADCAST_SCAN_FIRST_STARTED, |