staging: brcm80211: removed last typedefs from fullmac
[deliverable/linux.git] / drivers / staging / brcm80211 / brcmfmac / dhd.h
index b11eeeea3ae2c2494db472e823abb8a79b0457a5..a67d1ed83e565aebd3966fc28378e5a828051e99 100644 (file)
 #define        WLC_PHY_TYPE_LCN        8
 #define        WLC_PHY_TYPE_NULL       0xf
 
-#define WL_PKT_FILTER_FIXED_LEN                  offsetof(wl_pkt_filter_t, u)
-#define WL_PKT_FILTER_PATTERN_FIXED_LEN          offsetof(wl_pkt_filter_pattern_t, mask_and_pattern)
+#define BRCMF_PKT_FILTER_FIXED_LEN     offsetof(struct brcmf_pkt_filter, u)
+#define BRCMF_PKT_FILTER_PATTERN_FIXED_LEN     \
+       offsetof(struct brcmf_pkt_filter_pattern, mask_and_pattern)
 
-#define WL_EVENTING_MASK_LEN   16
+#define BRCMF_EVENTING_MASK_LEN        16
 
 #define TOE_TX_CSUM_OL         0x00000001
 #define TOE_RX_CSUM_OL         0x00000002
 /* maximum channels returned by the get valid channels iovar */
 #define WL_NUMCHANNELS         64
 
-#define        WL_BSS_INFO_VERSION     108     /* current ver of wl_bss_info struct */
+#define        BRCMF_BSS_INFO_VERSION  108 /* current ver of brcmf_bss_info struct */
 
-/* size of wl_scan_params not including variable length array */
-#define WL_SCAN_PARAMS_FIXED_SIZE 64
+/* size of brcmf_scan_params not including variable length array */
+#define BRCMF_SCAN_PARAMS_FIXED_SIZE 64
 
 /* masks for channel and ssid count */
-#define WL_SCAN_PARAMS_COUNT_MASK 0x0000ffff
-#define WL_SCAN_PARAMS_NSSID_SHIFT 16
+#define BRCMF_SCAN_PARAMS_COUNT_MASK 0x0000ffff
+#define BRCMF_SCAN_PARAMS_NSSID_SHIFT 16
 
-#define WL_SCAN_ACTION_START      1
-#define WL_SCAN_ACTION_CONTINUE   2
+#define BRCMF_SCAN_ACTION_START      1
+#define BRCMF_SCAN_ACTION_CONTINUE   2
 #define WL_SCAN_ACTION_ABORT      3
 
-#define ISCAN_REQ_VERSION 1
+#define BRCMF_ISCAN_REQ_VERSION 1
 
-/* wl_iscan_results status values */
-#define WL_SCAN_RESULTS_SUCCESS        0
-#define WL_SCAN_RESULTS_PARTIAL        1
-#define WL_SCAN_RESULTS_PENDING        2
-#define WL_SCAN_RESULTS_ABORTED        3
-#define WL_SCAN_RESULTS_NO_MEM 4
+/* brcmf_iscan_results status values */
+#define BRCMF_SCAN_RESULTS_SUCCESS     0
+#define BRCMF_SCAN_RESULTS_PARTIAL     1
+#define BRCMF_SCAN_RESULTS_PENDING     2
+#define BRCMF_SCAN_RESULTS_ABORTED     3
+#define BRCMF_SCAN_RESULTS_NO_MEM      4
 
 #define WL_SOFT_KEY    (1 << 0)        /* Indicates this key is using soft encrypt */
-#define WL_PRIMARY_KEY (1 << 1)        /* Indicates this key is the primary (ie tx) key */
+#define BRCMF_PRIMARY_KEY      (1 << 1)        /* primary (ie tx) key */
 #define WL_KF_RES_4    (1 << 4)        /* Reserved for backward compat */
 #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
-#define DHD_BAD_IF     -0xf
+#define BRCMF_MAX_IFS  16
+#define BRCMF_DEL_IF   -0xe
+#define BRCMF_BAD_IF   -0xf
 
 #define DOT11_BSSTYPE_ANY                      2
 #define DOT11_MAX_DEFAULT_KEYS 4
 #define BRCMF_EVENT_MSG_FLUSHTXQ       0x02
 #define BRCMF_EVENT_MSG_GROUP          0x04
 
-typedef struct brcmf_event_msg {
+struct brcmf_event_msg {
        u16 version;
        u16 flags;
        u32 event_type;
@@ -147,7 +145,7 @@ typedef struct brcmf_event_msg {
        u32 datalen;
        u8 addr[ETH_ALEN];
        char ifname[IFNAMSIZ];
-} __packed brcmf_event_msg_t;
+} __packed;
 
 struct brcm_ethhdr {
        u16 subtype;
@@ -157,11 +155,11 @@ struct brcm_ethhdr {
        u16 usr_subtype;
 } __packed;
 
-typedef struct brcmf_event {
+struct brcmf_event {
        struct ethhdr eth;
        struct brcm_ethhdr hdr;
        struct brcmf_event_msg msg;
-} __packed brcmf_event_t;
+} __packed;
 
 #define BRCMF_E_SET_SSID                       0
 #define BRCMF_E_JOIN                           1
@@ -311,13 +309,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 */
@@ -329,7 +320,7 @@ enum dhd_bus_state {
  * start matching, the pattern to match, the size of the pattern, and a bitmask
  * that indicates which bits within the pattern should be matched.
  */
-typedef struct wl_pkt_filter_pattern {
+struct brcmf_pkt_filter_pattern {
        u32 offset;             /* Offset within received packet to start pattern matching.
                                 * Offset '0' is the first byte of the ethernet header.
                                 */
@@ -337,29 +328,29 @@ typedef struct wl_pkt_filter_pattern {
        u8 mask_and_pattern[1]; /* Variable length mask and pattern data.  mask starts
                                         * at offset 0.  Pattern immediately follows mask.
                                         */
-} wl_pkt_filter_pattern_t;
+};
 
 /* IOVAR "pkt_filter_add" parameter. Used to install packet filters. */
-typedef struct wl_pkt_filter {
+struct brcmf_pkt_filter {
        u32 id;         /* Unique filter id, specified by app. */
        u32 type;               /* Filter type (WL_PKT_FILTER_TYPE_xxx). */
        u32 negate_match;       /* Negate the result of filter matches */
        union {                 /* Filter definitions */
-               wl_pkt_filter_pattern_t pattern;        /* Pattern matching filter */
+               struct brcmf_pkt_filter_pattern pattern; /* Filter pattern */
        } u;
-} wl_pkt_filter_t;
+};
 
 /* IOVAR "pkt_filter_enable" parameter. */
-typedef struct wl_pkt_filter_enable {
+struct brcmf_pkt_filter_enable {
        u32 id;         /* Unique filter id */
        u32 enable;             /* Enable/disable bool */
-} wl_pkt_filter_enable_t;
+};
 
 /* BSS info structure
  * Applications MUST CHECK ie_offset field and length field to access IEs and
- * next bss_info structure in a vector (in wl_scan_results_t)
+ * next bss_info structure in a vector (in struct brcmf_scan_results)
  */
-typedef struct wl_bss_info {
+struct brcmf_bss_info {
        u32 version;            /* version field */
        u32 length;             /* byte length of data in this record,
                                 * starting at version and including IEs
@@ -392,15 +383,15 @@ typedef struct wl_bss_info {
        s16 SNR;                /* average SNR of during frame reception */
        /* Add new fields here */
        /* variable length Information Elements */
-} wl_bss_info_t;
+};
 
-typedef struct wlc_ssid {
+struct brcmf_ssid {
        u32 SSID_len;
        unsigned char SSID[32];
-} wlc_ssid_t;
+};
 
-typedef struct wl_scan_params {
-       wlc_ssid_t ssid;        /* default: {0, ""} */
+struct brcmf_scan_params {
+       struct brcmf_ssid ssid; /* default: {0, ""} */
        u8 bssid[ETH_ALEN];     /* default: bcast */
        s8 bss_type;            /* default: any,
                                 * DOT11_BSSTYPE_ANY/INFRASTRUCTURE/INDEPENDENT
@@ -418,176 +409,76 @@ typedef struct wl_scan_params {
                                 */
        s32 channel_num;        /* count of channels and ssids that follow
                                 *
-                                * low half is count of channels in channel_list, 0
-                                * means default (use all available channels)
+                                * low half is count of channels in
+                                * channel_list, 0 means default (use all
+                                * available channels)
                                 *
-                                * high half is entries in wlc_ssid_t array that
-                                * follows channel_list, aligned for s32 (4 bytes)
-                                * meaning an odd channel count implies a 2-byte pad
-                                * between end of channel_list and first ssid
+                                * high half is entries in struct brcmf_ssid
+                                * array that follows channel_list, aligned for
+                                * s32 (4 bytes) meaning an odd channel count
+                                * implies a 2-byte pad between end of
+                                * channel_list and first ssid
                                 *
-                                * if ssid count is zero, single ssid in the fixed
-                                * parameter portion is assumed, otherwise ssid in
-                                * the fixed portion is ignored
+                                * if ssid count is zero, single ssid in the
+                                * fixed parameter portion is assumed, otherwise
+                                * ssid in the fixed portion is ignored
                                 */
        u16 channel_list[1];    /* list of chanspecs */
-} wl_scan_params_t;
+};
 
 /* incremental scan struct */
-typedef struct wl_iscan_params {
+struct brcmf_iscan_params {
        u32 version;
        u16 action;
        u16 scan_duration;
-       wl_scan_params_t params;
-} wl_iscan_params_t;
+       struct brcmf_scan_params params;
+};
 
-/* 3 fields + size of wl_scan_params, not including variable length array */
-#define WL_ISCAN_PARAMS_FIXED_SIZE (offsetof(wl_iscan_params_t, params) + sizeof(wlc_ssid_t))
+/* 3 fields + size of brcmf_scan_params, not including variable length array */
+#define BRCMF_ISCAN_PARAMS_FIXED_SIZE \
+       (offsetof(struct brcmf_iscan_params, params) + \
+        sizeof(struct brcmf_ssid))
 
-typedef struct wl_scan_results {
+struct brcmf_scan_results {
        u32 buflen;
        u32 version;
        u32 count;
-       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;
+       struct brcmf_bss_info bss_info[1];
+};
 
 /* used for association with a specific BSSID and chanspec list */
-typedef struct wl_assoc_params {
+struct brcmf_assoc_params {
        u8 bssid[ETH_ALEN];     /* 00:00:00:00:00:00: broadcast scan */
        s32 chanspec_num;       /* 0: all available channels,
                                 * otherwise count of chanspecs in chanspec_list
                                 */
        chanspec_t chanspec_list[1];    /* list of chanspecs */
-} 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;
+};
+#define BRCMF_ASSOC_PARAMS_FIXED_SIZE \
+       (sizeof(struct brcmf_assoc_params) - sizeof(chanspec_t))
 
 /* used for join with or without a specific bssid and channel list */
-typedef struct wl_join_params {
-       wlc_ssid_t ssid;
-       wl_assoc_params_t params;       /* optional field, but it must include the fixed portion
-                                        * of the wl_assoc_params_t struct when it does present.
-                                        */
-} wl_join_params_t;
+struct brcmf_join_params {
+       struct brcmf_ssid ssid;
+       struct brcmf_assoc_params params;
+};
 
-/* size of wl_scan_results not including variable length array */
-#define WL_SCAN_RESULTS_FIXED_SIZE (sizeof(wl_scan_results_t) - sizeof(wl_bss_info_t))
+/* size of brcmf_scan_results not including variable length array */
+#define BRCMF_SCAN_RESULTS_FIXED_SIZE \
+       (sizeof(struct brcmf_scan_results) - sizeof(struct brcmf_bss_info))
 
 /* incremental scan results struct */
-typedef struct wl_iscan_results {
+struct brcmf_iscan_results {
        u32 status;
-       wl_scan_results_t results;
-} wl_iscan_results_t;
-
-/* size of wl_iscan_results not including variable length array */
-#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;
+       struct brcmf_scan_results results;
+};
 
-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;
+/* size of brcmf_iscan_results not including variable length array */
+#define BRCMF_ISCAN_RESULTS_FIXED_SIZE \
+       (BRCMF_SCAN_RESULTS_FIXED_SIZE + \
+        offsetof(struct brcmf_iscan_results, results))
 
-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 {
+struct brcmf_wsec_key {
        u32 index;              /* key index */
        u32 len;                /* key length */
        u8 data[WLAN_MAX_KEY_LEN];      /* key data */
@@ -605,42 +496,42 @@ typedef struct wl_wsec_key {
        } rxiv;
        u32 pad_5[2];
        u8 ea[ETH_ALEN];        /* per station */
-} wl_wsec_key_t;
+};
 
 /* Used to get specific STA parameters */
-typedef struct {
+struct brcmf_scb_val {
        u32 val;
        u8 ea[ETH_ALEN];
-} scb_val_t;
+};
 
 /* channel encoding */
-typedef struct channel_info {
+struct brcmf_channel_info {
        int hw_channel;
        int target_channel;
        int scan_channel;
-} channel_info_t;
+};
 
 /* Linux network driver ioctl encoding */
-typedef struct wl_ioctl {
+struct brcmf_ioctl {
        uint cmd;               /* common ioctl definition */
        void *buf;              /* pointer to user buffer */
        uint len;               /* length of user buffer */
        u8 set;         /* get or set request (optional) */
        uint used;              /* bytes read or written (optional) */
        uint needed;            /* bytes needed (optional) */
-} wl_ioctl_t;
+};
 
-/* Forward decls for struct dhd_pub (see below) */
-struct dhd_bus;                /* device bus info */
+/* Forward decls for struct brcmf_pub (see below) */
+struct brcmf_bus;              /* device bus info */
 struct brcmf_proto;    /* device communication protocol info */
-struct dhd_info;       /* device driver info */
+struct brcmf_info;     /* device driver info */
 
 /* Common structure for module and instance linkage */
-typedef struct dhd_pub {
+struct brcmf_pub {
        /* Linkage ponters */
-       struct dhd_bus *bus;
+       struct brcmf_bus *bus;
        struct brcmf_proto *prot;
-       struct dhd_info *info;
+       struct brcmf_info *info;
 
        /* Internal dhd items */
        bool up;                /* Driver up/down (to OS) */
@@ -656,7 +547,7 @@ typedef struct dhd_pub {
        bool iswl;              /* Dongle-resident driver is wl */
        unsigned long drv_version;      /* Version of dongle-resident driver */
        u8 mac[ETH_ALEN];                       /* MAC address obtained from dongle */
-       dngl_stats_t dstats;            /* Stats for dongle-based data */
+       struct dngl_stats dstats;       /* Stats for dongle-based data */
 
        /* Additional stats for the bus level */
        unsigned long tx_packets;       /* Data packets sent to dongle */
@@ -700,49 +591,44 @@ typedef struct dhd_pub {
        int pktfilter_count;
 
        u8 country_code[WLC_CNTRY_BUF_SZ];
-       char eventmask[WL_EVENTING_MASK_LEN];
+       char eventmask[BRCMF_EVENTING_MASK_LEN];
 
-} dhd_pub_t;
+};
 
-typedef struct dhd_if_event {
+struct brcmf_if_event {
        u8 ifidx;
        u8 action;
        u8 flags;
        u8 bssidx;
-} dhd_if_event_t;
+};
 
-typedef struct {
+struct brcmf_timeout {
        u32 limit;              /* Expiration time (usec) */
        u32 increment;  /* Current expiration increment (usec) */
        u32 elapsed;            /* Current elapsed time (usec) */
        u32 tick;               /* O/S tick time (usec) */
-} dhd_timeout_t;
+};
 
-typedef struct {
+struct bcmevent_name {
        uint event;
        const char *name;
-} bcmevent_name_t;
+};
 
 #if defined(CONFIG_PM_SLEEP)
 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 { \
+#define BRCMF_PM_RESUME_WAIT_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
+#define _BRCMF_PM_RESUME_WAIT(a, b) do { \
                int retry = 0; \
                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)  \
+#define BRCMF_PM_RESUME_WAIT(a)        _BRCMF_PM_RESUME_WAIT(a, 30)
+#define BRCMF_PM_RESUME_RETURN_ERROR(a)        \
        do { if (atomic_read(&brcmf_mmc_suspend)) return a; } while (0)
-#define DHD_PM_RESUME_RETURN   do { \
-       if (atomic_read(&brcmf_mmc_suspend)) \
-               return; \
-       } while (0)
 
-#define DHD_SPINWAIT_SLEEP_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
-#define SPINWAIT_SLEEP(a, exp, us) do { \
+#define BRCMF_SPINWAIT_SLEEP_INIT(a) DECLARE_WAIT_QUEUE_HEAD(a);
+#define BRCMF_SPINWAIT_SLEEP(a, exp, us) do { \
                uint countdown = (us) + 9999; \
                while ((exp) && (countdown >= 10000)) { \
                        wait_event_timeout(a, false, HZ/100); \
@@ -752,14 +638,12 @@ extern atomic_t brcmf_mmc_suspend;
 
 #else
 
-#define DHD_PM_RESUME_WAIT_INIT(a)
-#define DHD_PM_RESUME_WAIT(a)
-#define DHD_PM_RESUME_WAIT_FOREVER(a)
-#define DHD_PM_RESUME_RETURN_ERROR(a)
-#define DHD_PM_RESUME_RETURN
+#define BRCMF_PM_RESUME_WAIT_INIT(a)
+#define BRCMF_PM_RESUME_WAIT(a)
+#define BRCMF_PM_RESUME_RETURN_ERROR(a)
 
-#define DHD_SPINWAIT_SLEEP_INIT(a)
-#define SPINWAIT_SLEEP(a, exp, us)  do { \
+#define BRCMF_SPINWAIT_SLEEP_INIT(a)
+#define BRCMF_SPINWAIT_SLEEP(a, exp, us)  do { \
                uint countdown = (us) + 9; \
                while ((exp) && (countdown >= 10)) { \
                        udelay(10);  \
@@ -819,35 +703,32 @@ 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 struct bcmevent_name bcmevent_names[];
 extern const int bcmevent_names_size;
 
 
-static inline void MUTEX_LOCK_INIT(dhd_pub_t *dhdp)
+static inline void MUTEX_LOCK_INIT(struct brcmf_pub *drvr)
 {
 }
 
-static inline void MUTEX_LOCK(dhd_pub_t *dhdp)
+static inline void MUTEX_LOCK(struct brcmf_pub *drvr)
 {
 }
 
-static inline void MUTEX_UNLOCK(dhd_pub_t *dhdp)
+static inline void MUTEX_UNLOCK(struct brcmf_pub *drvr)
 {
 }
 
-static inline void MUTEX_LOCK_SOFTAP_SET_INIT(dhd_pub_t *dhdp)
+static inline void MUTEX_LOCK_SOFTAP_SET_INIT(struct brcmf_pub *drvr)
 {
 }
 
-static inline void MUTEX_LOCK_SOFTAP_SET(dhd_pub_t *dhdp)
+static inline void MUTEX_LOCK_SOFTAP_SET(struct brcmf_pub *drvr)
 {
 }
 
-static inline void MUTEX_UNLOCK_SOFTAP_SET(dhd_pub_t *dhdp)
+static inline void MUTEX_UNLOCK_SOFTAP_SET(struct brcmf_pub *drvr)
 {
 }
 
@@ -868,92 +749,91 @@ static inline void MUTEX_UNLOCK_WL_SCAN_SET(void)
  */
 
 /* Indication from bus module regarding presence/insertion of dongle.
- * Return dhd_pub_t pointer, used as handle to OS module in later calls.
+ * Return struct brcmf_pub pointer, used as handle to OS module in later calls.
  * Returned structure should have bus and prot pointers filled in.
  * bus_hdrlen specifies required headroom for bus module header.
  */
-extern dhd_pub_t *brcmf_attach(struct dhd_bus *bus,
-                               uint bus_hdrlen);
-extern int brcmf_net_attach(dhd_pub_t *dhdp, int idx);
+extern struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus,
+                                     uint bus_hdrlen);
+extern int brcmf_net_attach(struct brcmf_pub *drvr, int idx);
 extern int brcmf_netdev_wait_pend8021x(struct net_device *dev);
 
 /* Indication from bus module regarding removal/absence of dongle */
-extern void brcmf_detach(dhd_pub_t *dhdp);
+extern void brcmf_detach(struct brcmf_pub *drvr);
 
 /* Indication from bus module to change flow-control state */
-extern void brcmf_txflowcontrol(dhd_pub_t *dhdp, int ifidx, bool on);
+extern void brcmf_txflowcontrol(struct brcmf_pub *drvr, int ifidx, bool on);
 
-extern bool brcmf_c_prec_enq(dhd_pub_t *dhdp, struct pktq *q,
+extern bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
                         struct sk_buff *pkt, int prec);
 
 /* Receive frame for delivery to OS.  Callee disposes of rxp. */
-extern void brcmf_rx_frame(dhd_pub_t *dhdp, int ifidx,
+extern void brcmf_rx_frame(struct brcmf_pub *drvr, int ifidx,
                         struct sk_buff *rxp, int numpkt);
 
 /* Return pointer to interface name */
-extern char *brcmf_ifname(dhd_pub_t *dhdp, int idx);
+extern char *brcmf_ifname(struct brcmf_pub *drvr, int idx);
 
 /* Request scheduling of the bus dpc */
-extern void brcmf_sched_dpc(dhd_pub_t *dhdp);
+extern void brcmf_sched_dpc(struct brcmf_pub *drvr);
 
 /* Notify tx completion */
-extern void brcmf_txcomplete(dhd_pub_t *dhdp, struct sk_buff *txp,
+extern void brcmf_txcomplete(struct brcmf_pub *drvr, struct sk_buff *txp,
                             bool success);
 
 /* Query ioctl */
-extern int brcmf_proto_cdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd,
-                                      void *buf, uint len);
+extern int brcmf_proto_cdc_query_ioctl(struct brcmf_pub *drvr, int ifidx,
+                                      uint cmd, void *buf, uint len);
 
 /* OS independent layer functions */
-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,
+extern int brcmf_os_proto_block(struct brcmf_pub *drvr);
+extern int brcmf_os_proto_unblock(struct brcmf_pub *drvr);
+extern int brcmf_os_ioctl_resp_wait(struct brcmf_pub *drvr, uint *condition,
                                  bool *pending);
-extern int brcmf_os_ioctl_resp_wake(dhd_pub_t *pub);
+extern int brcmf_os_ioctl_resp_wake(struct brcmf_pub *drvr);
 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_open_image(char *filename);
-extern int brcmf_os_get_image_block(char *buf, int len, void *image);
-extern void brcmf_os_close_image(void *image);
-extern void brcmf_os_sdlock_sndup_rxq(dhd_pub_t *pub);
+extern void brcmf_os_sdlock_sndup_rxq(struct brcmf_pub *drvr);
 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);
+extern void brcmf_os_sdunlock_sndup_rxq(struct brcmf_pub *drvr);
+extern void brcmf_os_sdlock_eventq(struct brcmf_pub *drvr);
+extern void brcmf_os_sdunlock_eventq(struct brcmf_pub *drvr);
 #ifdef BCMDBG
-extern int brcmf_write_to_file(dhd_pub_t *dhd, u8 *buf, int size);
+extern int brcmf_write_to_file(struct brcmf_pub *drvr, 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 void brcmf_timeout_start(struct brcmf_timeout *tmo, uint usec);
+extern int brcmf_timeout_expired(struct brcmf_timeout *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 int brcmf_ifname2idx(struct brcmf_info *drvr_priv, char *name);
+extern int brcmf_c_host_event(struct brcmf_info *drvr_priv, int *idx,
+                             void *pktdata, struct brcmf_event_msg *,
+                             void **data_ptr);
 
 extern void brcmf_c_init(void);
 
-extern int brcmf_add_if(struct dhd_info *dhd, int ifidx, void *handle,
+extern int brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, void *handle,
                      char *name, u8 *mac_addr, u32 flags, u8 bssidx);
-extern void brcmf_del_if(struct dhd_info *dhd, int ifidx);
+extern void brcmf_del_if(struct brcmf_info *drvr_priv, 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 brcmf_vif_add(struct brcmf_info *drvr_priv, int ifidx, char *name);
+extern void brcmf_vif_del(struct brcmf_info *drvr_priv, int ifidx);
 
-extern void brcmf_event(struct dhd_info *dhd, char *evpkt, int evlen,
+extern void brcmf_event(struct brcmf_info *drvr_priv, char *evpkt, int evlen,
                        int ifidx);
-extern void brcmf_vif_sendup(struct dhd_info *dhd, int ifidx,
+extern void brcmf_vif_sendup(struct brcmf_info *drvr_priv, int ifidx,
                             unsigned char *cp, int len);
 
 /* Send packet to dongle via data channel */
-extern int brcmf_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pkt);
+extern int brcmf_sendpkt(struct brcmf_pub *drvr, int ifidx,\
+                        struct sk_buff *pkt);
 
-extern int brcmf_bus_devreset(dhd_pub_t *dhdp, u8 flag);
-extern int brcmf_bus_start(dhd_pub_t *dhdp);
+extern int brcmf_bus_devreset(struct brcmf_pub *drvr, u8 flag);
+extern int brcmf_bus_start(struct brcmf_pub *drvr);
 
-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,
+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);
 
 #ifdef BCMDBG
@@ -965,7 +845,7 @@ extern void osl_assert(char *exp, char *file, int line);
 #endif  /* defined(BCMDBG) */
 
 /* Linux network driver ioctl encoding */
-typedef struct dhd_ioctl {
+struct brcmf_c_ioctl {
        uint cmd;               /* common ioctl definition */
        void *buf;              /* pointer to user buffer */
        uint len;               /* length of user buffer */
@@ -973,42 +853,39 @@ typedef struct dhd_ioctl {
        uint used;              /* bytes read or written (optional) */
        uint needed;            /* bytes needed (optional) */
        uint driver;            /* to identify target driver */
-} dhd_ioctl_t;
+};
 
 /* per-driver magic numbers */
-#define DHD_IOCTL_MAGIC                0x00444944
+#define BRCMF_IOCTL_MAGIC              0x00444944
 
 /* bump this number if you change the ioctl interface */
-#define DHD_IOCTL_VERSION      1
-
-#define        DHD_IOCTL_MAXLEN        8192    /* max length ioctl buffer required */
-#define        DHD_IOCTL_SMLEN 256     /* "small" length ioctl buffer required */
+#define BRCMF_IOCTL_VERSION    1
+#define        BRCMF_IOCTL_MAXLEN      8192    /* max length ioctl buffer required */
 
 /* common ioctl definitions */
-#define DHD_GET_MAGIC                          0
-#define DHD_GET_VERSION                                1
-#define DHD_GET_VAR                            2
-#define DHD_SET_VAR                            3
+#define BRCMF_GET_MAGIC                                0
+#define BRCMF_GET_VERSION                              1
+#define BRCMF_GET_VAR                          2
+#define BRCMF_SET_VAR                          3
 
 /* message levels */
-#define DHD_ERROR_VAL  0x0001
-#define DHD_TRACE_VAL  0x0002
-#define DHD_INFO_VAL   0x0004
-#define DHD_DATA_VAL   0x0008
-#define DHD_CTL_VAL    0x0010
-#define DHD_TIMER_VAL  0x0020
-#define DHD_HDRS_VAL   0x0040
-#define DHD_BYTES_VAL  0x0080
-#define DHD_INTR_VAL   0x0100
-#define DHD_LOG_VAL    0x0200
-#define DHD_GLOM_VAL   0x0400
-#define DHD_EVENT_VAL  0x0800
-#define DHD_BTA_VAL    0x1000
-#define DHD_ISCAN_VAL 0x2000
+#define BRCMF_ERROR_VAL        0x0001
+#define BRCMF_TRACE_VAL        0x0002
+#define BRCMF_INFO_VAL 0x0004
+#define BRCMF_DATA_VAL 0x0008
+#define BRCMF_CTL_VAL  0x0010
+#define BRCMF_TIMER_VAL        0x0020
+#define BRCMF_HDRS_VAL 0x0040
+#define BRCMF_BYTES_VAL        0x0080
+#define BRCMF_INTR_VAL 0x0100
+#define BRCMF_GLOM_VAL 0x0400
+#define BRCMF_EVENT_VAL        0x0800
+#define BRCMF_BTA_VAL  0x1000
+#define BRCMF_ISCAN_VAL 0x2000
 
 #ifdef SDTEST
 /* For pktgen iovar */
-typedef struct brcmf_pktgen {
+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 */
@@ -1021,27 +898,25 @@ typedef struct brcmf_pktgen {
        uint numfail;           /* Count of test send failures */
        uint mode;              /* Test mode (type of test packets) */
        uint stop;              /* Stop after this many tx failures */
-} brcmf_pktgen_t;
+};
 
 /* Version in case structure changes */
-#define DHD_PKTGEN_VERSION 2
+#define BRCMF_PKTGEN_VERSION   2
 
 /* Type of test packets to use */
-#define DHD_PKTGEN_ECHO                1       /* Send echo requests */
-#define DHD_PKTGEN_SEND                2       /* Send discard packets */
-#define DHD_PKTGEN_RXBURST     3       /* Request dongle send N packets */
-#define DHD_PKTGEN_RECV                4       /* Continuous rx from continuous
+#define BRCMF_PKTGEN_ECHO      1       /* Send echo requests */
+#define BRCMF_PKTGEN_SEND      2       /* Send discard packets */
+#define BRCMF_PKTGEN_RXBURST   3       /* Request dongle send N packets */
+#define BRCMF_PKTGEN_RECV              4       /* Continuous rx from continuous
                                         tx dongle */
 #endif                         /* SDTEST */
 
 /* Enter idle immediately (no timeout) */
-#define DHD_IDLE_IMMEDIATE     (-1)
+#define BRCMF_IDLE_IMMEDIATE   (-1)
 
 /* Values for idleclock iovar: other values are the sd_divisor to use
         when idle */
-#define DHD_IDLE_ACTIVE        0       /* Do not request any SD clock change
+#define BRCMF_IDLE_ACTIVE      0       /* Do not request any SD clock change
                                 when idle */
-#define DHD_IDLE_STOP   (-1)   /* Request SD clock be stopped
-                                (and use SD1 mode) */
 
 #endif                         /* _dhd_h_ */
This page took 0.04437 seconds and 5 git commands to generate.