diff options
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c index 69f335aeb25..a51d8f5d36f 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_common.c | |||
@@ -83,12 +83,14 @@ brcmf_c_mkiovar(char *name, char *data, uint datalen, char *buf, uint buflen) | |||
83 | return len; | 83 | return len; |
84 | } | 84 | } |
85 | 85 | ||
86 | bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, | 86 | bool brcmf_c_prec_enq(struct device *dev, struct pktq *q, |
87 | struct sk_buff *pkt, int prec) | 87 | struct sk_buff *pkt, int prec) |
88 | { | 88 | { |
89 | struct sk_buff *p; | 89 | struct sk_buff *p; |
90 | int eprec = -1; /* precedence to evict from */ | 90 | int eprec = -1; /* precedence to evict from */ |
91 | bool discard_oldest; | 91 | bool discard_oldest; |
92 | struct brcmf_bus *bus_if = dev_get_drvdata(dev); | ||
93 | struct brcmf_pub *drvr = bus_if->drvr; | ||
92 | 94 | ||
93 | /* Fast case, precedence queue is not full and we are also not | 95 | /* Fast case, precedence queue is not full and we are also not |
94 | * exceeding total queue length | 96 | * exceeding total queue length |
@@ -431,7 +433,7 @@ brcmf_c_show_host_event(struct brcmf_event_msg *event, void *event_data) | |||
431 | #endif /* BCMDBG */ | 433 | #endif /* BCMDBG */ |
432 | 434 | ||
433 | int | 435 | int |
434 | brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, | 436 | brcmf_c_host_event(struct brcmf_pub *drvr, int *ifidx, void *pktdata, |
435 | struct brcmf_event_msg *event, void **data_ptr) | 437 | struct brcmf_event_msg *event, void **data_ptr) |
436 | { | 438 | { |
437 | /* check whether packet is a BRCM event pkt */ | 439 | /* check whether packet is a BRCM event pkt */ |
@@ -473,18 +475,18 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, | |||
473 | 475 | ||
474 | if (ifevent->ifidx > 0 && ifevent->ifidx < BRCMF_MAX_IFS) { | 476 | if (ifevent->ifidx > 0 && ifevent->ifidx < BRCMF_MAX_IFS) { |
475 | if (ifevent->action == BRCMF_E_IF_ADD) | 477 | if (ifevent->action == BRCMF_E_IF_ADD) |
476 | brcmf_add_if(drvr_priv, ifevent->ifidx, | 478 | brcmf_add_if(drvr->dev, ifevent->ifidx, |
477 | event->ifname, | 479 | event->ifname, |
478 | pvt_data->eth.h_dest); | 480 | pvt_data->eth.h_dest); |
479 | else | 481 | else |
480 | brcmf_del_if(drvr_priv, ifevent->ifidx); | 482 | brcmf_del_if(drvr, ifevent->ifidx); |
481 | } else { | 483 | } else { |
482 | brcmf_dbg(ERROR, "Invalid ifidx %d for %s\n", | 484 | brcmf_dbg(ERROR, "Invalid ifidx %d for %s\n", |
483 | ifevent->ifidx, event->ifname); | 485 | ifevent->ifidx, event->ifname); |
484 | } | 486 | } |
485 | 487 | ||
486 | /* send up the if event: btamp user needs it */ | 488 | /* send up the if event: btamp user needs it */ |
487 | *ifidx = brcmf_ifname2idx(drvr_priv, event->ifname); | 489 | *ifidx = brcmf_ifname2idx(drvr, event->ifname); |
488 | break; | 490 | break; |
489 | 491 | ||
490 | /* These are what external supplicant/authenticator wants */ | 492 | /* These are what external supplicant/authenticator wants */ |
@@ -496,7 +498,7 @@ brcmf_c_host_event(struct brcmf_info *drvr_priv, int *ifidx, void *pktdata, | |||
496 | default: | 498 | default: |
497 | /* Fall through: this should get _everything_ */ | 499 | /* Fall through: this should get _everything_ */ |
498 | 500 | ||
499 | *ifidx = brcmf_ifname2idx(drvr_priv, event->ifname); | 501 | *ifidx = brcmf_ifname2idx(drvr, event->ifname); |
500 | brcmf_dbg(TRACE, "MAC event %d, flags %x, status %x\n", | 502 | brcmf_dbg(TRACE, "MAC event %d, flags %x, status %x\n", |
501 | type, flags, status); | 503 | type, flags, status); |
502 | 504 | ||
@@ -796,7 +798,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
796 | "event_msgs" + '\0' + bitvec */ | 798 | "event_msgs" + '\0' + bitvec */ |
797 | uint up = 0; | 799 | uint up = 0; |
798 | char buf[128], *ptr; | 800 | char buf[128], *ptr; |
799 | u32 dongle_align = BRCMF_SDALIGN; | 801 | u32 dongle_align = drvr->bus_if->align; |
800 | u32 glom = 0; | 802 | u32 glom = 0; |
801 | u32 roaming = 1; | 803 | u32 roaming = 1; |
802 | uint bcn_timeout = 3; | 804 | uint bcn_timeout = 3; |
@@ -804,7 +806,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
804 | int scan_unassoc_time = 40; | 806 | int scan_unassoc_time = 40; |
805 | int i; | 807 | int i; |
806 | 808 | ||
807 | brcmf_os_proto_block(drvr); | 809 | mutex_lock(&drvr->proto_block); |
808 | 810 | ||
809 | /* Set Country code */ | 811 | /* Set Country code */ |
810 | if (drvr->country_code[0] != 0) { | 812 | if (drvr->country_code[0] != 0) { |
@@ -873,7 +875,7 @@ int brcmf_c_preinit_dcmds(struct brcmf_pub *drvr) | |||
873 | 0, true); | 875 | 0, true); |
874 | } | 876 | } |
875 | 877 | ||
876 | brcmf_os_proto_unblock(drvr); | 878 | mutex_unlock(&drvr->proto_block); |
877 | 879 | ||
878 | return 0; | 880 | return 0; |
879 | } | 881 | } |