#define DHD_COMPILED
#endif
-static void dhd_dpc(unsigned long data);
+static void brcmf_dpc(unsigned long data);
#ifdef TOE
-static int dhd_toe_get(dhd_info_t *dhd, int idx, u32 *toe_ol);
-static int dhd_toe_set(dhd_info_t *dhd, int idx, u32 toe_ol);
+static int brcmf_toe_get(dhd_info_t *dhd, int idx, u32 *toe_ol);
+static int brcmf_toe_set(dhd_info_t *dhd, int idx, u32 toe_ol);
#endif /* TOE */
-static int dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
+static int brcmf_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
brcmf_event_msg_t *event_ptr, void **data_ptr);
-static void dhd_set_packet_filter(int value, dhd_pub_t *dhd)
+static void brcmf_set_packet_filter(int value, dhd_pub_t *dhd)
{
#ifdef PKT_FILTER_SUPPORT
DHD_TRACE(("%s: %d\n", __func__, value));
}
#if defined(CONFIG_HAS_EARLYSUSPEND)
-static int dhd_set_suspend(int value, dhd_pub_t *dhd)
+static int brcmf_set_suspend(int value, dhd_pub_t *dhd)
{
int power_mode = PM_MAX;
/* wl_pkt_filter_enable_t enable_parm; */
/* Enable packet filter, only allow unicast
packet to send up */
- dhd_set_packet_filter(1, dhd);
+ brcmf_set_packet_filter(1, dhd);
/* if dtim skip setup as default force it
* to wake each third dtim
sizeof(power_mode));
/* disable pkt filter */
- dhd_set_packet_filter(0, dhd);
+ brcmf_set_packet_filter(0, dhd);
/* restore pre-suspend setting for dtim_skip */
brcmu_mkiovar("bcn_li_dtim", (char *)&dhd->dtim_skip,
return 0;
}
-static void dhd_suspend_resume_helper(struct dhd_info *dhd, int val)
+static void brcmf_suspend_resume_helper(struct dhd_info *dhd, int val)
{
dhd_pub_t *dhdp = &dhd->pub;
/* Set flag when early suspend was called */
dhdp->in_suspend = val;
if (!dhdp->suspend_disable_flag)
- dhd_set_suspend(val, dhdp);
+ brcmf_set_suspend(val, dhdp);
brcmf_os_proto_unblock(dhdp);
}
-static void dhd_early_suspend(struct early_suspend *h)
+static void brcmf_early_suspend(struct early_suspend *h)
{
struct dhd_info *dhd = container_of(h, struct dhd_info, early_suspend);
}
-static void dhd_late_resume(struct early_suspend *h)
+static void brcmf_late_resume(struct early_suspend *h)
{
struct dhd_info *dhd = container_of(h, struct dhd_info, early_suspend);
return 0;
}
-static int dhd_net2idx(dhd_info_t *dhd, struct net_device *net)
+static int brcmf_net2idx(dhd_info_t *dhd, struct net_device *net)
{
int i = 0;
return "<if_none>";
}
-static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
+static void _brcmf_set_multicast_list(dhd_info_t *dhd, int ifidx)
{
struct net_device *dev;
struct netdev_hw_addr *ha;
}
}
-static int
-_dhd_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
+static int _brcmf_set_mac_address(dhd_info_t *dhd, int ifidx, u8 *addr)
{
char buf[32];
wl_ioctl_t ioc;
extern struct net_device *ap_net_dev;
#endif
-static void dhd_op_if(dhd_if_t *ifp)
+static void brcmf_op_if(dhd_if_t *ifp)
{
dhd_info_t *dhd;
int ret = 0, err = 0;
}
}
-static int _dhd_sysioc_thread(void *data)
+static int _brcmf_sysioc_thread(void *data)
{
dhd_info_t *dhd = (dhd_info_t *) data;
int i;
in_ap = (ap_net_dev != NULL);
#endif /* SOFTAP */
if (dhd->iflist[i]->state)
- dhd_op_if(dhd->iflist[i]);
+ brcmf_op_if(dhd->iflist[i]);
#ifdef SOFTAP
if (dhd->iflist[i] == NULL) {
DHD_TRACE(("\n\n %s: interface %d "
#endif /* SOFTAP */
if (dhd->set_multicast) {
dhd->set_multicast = false;
- _dhd_set_multicast_list(dhd, i);
+ _brcmf_set_multicast_list(dhd, i);
}
if (dhd->set_macaddress) {
dhd->set_macaddress = false;
- _dhd_set_mac_address(dhd, i,
+ _brcmf_set_mac_address(dhd, i,
dhd->macvalue);
}
}
struct sockaddr *sa = (struct sockaddr *)addr;
int ifidx;
- ifidx = dhd_net2idx(dhd, dev);
+ ifidx = brcmf_net2idx(dhd, dev);
if (ifidx == DHD_BAD_IF)
return -1;
dhd_info_t *dhd = *(dhd_info_t **) netdev_priv(dev);
int ifidx;
- ifidx = dhd_net2idx(dhd, dev);
+ ifidx = brcmf_net2idx(dhd, dev);
if (ifidx == DHD_BAD_IF)
return;
return -ENODEV;
}
- ifidx = dhd_net2idx(dhd, net);
+ ifidx = brcmf_net2idx(dhd, net);
if (ifidx == DHD_BAD_IF) {
DHD_ERROR(("%s: bad ifidx %d\n", __func__, ifidx));
netif_stop_queue(net);
/* Process special event packets and then discard them */
if (ntohs(skb->protocol) == ETH_P_BRCM)
- dhd_wl_host_event(dhd, &ifidx,
+ brcmf_host_event(dhd, &ifidx,
skb_mac_header(skb),
&event, &data);
DHD_TRACE(("%s: Enter\n", __func__));
- ifidx = dhd_net2idx(dhd, net);
+ ifidx = brcmf_net2idx(dhd, net);
if (ifidx == DHD_BAD_IF)
return NULL;
return &ifp->stats;
}
-static int dhd_watchdog_thread(void *data)
+static int brcmf_watchdog_thread(void *data)
{
dhd_info_t *dhd = (dhd_info_t *) data;
return 0;
}
-static void dhd_watchdog(unsigned long data)
+static void brcmf_watchdog(unsigned long data)
{
dhd_info_t *dhd = (dhd_info_t *) data;
mod_timer(&dhd->timer, jiffies + brcmf_watchdog_ms * HZ / 1000);
}
-static int dhd_dpc_thread(void *data)
+static int brcmf_dpc_thread(void *data)
{
dhd_info_t *dhd = (dhd_info_t *) data;
return 0;
}
-static void dhd_dpc(unsigned long data)
+static void brcmf_dpc(unsigned long data)
{
dhd_info_t *dhd;
#ifdef TOE
/* Retrieve current toe component enables, which are kept
as a bitmap in toe_ol iovar */
-static int dhd_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol)
+static int brcmf_toe_get(dhd_info_t *dhd, int ifidx, u32 *toe_ol)
{
wl_ioctl_t ioc;
char buf[32];
/* Set current toe component enables in toe_ol iovar,
and set toe global enable iovar */
-static int dhd_toe_set(dhd_info_t *dhd, int ifidx, u32 toe_ol)
+static int brcmf_toe_set(dhd_info_t *dhd, int ifidx, u32 toe_ol)
{
wl_ioctl_t ioc;
char buf[32];
/* Get toe offload components from dongle */
case ETHTOOL_GRXCSUM:
case ETHTOOL_GTXCSUM:
- ret = dhd_toe_get(dhd, 0, &toe_cmpnt);
+ ret = brcmf_toe_get(dhd, 0, &toe_cmpnt);
if (ret < 0)
return ret;
return -EFAULT;
/* Read the current settings, update and write back */
- ret = dhd_toe_get(dhd, 0, &toe_cmpnt);
+ ret = brcmf_toe_get(dhd, 0, &toe_cmpnt);
if (ret < 0)
return ret;
else
toe_cmpnt &= ~csum_dir;
- ret = dhd_toe_set(dhd, 0, toe_cmpnt);
+ ret = brcmf_toe_set(dhd, 0, toe_cmpnt);
if (ret < 0)
return ret;
int ifidx;
bool is_set_key_cmd;
- ifidx = dhd_net2idx(dhd, net);
+ ifidx = brcmf_net2idx(dhd, net);
DHD_TRACE(("%s: ifidx %d, cmd 0x%04x\n", __func__, ifidx, cmd));
if (ifidx == DHD_BAD_IF)
#ifdef TOE
u32 toe_ol;
#endif
- int ifidx = dhd_net2idx(dhd, net);
+ int ifidx = brcmf_net2idx(dhd, net);
s32 ret = 0;
DHD_TRACE(("%s: ifidx %d\n", __func__, ifidx));
#ifdef TOE
/* Get current TOE mode from dongle */
- if (dhd_toe_get(dhd, ifidx, &toe_ol) >= 0
+ if (brcmf_toe_get(dhd, ifidx, &toe_ol) >= 0
&& (toe_ol & TOE_TX_CSUM_OL) != 0)
dhd->iflist[ifidx]->net->features |= NETIF_F_IP_CSUM;
else
/* Set up the watchdog timer */
init_timer(&dhd->timer);
dhd->timer.data = (unsigned long) dhd;
- dhd->timer.function = dhd_watchdog;
+ dhd->timer.function = brcmf_watchdog;
/* Initialize thread based operation and lock */
sema_init(&dhd->sdsem, 1);
if (dhd_dpc_prio >= 0) {
/* Initialize watchdog thread */
sema_init(&dhd->watchdog_sem, 0);
- dhd->watchdog_tsk = kthread_run(dhd_watchdog_thread, dhd,
+ dhd->watchdog_tsk = kthread_run(brcmf_watchdog_thread, dhd,
"dhd_watchdog");
if (IS_ERR(dhd->watchdog_tsk)) {
printk(KERN_WARNING
if (dhd_dpc_prio >= 0) {
/* Initialize DPC thread */
sema_init(&dhd->dpc_sem, 0);
- dhd->dpc_tsk = kthread_run(dhd_dpc_thread, dhd, "dhd_dpc");
+ dhd->dpc_tsk = kthread_run(brcmf_dpc_thread, dhd, "dhd_dpc");
if (IS_ERR(dhd->dpc_tsk)) {
printk(KERN_WARNING
"dhd_dpc thread failed to start\n");
dhd->dpc_tsk = NULL;
}
} else {
- tasklet_init(&dhd->tasklet, dhd_dpc, (unsigned long) dhd);
+ tasklet_init(&dhd->tasklet, brcmf_dpc, (unsigned long) dhd);
dhd->dpc_tsk = NULL;
}
if (dhd_sysioc) {
sema_init(&dhd->sysioc_sem, 0);
- dhd->sysioc_tsk = kthread_run(_dhd_sysioc_thread, dhd,
+ dhd->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, dhd,
"_dhd_sysioc");
if (IS_ERR(dhd->sysioc_tsk)) {
printk(KERN_WARNING
/* Init lock suspend to prevent kernel going to suspend */
#ifdef CONFIG_HAS_EARLYSUSPEND
dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
- dhd->early_suspend.suspend = dhd_early_suspend;
- dhd->early_suspend.resume = dhd_late_resume;
+ dhd->early_suspend.suspend = brcmf_early_suspend;
+ dhd->early_suspend.resume = brcmf_late_resume;
register_early_suspend(&dhd->early_suspend);
#endif
return 0;
}
-int
-dhd_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, uint cmd_len,
- int set)
+int brcmf_iovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf,
+ uint cmd_len, int set)
{
char buf[strlen(name) + 1 + cmd_len];
int len = sizeof(buf);
return -EBADE;
}
-void dhd_bus_detach(dhd_pub_t *dhdp)
+static void brcmf_bus_detach(dhd_pub_t *dhdp)
{
dhd_info_t *dhd;
dhd->sysioc_tsk = NULL;
}
- dhd_bus_detach(dhdp);
+ brcmf_bus_detach(dhdp);
if (dhdp->prot)
brcmf_proto_detach(dhdp);
}
}
-static void __exit dhd_module_cleanup(void)
+static void __exit brcmf_module_cleanup(void)
{
DHD_TRACE(("%s: Enter\n", __func__));
brcmf_customer_gpio_wlan_ctrl(WLAN_POWER_OFF);
}
-static int __init dhd_module_init(void)
+static int __init brcmf_module_init(void)
{
int error;
return -EINVAL;
}
-module_init(dhd_module_init);
-module_exit(dhd_module_cleanup);
+module_init(brcmf_module_init);
+module_exit(brcmf_module_cleanup);
/*
* OS specific functions required to implement DHD driver in OS independent way
spin_unlock_bh(&dhd->sdlock);
}
-static int
-dhd_wl_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
- brcmf_event_msg_t *event, void **data)
+static int brcmf_host_event(dhd_info_t *dhd, int *ifidx, void *pktdata,
+ brcmf_event_msg_t *event, void **data)
{
int bcmerror = 0;
if (dhd) {
brcmf_os_proto_block(&dhd->pub);
- ret = dhd_set_suspend(val, &dhd->pub);
+ ret = brcmf_set_suspend(val, &dhd->pub);
brcmf_os_proto_unblock(&dhd->pub);
}
#endif /* defined(CONFIG_HAS_EARLYSUSPEND) */
brcmf_os_proto_block(&dhd->pub);
if (dhd->pub.in_suspend) {
if (!val || (val && !dhd->pub.suspend_disable_flag))
- dhd_set_packet_filter(val, &dhd->pub);
+ brcmf_set_packet_filter(val, &dhd->pub);
}
brcmf_os_proto_unblock(&dhd->pub);
}
#endif /* PNO_SUPPORT */
-static int dhd_get_pend_8021x_cnt(dhd_info_t *dhd)
+static int brcmf_get_pend_8021x_cnt(dhd_info_t *dhd)
{
return atomic_read(&dhd->pend_8021x_cnt);
}
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(dev);
int timeout = 10 * HZ / 1000;
int ntimes = MAX_WAIT_FOR_8021X_TX;
- int pend = dhd_get_pend_8021x_cnt(dhd);
+ int pend = brcmf_get_pend_8021x_cnt(dhd);
while (ntimes && pend) {
if (pend) {
set_current_state(TASK_RUNNING);
ntimes--;
}
- pend = dhd_get_pend_8021x_cnt(dhd);
+ pend = brcmf_get_pend_8021x_cnt(dhd);
}
return pend;
}