Skip to content

Commit

Permalink
staging: brcm80211: structure renaming in dhd.h
Browse files Browse the repository at this point in the history
structure have been renamed for consistency and the structure typedefs
have been removed.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Jul 5, 2011
1 parent c1b52f6 commit bb26354
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
16 changes: 8 additions & 8 deletions drivers/staging/brcm80211/brcmfmac/dhd.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,19 +595,19 @@ typedef struct dhd_pub {

} 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;
Expand Down Expand Up @@ -803,8 +803,8 @@ extern void brcmf_os_sdunlock_eventq(dhd_pub_t *pub);
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,
Expand Down Expand Up @@ -843,15 +843,15 @@ 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 */
bool set; /* get or set request (optional) */
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
Expand Down
6 changes: 4 additions & 2 deletions drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ brcmf_c_iovar_op(dhd_pub_t *drvr, const char *name,
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;

Expand Down Expand Up @@ -790,7 +791,8 @@ brcmf_c_host_event(struct dhd_info *drvr_priv, int *ifidx, void *pktdata,
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 &&
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,15 @@ static void brcmf_late_resume(struct early_suspend *h)
* 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->elapsed = 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) {
Expand Down Expand Up @@ -1197,7 +1197,7 @@ static int brcmf_netdev_ioctl_entry(struct net_device *net, struct ifreq *ifr,
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;
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/brcm80211/brcmfmac/dhd_proto.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ 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, 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,
Expand All @@ -66,8 +66,8 @@ extern void brcmf_proto_dump(dhd_pub_t *dhdp, struct brcmu_strbuf *strbuf);
/* 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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3130,7 +3130,7 @@ void brcmf_sdbrcm_bus_stop(struct dhd_bus *bus, bool enforce_mutex)
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;
Expand Down

0 comments on commit bb26354

Please sign in to comment.