} 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 {
uint event;
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 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,
#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 */
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 BRCMF_IOCTL_MAGIC 0x00444944
return bcmerror;
}
-int brcmf_c_ioctl(dhd_pub_t *drvr, dhd_ioctl_t *ioc, void *buf, uint buflen)
+int brcmf_c_ioctl(dhd_pub_t *drvr, struct brcmf_c_ioctl *ioc, void *buf,
+ uint buflen)
{
int bcmerror = 0;
switch (type) {
case BRCMF_E_IF:
{
- dhd_if_event_t *ifevent = (dhd_if_event_t *) event_data;
+ struct brcmf_if_event *ifevent =
+ (struct brcmf_if_event *) event_data;
DHD_TRACE(("%s: if event\n", __func__));
if (ifevent->ifidx > 0 &&
* fatal();
*/
-void brcmf_timeout_start(dhd_timeout_t *tmo, uint usec)
+void brcmf_timeout_start(struct brcmf_timeout *tmo, uint usec)
{
tmo->limit = usec;
tmo->increment = 0;
tmo->tick = 1000000 / HZ;
}
-int brcmf_timeout_expired(dhd_timeout_t *tmo)
+int brcmf_timeout_expired(struct brcmf_timeout *tmo)
{
/* Does nothing the first call */
if (tmo->increment == 0) {
int cmd)
{
dhd_info_t *drvr_priv = *(dhd_info_t **) netdev_priv(net);
- dhd_ioctl_t ioc;
+ struct brcmf_c_ioctl ioc;
int bcmerror = 0;
int buflen = 0;
void *buf = NULL;
/* Use protocol to issue ioctl to dongle */
extern int brcmf_proto_ioctl(dhd_pub_t *dhd, int ifidx, struct brcmf_ioctl *ioc,
- void *buf, int len);
+ void *buf, int len);
/* Check for and handle local prot-specific iovar commands */
extern int brcmf_proto_iovar_op(dhd_pub_t *dhdp, const char *name,
/* Update local copy of dongle statistics */
extern void brcmf_proto_dstats(dhd_pub_t *dhdp);
-extern int brcmf_c_ioctl(dhd_pub_t *dhd_pub, dhd_ioctl_t *ioc, void *buf,
- uint buflen);
+extern int brcmf_c_ioctl(dhd_pub_t *dhd_pub, struct brcmf_c_ioctl *ioc,
+ void *buf, uint buflen);
extern int brcmf_c_preinit_ioctls(dhd_pub_t *dhd);
int brcmf_sdbrcm_bus_init(dhd_pub_t *dhdp, bool enforce_mutex)
{
dhd_bus_t *bus = dhdp->bus;
- dhd_timeout_t tmo;
+ struct brcmf_timeout tmo;
uint retries = 0;
u8 ready, enable;
int err, ret = 0;