staging: brcm80211: cleaned up buffer len defines in fullmac
authorRoland Vossen <rvossen@broadcom.com>
Sun, 2 Oct 2011 17:14:44 +0000 (10:14 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 3 Oct 2011 23:16:51 +0000 (16:16 -0700)
Code cleanup. Replaced identical definition BRCMF_C_DCMD_MAXLEN
by BRCMF_DCMD_MAXLEN. Renamed related buffer len definitions.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd.h
drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
drivers/staging/brcm80211/brcmfmac/wl_cfg80211.h

index 501faed8705a638eda297e72feb50c711b9ecb14..3ec74778b2e312667fb5b0b98960062a2b544c78 100644 (file)
 
 #define BRCMF_VERSION_STR              "4.218.248.5"
 
-#define        BRCMF_C_DCMD_SMLEN      256     /* "small" cmd buffer required */
-#define BRCMF_C_DCMD_MEDLEN    1536    /* "med" cmd buffer required */
-#define        BRCMF_C_DCMD_MAXLEN     8192
-
 /*******************************************************************************
  * IO codes that are interpreted by dongle firmware
  ******************************************************************************/
@@ -749,6 +745,8 @@ extern void brcmf_c_pktfilter_offload_set(struct brcmf_pub *drvr, char *arg);
 extern void brcmf_c_pktfilter_offload_enable(struct brcmf_pub *drvr, char *arg,
                                             int enable, int master_mode);
 
+#define        BRCMF_DCMD_SMLEN        256     /* "small" cmd buffer required */
+#define BRCMF_DCMD_MEDLEN      1536    /* "med" cmd buffer required */
 #define        BRCMF_DCMD_MAXLEN       8192    /* max length cmd buffer required */
 
 /* message levels */
index ec0a05745666f5ba2b73a0a699f918b9f4866ec6..e34c5c3d1d5556190c03dbc8dcb71d46ada68128 100644 (file)
@@ -97,7 +97,7 @@ struct brcmf_proto {
        u32 lastcmd;
        u8 bus_header[BUS_HEADER_LEN];
        struct brcmf_proto_cdc_dcmd msg;
-       unsigned char buf[BRCMF_C_DCMD_MAXLEN + ROUND_UP_MARGIN];
+       unsigned char buf[BRCMF_DCMD_MAXLEN + ROUND_UP_MARGIN];
 };
 
 static int brcmf_proto_cdc_msg(struct brcmf_pub *drvr)
@@ -288,7 +288,7 @@ brcmf_proto_dcmd(struct brcmf_pub *drvr, int ifidx, struct brcmf_dcmd *dcmd,
 
        brcmf_dbg(TRACE, "Enter\n");
 
-       if (len > BRCMF_C_DCMD_MAXLEN)
+       if (len > BRCMF_DCMD_MAXLEN)
                goto done;
 
        if (prot->pending == true) {
@@ -435,7 +435,7 @@ int brcmf_proto_attach(struct brcmf_pub *drvr)
 
        drvr->prot = cdc;
        drvr->hdrlen += BDC_HEADER_LEN;
-       drvr->maxctl = BRCMF_C_DCMD_MAXLEN +
+       drvr->maxctl = BRCMF_DCMD_MAXLEN +
                        sizeof(struct brcmf_proto_cdc_dcmd) + ROUND_UP_MARGIN;
        return 0;
 
index 42e7642126f7948147a1170b122aabc1c82293bd..d12aa75c46dfc02e2f0031fb10a942c963e38bb0 100644 (file)
@@ -342,7 +342,7 @@ done:
 
 static s32 brcmf_dev_intvar_set(struct net_device *ndev, s8 *name, s32 val)
 {
-       s8 buf[BRCMF_C_DCMD_SMLEN];
+       s8 buf[BRCMF_DCMD_SMLEN];
        u32 len;
        s32 err = 0;
        __le32 val_le;
@@ -363,7 +363,7 @@ static s32
 brcmf_dev_intvar_get(struct net_device *ndev, s8 *name, s32 *retval)
 {
        union {
-               s8 buf[BRCMF_C_DCMD_SMLEN];
+               s8 buf[BRCMF_DCMD_SMLEN];
                __le32 val;
        } var;
        u32 len;
@@ -451,7 +451,7 @@ brcmf_run_iscan(struct brcmf_cfg80211_iscan_ctrl *iscan,
        params = kzalloc(params_size, GFP_KERNEL);
        if (!params)
                return -ENOMEM;
-       BUG_ON(params_size >= BRCMF_C_DCMD_SMLEN);
+       BUG_ON(params_size >= BRCMF_DCMD_SMLEN);
 
        wl_iscan_prep(&params->params_le, ssid);
 
@@ -460,7 +460,7 @@ brcmf_run_iscan(struct brcmf_cfg80211_iscan_ctrl *iscan,
        params->scan_duration = cpu_to_le16(0);
 
        err = brcmf_dev_iovar_setbuf(iscan->ndev, "iscan", params, params_size,
-                                    iscan->dcmd_buf, BRCMF_C_DCMD_SMLEN);
+                                    iscan->dcmd_buf, BRCMF_DCMD_SMLEN);
        if (err) {
                if (err == -EBUSY)
                        WL_INFO("system busy : iscan canceled\n");
index 21c8f8e636cb420cf3a88cd4bf45f2f6c9e00564..e69f4f6bf94639afe5c89a1a30781c036441c2ac 100644 (file)
@@ -106,7 +106,7 @@ do {                                                                \
 #define WL_DCMD_LEN_MAX        1024
 #define WL_EXTRA_BUF_MAX       2048
 #define WL_ISCAN_BUF_MAX       2048    /*
-                                * the buf length can be BRCMF_C_DCMD_MAXLEN
+                                * the buf length can be BRCMF_DCMD_MAXLEN
                                 * to reduce iteration
                                 */
 #define WL_ISCAN_TIMER_INTERVAL_MS     3000
@@ -251,7 +251,7 @@ struct brcmf_cfg80211_iscan_ctrl {
        struct work_struct work;
        struct brcmf_cfg80211_iscan_eloop el;
        void *data;
-       s8 dcmd_buf[BRCMF_C_DCMD_SMLEN];
+       s8 dcmd_buf[BRCMF_DCMD_SMLEN];
        s8 scan_buf[WL_ISCAN_BUF_MAX];
 };