brcm80211: fmac: move sdio related macros to sdio_host.h
authorFranky Lin <frankyl@broadcom.com>
Sat, 17 Dec 2011 02:37:11 +0000 (18:37 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Dec 2011 19:40:46 +0000 (14:40 -0500)
dhd_bus.h will be used as the shared header file for common layer
and bus layer. It should not contain any sdio specific macros.
This patch moves them to sdio_host.h as part of the fullmac bus
interface refactoring.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c
drivers/net/wireless/brcm80211/brcmfmac/sdio_host.h

index b895f198a950c1a8577ef675909b4b427bed92a6..0b0eb4fee626f143ca9d8325744966c87468e389 100644 (file)
@@ -488,6 +488,7 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
                sdiodev->bus_if = bus_if;
                bus_if->bus_priv = sdiodev;
                bus_if->type = SDIO_BUS;
+               bus_if->align = BRCMF_SDALIGN;
                dev_set_drvdata(&func->card->dev, sdiodev);
 
                atomic_set(&sdiodev->suspend, false);
index 5d0be12fe1846695e29276b28a4a62b4a1b160ce..30cc4174b47ec54661dc0328acdd1e478393a269 100644 (file)
@@ -580,6 +580,7 @@ struct brcmf_bus {
        bool drvr_up;           /* Status flag of driver up/down */
        unsigned long tx_realloc;       /* Tx packets realloced for headroom */
        struct dngl_stats dstats;       /* Stats for dongle-based data */
+       u8 align;               /* bus alignment requirement */
 };
 
 /* Forward decls for struct brcmf_pub (see below) */
index 1b34877ba35b71c7ab2655d157a6ac373ab58f9c..413ba218cc28652664d216693204022c7ebc73da 100644 (file)
 #ifndef _BRCMF_BUS_H_
 #define _BRCMF_BUS_H_
 
-/* Packet alignment for most efficient SDIO (can change based on platform) */
-#define BRCMF_SDALIGN  (1 << 6)
-
-/* watchdog polling interval in ms */
-#define BRCMF_WD_POLL_MS       10
-
 /*
  * Exported from brcmf bus module (brcmf_usb, brcmf_sdio)
  */
index 8b4dba3bedcdee7941699e370108703366507687..65c948e28bcabcd0254086a345dd3943f7abc4f4 100644 (file)
@@ -82,13 +82,14 @@ struct brcmf_proto_bdc_header {
 
 
 #define RETRIES 2 /* # of retries to retrieve matching dcmd response */
-#define BUS_HEADER_LEN (16+BRCMF_SDALIGN) /* Must be atleast SDPCM_RESERVE
+#define BUS_HEADER_LEN (16+64)         /* Must be atleast SDPCM_RESERVE
                                         * (amount of header tha might be added)
                                         * plus any space that might be needed
-                                        * for alignment padding.
+                                        * for bus alignment padding.
                                         */
-#define ROUND_UP_MARGIN        2048    /* Biggest SDIO block size possible for
+#define ROUND_UP_MARGIN        2048    /* Biggest bus block size possible for
                                 * round off at the end of buffer
+                                * Currently is SDIO
                                 */
 
 struct brcmf_proto {
index 279ae76a8e8237755d3234f7c720ddca9ba7a3cf..a51d8f5d36fcf843bf311e5e257d560bb134e134 100644 (file)
@@ -798,7 +798,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr)
                                 "event_msgs" + '\0' + bitvec  */
        uint up = 0;
        char buf[128], *ptr;
-       u32 dongle_align = BRCMF_SDALIGN;
+       u32 dongle_align = drvr->bus_if->align;
        u32 glom = 0;
        u32 roaming = 1;
        uint bcn_timeout = 3;
index a63490e4cb199f30fbb5ddab9cecce1418b189ad..0281d207d998faff6ce51441d9284606a36bf9d1 100644 (file)
 #define SUCCESS        0
 #define ERROR  1
 
+/* Packet alignment for most efficient SDIO (can change based on platform) */
+#define BRCMF_SDALIGN  (1 << 6)
+
+/* watchdog polling interval in ms */
+#define BRCMF_WD_POLL_MS       10
+
 struct brcmf_sdreg {
        int func;
        int offset;