Commit ec66c6fa authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: rename structure definitions in dhd.h

Structure definitions in dhd.h have been prefixed with brcmf_ for
consistent naming in fullmac driver and typedef of these structures
has been removed.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 462dc314
......@@ -83,8 +83,9 @@
#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 WL_PKT_FILTER_FIXED_LEN offsetof(struct brcmf_pkt_filter, u)
#define WL_PKT_FILTER_PATTERN_FIXED_LEN \
offsetof(struct brcmf_pkt_filter_pattern, mask_and_pattern)
#define WL_EVENTING_MASK_LEN 16
......@@ -94,9 +95,9 @@
/* 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 WL_BSS_INFO_VERSION 108 /* current ver of brcmf_bss_info struct */
/* size of wl_scan_params not including variable length array */
/* size of brcmf_scan_params not including variable length array */
#define WL_SCAN_PARAMS_FIXED_SIZE 64
/* masks for channel and ssid count */
......@@ -109,7 +110,7 @@
#define ISCAN_REQ_VERSION 1
/* wl_iscan_results status values */
/* brcmf_iscan_results status values */
#define WL_SCAN_RESULTS_SUCCESS 0
#define WL_SCAN_RESULTS_PARTIAL 1
#define WL_SCAN_RESULTS_PENDING 2
......@@ -319,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.
*/
......@@ -327,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
......@@ -382,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
......@@ -408,71 +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;
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))
};
#define WL_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;
struct brcmf_scan_results results;
};
/* 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))
/* 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_wsec_key {
struct brcmf_wsec_key {
u32 index; /* key index */
u32 len; /* key length */
u8 data[WLAN_MAX_KEY_LEN]; /* key data */
......@@ -490,30 +496,30 @@ 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 */
......
......@@ -275,7 +275,7 @@ int brcmf_proto_cdc_set_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd,
extern int dhd_bus_interface(struct dhd_bus *bus, uint arg, void *arg2);
int
brcmf_proto_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc, void *buf,
brcmf_proto_ioctl(dhd_pub_t *dhd, int ifidx, struct brcmf_ioctl *ioc, void *buf,
int len)
{
struct brcmf_proto *prot = dhd->prot;
......
......@@ -886,8 +886,8 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *drvr, char *arg, int enable,
char *arg_save = 0, *arg_org = 0;
int rc;
char buf[128];
wl_pkt_filter_enable_t enable_parm;
wl_pkt_filter_enable_t *pkt_filterp;
struct brcmf_pkt_filter_enable enable_parm;
struct brcmf_pkt_filter_enable *pkt_filterp;
arg_save = kmalloc(strlen(arg) + 1, GFP_ATOMIC);
if (!arg_save) {
......@@ -911,7 +911,7 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *drvr, char *arg, int enable,
buf[str_len] = '\0';
buf_len = str_len + 1;
pkt_filterp = (wl_pkt_filter_enable_t *) (buf + str_len + 1);
pkt_filterp = (struct brcmf_pkt_filter_enable *) (buf + str_len + 1);
/* Parse packet filter id. */
enable_parm.id = simple_strtoul(argv[i], NULL, 0);
......@@ -949,8 +949,8 @@ brcmf_c_pktfilter_offload_enable(dhd_pub_t *drvr, char *arg, int enable,
void brcmf_c_pktfilter_offload_set(dhd_pub_t *drvr, char *arg)
{
const char *str;
wl_pkt_filter_t pkt_filter;
wl_pkt_filter_t *pkt_filterp;
struct brcmf_pkt_filter pkt_filter;
struct brcmf_pkt_filter *pkt_filterp;
int buf_len;
int str_len;
int rc;
......@@ -998,7 +998,7 @@ void brcmf_c_pktfilter_offload_set(dhd_pub_t *drvr, char *arg)
buf[str_len] = '\0';
buf_len = str_len + 1;
pkt_filterp = (wl_pkt_filter_t *) (buf + str_len + 1);
pkt_filterp = (struct brcmf_pkt_filter *) (buf + str_len + 1);
/* Parse packet filter id. */
pkt_filter.id = simple_strtoul(argv[i], NULL, 0);
......
......@@ -209,7 +209,7 @@ static void brcmf_set_packet_filter(int value, dhd_pub_t *drvr)
static int brcmf_set_suspend(int value, dhd_pub_t *drvr)
{
int power_mode = PM_MAX;
/* wl_pkt_filter_enable_t enable_parm; */
/* struct wl_pkt_filter_enable enable_parm; */
char iovbuf[32];
int bcn_li_dtim = 3;
......@@ -426,7 +426,7 @@ static void _brcmf_set_multicast_list(dhd_info_t *drvr_priv, int ifidx)
struct netdev_hw_addr *ha;
u32 allmulti, cnt;
wl_ioctl_t ioc;
struct brcmf_ioctl ioc;
char *buf, *bufp;
uint buflen;
int ret;
......@@ -539,7 +539,7 @@ static void _brcmf_set_multicast_list(dhd_info_t *drvr_priv, int ifidx)
static int _brcmf_set_mac_address(dhd_info_t *drvr_priv, int ifidx, u8 *addr)
{
char buf[32];
wl_ioctl_t ioc;
struct brcmf_ioctl ioc;
int ret;
DHD_TRACE(("%s enter\n", __func__));
......@@ -993,7 +993,7 @@ static struct net_device_stats *brcmf_netdev_get_stats(struct net_device *net)
as a bitmap in toe_ol iovar */
static int brcmf_toe_get(dhd_info_t *drvr_priv, int ifidx, u32 *toe_ol)
{
wl_ioctl_t ioc;
struct brcmf_ioctl ioc;
char buf[32];
int ret;
......@@ -1027,7 +1027,7 @@ static int brcmf_toe_get(dhd_info_t *drvr_priv, int ifidx, u32 *toe_ol)
and set toe global enable iovar */
static int brcmf_toe_set(dhd_info_t *drvr_priv, int ifidx, u32 toe_ol)
{
wl_ioctl_t ioc;
struct brcmf_ioctl ioc;
char buf[32];
int toe, ret;
......@@ -1220,7 +1220,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
memset(&ioc, 0, sizeof(ioc));
/* Copy the ioc control structure part of ioctl request */
if (copy_from_user(&ioc, ifr->ifr_data, sizeof(wl_ioctl_t))) {
if (copy_from_user(&ioc, ifr->ifr_data, sizeof(struct brcmf_ioctl))) {
bcmerror = -EINVAL;
goto done;
}
......@@ -1248,8 +1248,8 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
}
/* To differentiate between wl and dhd read 4 more byes */
if ((copy_from_user(&driver, (char *)ifr->ifr_data + sizeof(wl_ioctl_t),
sizeof(uint)) != 0)) {
if ((copy_from_user(&driver, (char *)ifr->ifr_data +
sizeof(struct brcmf_ioctl), sizeof(uint)) != 0)) {
bcmerror = -EINVAL;
goto done;
}
......@@ -1292,8 +1292,8 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
brcmf_netdev_wait_pend8021x(net);
bcmerror =
brcmf_proto_ioctl(&drvr_priv->pub, ifidx, (wl_ioctl_t *)&ioc, buf,
buflen);
brcmf_proto_ioctl(&drvr_priv->pub, ifidx, (struct brcmf_ioctl *)&ioc,
buf, buflen);
done:
if (!bcmerror && buf && ioc.buf) {
......@@ -1604,7 +1604,7 @@ int brcmf_iovar(dhd_pub_t *drvr, int ifidx, char *name, char *cmd_buf,
{
char buf[strlen(name) + 1 + cmd_len];
int len = sizeof(buf);
wl_ioctl_t ioc;
struct brcmf_ioctl ioc;
int ret;
len = brcmu_mkiovar(name, cmd_buf, cmd_len, buf, len);
......
......@@ -52,7 +52,7 @@ extern void brcmf_proto_hdrpush(dhd_pub_t *, int ifidx, struct sk_buff *txp);
extern int brcmf_proto_hdrpull(dhd_pub_t *, int *ifidx, struct sk_buff *rxp);
/* Use protocol to issue ioctl to dongle */
extern int brcmf_proto_ioctl(dhd_pub_t *dhd, int ifidx, wl_ioctl_t *ioc,
extern int brcmf_proto_ioctl(dhd_pub_t *dhd, int ifidx, struct brcmf_ioctl *ioc,
void *buf, int len);
/* Check for and handle local prot-specific iovar commands */
......
......@@ -206,7 +206,7 @@ struct wl_cfg80211_bss_info {
/* basic structure of scan request */
struct wl_scan_req {
struct wlc_ssid ssid;
struct brcmf_ssid ssid;
};
/* basic structure of information element */
......@@ -244,7 +244,7 @@ struct wl_ibss {
/* dongle profile */
struct wl_profile {
u32 mode;
struct wlc_ssid ssid;
struct brcmf_ssid ssid;
u8 bssid[ETH_ALEN];
u16 beacon_interval;
u8 dtim_period;
......@@ -303,9 +303,9 @@ struct wl_priv {
struct list_head eq_list; /* used for event queue */
spinlock_t eq_lock; /* for event queue synchronization */
struct mutex usr_sync; /* maily for dongle up/down synchronization */
struct wl_scan_results *bss_list; /* bss_list holding scanned
struct brcmf_scan_results *bss_list; /* bss_list holding scanned
ap information */
struct wl_scan_results *scan_results;
struct brcmf_scan_results *scan_results;
struct wl_scan_req *scan_req_int; /* scan request object for
internal purpose */
struct wl_cfg80211_bss_info *bss_info; /* bss information for
......@@ -354,11 +354,11 @@ struct wl_priv {
#define wl_to_iscan(w) (w->iscan)
#define wl_to_conn(w) (&w->conn_info)
static inline struct wl_bss_info *next_bss(struct wl_scan_results *list,
struct wl_bss_info *bss)
static inline struct brcmf_bss_info *next_bss(struct brcmf_scan_results *list,
struct brcmf_bss_info *bss)
{
return bss = bss ?
(struct wl_bss_info *)((unsigned long)bss +
(struct brcmf_bss_info *)((unsigned long)bss +
le32_to_cpu(bss->length)) :
list->bss_info;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment