]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/brcm80211/brcmfmac/dhd.h
staging: brcm80211: remove unused definitions from dhd.h
[mv-sheeva.git] / drivers / staging / brcm80211 / brcmfmac / dhd.h
index 1145e5b26952037e299ad7140d05a02e2517724c..2ebf0151ff7918cc3b7317222ce8547e49f68559 100644 (file)
 #ifndef _dhd_h_
 #define _dhd_h_
 
-/* Forward decls */
-struct dhd_bus;
-struct dhd_prot;
-struct dhd_info;
+#define BRCMF_VERSION_STR              "4.218.248.5"
 
 #define        BRCMF_C_IOCTL_SMLEN     256     /* "small" ioctl buffer required */
 #define BRCMF_C_IOCTL_MEDLEN   1536    /* "med" ioctl buffer required */
@@ -125,9 +122,6 @@ struct dhd_info;
 #define WL_KF_RES_5    (1 << 5)        /* Reserved for backward compat */
 #define WL_IBSS_PEER_GROUP_KEY (1 << 6)        /* Indicates a group key for a IBSS PEER */
 
-/* optionally set by a module_param_string() */
-#define MOD_PARAM_PATHLEN      2048
-
 /* For supporting multiple interfaces */
 #define DHD_MAX_IFS    16
 #define DHD_DEL_IF     -0xe
@@ -314,13 +308,6 @@ typedef struct brcmf_event {
 #define BRCMF_E_LINK_ASSOC_REC                 3
 #define BRCMF_E_LINK_BSSCFG_DIS                        4
 
-enum cust_gpio_modes {
-       WLAN_RESET_ON,
-       WLAN_RESET_OFF,
-       WLAN_POWER_ON,
-       WLAN_POWER_OFF
-};
-
 /* The level of bus communication with the dongle */
 enum dhd_bus_state {
        DHD_BUS_DOWN,           /* Not ready for frame transfers */
@@ -454,20 +441,6 @@ typedef struct wl_scan_results {
        wl_bss_info_t bss_info[1];
 } wl_scan_results_t;
 
-typedef struct wl_rateset_args {
-       u32 count;              /* # rates in this set */
-       u8 rates[WL_NUMRATES];  /* rates in 500kbps units w/hi bit set if basic */
-       u8 mcs[MCSSET_LEN];     /* supported mcs index bit map */
-} wl_rateset_args_t;
-
-/* u32 list */
-typedef struct wl_u32_list {
-       /* in - # of elements, out - # of entries */
-       u32 count;
-       /* variable length u32 list */
-       u32 element[1];
-} wl_u32_list_t;
-
 /* used for association with a specific BSSID and chanspec list */
 typedef struct wl_assoc_params {
        u8 bssid[ETH_ALEN];     /* 00:00:00:00:00:00: broadcast scan */
@@ -478,9 +451,6 @@ typedef struct wl_assoc_params {
 } wl_assoc_params_t;
 #define WL_ASSOC_PARAMS_FIXED_SIZE     (sizeof(wl_assoc_params_t) - sizeof(chanspec_t))
 
-/* used for reassociation/roam to a specific BSSID and channel */
-typedef wl_assoc_params_t wl_reassoc_params_t;
-
 /* used for join with or without a specific bssid and channel list */
 typedef struct wl_join_params {
        wlc_ssid_t ssid;
@@ -502,94 +472,6 @@ typedef struct wl_iscan_results {
 #define WL_ISCAN_RESULTS_FIXED_SIZE \
        (WL_SCAN_RESULTS_FIXED_SIZE + offsetof(wl_iscan_results_t, results))
 
-typedef struct {
-       u32 duration;   /* millisecs spent sampling this channel */
-       u32 congest_ibss;       /* millisecs in our bss (presumably this traffic will */
-       /*  move if cur bss moves channels) */
-       u32 congest_obss;       /* traffic not in our bss */
-       u32 interference;       /* millisecs detecting a non 802.11 interferer. */
-       u32 timestamp;  /* second timestamp */
-} cca_congest_t;
-
-typedef struct {
-       chanspec_t chanspec;    /* Which channel? */
-       u8 num_secs;            /* How many secs worth of data */
-       cca_congest_t secs[1];  /* Data */
-} cca_congest_channel_req_t;
-
-typedef struct wl_country {
-       char country_abbrev[WLC_CNTRY_BUF_SZ];  /* nul-terminated country code used in
-                                                * the Country IE
-                                                */
-       s32 rev;                /* revision specifier for ccode
-                                * on set, -1 indicates unspecified.
-                                * on get, rev >= 0
-                                */
-       char ccode[WLC_CNTRY_BUF_SZ];   /* nul-terminated built-in country code.
-                                        * variable length, but fixed size in
-                                        * struct allows simple allocation for
-                                        * expected country strings <= 3 chars.
-                                        */
-} wl_country_t;
-
-typedef struct wl_channels_in_country {
-       u32 buflen;
-       u32 band;
-       char country_abbrev[WLC_CNTRY_BUF_SZ];
-       u32 count;
-       u32 channel[1];
-} wl_channels_in_country_t;
-
-typedef struct wl_country_list {
-       u32 buflen;
-       u32 band_set;
-       u32 band;
-       u32 count;
-       char country_abbrev[1];
-} wl_country_list_t;
-
-typedef struct wl_rm_req_elt {
-       s8 type;
-       s8 flags;
-       chanspec_t chanspec;
-       u32 token;              /* token for this measurement */
-       u32 tsf_h;              /* TSF high 32-bits of Measurement start time */
-       u32 tsf_l;              /* TSF low 32-bits */
-       u32 dur;                /* TUs */
-} wl_rm_req_elt_t;
-
-typedef struct wl_rm_req {
-       u32 token;              /* overall measurement set token */
-       u32 count;              /* number of measurement requests */
-       void *cb;               /* completion callback function: may be NULL */
-       void *cb_arg;           /* arg to completion callback function */
-       wl_rm_req_elt_t req[1]; /* variable length block of requests */
-} wl_rm_req_t;
-
-typedef struct wl_rm_rep_elt {
-       s8 type;
-       s8 flags;
-       chanspec_t chanspec;
-       u32 token;              /* token for this measurement */
-       u32 tsf_h;              /* TSF high 32-bits of Measurement start time */
-       u32 tsf_l;              /* TSF low 32-bits */
-       u32 dur;                /* TUs */
-       u32 len;                /* byte length of data block */
-       u8 data[1];             /* variable length data block */
-} wl_rm_rep_elt_t;
-
-#define WL_RPI_REP_BIN_NUM 8
-typedef struct wl_rm_rpi_rep {
-       u8 rpi[WL_RPI_REP_BIN_NUM];
-       s8 rpi_max[WL_RPI_REP_BIN_NUM];
-} wl_rm_rpi_rep_t;
-
-typedef struct wl_rm_rep {
-       u32 token;              /* overall measurement set token */
-       u32 len;                /* length of measurement report block */
-       wl_rm_rep_elt_t rep[1]; /* variable length block of reports */
-} wl_rm_rep_t;
-
 typedef struct wl_wsec_key {
        u32 index;              /* key index */
        u32 len;                /* key length */
@@ -633,12 +515,17 @@ typedef struct wl_ioctl {
        uint needed;            /* bytes needed (optional) */
 } wl_ioctl_t;
 
+/* Forward decls for struct dhd_pub (see below) */
+struct dhd_bus;                /* device bus info */
+struct brcmf_proto;    /* device communication protocol info */
+struct dhd_info;       /* device driver info */
+
 /* Common structure for module and instance linkage */
 typedef struct dhd_pub {
        /* Linkage ponters */
-       struct dhd_bus *bus;    /* Bus module handle */
-       struct dhd_prot *prot;  /* Protocol module handle */
-       struct dhd_info *info;  /* Info module handle */
+       struct dhd_bus *bus;
+       struct brcmf_proto *prot;
+       struct dhd_info *info;
 
        /* Internal dhd items */
        bool up;                /* Driver up/down (to OS) */
@@ -691,9 +578,6 @@ typedef struct dhd_pub {
        int suspend_disable_flag;       /* "1" to disable all extra powersaving
                                         during suspend */
        int in_suspend;         /* flag set to 1 when early suspend called */
-#ifdef PNO_SUPPORT
-       int pno_enable;         /* pno status : "1" is pno enable */
-#endif                         /* PNO_SUPPORT */
        int dtim_skip;          /* dtim skip , default 0 means wake each dtim */
 
        /* Pkt filter defination */
@@ -725,20 +609,20 @@ typedef struct {
 } bcmevent_name_t;
 
 #if defined(CONFIG_PM_SLEEP)
-extern atomic_t dhd_mmc_suspend;
+extern atomic_t brcmf_mmc_suspend;
 #define DHD_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
 #define _DHD_PM_RESUME_WAIT(a, b) do { \
                int retry = 0; \
-               while (atomic_read(&dhd_mmc_suspend) && retry++ != b) { \
+               while (atomic_read(&brcmf_mmc_suspend) && retry++ != b) { \
                        wait_event_timeout(a, false, HZ/100); \
                } \
        }       while (0)
 #define DHD_PM_RESUME_WAIT(a)  _DHD_PM_RESUME_WAIT(a, 30)
 #define DHD_PM_RESUME_WAIT_FOREVER(a)  _DHD_PM_RESUME_WAIT(a, ~0)
 #define DHD_PM_RESUME_RETURN_ERROR(a)  \
-       do { if (atomic_read(&dhd_mmc_suspend)) return a; } while (0)
+       do { if (atomic_read(&brcmf_mmc_suspend)) return a; } while (0)
 #define DHD_PM_RESUME_RETURN   do { \
-       if (atomic_read(&dhd_mmc_suspend)) \
+       if (atomic_read(&brcmf_mmc_suspend)) \
                return; \
        } while (0)
 
@@ -774,63 +658,52 @@ extern atomic_t dhd_mmc_suspend;
  * Insmod parameters for debug/test
  */
 
-/* Watchdog timer interval */
-extern uint dhd_watchdog_ms;
-
-#if defined(DHD_DEBUG)
-/* Console output poll interval */
-extern uint dhd_console_ms;
-#endif                         /* defined(DHD_DEBUG) */
-
 /* Use interrupts */
-extern uint dhd_intr;
+extern uint brcmf_intr;
 
 /* Use polling */
-extern uint dhd_poll;
+extern uint brcmf_poll;
 
 /* ARP offload agent mode */
-extern uint dhd_arp_mode;
+extern uint brcmf_arp_mode;
 
 /* ARP offload enable */
-extern uint dhd_arp_enable;
+extern uint brcmf_arp_enable;
 
 /* Pkt filte enable control */
-extern uint dhd_pkt_filter_enable;
+extern uint brcmf_pkt_filter_enable;
 
 /*  Pkt filter init setup */
-extern uint dhd_pkt_filter_init;
+extern uint brcmf_pkt_filter_init;
 
 /* Pkt filter mode control */
-extern uint dhd_master_mode;
+extern uint brcmf_master_mode;
 
 /* Roaming mode control */
-extern uint dhd_roam;
+extern uint brcmf_roam;
 
 /* Roaming mode control */
-extern uint dhd_radio_up;
+extern uint brcmf_radio_up;
 
 /* Initial idletime ticks (may be -1 for immediate idle, 0 for no idle) */
-extern int dhd_idletime;
-#define DHD_IDLETIME_TICKS 1
+extern int brcmf_idletime;
+#define BRCMF_IDLETIME_TICKS 1
 
 /* SDIO Drive Strength */
-extern uint dhd_sdiod_drive_strength;
+extern uint brcmf_sdiod_drive_strength;
 
 /* Override to force tx queueing all the time */
-extern uint dhd_force_tx_queueing;
+extern uint brcmf_force_tx_queueing;
 
 #ifdef SDTEST
 /* Echo packet generator (SDIO), pkts/s */
-extern uint dhd_pktgen;
+extern uint brcmf_pktgen;
 
 /* Echo packet len (0 => sawtooth, max 1800) */
-extern uint dhd_pktgen_len;
-#define MAX_PKTGEN_LEN 1800
+extern uint brcmf_pktgen_len;
+#define BRCMF_MAX_PKTGEN_LEN 1800
 #endif
 
-extern char brcmf_fw_path[MOD_PARAM_PATHLEN];
-extern char brcmf_nv_path[MOD_PARAM_PATHLEN];
-
 extern u32 g_assert_type;
 extern const bcmevent_name_t bcmevent_names[];
 extern const int bcmevent_names_size;
@@ -881,104 +754,86 @@ static inline void MUTEX_UNLOCK_WL_SCAN_SET(void)
  * Returned structure should have bus and prot pointers filled in.
  * bus_hdrlen specifies required headroom for bus module header.
  */
-extern dhd_pub_t *dhd_attach(struct dhd_bus *bus,
+extern dhd_pub_t *brcmf_attach(struct dhd_bus *bus,
                                uint bus_hdrlen);
-extern int dhd_net_attach(dhd_pub_t *dhdp, int idx);
+extern int brcmf_net_attach(dhd_pub_t *dhdp, int idx);
+extern int brcmf_netdev_wait_pend8021x(struct net_device *dev);
 
 /* Indication from bus module regarding removal/absence of dongle */
-extern void dhd_detach(dhd_pub_t *dhdp);
+extern void brcmf_detach(dhd_pub_t *dhdp);
 
 /* Indication from bus module to change flow-control state */
-extern void dhd_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on);
+extern void brcmf_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on);
 
 extern bool brcmf_c_prec_enq(dhd_pub_t *dhdp, struct pktq *q,
                         struct sk_buff *pkt, int prec);
 
 /* Receive frame for delivery to OS.  Callee disposes of rxp. */
-extern void dhd_rx_frame(dhd_pub_t *dhdp, int ifidx,
+extern void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx,
                         struct sk_buff *rxp, int numpkt);
 
 /* Return pointer to interface name */
-extern char *dhd_ifname(dhd_pub_t *dhdp, int idx);
+extern char *brcmf_ifname(dhd_pub_t *dhdp, int idx);
 
 /* Request scheduling of the bus dpc */
-extern void dhd_sched_dpc(dhd_pub_t *dhdp);
+extern void brcmf_sched_dpc(dhd_pub_t *dhdp);
 
 /* Notify tx completion */
-extern void dhd_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp, bool success);
+extern void brcmf_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp,
+                            bool success);
 
 /* Query ioctl */
-extern int dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf,
-                             uint len);
+extern int brcmf_proto_cdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd,
+                                      void *buf, uint len);
 
 /* OS independent layer functions */
-extern int dhd_os_proto_block(dhd_pub_t *pub);
-extern int dhd_os_proto_unblock(dhd_pub_t *pub);
-extern int dhd_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition,
+extern int brcmf_os_proto_block(dhd_pub_t *pub);
+extern int brcmf_os_proto_unblock(dhd_pub_t *pub);
+extern int brcmf_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition,
                                  bool *pending);
-extern int dhd_os_ioctl_resp_wake(dhd_pub_t *pub);
-extern unsigned int dhd_os_get_ioctl_resp_timeout(void);
-extern void dhd_os_set_ioctl_resp_timeout(unsigned int timeout_msec);
-extern void *dhd_os_open_image(char *filename);
-extern int dhd_os_get_image_block(char *buf, int len, void *image);
-extern void dhd_os_close_image(void *image);
-extern void dhd_os_wd_timer(void *bus, uint wdtick);
-extern void dhd_os_sdlock(dhd_pub_t *pub);
-extern void dhd_os_sdunlock(dhd_pub_t *pub);
-extern void dhd_os_sdlock_sndup_rxq(dhd_pub_t *pub);
-extern void dhd_customer_gpio_wlan_ctrl(int onoff);
-extern int dhd_custom_get_mac_address(unsigned char *buf);
-extern void dhd_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
-extern void dhd_os_sdlock_eventq(dhd_pub_t *pub);
-extern void dhd_os_sdunlock_eventq(dhd_pub_t *pub);
-#ifdef DHD_DEBUG
-extern int write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
-#endif                         /* DHD_DEBUG */
-#if defined(OOB_INTR_ONLY)
-extern int dhd_customer_oob_irq_map(unsigned long *irq_flags_ptr);
-#endif                         /* defined(OOB_INTR_ONLY) */
-
-int setScheduler(struct task_struct *p, int policy, struct sched_param *param);
-
-extern void dhd_timeout_start(dhd_timeout_t *tmo, uint usec);
-extern int dhd_timeout_expired(dhd_timeout_t *tmo);
-
-extern int dhd_ifname2idx(struct dhd_info *dhd, char *name);
-extern u8 *dhd_bssidx2bssid(dhd_pub_t *dhd, int idx);
+extern int brcmf_os_ioctl_resp_wake(dhd_pub_t *pub);
+extern unsigned int brcmf_os_get_ioctl_resp_timeout(void);
+extern void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec);
+extern void brcmf_os_sdlock_sndup_rxq(dhd_pub_t *pub);
+extern void brcmf_customer_gpio_wlan_ctrl(int onoff);
+extern int brcmf_custom_get_mac_address(unsigned char *buf);
+extern void brcmf_os_sdunlock_sndup_rxq(dhd_pub_t *pub);
+extern void brcmf_os_sdlock_eventq(dhd_pub_t *pub);
+extern void brcmf_os_sdunlock_eventq(dhd_pub_t *pub);
+#ifdef BCMDBG
+extern int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
+#endif                         /* BCMDBG */
+
+extern void brcmf_timeout_start(dhd_timeout_t *tmo, uint usec);
+extern int brcmf_timeout_expired(dhd_timeout_t *tmo);
+
+extern int brcmf_ifname2idx(struct dhd_info *dhd, char *name);
 extern int brcmf_c_host_event(struct dhd_info *dhd, int *idx, void *pktdata,
                         brcmf_event_msg_t *, void **data_ptr);
 
 extern void brcmf_c_init(void);
 
-extern int dhd_add_if(struct dhd_info *dhd, int ifidx, void *handle,
+extern int brcmf_add_if(struct dhd_info *dhd, int ifidx, void *handle,
                      char *name, u8 *mac_addr, u32 flags, u8 bssidx);
-extern void dhd_del_if(struct dhd_info *dhd, int ifidx);
+extern void brcmf_del_if(struct dhd_info *dhd, int ifidx);
 
-extern void dhd_vif_add(struct dhd_info *dhd, int ifidx, char *name);
-extern void dhd_vif_del(struct dhd_info *dhd, int ifidx);
+extern void brcmf_vif_add(struct dhd_info *dhd, int ifidx, char *name);
+extern void brcmf_vif_del(struct dhd_info *dhd, int ifidx);
 
-extern void dhd_event(struct dhd_info *dhd, char *evpkt, int evlen, int ifidx);
-extern void dhd_vif_sendup(struct dhd_info *dhd, int ifidx, unsigned char * cp,
-                          int len);
+extern void brcmf_event(struct dhd_info *dhd, char *evpkt, int evlen,
+                       int ifidx);
+extern void brcmf_vif_sendup(struct dhd_info *dhd, int ifidx,
+                            unsigned char *cp, int len);
 
 /* Send packet to dongle via data channel */
-extern int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt);
-
-/* Send event to host */
-extern void dhd_sendup_event(dhd_pub_t *dhdp, brcmf_event_msg_t *event,
-                            void *data);
-extern int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag);
-extern uint dhd_bus_status(dhd_pub_t *dhdp);
-extern int dhd_bus_start(dhd_pub_t *dhdp);
+extern int brcmf_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt);
 
-extern void dhd_wait_for_event(dhd_pub_t *dhd, bool * lockvar);
-extern void dhd_wait_event_wakeup(dhd_pub_t *dhd);
+extern int brcmf_bus_devreset(dhd_pub_t *dhdp, u8 flag);
+extern int brcmf_bus_start(dhd_pub_t *dhdp);
 
-#ifdef PKT_FILTER_SUPPORT
 extern void brcmf_c_pktfilter_offload_set(dhd_pub_t *dhd, char *arg);
 extern void brcmf_c_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg,
                                             int enable, int master_mode);
-#endif
 
 #ifdef BCMDBG
 #define ASSERT(exp) \
@@ -1032,7 +887,7 @@ typedef struct dhd_ioctl {
 
 #ifdef SDTEST
 /* For pktgen iovar */
-typedef struct dhd_pktgen {
+typedef struct brcmf_pktgen {
        uint version;           /* To allow structure change tracking */
        uint freq;              /* Max ticks between tx/rx attempts */
        uint count;             /* Test packets to send/rcv each attempt */
@@ -1045,7 +900,7 @@ typedef struct dhd_pktgen {
        uint numfail;           /* Count of test send failures */
        uint mode;              /* Test mode (type of test packets) */
        uint stop;              /* Stop after this many tx failures */
-} dhd_pktgen_t;
+} brcmf_pktgen_t;
 
 /* Version in case structure changes */
 #define DHD_PKTGEN_VERSION 2