Lines Matching full:pub
387 #define DBUS_RX_BUFFER_SIZE_DHD(net) (net->mtu + net->hard_header_len + dhd->pub.hdrlen)
389 #define DBUS_RX_BUFFER_SIZE_DHD(net) (net->mtu + net->hard_header_len + dhd->pub.hdrlen + 128)
504 static int dhd_nho_ioctl_process(dhd_pub_t *pub, int ifidx, dhd_ioctl_t *ioc, void *data_buf);
1147 dhd_pub_t *dhd = &dhdinfo->pub; in dhd_pm_callback()
1222 static void dhd_os_rxflock(dhd_pub_t *pub);
1223 static void dhd_os_rxfunlock(dhd_pub_t *pub);
1330 .pub = {
1343 #define DHD_PUB_NULL (&dhd_info_null.pub)
1368 static void dhd_sta_free(dhd_pub_t *pub, dhd_sta_t *sta);
1481 dhd_sta_free(&ifp->info->pub, sta); in dhd_if_del_sta_list()
1614 dhd_find_sta(void *pub, int ifidx, void *ea) in dhd_find_sta() argument
1621 ifp = dhd_get_ifp((dhd_pub_t *)pub, ifidx); in dhd_find_sta()
1644 dhd_add_sta(void *pub, int ifidx, void *ea) in dhd_add_sta() argument
1651 ifp = dhd_get_ifp((dhd_pub_t *)pub, ifidx); in dhd_add_sta()
1660 sta = dhd_sta_alloc((dhd_pub_t *)pub); in dhd_add_sta()
1690 dhd_del_all_sta(void *pub, int ifidx) in dhd_del_all_sta() argument
1696 ifp = dhd_get_ifp((dhd_pub_t *)pub, ifidx); in dhd_del_all_sta()
1705 dhd_sta_free(&ifp->info->pub, sta); in dhd_del_all_sta()
1709 bcm_l2_filter_arp_table_update(((dhd_pub_t*)pub)->osh, in dhd_del_all_sta()
1711 sta->ea.octet, FALSE, ((dhd_pub_t*)pub)->tickcnt); in dhd_del_all_sta()
1723 dhd_del_sta(void *pub, int ifidx, void *ea) in dhd_del_sta() argument
1730 ifp = dhd_get_ifp((dhd_pub_t *)pub, ifidx); in dhd_del_sta()
1742 dhd_sta_free(&ifp->info->pub, sta); in dhd_del_sta()
1750 bcm_l2_filter_arp_table_update(((dhd_pub_t*)pub)->osh, ifp->phnd_arp_table, FALSE, in dhd_del_sta()
1751 ea, FALSE, ((dhd_pub_t*)pub)->tickcnt); in dhd_del_sta()
1759 dhd_findadd_sta(void *pub, int ifidx, void *ea) in dhd_findadd_sta() argument
1763 sta = dhd_find_sta(pub, ifidx, ea); in dhd_findadd_sta()
1767 sta = dhd_add_sta(pub, ifidx, ea); in dhd_findadd_sta()
1786 snapshot = (dhd_sta_t *)MALLOC(dhd->pub.osh, sizeof(dhd_sta_t)); in dhd_sta_list_snapshot()
1810 MFREE(dhd->pub.osh, sta, sizeof(dhd_sta_t)); in dhd_sta_list_snapshot_free()
1820 dhd_sta_t *dhd_findadd_sta(void *pub, int ifidx, void *ea) { return NULL; } in dhd_findadd_sta() argument
1821 dhd_sta_t *dhd_find_sta(void *pub, int ifidx, void *ea) { return NULL; } in dhd_find_sta() argument
1822 void dhd_del_sta(void *pub, int ifidx, void *ea) {} in dhd_del_sta() argument
1934 dhd_axi_error(&dhd->pub); in dhd_axi_error_dispatcher_fn()
2691 dhd_pub_t *dhdp = &dhd->pub; in dhd_suspend_resume_helper()
2714 if (dhd && (dhd->pub.conf->suspend_mode == EARLY_SUSPEND || in dhd_early_suspend()
2715 dhd->pub.conf->suspend_mode == SUSPEND_MODE_2)) { in dhd_early_suspend()
2717 if (dhd->pub.conf->suspend_mode == EARLY_SUSPEND) in dhd_early_suspend()
2718 dhd_conf_set_suspend_resume(&dhd->pub, 1); in dhd_early_suspend()
2727 if (dhd && (dhd->pub.conf->suspend_mode == EARLY_SUSPEND || in dhd_late_resume()
2728 dhd->pub.conf->suspend_mode == SUSPEND_MODE_2)) { in dhd_late_resume()
2729 dhd_conf_set_suspend_resume(&dhd->pub, 0); in dhd_late_resume()
2730 if (dhd->pub.conf->suspend_mode == EARLY_SUSPEND) in dhd_late_resume()
2812 struct net_device * dhd_idx2net(void *pub, int ifidx) in dhd_idx2net() argument
2814 struct dhd_pub *dhd_pub = (struct dhd_pub *)pub; in dhd_idx2net()
2940 if (!dhd->pub.early_suspended) in _dhd_set_multicast_list()
2952 if (!(bufp = buf = MALLOC(dhd->pub.osh, buflen))) { in _dhd_set_multicast_list()
2954 dhd_ifname(&dhd->pub, ifidx), cnt)); in _dhd_set_multicast_list()
3015 ret = dhd_wl_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len); in _dhd_set_multicast_list()
3018 dhd_ifname(&dhd->pub, ifidx), cnt)); in _dhd_set_multicast_list()
3022 MFREE(dhd->pub.osh, buf, buflen); in _dhd_set_multicast_list()
3030 ret = dhd_iovar(&dhd->pub, ifidx, "allmulti", (char *)&allmulti, in _dhd_set_multicast_list()
3034 dhd_ifname(&dhd->pub, ifidx), ltoh32(allmulti))); in _dhd_set_multicast_list()
3059 ret = dhd_wl_ioctl(&dhd->pub, ifidx, &ioc, ioc.buf, ioc.len); in _dhd_set_multicast_list()
3062 dhd_ifname(&dhd->pub, ifidx), ltoh32(allmulti))); in _dhd_set_multicast_list()
3073 WL_MSG(dhd_ifname(&dhd->pub, ifidx), "close dev for mac changing\n"); in _dhd_set_mac_address()
3074 dhd->pub.skip_dhd_stop = TRUE; in _dhd_set_mac_address()
3079 ret = dhd_iovar(&dhd->pub, ifidx, "cur_etheraddr", (char *)addr, in _dhd_set_mac_address()
3083 dhd_ifname(&dhd->pub, ifidx), addr, ret)); in _dhd_set_mac_address()
3088 memcpy(dhd->pub.mac.octet, addr, ETHER_ADDR_LEN); in _dhd_set_mac_address()
3089 WL_MSG(dhd_ifname(&dhd->pub, ifidx), "MACID %pM is overwritten\n", addr); in _dhd_set_mac_address()
3100 dhd->pub.skip_dhd_stop = FALSE; in _dhd_set_mac_address()
3101 WL_MSG(dhd_ifname(&dhd->pub, ifidx), "notify mac changed done\n"); in _dhd_set_mac_address()
3301 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_ifadd_event_handler()
3310 dhd->pub.awdl_ifidx = ifidx; in dhd_ifadd_event_handler()
3330 if ((ndev = wl_cfg80211_post_ifcreate(dhd->pub.info->iflist[0]->net, in dhd_ifadd_event_handler()
3333 if (wl_cfg80211_post_ifcreate(dhd->pub.info->iflist[0]->net, in dhd_ifadd_event_handler()
3347 ndev = dhd_allocate_if(&dhd->pub, ifidx, if_event->name, in dhd_ifadd_event_handler()
3355 ret = dhd_register_if(&dhd->pub, ifidx, TRUE); in dhd_ifadd_event_handler()
3358 dhd_remove_if(&dhd->pub, ifidx, TRUE); in dhd_ifadd_event_handler()
3366 if (FW_SUPPORTED((&dhd->pub), ap) && (if_event->event.role != WLC_E_IF_ROLE_STA)) { in dhd_ifadd_event_handler()
3368 ret = dhd_iovar(&dhd->pub, ifidx, "ap_isolate", (char *)&var_int, sizeof(var_int), in dhd_ifadd_event_handler()
3372 dhd_remove_if(&dhd->pub, ifidx, TRUE); in dhd_ifadd_event_handler()
3384 dhd->pub.awdl_ifidx = 0; in dhd_ifadd_event_handler()
3388 MFREE(dhd->pub.osh, if_event, sizeof(dhd_if_event_t)); in dhd_ifadd_event_handler()
3390 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ifadd_event_handler()
3417 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_ifdel_event_handler()
3422 if (!dhd->pub.info->iflist[ifidx]) { in dhd_ifdel_event_handler()
3433 if (wl_cfg80211_post_ifdel(dhd->pub.info->iflist[ifidx]->net, in dhd_ifdel_event_handler()
3441 dhd_remove_if(&dhd->pub, ifidx, TRUE); in dhd_ifdel_event_handler()
3445 dhd->pub.awdl_ifidx = 0; in dhd_ifdel_event_handler()
3452 MFREE(dhd->pub.osh, if_event, sizeof(dhd_if_event_t)); in dhd_ifdel_event_handler()
3453 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ifdel_event_handler()
3481 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_ifupdate_event_handler()
3486 dhd_op_if_update(&dhd->pub, ifidx); in dhd_ifupdate_event_handler()
3488 MFREE(dhd->pub.osh, if_event, sizeof(dhd_if_event_t)); in dhd_ifupdate_event_handler()
3490 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ifupdate_event_handler()
3516 ret = dhd_wl_ioctl_cmd(&dhdinfo->pub, WLC_GET_VAR, buf, sizeof(buf), FALSE, ifp->idx); in dhd_op_if_update()
3554 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_set_mac_addr_handler()
3560 if (ifp == NULL || !dhd->pub.up) { in dhd_set_mac_addr_handler()
3581 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_set_mac_addr_handler()
3603 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_set_mcast_list_handler()
3607 if (ifp == NULL || !dhd->pub.up) { in dhd_set_mcast_list_handler()
3612 if (ifp == NULL || !dhd->pub.up) { in dhd_set_mcast_list_handler()
3627 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_set_mcast_list_handler()
3643 dhd_pub_t *dhdp = &dhd->pub; in dhd_set_mac_address()
3725 dhd_os_wlfc_block(dhd_pub_t *pub) in dhd_os_wlfc_block() argument
3727 dhd_info_t *di = (dhd_info_t *)(pub->info); in dhd_os_wlfc_block()
3741 dhd_os_wlfc_unblock(dhd_pub_t *pub) in dhd_os_wlfc_unblock() argument
3743 dhd_info_t *di = (dhd_info_t *)(pub->info); in dhd_os_wlfc_unblock()
4088 PKTCFREE(dhd->pub.osh, pktbuf, TRUE); in BCMFASTPATH()
4221 dhd_pub_t *dhdp = &dhd_info->pub; in BCMFASTPATH()
4283 prio = dhd->pub.flow_prio_map[skb->priority]; in BCMFASTPATH()
4291 if (dhd_query_bus_erros(&dhd->pub)) { in BCMFASTPATH()
4295 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4296 DHD_BUS_BUSY_SET_IN_TX(&dhd->pub); in BCMFASTPATH()
4297 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4300 if (dhdpcie_runtime_bus_wake(&dhd->pub, FALSE, dhd_start_xmit)) { in BCMFASTPATH()
4303 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4304 if (!dhdpcie_is_resume_done(&dhd->pub)) { in BCMFASTPATH()
4305 dhd_bus_stop_queue(dhd->pub.bus); in BCMFASTPATH()
4307 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4308 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4309 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4314 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4316 if (DHD_BUS_CHECK_SUSPEND_OR_SUSPEND_IN_PROGRESS(&dhd->pub)) { in BCMFASTPATH()
4318 __FUNCTION__, dhd->pub.busstate, dhd->pub.dhd_bus_busy_state)); in BCMFASTPATH()
4319 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4322 if (DHD_BUS_CHECK_ANY_SUSPEND_IN_PROGRESS(&dhd->pub)) { in BCMFASTPATH()
4323 dhd_bus_stop_queue(dhd->pub.bus); in BCMFASTPATH()
4326 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4327 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4331 if (DHD_BUS_CHECK_SUSPEND_OR_SUSPEND_IN_PROGRESS(&dhd->pub)) { in BCMFASTPATH()
4333 __FUNCTION__, dhd->pub.busstate, dhd->pub.dhd_bus_busy_state)); in BCMFASTPATH()
4337 DHD_OS_WAKE_LOCK(&dhd->pub); in BCMFASTPATH()
4340 if (dhd->pub.req_hang_type == HANG_REASON_BUS_DOWN) { in BCMFASTPATH()
4342 dhd->pub.busstate = DHD_BUS_DOWN; in BCMFASTPATH()
4350 if (dhd->pub.hang_was_sent || DHD_BUS_CHECK_DOWN_OR_DOWN_IN_PROGRESS(&dhd->pub)) { in BCMFASTPATH()
4351 DHD_ERROR(("%s: xmit rejected pub.up=%d busstate=%d \n", in BCMFASTPATH()
4352 __FUNCTION__, dhd->pub.up, dhd->pub.busstate)); in BCMFASTPATH()
4356 if (dhd->pub.up && !dhd->pub.hang_was_sent && !DHD_BUS_CHECK_REMOVE(&dhd->pub)) { in BCMFASTPATH()
4358 dhd->pub.hang_reason = HANG_REASON_BUS_DOWN; in BCMFASTPATH()
4362 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4363 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4364 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4365 DHD_OS_WAKE_UNLOCK(&dhd->pub); in BCMFASTPATH()
4377 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4378 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4379 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4380 DHD_OS_WAKE_UNLOCK(&dhd->pub); in BCMFASTPATH()
4384 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4387 if (dhd->pub.tput_data.tput_test_running) { in BCMFASTPATH()
4400 PKTPUSH(dhd->pub.osh, skb, 1); in BCMFASTPATH()
4402 PKTSETLEN(dhd->pub.osh, skb, length); in BCMFASTPATH()
4405 datalen = PKTLEN(dhd->pub.osh, skb); in BCMFASTPATH()
4408 if (dhd->pub.conf->tput_monitor_ms) { in BCMFASTPATH()
4409 dhd_os_sdlock_txq(&dhd->pub); in BCMFASTPATH()
4410 dhd->pub.conf->net_len += datalen; in BCMFASTPATH()
4411 dhd_os_sdunlock_txq(&dhd->pub); in BCMFASTPATH()
4412 if ((dhd->pub.conf->data_drop_mode == XMIT_DROP) && in BCMFASTPATH()
4413 (PKTLEN(dhd->pub.osh, skb) > 500)) { in BCMFASTPATH()
4421 if (skb_headroom(skb) < dhd->pub.hdrlen + htsfdlystat_sz) { in BCMFASTPATH()
4425 dhd_ifname(&dhd->pub, ifidx))); in BCMFASTPATH()
4426 dhd->pub.tx_realloc++; in BCMFASTPATH()
4429 skb2 = skb_realloc_headroom(skb, dhd->pub.hdrlen + htsfdlystat_sz); in BCMFASTPATH()
4434 dhd_ifname(&dhd->pub, ifidx))); in BCMFASTPATH()
4443 if (dhd->pub.conf->orphan_move == 2) in BCMFASTPATH()
4444 PKTORPHAN(skb, dhd->pub.conf->tsq); in BCMFASTPATH()
4445 else if (dhd->pub.conf->orphan_move == 3) in BCMFASTPATH()
4449 if (!(pktbuf = PKTFRMNATIVE(dhd->pub.osh, skb))) { in BCMFASTPATH()
4451 dhd_ifname(&dhd->pub, ifidx))); in BCMFASTPATH()
4462 if (WET_ENABLED(&dhd->pub) && in BCMFASTPATH()
4463 (dhd_wet_send_proc(dhd->pub.wet_info, pktbuf, &pktbuf) < 0)) { in BCMFASTPATH()
4465 __FUNCTION__, dhd_ifname(&dhd->pub, ifidx))); in BCMFASTPATH()
4466 PKTFREE(dhd->pub.osh, pktbuf, FALSE); in BCMFASTPATH()
4473 eh = (struct ether_header *)PKTDATA(dhd->pub.osh, pktbuf); in BCMFASTPATH()
4481 ((IPV4_PROT(iph) == IP_PROT_IGMP) && dhd->pub.wmf_ucast_igmp))) { in BCMFASTPATH()
4489 ucast_convert = dhd->pub.wmf_ucast_upnp && MCAST_ADDR_UPNP_SSDP(dest_ip); in BCMFASTPATH()
4492 ucast_convert |= dhd->pub.wmf_ucast_igmp_query && in BCMFASTPATH()
4517 if ((sdu_clone = PKTDUP(dhd->pub.osh, pktbuf)) == NULL) { in BCMFASTPATH()
4525 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4526 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4527 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4528 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4529 DHD_OS_WAKE_UNLOCK(&dhd->pub); in BCMFASTPATH()
4532 PKTFREE(dhd->pub.osh, pktbuf, TRUE); in BCMFASTPATH()
4541 ret = dhd_wmf_packets_handle(&dhd->pub, pktbuf, NULL, ifidx, 0); in BCMFASTPATH()
4549 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4550 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4551 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4552 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4553 DHD_OS_WAKE_UNLOCK(&dhd->pub); in BCMFASTPATH()
4566 if (PSR_ENABLED(&dhd->pub) && in BCMFASTPATH()
4570 (dhd_psta_proc(&dhd->pub, ifidx, &pktbuf, TRUE) < 0)) { in BCMFASTPATH()
4573 dhd_ifname(&dhd->pub, ifidx))); in BCMFASTPATH()
4587 if (dhd_tcpdata_get_flag(&dhd->pub, pktbuf) == FLAG_SYNCACK) { in BCMFASTPATH()
4593 if (dhd->pub.tcpack_sup_mode == TCPACK_SUP_HOLD) { in BCMFASTPATH()
4595 if (dhd_tcpack_hold(&dhd->pub, pktbuf, ifidx)) { in BCMFASTPATH()
4601 if (dhd_tcpack_suppress(&dhd->pub, pktbuf)) { in BCMFASTPATH()
4615 ret = __dhd_sendpkt(&dhd->pub, ifidx, pktbuf); in BCMFASTPATH()
4624 dhd->pub.tx_dropped++; in BCMFASTPATH()
4628 if (!dhd_wlfc_is_supported(&dhd->pub)) in BCMFASTPATH()
4631 dhd->pub.tx_packets++; in BCMFASTPATH()
4635 dhd->pub.actual_tx_pkts++; in BCMFASTPATH()
4638 DHD_GENERAL_LOCK(&dhd->pub, flags); in BCMFASTPATH()
4639 DHD_BUS_BUSY_CLEAR_IN_TX(&dhd->pub); in BCMFASTPATH()
4641 dhd_os_tx_completion_wake(&dhd->pub); in BCMFASTPATH()
4642 dhd_os_busbusy_wake(&dhd->pub); in BCMFASTPATH()
4643 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in BCMFASTPATH()
4644 DHD_OS_WAKE_UNLOCK(&dhd->pub); in BCMFASTPATH()
4656 struct dhd_pub * pub; in dhd_rx_wq_wakeup() local
4660 pub = work->pub; in dhd_rx_wq_wakeup()
4664 if (atomic_read(&pub->block_bus) || pub->busstate == DHD_BUS_DOWN) { in dhd_rx_wq_wakeup()
4668 DHD_OS_WAKE_LOCK(pub); in dhd_rx_wq_wakeup()
4669 if (pm_runtime_get_sync(dhd_bus_to_dev(pub->bus)) >= 0) { in dhd_rx_wq_wakeup()
4672 pm_runtime_mark_last_busy(dhd_bus_to_dev(pub->bus)); in dhd_rx_wq_wakeup()
4673 pm_runtime_put_autosuspend(dhd_bus_to_dev(pub->bus)); in dhd_rx_wq_wakeup()
4675 DHD_OS_WAKE_UNLOCK(pub); in dhd_rx_wq_wakeup()
4690 bus = dhd->pub.bus; in dhd_start_xmit_wq_adapter()
4692 if (atomic_read(&dhd->pub.block_bus)) { in dhd_start_xmit_wq_adapter()
4719 if (dhd->pub.busstate == DHD_BUS_SUSPEND) { in BCMFASTPATH()
4722 dhd_netif_stop_queue(dhd->pub.bus); in BCMFASTPATH()
4740 } else if (dhd->pub.busstate == DHD_BUS_DATA) { in BCMFASTPATH()
4763 rx_work->pub = dhdp; in dhd_bus_wakeup_work()
4818 flags = dhd_os_sdlock_txoff(&dhd->pub); in dhd_txflowcontrol()
4833 dhd_os_sdunlock_txoff(&dhd->pub, flags); in dhd_txflowcontrol()
4906 dhd_pub_t *dhdp = &dhd->pub; in BCMFASTPATH()
5100 dhdp = &dhd->pub; in dhd_event_logtrace_process_items()
5103 DHD_ERROR(("%s: dhd pub is null \n", __FUNCTION__)); in dhd_event_logtrace_process_items()
5192 dhd_pub_t *dhdp = (dhd_pub_t *)&dhd->pub; in dhd_logtrace_thread()
5200 if (dhd->pub.dongle_reset == FALSE) { in dhd_logtrace_thread()
5209 if (dhd->pub.dongle_edl_support) { in dhd_logtrace_thread()
5210 ret = dhd_prot_process_edl_complete(&dhd->pub, in dhd_logtrace_thread()
5265 if (dhd->pub.dongle_edl_support) { in dhd_event_logtrace_process()
5266 ret = dhd_prot_process_edl_complete(&dhd->pub, &dhd->event_data); in dhd_event_logtrace_process()
5474 dhdp = &dhd->pub; in dhd_bt_log_process()
5477 DHD_ERROR(("%s: dhd pub is null \n", __FUNCTION__)); in dhd_bt_log_process()
5518 dhd_prot_process_edl_complete(&dhd_info->pub, &dhd_info->event_data); in dhd_edl_process_work()
5532 dhd_nho_evt_process(dhd_pub_t *pub, int ifidx, wl_event_msg_t *evt_msg, in dhd_nho_evt_process() argument
5542 bcm_nanho_evt(pub->nanhoi, &pvt_data->event, event_len, &consumed); in dhd_nho_evt_process()
5851 if (dhd->pub.tput_data.tput_test_running && in dhd_rx_frame()
5852 dhd->pub.tput_data.direction == TPUT_DIR_RX && in dhd_rx_frame()
5855 PKTFREE(dhd->pub.osh, pktbuf, FALSE); in dhd_rx_frame()
5895 if ((!ifp->net || ifp->net->reg_state != NETREG_REGISTERED || !dhd->pub.up) && in dhd_rx_frame()
6037 if (WET_ENABLED(&dhd->pub) && (dhd_wet_recv_proc(dhd->pub.wet_info, in dhd_rx_frame()
6192 if (dhd->pub.loopback) { in dhd_rx_frame()
6248 dhd->pub.rx_multicast++; in dhd_rx_frame()
6385 dhd->pub.up)) in dhd_rx_frame()
6559 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_OFF); in dhd_rx_frame()
6636 uint datalen = PKTLEN(dhd->pub.osh, txp); in dhd_txcomplete()
6639 dhd->pub.tx_packets++; in dhd_txcomplete()
6649 dhd->pub.tot_txcpl++; in dhd_txcomplete()
6653 int dhd_os_tput_test_wait(dhd_pub_t *pub, uint *condition, in dhd_os_tput_test_wait() argument
6660 pub->tput_test_done = FALSE; in dhd_os_tput_test_wait()
6661 condition = (uint *)&pub->tput_test_done; in dhd_os_tput_test_wait()
6662 timeout = wait_event_timeout(pub->tx_tput_test_wait, in dhd_os_tput_test_wait()
6668 int dhd_os_tput_test_wake(dhd_pub_t * pub) in dhd_os_tput_test_wake() argument
6671 pub->tput_test_done = TRUE; in dhd_os_tput_test_wake()
6673 wake_up(&(pub->tx_tput_test_wait)); in dhd_os_tput_test_wake()
6690 ifp = dhd_get_ifp_by_ndev(&dhd->pub, net); in dhd_get_stats()
6697 if (dhd->pub.up) { in dhd_get_stats()
6699 dhd_prot_dstats(&dhd->pub); in dhd_get_stats()
6730 DHD_OS_WD_WAKE_LOCK(&dhd->pub); in dhd_watchdog_thread()
6736 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_watchdog_thread()
6741 if (dhd->pub.dongle_reset == FALSE) { in dhd_watchdog_thread()
6744 dhd_bus_watchdog(&dhd->pub); in dhd_watchdog_thread()
6748 dhd_timesync_watchdog(&dhd->pub); in dhd_watchdog_thread()
6753 osl_ctfpool_replenish(dhd->pub.osh, CTFPOOL_REFILL_THRESH); in dhd_watchdog_thread()
6756 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_watchdog_thread()
6758 dhd->pub.tickcnt++; in dhd_watchdog_thread()
6760 dhd_l2_filter_watchdog(&dhd->pub); in dhd_watchdog_thread()
6771 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_watchdog_thread()
6774 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_watchdog_thread()
6789 if (dhd->pub.dongle_reset) { in dhd_watchdog()
6799 DHD_OS_WD_WAKE_LOCK(&dhd->pub); in dhd_watchdog()
6802 dhd_bus_watchdog(&dhd->pub); in dhd_watchdog()
6806 dhd_timesync_watchdog(&dhd->pub); in dhd_watchdog()
6809 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_watchdog()
6811 dhd->pub.tickcnt++; in dhd_watchdog()
6814 dhd_l2_filter_watchdog(&dhd->pub); in dhd_watchdog()
6819 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_watchdog()
6821 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_watchdog()
6826 osl_ctfpool_replenish(dhd->pub.osh, CTFPOOL_REFILL_THRESH); in dhd_watchdog()
6848 if (dhd->pub.dongle_reset == FALSE) { in dhd_rpm_state_thread()
6850 if (dhd->pub.up) { in dhd_rpm_state_thread()
6852 dhd_bus_dw_deassert(&dhd->pub); in dhd_rpm_state_thread()
6854 if (dhd_get_rpm_state(&dhd->pub)) { in dhd_rpm_state_thread()
6855 dhd_runtimepm_state(&dhd->pub); in dhd_rpm_state_thread()
6858 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_rpm_state_thread()
6869 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_rpm_state_thread()
6883 if (dhd->pub.dongle_reset) { in dhd_runtimepm()
6966 dhd->pub.current_dpc = current; in dhd_dpc_thread()
6970 if (dhd->pub.conf->dpc_cpucore >= 0) { in dhd_dpc_thread()
6971 printf("%s: set dpc_cpucore %d\n", __FUNCTION__, dhd->pub.conf->dpc_cpucore); in dhd_dpc_thread()
6972 set_cpus_allowed_ptr(current, cpumask_of(dhd->pub.conf->dpc_cpucore)); in dhd_dpc_thread()
6973 dhd->pub.conf->dpc_cpucore = -1; in dhd_dpc_thread()
6975 if (dhd->pub.conf->dhd_dpc_prio >= 0) { in dhd_dpc_thread()
6977 printf("%s: set dhd_dpc_prio %d\n", __FUNCTION__, dhd->pub.conf->dhd_dpc_prio); in dhd_dpc_thread()
6978 param.sched_priority = (dhd->pub.conf->dhd_dpc_prio < MAX_RT_PRIO)? in dhd_dpc_thread()
6979 dhd->pub.conf->dhd_dpc_prio:(MAX_RT_PRIO-1); in dhd_dpc_thread()
6981 dhd->pub.conf->dhd_dpc_prio = -1; in dhd_dpc_thread()
6989 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_dpc_thread()
6994 if (dhd->pub.busstate != DHD_BUS_DOWN) { in dhd_dpc_thread()
6998 dhd_os_wd_timer_extend(&dhd->pub, TRUE); in dhd_dpc_thread()
6999 while (dhd_bus_dpc(dhd->pub.bus)) { in dhd_dpc_thread()
7007 dhd->pub.dhd_bug_on = true; in dhd_dpc_thread()
7013 dhd_os_wd_timer_extend(&dhd->pub, FALSE); in dhd_dpc_thread()
7014 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_dpc_thread()
7016 if (dhd->pub.up) in dhd_dpc_thread()
7017 dhd_bus_stop(dhd->pub.bus, TRUE); in dhd_dpc_thread()
7018 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_dpc_thread()
7036 dhd_pub_t *pub = &dhd->pub; in dhd_rxf_thread() local
7049 dhd->pub.current_rxf = current; in dhd_rxf_thread()
7053 if (dhd->pub.conf->rxf_cpucore >= 0) { in dhd_rxf_thread()
7054 printf("%s: set rxf_cpucore %d\n", __FUNCTION__, dhd->pub.conf->rxf_cpucore); in dhd_rxf_thread()
7055 set_cpus_allowed_ptr(current, cpumask_of(dhd->pub.conf->rxf_cpucore)); in dhd_rxf_thread()
7056 dhd->pub.conf->rxf_cpucore = -1; in dhd_rxf_thread()
7067 DHD_OS_WAKE_UNLOCK(pub); in dhd_rxf_thread()
7070 skb = dhd_rxf_dequeue(pub); in dhd_rxf_thread()
7076 void *skbnext = PKTNEXT(pub->osh, skb); in dhd_rxf_thread()
7077 PKTSETNEXT(pub->osh, skb, NULL); in dhd_rxf_thread()
7081 if (dhd_monitor_enabled(pub, 0)) in dhd_rxf_thread()
7082 dhd_rx_mon_pkt_sdio(pub, skb, 0); in dhd_rxf_thread()
7095 DHD_OS_WAKE_UNLOCK(pub); in dhd_rxf_thread()
7196 if (dhd->pub.busstate != DHD_BUS_DOWN) { in dhd_dpc()
7200 if (dhd_bus_dpc(dhd->pub.bus)) { in dhd_dpc()
7204 dhd_bus_stop(dhd->pub.bus, TRUE); in dhd_dpc()
7295 ret = dhd_iovar(&dhd->pub, ifidx, "toe_ol", NULL, 0, (char *)&buf, sizeof(buf), FALSE); in dhd_toe_get()
7299 DHD_ERROR(("%s: toe not supported by device\n", dhd_ifname(&dhd->pub, in dhd_toe_get()
7304 DHD_INFO(("%s: could not get toe_ol: ret=%d\n", dhd_ifname(&dhd->pub, ifidx), ret)); in dhd_toe_get()
7319 ret = dhd_iovar(&dhd->pub, ifidx, "toe_ol", (char *)&toe_ol, sizeof(toe_ol), NULL, 0, TRUE); in dhd_toe_set()
7322 dhd_ifname(&dhd->pub, ifidx), ret)); in dhd_toe_set()
7328 ret = dhd_iovar(&dhd->pub, ifidx, "toe", (char *)&toe, sizeof(toe), NULL, 0, TRUE); in dhd_toe_set()
7330 DHD_ERROR(("%s: could not set toe: ret=%d\n", dhd_ifname(&dhd->pub, ifidx), ret)); in dhd_toe_set()
7373 snprintf(info->version, sizeof(info->version), "%lu", dhd->pub.drv_version); in dhd_ethtool_get_drvinfo()
7422 else if (!dhd->pub.up) { in dhd_ethtool()
7428 else if (dhd->pub.iswl) in dhd_ethtool()
7433 snprintf(info.version, sizeof(info.version), "%lu", dhd->pub.drv_version); in dhd_ethtool()
7692 dhd_ifname(&dhd->pub, ifidx))); in dhd_rx_mon_pkt()
7699 dhd_ifname(&dhd->pub, ifidx))); in dhd_rx_mon_pkt()
7703 PKTPUSH(dhd->pub.osh, dhd->monitor_skb, ETHER_HDR_LEN); in dhd_rx_mon_pkt()
7777 dhd->pub.hang_was_sent = 0; in dhd_bus_get()
7798 dhd_bus_update_fw_nv_path(dhd->pub.bus, in dhd_bus_get()
7805 if (dhd_sync_with_dongle(&dhd->pub) < 0) { in dhd_bus_get()
7848 if (dhd->pub.wlfc_enabled) { in dhd_bus_put()
7849 dhd_wlfc_deinit(&dhd->pub); in dhd_bus_put()
7853 if (dhd->pub.pno_state) { in dhd_bus_put()
7854 dhd_pno_deinit(&dhd->pub); in dhd_bus_put()
7858 if (dhd->pub.rtt_state) { in dhd_bus_put()
7859 dhd_rtt_deinit(&dhd->pub); in dhd_bus_put()
7881 return dhd_bus_get(&dhd->pub, WLAN_MODULE); in dhd_net_bus_get()
7888 return dhd_bus_put(&dhd->pub, WLAN_MODULE); in dhd_net_bus_put()
7964 dhd_os_send_hang_message(&dhd->pub); in dhd_bus_retry_hang_recovery()
7995 dhd_pub_t *dhdp = (dhd_pub_t *)&dhd->pub; in dhd_add_monitor_if()
8043 if (FW_SUPPORTED((&dhd->pub), monitor)) { in dhd_add_monitor_if()
8046 DHD_DISABLE_RUNTIME_PM(&dhd->pub); in dhd_add_monitor_if()
8051 ret = dhd_iovar(&dhd->pub, 0, "scansuppress", (char *)&scan_suppress, in dhd_add_monitor_if()
8082 if (FW_SUPPORTED((&dhd->pub), monitor)) { in dhd_del_monitor_if()
8085 DHD_ENABLE_RUNTIME_PM(&dhd->pub); in dhd_del_monitor_if()
8090 ret = dhd_iovar(&dhd->pub, 0, "scansuppress", (char *)&scan_suppress, in dhd_del_monitor_if()
8118 dhd_set_monitor(dhd_pub_t *pub, int ifidx, int val) in dhd_set_monitor() argument
8120 dhd_info_t *dhd = pub->info; in dhd_set_monitor()
8169 dhd = &dhd_info->pub; in dhd_deferred_work_rte_log_time_sync()
8182 int dhd_ioctl_process(dhd_pub_t *pub, int ifidx, dhd_ioctl_t *ioc, void *data_buf) in dhd_ioctl_process() argument
8188 net = dhd_idx2net(pub, ifidx); in dhd_ioctl_process()
8219 bcmerror = dhd_ioctl((void *)pub, ioc, data_buf, buflen); in dhd_ioctl_process()
8221 pub->bcmerror = bcmerror; in dhd_ioctl_process()
8231 if (pub->busstate == DHD_BUS_DOWN || pub->busstate == DHD_BUS_LOAD) { in dhd_ioctl_process()
8232 if ((!pub->dongle_trap_occured) && allow_delay_fwdl) { in dhd_ioctl_process()
8239 ret = dhd_bus_start(pub); in dhd_ioctl_process()
8251 if (!pub->iswl) { in dhd_ioctl_process()
8279 bcmerror = dhd_wl_ioctl(pub, ifidx, (wl_ioctl_t *)ioc, data_buf, buflen); in dhd_ioctl_process()
8293 pub->secure_join = TRUE; in dhd_ioctl_process()
8298 pub->secure_join = FALSE; in dhd_ioctl_process()
8311 pub->secure_join = TRUE; in dhd_ioctl_process()
8314 pub->secure_join = FALSE; in dhd_ioctl_process()
8319 bool set_ssid_rcvd = OSL_ATOMIC_READ(pub->osh, &pub->set_ssid_rcvd); in dhd_ioctl_process()
8320 if ((!set_ssid_rcvd) && (!pub->secure_join)) { in dhd_ioctl_process()
8321 dhd_start_join_timer(pub); in dhd_ioctl_process()
8325 __FUNCTION__, set_ssid_rcvd, pub->secure_join)); in dhd_ioctl_process()
8326 OSL_ATOMIC_SET(pub->osh, &pub->set_ssid_rcvd, FALSE); in dhd_ioctl_process()
8331 dhd_start_scan_timer(pub, 0); in dhd_ioctl_process()
8338 dhd_check_hang(net, pub, bcmerror); in dhd_ioctl_process()
8363 dhd_nho_ioctl_process(dhd_pub_t *pub, int ifidx, dhd_ioctl_t *ioc, void *data_buf) in dhd_nho_ioctl_process() argument
8369 err = bcm_nanho_iov(pub->nanhoi, ifidx, (wl_ioctl_t *)ioc); in dhd_nho_ioctl_process()
8372 err = dhd_ioctl_process(pub, ifidx, ioc, data_buf); in dhd_nho_ioctl_process()
8426 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_ioctl_entry()
8430 if (!dhd_download_fw_on_driverload && dhd->pub.up == FALSE) { in dhd_ioctl_entry()
8432 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8442 if (dhd_is_static_ndev(&dhd->pub, net) && !(net->flags & IFF_UP)) { in dhd_ioctl_entry()
8443 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8450 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8459 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8466 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8473 dhd_check_hang(net, &dhd->pub, ret); in dhd_ioctl_entry()
8474 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8481 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8581 if (!(local_buf = MALLOC(dhd->pub.osh, buflen+1))) { in dhd_ioctl_entry()
8602 if (ioc.driver != DHD_IOCTL_MAGIC && dhd->pub.hang_was_sent) { in dhd_ioctl_entry()
8604 DHD_OS_WAKE_LOCK_CTRL_TIMEOUT_ENABLE(&dhd->pub, DHD_EVENT_TIMEOUT_MS); in dhd_ioctl_entry()
8611 bcmerror = dhd_nho_ioctl_process(&dhd->pub, ifidx, &ioc, local_buf); in dhd_ioctl_entry()
8613 bcmerror = dhd_ioctl_process(&dhd->pub, ifidx, &ioc, local_buf); in dhd_ioctl_entry()
8625 MFREE(dhd->pub.osh, local_buf, buflen+1); in dhd_ioctl_entry()
8627 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry()
8694 if (atomic_read(&dhd->pub.block_bus)) in dhd_ioctl_entry_wrapper()
8697 if (pm_runtime_get_sync(dhd_bus_to_dev(dhd->pub.bus)) < 0) in dhd_ioctl_entry_wrapper()
8706 pm_runtime_mark_last_busy(dhd_bus_to_dev(dhd->pub.bus)); in dhd_ioctl_entry_wrapper()
8707 pm_runtime_put_autosuspend(dhd_bus_to_dev(dhd->pub.bus)); in dhd_ioctl_entry_wrapper()
8742 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_stop()
8744 dhd->pub.rxcnt_timeout = 0; in dhd_stop()
8745 dhd->pub.txcnt_timeout = 0; in dhd_stop()
8748 dhd->pub.d3ackcnt_timeout = 0; in dhd_stop()
8751 mutex_lock(&dhd->pub.ndev_op_sync); in dhd_stop()
8752 if (dhd->pub.up == 0) { in dhd_stop()
8756 if (dhd->pub.req_hang_type) { in dhd_stop()
8758 __FUNCTION__, dhd->pub.req_hang_type)); in dhd_stop()
8759 dhd->pub.req_hang_type = 0; in dhd_stop()
8764 if (!dhd->wl_accel_force_reg_on && dhd_query_bus_erros(&dhd->pub)) { in dhd_stop()
8782 if ((!dhd->pub.hang_was_sent) && wl_cfg80211_static_if_active(cfg)) { in dhd_stop()
8790 if (!dhd->pub.hang_was_sent && dhd->pub.skip_dhd_stop) { in dhd_stop()
8808 DHD_STOP_RPM_TIMER(&dhd->pub); in dhd_stop()
8810 DHD_UP_LOCK(&dhd->pub.up_lock, flags); in dhd_stop()
8811 dhd->pub.up = 0; in dhd_stop()
8812 DHD_UP_UNLOCK(&dhd->pub.up_lock, flags); in dhd_stop()
8814 dhd->pub.up = 0; in dhd_stop()
8817 dhd_bus_inform_ep_loaded_to_rc(&dhd->pub, dhd->pub.up); in dhd_stop()
8826 DHD_STATLOG_CTRL(&dhd->pub, ST(WLAN_POWER_OFF), ifidx, 0); in dhd_stop()
8831 dhd_cleanup_m4_state_work(&dhd->pub, ifidx); in dhd_stop()
8834 dhd_dump_pkt_clear(&dhd->pub); in dhd_stop()
8839 dhd_remove_if(&dhd->pub, i, FALSE); in dhd_stop()
8886 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_OFF); in dhd_stop()
8902 dhd_wlfc_cleanup(&dhd->pub, NULL, 0); in dhd_stop()
8907 dhd_event_logtrace_flush_queue(&dhd->pub); in dhd_stop()
8910 MFREE(dhd->pub.osh, dhd->event_data.fmts, in dhd_stop()
8914 MFREE(dhd->pub.osh, dhd->event_data.raw_fmts, in dhd_stop()
8918 MFREE(dhd->pub.osh, dhd->event_data.raw_sstr, in dhd_stop()
8922 MFREE(dhd->pub.osh, dhd->event_data.rom_raw_sstr, in dhd_stop()
8931 dhd_os_reset_logging(&dhd->pub); in dhd_stop()
8938 dhd_prot_stop(&dhd->pub); in dhd_stop()
8953 dhd_bus_put(&dhd->pub, WLAN_MODULE); in dhd_stop()
8981 dhd->pub.hang_was_sent = 0; in dhd_stop()
8982 dhd->pub.hang_was_pending = 0; in dhd_stop()
8986 dhd->pub.dhd_cspec.country_abbrev[0] = 0x00; in dhd_stop()
8987 dhd->pub.dhd_cspec.rev = 0; in dhd_stop()
8988 dhd->pub.dhd_cspec.ccode[0] = 0x00; in dhd_stop()
8996 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_stop()
9011 mutex_unlock(&dhd->pub.ndev_op_sync); in dhd_stop()
9043 * previous FW mode - dhd->pub.op_mode remember the previous mode in dhd_verify_firmware_mode_change()
9054 } else if (dhd->pub.monitor_enable == TRUE) { in dhd_verify_firmware_mode_change()
9063 current_mode, dhd->pub.op_mode)); in dhd_verify_firmware_mode_change()
9065 if (!(dhd->pub.op_mode & current_mode)) { in dhd_verify_firmware_mode_change()
9137 ret = dhd_wl_ioctl_set_intiovar(&dhd->pub, "bus:host_access", 0, WLC_SET_VAR, TRUE, 0); in dhd_wifi_accel_on_work_cb()
9182 if (dhd->pub.hang_was_sent == 1) { in dhd_open()
9187 if (!dhd_download_fw_on_driverload && dhd->pub.up == 1) { in dhd_open()
9196 mutex_lock(&dhd->pub.ndev_op_sync); in dhd_open()
9199 wl_ext_reset_scan_busy(&dhd->pub); in dhd_open()
9202 if (dhd->pub.up == 1) { in dhd_open()
9205 mutex_unlock(&dhd->pub.ndev_op_sync); in dhd_open()
9216 mutex_unlock(&dhd->pub.ndev_op_sync); in dhd_open()
9220 if (!dhd->wl_accel_force_reg_on && dhd_query_bus_erros(&dhd->pub)) { in dhd_open()
9227 mutex_unlock(&dhd->pub.ndev_op_sync); in dhd_open()
9245 ret = dhd_init_logstrs_array(dhd->pub.osh, &dhd->event_data); in dhd_open()
9247 dhd_init_static_strs_array(dhd->pub.osh, &dhd->event_data, in dhd_open()
9249 dhd_init_static_strs_array(dhd->pub.osh, &dhd->event_data, in dhd_open()
9257 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_open()
9258 dhd->pub.dongle_trap_occured = 0; in dhd_open()
9260 dhd->pub.dongle_trap_due_to_bt = 0; in dhd_open()
9262 dhd->pub.hang_was_sent = 0; in dhd_open()
9263 dhd->pub.hang_was_pending = 0; in dhd_open()
9264 dhd->pub.hang_reason = 0; in dhd_open()
9265 dhd->pub.iovar_timeout_occured = 0; in dhd_open()
9267 dhd->pub.d3ack_timeout_occured = 0; in dhd_open()
9268 dhd->pub.livelock_occured = 0; in dhd_open()
9269 dhd->pub.pktid_audit_failed = 0; in dhd_open()
9271 dhd->pub.iface_op_failed = 0; in dhd_open()
9272 dhd->pub.scan_timeout_occurred = 0; in dhd_open()
9273 dhd->pub.scan_busy_occurred = 0; in dhd_open()
9274 dhd->pub.smmu_fault_occurred = 0; in dhd_open()
9276 dhd->pub.dequeue_prec_map = ALLPRIO; in dhd_open()
9279 dhd->pub.permitted_gro = TRUE; in dhd_open()
9320 DHD_STATLOG_CTRL(&dhd->pub, ST(WLAN_POWER_ON), ifidx, 0); in dhd_open()
9354 ret = dhd_bus_get(&dhd->pub, WLAN_MODULE); in dhd_open()
9389 if (dhd->pub.conf->dpc_cpucore >= 0) { in dhd_open()
9390 dhd_bus_get_ids(dhd->pub.bus, &bus_type, &bus_num, &slot_num); in dhd_open()
9393 printf("%s: set irq affinity hit %d\n", __FUNCTION__, dhd->pub.conf->dpc_cpucore); in dhd_open()
9394 irq_set_affinity_hint(adapter->irq_num, cpumask_of(dhd->pub.conf->dpc_cpucore)); in dhd_open()
9399 if (dhd->pub.busstate != DHD_BUS_DATA) { in dhd_open()
9401 dhd_set_path(&dhd->pub); in dhd_open()
9407 if ((ret = dbus_up(dhd->pub.bus)) != 0) { in dhd_open()
9411 dhd->pub.busstate = DHD_BUS_DATA; in dhd_open()
9413 if ((ret = dhd_sync_with_dongle(&dhd->pub)) < 0) { in dhd_open()
9421 if (pm_runtime_get_sync(dhd_bus_to_dev(dhd->pub.bus)) >= 0) { in dhd_open()
9422 ret = dhd_bus_start(&dhd->pub); in dhd_open()
9423 pm_runtime_mark_last_busy(dhd_bus_to_dev(dhd->pub.bus)); in dhd_open()
9424 pm_runtime_put_autosuspend(dhd_bus_to_dev(dhd->pub.bus)); in dhd_open()
9427 ret = dhd_bus_start(&dhd->pub); in dhd_open()
9443 if (dhd->pub.is_bt_recovery_required) { in dhd_open()
9447 dhd->pub.is_bt_recovery_required = FALSE; in dhd_open()
9451 dev_addr_set(net, dhd->pub.mac.octet); in dhd_open()
9521 dhd_bus_aspm_enable_rc_ep(dhd->pub.bus, TRUE); in dhd_open()
9524 dhd_irq_set_affinity(&dhd->pub, cpumask_of(0)); in dhd_open()
9527 dhd_set_scb_probe(&dhd->pub); in dhd_open()
9539 if (dhd->pub.conf) { in dhd_open()
9540 wl_android_ext_priv_cmd(net, dhd->pub.conf->isam_init, 0, &bytes_written); in dhd_open()
9541 wl_android_ext_priv_cmd(net, dhd->pub.conf->isam_config, 0, &bytes_written); in dhd_open()
9542 wl_android_ext_priv_cmd(net, dhd->pub.conf->isam_enable, 0, &bytes_written); in dhd_open()
9548 dhd->pub.up = 1; in dhd_open()
9550 dhd_bus_inform_ep_loaded_to_rc(&dhd->pub, dhd->pub.up); in dhd_open()
9552 DHD_START_RPM_TIMER(&dhd->pub); in dhd_open()
9556 dhd->pub.wl_event_enabled = true; in dhd_open()
9558 dhd->pub.wl_event_enabled = false; in dhd_open()
9563 dhd->pub.logtrace_pkt_sendup = true; in dhd_open()
9565 dhd->pub.logtrace_pkt_sendup = false; in dhd_open()
9571 dhd_dbgfs_init(&dhd->pub); in dhd_open()
9575 mutex_unlock(&dhd->pub.ndev_op_sync); in dhd_open()
9588 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_open()
9690 dhd->pub.conf->fw_type = FW_TYPE_EZMESH; in dhd_static_if_open()
9731 if (dhd->pub.skip_dhd_stop) { in dhd_static_if_stop()
9744 if (dhd->pub.up == 0) { in dhd_static_if_stop()
9754 if (dhd->pub.conf->fw_type == FW_TYPE_EZMESH) { in dhd_static_if_stop()
9756 dhd->pub.conf->fw_type = FW_TYPE_STA; in dhd_static_if_stop()
9788 if (dhd->pub.busstate == DHD_BUS_DATA) { in dhd_do_driver_init()
9809 if (wl_cfg80211_notify_ifadd(dhd_linux_get_primary_netdev(&dhdinfo->pub), in dhd_event_ifadd()
9820 dhd_if_event_t *if_event = MALLOC(dhdinfo->pub.osh, sizeof(dhd_if_event_t)); in dhd_event_ifadd()
9823 MALLOCED(dhdinfo->pub.osh))); in dhd_event_ifadd()
9843 if (wl_cfg80211_notify_ifdel(dhd_linux_get_primary_netdev(&dhdinfo->pub), in dhd_event_ifdel()
9851 if_event = MALLOC(dhdinfo->pub.osh, sizeof(dhd_if_event_t)); in dhd_event_ifdel()
9854 MALLOCED(dhdinfo->pub.osh))); in dhd_event_ifdel()
9874 wl_cfg80211_notify_ifchange(dhd_linux_get_primary_netdev(&dhdinfo->pub), in dhd_event_ifchange()
9882 if_event = MALLOC(dhdinfo->pub.osh, sizeof(dhd_if_event_t)); in dhd_event_ifchange()
9885 MALLOCED(dhdinfo->pub.osh))); in dhd_event_ifchange()
9909 dhd_nfct_info_t *nfct = dhd->pub.nfct; in dhd_natoe_ct_event_hanlder()
9979 if (dhd_natoe_prep_send_exception_port_ioctl(&dhd->pub, ct_ioc) < 0) { in dhd_natoe_ct_ioctl_handler()
10186 ifp = MALLOC(dhdinfo->pub.osh, sizeof(dhd_if_t)); in dhd_allocate_if()
10309 MFREE(dhdinfo->pub.osh, ifp, sizeof(*ifp)); in dhd_allocate_if()
10358 dhd_pub_t *dhdp = &dhdinfo->pub; in dhd_cleanup_if()
10475 MFREE(dhdinfo->pub.osh, ifp, sizeof(*ifp)); in dhd_remove_if()
10570 osl_ctfpool_cleanup(dhd->pub.osh); in dhd_ctf_detach()
11383 dhd_get_rxsz(dhd_pub_t *pub) in dhd_get_rxsz() argument
11390 dhd = pub->info; in dhd_get_rxsz()
11392 net->hard_header_len = ETH_HLEN + pub->hdrlen; in dhd_get_rxsz()
11399 dhd_set_path(dhd_pub_t *pub) in dhd_set_path() argument
11403 dhd = pub->info; in dhd_set_path()
11406 if (dhd_update_fw_nv_path(dhd) && dhd->pub.bus) { in dhd_set_path()
11409 dhd_bus_update_fw_nv_path(dhd->pub.bus, in dhd_set_path()
11469 dhd->pub.osh = osh; in dhd_attach()
11471 dll_init(&(dhd->pub.dump_iovlist_head)); in dhd_attach()
11474 dhd->pub.dhd_console_ms = dhd_console_ms; /* assigns default value */ in dhd_attach()
11477 dhd->pub.adapter = (void *)adapter; in dhd_attach()
11479 dhd->pub.is_bt_recovery_required = FALSE; in dhd_attach()
11483 g_dhd_pub = &dhd->pub; in dhd_attach()
11486 dll_init(&(dhd->pub.mw_list_head)); in dhd_attach()
11490 dhd->pub.dhd_cflags |= WLAN_PLAT_NODFS_FLAG; in dhd_attach()
11491 dhd->pub.force_country_change = TRUE; in dhd_attach()
11495 dhd->pub.dhd_cspec.country_abbrev, &dhd->pub.dhd_cspec, in dhd_attach()
11496 dhd->pub.dhd_cflags); in dhd_attach()
11502 dhd->pub.wet_info = dhd_get_wet_info(&dhd->pub); in dhd_attach()
11506 if (bcm_nanho_init(&dhd->pub.nanhoi, &dhd->pub, in dhd_attach()
11517 dhd->pub.pcie_txs_metadata_enable = pcie_txs_metadata_enable; in dhd_attach()
11520 dhd->pub.info = dhd; in dhd_attach()
11523 dhd->pub.bus = bus; in dhd_attach()
11524 dhd->pub.hdrlen = bus_hdrlen; in dhd_attach()
11525 dhd->pub.txoff = FALSE; in dhd_attach()
11527 dhd->pub.check_trap_rot = TRUE; in dhd_attach()
11529 dhd->pub.check_trap_rot = FALSE; in dhd_attach()
11532 /* dhd_conf must be attached after linking dhd to dhd->pub.info, in dhd_attach()
11535 if (dhd_conf_attach(&dhd->pub) != 0) { in dhd_attach()
11540 dhd_conf_reset(&dhd->pub); in dhd_attach()
11541 dhd_conf_set_chiprev(&dhd->pub, dhd_bus_chip(bus), dhd_bus_chiprev(bus)); in dhd_attach()
11542 dhd_conf_preinit(&dhd->pub); in dhd_attach()
11564 net = dhd_allocate_if(&dhd->pub, 0, if_name, NULL, 0, TRUE, NULL); in dhd_attach()
11568 mutex_init(&dhd->pub.ndev_op_sync); in dhd_attach()
11573 dhd->pub.l2_filter_cnt = 0; in dhd_attach()
11581 dhd->pub.req_hang_type = 0; in dhd_attach()
11587 dhd->pub.skip_fc = dhd_wlfc_skip_fc; in dhd_attach()
11588 dhd->pub.plat_init = dhd_wlfc_plat_init; in dhd_attach()
11589 dhd->pub.plat_deinit = dhd_wlfc_plat_deinit; in dhd_attach()
11592 init_waitqueue_head(&dhd->pub.wlfc_wqhead); in dhd_attach()
11593 dhd->pub.wlfc_thread = kthread_create(dhd_wlfc_transfer_packets, &dhd->pub, "wlfc-thread"); in dhd_attach()
11594 if (IS_ERR(dhd->pub.wlfc_thread)) { in dhd_attach()
11598 wake_up_process(dhd->pub.wlfc_thread); in dhd_attach()
11607 init_waitqueue_head(&dhd->pub.tx_tput_test_wait); in dhd_attach()
11618 init_waitqueue_head(&dhd->pub.tx_completion_wait); in dhd_attach()
11619 dhd->pub.dhd_bus_busy_state = 0; in dhd_attach()
11627 spin_lock_init(&dhd->pub.tdls_lock); in dhd_attach()
11660 if (dhd_prot_attach(&dhd->pub) != 0) { in dhd_attach()
11668 if (dhd_timesync_attach(&dhd->pub) != 0) { in dhd_attach()
11676 spin_lock_init(&dhd->pub.up_lock); in dhd_attach()
11678 if (unlikely(wl_cfg80211_attach(net, &dhd->pub))) { in dhd_attach()
11683 dhd_monitor_init(&dhd->pub); in dhd_attach()
11738 if (dhd_os_dbg_attach(&dhd->pub)) { in dhd_attach()
11745 dhd_os_start_logging(&dhd->pub, FW_VERBOSE_RING_NAME, 3, 0, 0, 0); in dhd_attach()
11750 dhd_os_start_logging(&dhd->pub, BT_LOG_RING_NAME, 3, 0, 0, 0); in dhd_attach()
11753 dhd->pub.dbg->pkt_mon_lock = osl_spin_lock_init(dhd->pub.osh); in dhd_attach()
11755 dhd_os_dbg_attach_pkt_monitor(&dhd->pub); in dhd_attach()
11762 dhd->pub.mem_stats_lock = osl_spin_lock_init(dhd->pub.osh); in dhd_attach()
11763 dhd->pub.txpath_mem = 0; in dhd_attach()
11764 dhd->pub.rxpath_mem = 0; in dhd_attach()
11768 dhd->pub.awdl_stats_lock = osl_spin_lock_init(dhd->pub.osh); in dhd_attach()
11772 dhd->pub.statlog = dhd_attach_statlog(&dhd->pub, MAX_STATLOG_ITEM, in dhd_attach()
11774 if (dhd->pub.statlog == NULL) { in dhd_attach()
11780 dhd_log_dump_init(&dhd->pub); in dhd_attach()
11783 dhd_dump_pkt_init(&dhd->pub); in dhd_attach()
11786 dhd_os_attach_pktlog(&dhd->pub); in dhd_attach()
11790 dhd->pub.hang_info = MALLOCZ(osh, VENDOR_SEND_HANG_EXT_INFO_LEN); in dhd_attach()
11791 if (dhd->pub.hang_info == NULL) { in dhd_attach()
11795 if (dhd_sta_pool_init(&dhd->pub, DHD_MAX_STA) != BCME_OK) { in dhd_attach()
11802 dhd->cih = ctf_attach(dhd->pub.osh, "dhd", &dhd_msg_level, dhd_ctf_detach, dhd); in dhd_attach()
11809 if (CTF_ENAB(dhd->cih) && (osl_ctfpool_init(dhd->pub.osh, in dhd_attach()
11884 bzero(&dhd->pub.skbbuf[0], sizeof(void *) * MAXSKBPEND); in dhd_attach()
11897 dhd_dbg_ring_proc_create(&dhd->pub); in dhd_attach()
11945 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_DELAYTX); in dhd_attach()
11950 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_HOLD); in dhd_attach()
11952 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_OFF); in dhd_attach()
11960 register_page_corrupt_cb(dhd_page_corrupt_cb, &dhd->pub); in dhd_attach()
11970 DHD_LB_STATS_INIT(&dhd->pub); in dhd_attach()
12034 if (dhd_macdbg_attach(&dhd->pub) != BCME_OK) { in dhd_attach()
12041 init_dhd_timeouts(&dhd->pub); in dhd_attach()
12044 dhd->pub.extended_trap_data = MALLOCZ(osh, BCMPCIE_EXT_TRAP_DATA_MAXLEN); in dhd_attach()
12045 if (dhd->pub.extended_trap_data == NULL) { in dhd_attach()
12049 dhd->pub.axi_err_dump = MALLOCZ(osh, sizeof(dhd_axi_error_dump_t)); in dhd_attach()
12050 if (dhd->pub.axi_err_dump == NULL) { in dhd_attach()
12070 DHD_SSSR_MEMPOOL_INIT(&dhd->pub); in dhd_attach()
12071 DHD_SSSR_REG_INFO_INIT(&dhd->pub); in dhd_attach()
12074 dhd_sdtc_etb_mempool_init(&dhd->pub); in dhd_attach()
12079 if (DHD_EDL_MEM_INIT(&dhd->pub) != BCME_OK) { in dhd_attach()
12091 dhd->pub.nfct = dhd_ct_open(&dhd->pub, NFNL_SUBSYS_CTNETLINK | NFNL_SUBSYS_CTNETLINK_EXP, in dhd_attach()
12095 dhd->pub.gdb_proxy_nodeadman = nodeadman != 0; in dhd_attach()
12103 dhd_csi_init(&dhd->pub); in dhd_attach()
12109 dhd->pub.memdump_enabled = DUMP_DISABLED; in dhd_attach()
12112 dhd->pub.memdump_enabled = DUMP_MEMFILE; in dhd_attach()
12114 dhd->pub.memdump_enabled = DUMP_MEMFILE_BUGON; in dhd_attach()
12117 dhd->pub.memdump_enabled = DUMP_MEMFILE; in dhd_attach()
12120 dhd_get_memdump_info(&dhd->pub); in dhd_attach()
12125 pom_handler = &dhd->pub.pom_wlan_handler; in dhd_attach()
12131 dhd->pub.pom_func_register = NULL; in dhd_attach()
12132 dhd->pub.pom_func_deregister = NULL; in dhd_attach()
12133 dhd->pub.pom_toggle_reg_on = NULL; in dhd_attach()
12135 dhd->pub.pom_func_register = symbol_get(pom_func_register); in dhd_attach()
12136 dhd->pub.pom_func_deregister = symbol_get(pom_func_deregister); in dhd_attach()
12137 dhd->pub.pom_toggle_reg_on = symbol_get(pom_toggle_reg_on); in dhd_attach()
12143 if (!dhd->pub.pom_func_register || in dhd_attach()
12144 !dhd->pub.pom_func_deregister || in dhd_attach()
12145 !dhd->pub.pom_toggle_reg_on) { in dhd_attach()
12151 dhd->pub.pom_func_register(pom_handler); in dhd_attach()
12152 dhd->pub.enable_erpom = TRUE; in dhd_attach()
12158 dhd->pub.dump_file_manage = in dhd_attach()
12159 (dhd_dump_file_manage_t *)MALLOCZ(dhd->pub.osh, sizeof(dhd_dump_file_manage_t)); in dhd_attach()
12160 if (unlikely(!dhd->pub.dump_file_manage)) { in dhd_attach()
12169 if (dhd_fwtrace_attach(&dhd->pub) != 0) { in dhd_attach()
12177 if (dhd_rtt_attach(&dhd->pub)) { in dhd_attach()
12184 if (dhd_tx_profile_attach(&dhd->pub) != BCME_OK) { in dhd_attach()
12190 return &dhd->pub; in dhd_attach()
12194 DHD_TRACE(("%s: Calling dhd_detach dhd_state 0x%x &dhd->pub %p\n", in dhd_attach()
12195 __FUNCTION__, dhd_state, &dhd->pub)); in dhd_attach()
12197 dhd_detach(&dhd->pub); in dhd_attach()
12198 dhd_free(&dhd->pub); in dhd_attach()
12566 if (dhd->pub.busstate == DHD_BUS_DATA && dhd_update_btfw_path(dhd, btfw_path)) { in dhd_download_btfw()
12568 ret = dhd_bus_download_btfw(dhd->pub.bus, dhd->pub.osh, dhd->btfw_path); in dhd_download_btfw()
12605 dhd->pub.dongle_trap_due_to_bt = 0; in dhd_bus_start()
12613 dhd->pub.iface_op_failed = 0; in dhd_bus_start()
12614 dhd->pub.scan_timeout_occurred = 0; in dhd_bus_start()
12615 dhd->pub.scan_busy_occurred = 0; in dhd_bus_start()
12617 if (dhd->pub.dhd_induce_error) { in dhd_bus_start()
12618 dhd->pub.dhd_induce_bh_error = dhd->pub.dhd_induce_error; in dhd_bus_start()
12620 dhd->pub.dhd_induce_error = DHD_INDUCE_ERROR_CLEAR; in dhd_bus_start()
12624 dhd->pub.tput_test_done = FALSE; in dhd_bus_start()
12629 uint chipid = dhd_bus_chip_id(&dhd->pub); in dhd_bus_start()
12630 uint revid = dhd_bus_chiprev_id(&dhd->pub); in dhd_bus_start()
12635 osl_flag_set(dhd->pub.osh, OSL_PHYS_MEM_LESS_THAN_16MB); in dhd_bus_start()
12640 if (dhd->pub.busstate == DHD_BUS_DOWN && dhd_update_fw_nv_path(dhd)) { in dhd_bus_start()
12642 dhd->pub.fw_download_status = FW_DOWNLOAD_IN_PROGRESS; in dhd_bus_start()
12648 ret = dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh, in dhd_bus_start()
12659 dhd->pub.fw_download_status = FW_DOWNLOAD_DONE; in dhd_bus_start()
12661 if (dhd->pub.busstate != DHD_BUS_LOAD) { in dhd_bus_start()
12670 dhd->pub.tickcnt = 0; in dhd_bus_start()
12671 dhd_os_wd_timer(&dhd->pub, dhd_watchdog_ms); in dhd_bus_start()
12674 if ((ret = dhd_bus_init(&dhd->pub, FALSE)) != 0) { in dhd_bus_start()
12687 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_bus_start()
12689 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_bus_start()
12693 DHD_STOP_RPM_TIMER(&dhd->pub); in dhd_bus_start()
12696 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_bus_start()
12704 dhd_enable_oob_intr(dhd->pub.bus, TRUE); in dhd_bus_start()
12708 dhd_enable_oob_intr(dhd->pub.bus, TRUE); in dhd_bus_start()
12713 uint32 max_h2d_rings = dhd_bus_max_h2d_queues(dhd->pub.bus); in dhd_bus_start()
12717 if ((ret = dhd_flow_rings_init(&dhd->pub, max_h2d_rings)) != BCME_OK) { in dhd_bus_start()
12738 ret = dhd_prot_init(&dhd->pub); in dhd_bus_start()
12740 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_bus_start()
12745 if (dhd->pub.busstate != DHD_BUS_DATA) { in dhd_bus_start()
12746 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_bus_start()
12748 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_bus_start()
12751 DHD_STOP_RPM_TIMER(&dhd->pub); in dhd_bus_start()
12755 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_bus_start()
12768 if ((ret = dhd_sync_with_dongle(&dhd->pub)) < 0) { in dhd_bus_start()
12769 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_bus_start()
12771 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_bus_start()
12774 DHD_OS_WD_WAKE_UNLOCK(&dhd->pub); in dhd_bus_start()
12814 aoe_update_host_ipv4_table(&dhd->pub, dhd->pend_ipaddr, TRUE, 0); in dhd_bus_start()
12821 bzero(&dhd->pub.dhd_tm_dwm_tbl, sizeof(dhd_trf_mgmt_dwm_tbl_t)); in dhd_bus_start()
12903 ret = _dhd_tdls_enable(&dhd->pub, tdls_on, auto_on, mac); in dhd_tdls_enable()
16362 dhd_getiovar(dhd_pub_t *pub, int ifidx, char *name, char *cmd_buf, in dhd_getiovar() argument
16386 ret = dhd_wl_ioctl(pub, ifidx, &ioc, ioc.buf, ioc.len); in dhd_getiovar()
16570 dhd_pub = &dhd->pub; in dhd_inetaddr_notifier_call()
16602 if (DHD_BUS_CHECK_DOWN_OR_DOWN_IN_PROGRESS(&dhd->pub) || in dhd_inetaddr_notifier_call()
16603 dhd->pub.busstate == DHD_BUS_LOAD) { in dhd_inetaddr_notifier_call()
16605 __FUNCTION__, dhd->pub.busstate)); in dhd_inetaddr_notifier_call()
16638 dhd_aoe_hostip_clr(&dhd->pub, idx); in dhd_inetaddr_notifier_call()
16639 dhd_aoe_arp_clr(&dhd->pub, idx); in dhd_inetaddr_notifier_call()
16667 dhdp = &dhd->pub; in dhd_inet6_work_handler()
16772 dhdp = &dhd->pub; in dhd_inet6addr_notifier_call()
16874 if (!ETHER_ISNULLADDR(dhd->pub.mac.octet)) in dhd_register_if()
16875 memcpy(temp_addr, dhd->pub.mac.octet, ETHER_ADDR_LEN); in dhd_register_if()
16896 net->hard_header_len = ETH_HLEN + dhd->pub.hdrlen; in dhd_register_if()
16936 dhd->pub.rxsz = DBUS_RX_BUFFER_SIZE_DHD(net); in dhd_register_if()
16957 if (dhd->pub.up == 1) { in dhd_register_if()
17013 MAC2STRDBG(dhd->pub.mac.octet)); in dhd_register_if()
17059 dhd_bus_put(&dhd->pub, WLAN_MODULE); in dhd_register_if()
17094 if (dhd->pub.busstate != DHD_BUS_DOWN && dhd_download_fw_on_driverload) { in dhd_bus_detach()
17096 dhd_prot_stop(&dhd->pub); in dhd_bus_detach()
17104 dbus_stop(dhd->pub.bus); in dhd_bus_detach()
17106 dhd->pub.busstate = DHD_BUS_DOWN; in dhd_bus_detach()
17108 dhd_bus_stop(dhd->pub.bus, TRUE); in dhd_bus_detach()
17171 dhd->pub.up = 0; in dhd_detach()
17179 dhd_free_wet_info(&dhd->pub, dhd->pub.wet_info); in dhd_detach()
17183 bcm_nanho_deinit(dhd->pub.nanhoi); in dhd_detach()
17190 if (dhd->pub.wlfc_thread) { in dhd_detach()
17191 kthread_stop(dhd->pub.wlfc_thread); in dhd_detach()
17195 dhd->pub.wlfc_thread = NULL; in dhd_detach()
17279 dhd_remove_if(&dhd->pub, i, TRUE); in dhd_detach()
17335 MFREE(dhd->pub.osh, ifp, sizeof(*ifp)); in dhd_detach()
17345 DHD_GENERAL_LOCK(&dhd->pub, flags); in dhd_detach()
17348 DHD_GENERAL_UNLOCK(&dhd->pub, flags); in dhd_detach()
17351 DHD_STOP_RPM_TIMER(&dhd->pub); in dhd_detach()
17380 if (dhd->pub.nfct) { in dhd_detach()
17381 dhd_ct_close(dhd->pub.nfct); in dhd_detach()
17406 DHD_LB_STATS_DEINIT(&dhd->pub); in dhd_detach()
17418 DHD_SSSR_REG_INFO_DEINIT(&dhd->pub); in dhd_detach()
17419 DHD_SSSR_MEMPOOL_DEINIT(&dhd->pub); in dhd_detach()
17422 dhd_sdtc_etb_mempool_deinit(&dhd->pub); in dhd_detach()
17454 osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.dbg->pkt_mon_lock); in dhd_detach()
17462 osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.mem_stats_lock); in dhd_detach()
17466 osl_spin_lock_deinit(dhd->pub.osh, dhd->pub.awdl_stats_lock); in dhd_detach()
17478 if (dhd->pub.hang_info) { in dhd_detach()
17479 MFREE(dhd->pub.osh, dhd->pub.hang_info, VENDOR_SEND_HANG_EXT_INFO_LEN); in dhd_detach()
17490 dhd_dbg_ring_proc_destroy(&dhd->pub); in dhd_detach()
17494 MFREE(dhd->pub.osh, dhd->event_data.fmts, in dhd_detach()
17498 MFREE(dhd->pub.osh, dhd->event_data.raw_fmts, in dhd_detach()
17502 MFREE(dhd->pub.osh, dhd->event_data.raw_sstr, in dhd_detach()
17506 MFREE(dhd->pub.osh, dhd->event_data.rom_raw_sstr, in dhd_detach()
17548 dhd_tcpack_suppress_set(&dhd->pub, TCPACK_SUP_OFF); in dhd_detach()
17567 osl_ctfpool_cleanup(dhd->pub.osh); in dhd_detach()
17605 dhd_log_dump_deinit(&dhd->pub); in dhd_detach()
17634 if (dhd->pub.dump_file_manage) { in dhd_detach()
17635 MFREE(dhd->pub.osh, dhd->pub.dump_file_manage, in dhd_detach()
17641 dhd->pub.fw_download_status = FW_UNLOADED; in dhd_detach()
17710 deinit_dhd_timeouts(&dhd->pub); in dhd_free()
17716 MFREE(dhd->pub.osh, dhd, sizeof(*dhd)); in dhd_free()
17999 dhd_os_proto_block(dhd_pub_t *pub) in dhd_os_proto_block() argument
18001 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_proto_block()
18013 dhd_os_proto_unblock(dhd_pub_t *pub) in dhd_os_proto_unblock() argument
18015 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_proto_unblock()
18026 dhd_os_dhdiovar_lock(dhd_pub_t *pub) in dhd_os_dhdiovar_lock() argument
18028 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_dhdiovar_lock()
18036 dhd_os_dhdiovar_unlock(dhd_pub_t *pub) in dhd_os_dhdiovar_unlock() argument
18038 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_dhdiovar_unlock()
18046 dhd_os_logdump_lock(dhd_pub_t *pub) in dhd_os_logdump_lock() argument
18050 if (!pub) in dhd_os_logdump_lock()
18053 dhd = (dhd_info_t *)(pub->info); in dhd_os_logdump_lock()
18061 dhd_os_logdump_unlock(dhd_pub_t *pub) in dhd_os_logdump_unlock() argument
18065 if (!pub) in dhd_os_logdump_unlock()
18068 dhd = (dhd_info_t *)(pub->info); in dhd_os_logdump_unlock()
18110 dhd_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition) in dhd_os_ioctl_resp_wait() argument
18112 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_ioctl_resp_wait()
18129 dhd_os_ioctl_resp_wake(dhd_pub_t *pub) in dhd_os_ioctl_resp_wake() argument
18131 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_ioctl_resp_wake()
18138 dhd_os_d3ack_wait(dhd_pub_t *pub, uint *condition) in dhd_os_d3ack_wait() argument
18140 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_d3ack_wait()
18156 dhd_os_ds_exit_wait(dhd_pub_t *pub, uint *condition) in dhd_os_ds_exit_wait() argument
18158 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_ds_exit_wait()
18173 dhd_os_ds_exit_wake(dhd_pub_t *pub) in dhd_os_ds_exit_wake() argument
18175 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_ds_exit_wake()
18184 dhd_os_d3ack_wake(dhd_pub_t *pub) in dhd_os_d3ack_wake() argument
18186 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_d3ack_wake()
18193 dhd_os_busbusy_wait_negation(dhd_pub_t *pub, uint *condition) in dhd_os_busbusy_wait_negation() argument
18195 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_busbusy_wait_negation()
18216 dhd_os_busbusy_wait_condition(dhd_pub_t *pub, uint *var, uint condition) in dhd_os_busbusy_wait_condition() argument
18218 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_busbusy_wait_condition()
18235 dhd_os_busbusy_wait_bitmask(dhd_pub_t *pub, uint *var, in dhd_os_busbusy_wait_bitmask() argument
18238 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_busbusy_wait_bitmask()
18251 dhd_os_dmaxfer_wait(dhd_pub_t *pub, uint *condition) in dhd_os_dmaxfer_wait() argument
18254 dhd_info_t * dhd = (dhd_info_t *)(pub->info); in dhd_os_dmaxfer_wait()
18266 dhd_os_dmaxfer_wake(dhd_pub_t *pub) in dhd_os_dmaxfer_wake() argument
18268 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_dmaxfer_wake()
18284 dhd_os_busbusy_wake(dhd_pub_t *pub) in dhd_os_busbusy_wake() argument
18286 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_busbusy_wake()
18297 dhd_pub_t *pub = bus; in dhd_os_wd_timer_extend() local
18298 dhd_info_t *dhd = (dhd_info_t *)pub->info; in dhd_os_wd_timer_extend()
18311 dhd_pub_t *pub = bus; in dhd_os_wd_timer() local
18312 dhd_info_t *dhd = (dhd_info_t *)pub->info; in dhd_os_wd_timer()
18322 DHD_GENERAL_LOCK(pub, flags); in dhd_os_wd_timer()
18325 if (pub->busstate == DHD_BUS_DOWN) { in dhd_os_wd_timer()
18326 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_wd_timer()
18329 DHD_OS_WD_WAKE_UNLOCK(pub); in dhd_os_wd_timer()
18338 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_wd_timer()
18341 DHD_OS_WD_WAKE_UNLOCK(pub); in dhd_os_wd_timer()
18348 DHD_OS_WD_WAKE_LOCK(pub); in dhd_os_wd_timer()
18355 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_wd_timer()
18363 dhd_pub_t *pub = bus; in dhd_os_runtimepm_timer() local
18364 dhd_info_t *dhd = (dhd_info_t *)pub->info; in dhd_os_runtimepm_timer()
18374 DHD_GENERAL_LOCK(pub, flags); in dhd_os_runtimepm_timer()
18377 if (DHD_BUS_CHECK_DOWN_OR_DOWN_IN_PROGRESS(pub)) { in dhd_os_runtimepm_timer()
18378 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_runtimepm_timer()
18395 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_runtimepm_timer()
18403 DHD_GENERAL_UNLOCK(pub, flags); in dhd_os_runtimepm_timer()
18436 dhd_os_open_image1(dhd_pub_t *pub, char *filename) in dhd_os_open_image1() argument
18499 dhd_os_gets_image(dhd_pub_t *pub, char *str, int len, void *image) in dhd_os_gets_image() argument
18540 dhd_os_close_image1(dhd_pub_t *pub, void *image) in dhd_os_close_image1() argument
18548 dhd_os_sdlock(dhd_pub_t *pub) in dhd_os_sdlock() argument
18552 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdlock()
18565 dhd_os_sdunlock(dhd_pub_t *pub) in dhd_os_sdunlock() argument
18569 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdunlock()
18582 dhd_os_sdlock_txq(dhd_pub_t *pub) in dhd_os_sdlock_txq() argument
18586 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdlock_txq()
18595 dhd_os_sdunlock_txq(dhd_pub_t *pub) in dhd_os_sdunlock_txq() argument
18599 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdunlock_txq()
18608 dhd_os_sdlock_txoff(dhd_pub_t *pub) in dhd_os_sdlock_txoff() argument
18613 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdlock_txoff()
18620 dhd_os_sdunlock_txoff(dhd_pub_t *pub, unsigned long flags) in dhd_os_sdunlock_txoff() argument
18624 dhd = (dhd_info_t *)(pub->info); in dhd_os_sdunlock_txoff()
18629 dhd_os_sdlock_rxq(dhd_pub_t *pub) in dhd_os_sdlock_rxq() argument
18634 dhd_os_sdunlock_rxq(dhd_pub_t *pub) in dhd_os_sdunlock_rxq() argument
18639 dhd_os_rxflock(dhd_pub_t *pub) in dhd_os_rxflock() argument
18643 dhd = (dhd_info_t *)(pub->info); in dhd_os_rxflock()
18649 dhd_os_rxfunlock(dhd_pub_t *pub) in dhd_os_rxfunlock() argument
18653 dhd = (dhd_info_t *)(pub->info); in dhd_os_rxfunlock()
18659 dhd_os_tcpacklock(dhd_pub_t *pub) in dhd_os_tcpacklock() argument
18664 dhd = (dhd_info_t *)(pub->info); in dhd_os_tcpacklock()
18678 dhd_os_tcpackunlock(dhd_pub_t *pub, unsigned long flags) in dhd_os_tcpackunlock() argument
18686 dhd = (dhd_info_t *)(pub->info); in dhd_os_tcpackunlock()
18721 if (!dhd->pub.up) { in dhd_get_wireless_stats()
18749 bcmerror = wl_process_host_event(&dhd->pub, &ifidx, pktdata, pktlen, event, data, in dhd_wl_host_event()
18752 bcmerror = wl_process_host_event(&dhd->pub, &ifidx, pktdata, pktlen, event, data, in dhd_wl_host_event()
18768 wl_ext_event_send(dhd->pub.event_params, event, *data); in dhd_wl_host_event()
18773 DHD_UP_LOCK(&dhd->pub.up_lock, flags); in dhd_wl_host_event()
18774 if (dhd->pub.up) { in dhd_wl_host_event()
18777 DHD_UP_UNLOCK(&dhd->pub.up_lock, flags); in dhd_wl_host_event()
18887 if (pm_runtime_get_sync(dhd_bus_to_dev(dhd->pub.bus)) < 0) in dhd_net_bus_devreset()
18894 if (dhd_wl_ioctl_cmd(&dhd->pub, WLC_DOWN, NULL, 0, TRUE, 0) < 0) { in dhd_net_bus_devreset()
18899 if (dhd->pub.wlfc_enabled) { in dhd_net_bus_devreset()
18900 dhd_wlfc_deinit(&dhd->pub); in dhd_net_bus_devreset()
18904 if (dhd->pub.pno_state) { in dhd_net_bus_devreset()
18905 dhd_pno_deinit(&dhd->pub); in dhd_net_bus_devreset()
18909 if (dhd->pub.rtt_state) { in dhd_net_bus_devreset()
18910 dhd_rtt_deinit(&dhd->pub); in dhd_net_bus_devreset()
18914 DHD_SSSR_DUMP_DEINIT(&dhd->pub); in dhd_net_bus_devreset()
18916 if (dhd->pub.sdtc_etb_inited) { in dhd_net_bus_devreset()
18917 dhd_sdtc_etb_deinit(&dhd->pub); in dhd_net_bus_devreset()
18926 dhd_os_dbg_detach_pkt_monitor(&dhd->pub); in dhd_net_bus_devreset()
18938 dhd_bus_update_fw_nv_path(dhd->pub.bus, in dhd_net_bus_devreset()
18949 if (flag == FALSE && dhd->pub.busstate == DHD_BUS_DOWN) { in dhd_net_bus_devreset()
18959 ret = dhd_bus_devreset(&dhd->pub, flag); in dhd_net_bus_devreset()
18962 pm_runtime_mark_last_busy(dhd_bus_to_dev(dhd->pub.bus)); in dhd_net_bus_devreset()
18963 pm_runtime_put_autosuspend(dhd_bus_to_dev(dhd->pub.bus)); in dhd_net_bus_devreset()
18968 dhd->pub.dongle_trap_occured = 0; in dhd_net_bus_devreset()
18970 dhd->pub.dongle_trap_due_to_bt = 0; in dhd_net_bus_devreset()
18972 dhd->pub.iovar_timeout_occured = 0; in dhd_net_bus_devreset()
18974 dhd->pub.d3ack_timeout_occured = 0; in dhd_net_bus_devreset()
18975 dhd->pub.livelock_occured = 0; in dhd_net_bus_devreset()
18976 dhd->pub.pktid_audit_failed = 0; in dhd_net_bus_devreset()
18978 dhd->pub.smmu_fault_occurred = 0; in dhd_net_bus_devreset()
18979 dhd->pub.iface_op_failed = 0; in dhd_net_bus_devreset()
18980 dhd->pub.scan_timeout_occurred = 0; in dhd_net_bus_devreset()
18981 dhd->pub.scan_busy_occurred = 0; in dhd_net_bus_devreset()
18996 return dhd_bus_suspend(&dhd->pub); in dhd_net_bus_suspend()
19003 return dhd_bus_resume(&dhd->pub, stage); in dhd_net_bus_resume()
19015 ret = dhd->pub.suspend_disable_flag; in net_os_set_suspend_disable()
19016 dhd->pub.suspend_disable_flag = val; in net_os_set_suspend_disable()
19026 if (dhd && (dhd->pub.conf->suspend_mode == EARLY_SUSPEND || in net_os_set_suspend()
19027 dhd->pub.conf->suspend_mode == SUSPEND_MODE_2)) { in net_os_set_suspend()
19028 if (dhd->pub.conf->suspend_mode == EARLY_SUSPEND && !val) in net_os_set_suspend()
19029 dhd_conf_set_suspend_resume(&dhd->pub, val); in net_os_set_suspend()
19031 ret = dhd_set_suspend(val, &dhd->pub); in net_os_set_suspend()
19038 if (dhd->pub.conf->suspend_mode == EARLY_SUSPEND && val) in net_os_set_suspend()
19039 dhd_conf_set_suspend_resume(&dhd->pub, val); in net_os_set_suspend()
19051 dhd->pub.suspend_bcn_li_dtim = val; in net_os_set_suspend_bcn_li_dtim()
19065 dhd->pub.max_dtim_enable = TRUE; in net_os_set_max_dtim_enable()
19067 dhd->pub.max_dtim_enable = FALSE; in net_os_set_max_dtim_enable()
19085 dhd->pub.disable_dtim_in_suspend = TRUE; in net_os_set_disable_dtim_in_suspend()
19087 dhd->pub.disable_dtim_in_suspend = FALSE; in net_os_set_disable_dtim_in_suspend()
19119 if (num >= dhd->pub.pktfilter_count) { in net_os_rxfilter_add_remove()
19123 ret = dhd_packet_filter_add_remove(&dhd->pub, add_remove, num); in net_os_rxfilter_add_remove()
19161 return dhd_os_enable_packet_filter(&dhd->pub, val); in net_os_enable_packet_filter()
19171 if ((ret = dhd_sync_with_dongle(&dhd->pub)) < 0) in dhd_dev_init_ioctl()
19182 dhd_pub_t *dhd = (&ptr->pub); in dhd_dev_get_feature_set()
19334 dhd->pub.dhd_cflags |= WLAN_PLAT_NODFS_FLAG; in dhd_dev_set_nodfs()
19336 dhd->pub.dhd_cflags &= ~WLAN_PLAT_NODFS_FLAG; in dhd_dev_set_nodfs()
19337 dhd->pub.force_country_change = TRUE; in dhd_dev_set_nodfs()
19347 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_ndo_cfg()
19437 dhdp = &dhd->pub; in dhd_dev_ndo_update_inet6addr()
19584 return (dhd_pno_stop_for_ssid(&dhd->pub)); in dhd_dev_pno_stop_for_ssid()
19593 return (dhd_pno_set_for_ssid(&dhd->pub, ssids_local, nssid, scan_fr, in dhd_dev_pno_set_for_ssid()
19603 return (dhd_pno_enable(&dhd->pub, enable)); in dhd_dev_pno_enable()
19612 return (dhd_pno_set_for_hotlist(&dhd->pub, p_pfn_bssid, hotlist_params)); in dhd_dev_pno_set_for_hotlist()
19619 return (dhd_pno_stop_for_batch(&dhd->pub)); in dhd_dev_pno_stop_for_batch()
19627 return (dhd_pno_set_for_batch(&dhd->pub, batch_params)); in dhd_dev_pno_set_for_batch()
19635 return (dhd_pno_get_for_batch(&dhd->pub, buf, bufsize, PNO_STATUS_NORMAL)); in dhd_dev_pno_get_for_batch()
19646 return (dhd_is_legacy_pno_enabled(&dhd->pub)); in dhd_dev_is_legacy_pno_enabled()
19656 return dhd_pno_set_epno(&dhd->pub); in dhd_dev_set_epno()
19665 return dhd_pno_flush_fw_epno(&dhd->pub); in dhd_dev_flush_fw_epno()
19675 return (dhd_pno_set_cfg_gscan(&dhd->pub, type, buf, flush)); in dhd_dev_pno_set_cfg_gscan()
19685 return (dhd_pno_get_gscan(&dhd->pub, type, info, len)); in dhd_dev_pno_get_gscan()
19694 return (dhd_wait_batch_results_complete(&dhd->pub)); in dhd_dev_wait_batch_results_complete()
19703 return (dhd_pno_lock_batch_results(&dhd->pub)); in dhd_dev_pno_lock_access_batch_results()
19711 return (dhd_pno_unlock_batch_results(&dhd->pub)); in dhd_dev_pno_unlock_access_batch_results()
19720 return (dhd_pno_initiate_gscan_request(&dhd->pub, run, flush)); in dhd_dev_pno_run_gscan()
19729 return (dhd_pno_enable_full_scan_result(&dhd->pub, real_time_flag)); in dhd_dev_pno_enable_full_scan_result()
19739 return (dhd_handle_hotlist_scan_evt(&dhd->pub, data, send_evt_bytes, type, buf_len)); in dhd_dev_hotlist_scan_event()
19749 return (dhd_process_full_gscan_result(&dhd->pub, data, len, send_evt_bytes)); in dhd_dev_process_full_gscan_result()
19757 dhd_gscan_hotlist_cache_cleanup(&dhd->pub, type); in dhd_dev_gscan_hotlist_cache_cleanup()
19767 return (dhd_gscan_batch_cache_cleanup(&dhd->pub)); in dhd_dev_gscan_batch_cache_cleanup()
19776 return (dhd_retreive_batch_scan_results(&dhd->pub)); in dhd_dev_retrieve_batch_scan()
19785 return (dhd_pno_process_epno_result(&dhd->pub, data, event, send_evt_bytes)); in dhd_dev_process_epno_result()
19811 if (dhd->pub.lazy_roam_enable) { in dhd_dev_set_lazy_roam_cfg()
19814 err = dhd_iovar(&dhd->pub, 0, "roam_exp_params", in dhd_dev_set_lazy_roam_cfg()
19836 err = dhd_iovar(&dhd->pub, 0, "roam_exp_params", in dhd_dev_lazy_roam_enable()
19842 dhd->pub.lazy_roam_enable = (enable != 0); in dhd_dev_lazy_roam_enable()
19862 err = dhd_iovar(&dhd->pub, 0, "roam_exp_bssid_pref", in dhd_dev_set_lazy_roam_bssid_pref()
19881 err = dhd_wl_ioctl_cmd(&(dhd->pub), WLC_SET_MACLIST, (char *)blacklist, in dhd_dev_set_blacklist_bssid()
19890 err = dhd_wl_ioctl_cmd(&(dhd->pub), WLC_SET_MACMODE, (char *)&macmode, in dhd_dev_set_blacklist_bssid()
19917 err = dhd_iovar(&dhd->pub, 0, "roam_exp_ssid_whitelist", (char *)ssid_whitelist, len, NULL, in dhd_dev_set_whitelist_ssid()
19945 err = dhd_iovar(&dhd->pub, 0, "rssi_monitor", (char *)&rssi_monitor, sizeof(rssi_monitor), in dhd_dev_set_rssi_monitor_cfg()
19961 err = dhd_tcpack_suppress_set(&dhd->pub, enable); in dhd_dev_set_tcpack_sup_mode_cfg()
19973 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_cfg_rand_mac_oui()
20025 return (dhd_rtt_set_cfg(&dhd->pub, buf)); in dhd_dev_rtt_set_cfg()
20033 return (dhd_rtt_stop(&dhd->pub, mac_list, mac_cnt)); in dhd_dev_rtt_cancel_cfg()
20041 return (dhd_rtt_register_noti_callback(&dhd->pub, ctx, noti_fn)); in dhd_dev_rtt_register_noti_callback()
20049 return (dhd_rtt_unregister_noti_callback(&dhd->pub, noti_fn)); in dhd_dev_rtt_unregister_noti_callback()
20057 return (dhd_rtt_capability(&dhd->pub, capa)); in dhd_dev_rtt_capability()
20064 return (dhd_rtt_avail_channel(&dhd->pub, channel_info)); in dhd_dev_rtt_avail_channel()
20071 return (dhd_rtt_enable_responder(&dhd->pub, channel_info)); in dhd_dev_rtt_enable_responder()
20077 return (dhd_rtt_cancel_responder(&dhd->pub)); in dhd_dev_rtt_cancel_responder()
20101 dhd_pub_t *dhdp = &dhd->pub; in __dhd_apf_add_filter()
20163 dhd_pub_t *dhdp = &dhd->pub; in __dhd_apf_config_filter()
20216 dhd_pub_t *dhdp = &dhd->pub; in __dhd_apf_delete_filter()
20251 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_get_version()
20285 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_get_max_len()
20315 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_add_filter()
20350 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_enable_filter()
20373 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_disable_filter()
20392 dhd_pub_t *dhdp = &dhd->pub; in dhd_dev_apf_delete_filter()
20581 if (dhd->pub.hang_report) { in net_os_send_hang_message()
20585 ret = dhd_os_send_hang_message(&dhd->pub); in net_os_send_hang_message()
20607 dhdp = &dhd->pub; in net_os_send_hang_message_reason()
20633 int dhd_wifi_platform_set_power(dhd_pub_t *pub, bool on) in dhd_wifi_platform_set_power() argument
20635 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_wifi_platform_set_power()
20644 if (dhd && dhd->pub.up) in dhd_force_country_change()
20645 return dhd->pub.force_country_change; in dhd_force_country_change()
20654 if (!dhd->pub.is_blob) in dhd_get_customized_country_code()
20659 dhd->pub.dhd_cflags); in dhd_get_customized_country_code()
20680 if (dhd->pub.is_blob) { in dhd_get_customized_country_code()
20681 if (strncmp(dhd->pub.vars_ccode, "J1", 3) == 0) { in dhd_get_customized_country_code()
20682 memcpy(cspec->ccode, dhd->pub.vars_ccode, in dhd_get_customized_country_code()
20683 sizeof(dhd->pub.vars_ccode)); in dhd_get_customized_country_code()
20688 if (strncmp(dhd->pub.vars_ccode, "JP", 3) == 0) { in dhd_get_customized_country_code()
20689 cspec->rev = dhd->pub.vars_regrev; in dhd_get_customized_country_code()
20704 if (dhd && dhd->pub.up) { in dhd_bus_country_set()
20705 memcpy(&dhd->pub.dhd_cspec, cspec, sizeof(wl_country_t)); in dhd_bus_country_set()
20718 if (dhd && dhd->pub.up) { in dhd_bus_band_set()
20774 static void dhd_suspend_lock(dhd_pub_t *pub) in dhd_suspend_lock() argument
20777 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_suspend_lock()
20783 static void dhd_suspend_unlock(dhd_pub_t *pub) in dhd_suspend_unlock() argument
20786 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_suspend_unlock()
20792 unsigned long dhd_os_general_spin_lock(dhd_pub_t *pub) in dhd_os_general_spin_lock() argument
20794 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_general_spin_lock()
20804 void dhd_os_general_spin_unlock(dhd_pub_t *pub, unsigned long flags) in dhd_os_general_spin_unlock() argument
20806 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_general_spin_unlock()
21053 dhd_pub_t *dhdp = &dhd->pub; in dhd_get_memdump_filename()
21140 int dhd_os_wake_lock_timeout(dhd_pub_t *pub) in dhd_os_wake_lock_timeout() argument
21142 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_timeout()
21171 ret = dhd_os_wake_lock_timeout(&dhd->pub); in net_os_wake_lock_timeout()
21175 int dhd_os_wake_lock_rx_timeout_enable(dhd_pub_t *pub, int val) in dhd_os_wake_lock_rx_timeout_enable() argument
21177 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_rx_timeout_enable()
21189 int dhd_os_wake_lock_ctrl_timeout_enable(dhd_pub_t *pub, int val) in dhd_os_wake_lock_ctrl_timeout_enable() argument
21191 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_ctrl_timeout_enable()
21203 int dhd_os_wake_lock_ctrl_timeout_cancel(dhd_pub_t *pub) in dhd_os_wake_lock_ctrl_timeout_cancel() argument
21205 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_ctrl_timeout_cancel()
21226 ret = dhd_os_wake_lock_rx_timeout_enable(&dhd->pub, val); in net_os_wake_lock_rx_timeout_enable()
21236 ret = dhd_os_wake_lock_ctrl_timeout_enable(&dhd->pub, val); in net_os_wake_lock_ctrl_timeout_enable()
21437 int dhd_os_wake_lock(dhd_pub_t *pub) in dhd_os_wake_lock() argument
21439 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock()
21449 dhd_bus_dev_pm_stay_awake(pub); in dhd_os_wake_lock()
21465 void dhd_event_wake_lock(dhd_pub_t *pub) in dhd_event_wake_lock() argument
21467 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_event_wake_lock()
21473 dhd_bus_dev_pm_stay_awake(pub); in dhd_event_wake_lock()
21479 dhd_pm_wake_lock_timeout(dhd_pub_t *pub, int val) in dhd_pm_wake_lock_timeout() argument
21482 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_pm_wake_lock_timeout()
21491 dhd_txfl_wake_lock_timeout(dhd_pub_t *pub, int val) in dhd_txfl_wake_lock_timeout() argument
21494 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_txfl_wake_lock_timeout()
21503 dhd_nan_wake_lock_timeout(dhd_pub_t *pub, int val) in dhd_nan_wake_lock_timeout() argument
21506 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_nan_wake_lock_timeout()
21520 ret = dhd_os_wake_lock(&dhd->pub); in net_os_wake_lock()
21524 int dhd_os_wake_unlock(dhd_pub_t *pub) in dhd_os_wake_unlock() argument
21526 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_unlock()
21530 dhd_os_wake_lock_timeout(pub); in dhd_os_wake_unlock()
21545 dhd_bus_dev_pm_relax(pub); in dhd_os_wake_unlock()
21555 void dhd_event_wake_unlock(dhd_pub_t *pub) in dhd_event_wake_unlock() argument
21557 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_event_wake_unlock()
21563 dhd_bus_dev_pm_relax(pub); in dhd_event_wake_unlock()
21568 void dhd_pm_wake_unlock(dhd_pub_t *pub) in dhd_pm_wake_unlock() argument
21571 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_pm_wake_unlock()
21582 void dhd_txfl_wake_unlock(dhd_pub_t *pub) in dhd_txfl_wake_unlock() argument
21585 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_txfl_wake_unlock()
21596 void dhd_nan_wake_unlock(dhd_pub_t *pub) in dhd_nan_wake_unlock() argument
21599 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_nan_wake_unlock()
21610 int dhd_os_check_wakelock(dhd_pub_t *pub) in dhd_os_check_wakelock() argument
21619 if (!pub) in dhd_os_check_wakelock()
21621 dhd = (dhd_info_t *)(pub->info); in dhd_os_check_wakelock()
21639 if (dhd && (dhd->wakelock_counter > 0) && dhd_bus_dev_pm_enabled(pub)) { in dhd_os_check_wakelock()
21648 dhd_os_check_wakelock_all(dhd_pub_t *pub) in dhd_os_check_wakelock_all() argument
21658 if (!pub) { in dhd_os_check_wakelock_all()
21661 if (pub->up == 0) { in dhd_os_check_wakelock_all()
21665 dhd = (dhd_info_t *)(pub->info); in dhd_os_check_wakelock_all()
21697 if (dhd && (dhd->wakelock_counter > 0) && dhd_bus_dev_pm_enabled(pub)) { in dhd_os_check_wakelock_all()
21711 ret = dhd_os_wake_unlock(&dhd->pub); in net_os_wake_unlock()
21715 int dhd_os_wd_wake_lock(dhd_pub_t *pub) in dhd_os_wd_wake_lock() argument
21717 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wd_wake_lock()
21736 int dhd_os_wd_wake_unlock(dhd_pub_t *pub) in dhd_os_wd_wake_unlock() argument
21738 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wd_wake_unlock()
21759 dhd_os_oob_irq_wake_lock_timeout(dhd_pub_t *pub, int val) in dhd_os_oob_irq_wake_lock_timeout() argument
21762 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_oob_irq_wake_lock_timeout()
21771 dhd_os_oob_irq_wake_unlock(dhd_pub_t *pub) in dhd_os_oob_irq_wake_unlock() argument
21774 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_oob_irq_wake_unlock()
21788 dhd_os_scan_wake_lock_timeout(dhd_pub_t *pub, int val) in dhd_os_scan_wake_lock_timeout() argument
21791 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_scan_wake_lock_timeout()
21800 dhd_os_scan_wake_unlock(dhd_pub_t *pub) in dhd_os_scan_wake_unlock() argument
21803 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_scan_wake_unlock()
21818 int dhd_os_wake_lock_waive(dhd_pub_t *pub) in dhd_os_wake_lock_waive() argument
21820 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_waive()
21844 int dhd_os_wake_lock_restore(dhd_pub_t *pub) in dhd_os_wake_lock_restore() argument
21846 dhd_info_t *dhd = (dhd_info_t *)(pub->info); in dhd_os_wake_lock_restore()
21876 dhd_bus_dev_pm_stay_awake(&dhd->pub); in dhd_os_wake_lock_restore()
21882 dhd_bus_dev_pm_relax(&dhd->pub); in dhd_os_wake_lock_restore()
21900 dhd_wake_lock_init(dhd->wl_wifi, dhd_bus_to_dev(dhd->pub.bus), "wlan_wake"); in dhd_os_wake_lock_init()
21901 dhd_wake_lock_init(dhd->wl_rxwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_rx_wake"); in dhd_os_wake_lock_init()
21902 dhd_wake_lock_init(dhd->wl_ctrlwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_ctrl_wake"); in dhd_os_wake_lock_init()
21903 dhd_wake_lock_init(dhd->wl_evtwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_evt_wake"); in dhd_os_wake_lock_init()
21904 dhd_wake_lock_init(dhd->wl_pmwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_pm_wake"); in dhd_os_wake_lock_init()
21905 dhd_wake_lock_init(dhd->wl_txflwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_txfl_wake"); in dhd_os_wake_lock_init()
21907 dhd_wake_lock_init(dhd->wl_intrwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_oob_irq_wake"); in dhd_os_wake_lock_init()
21910 dhd_wake_lock_init(dhd->wl_scanwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_scan_wake"); in dhd_os_wake_lock_init()
21912 dhd_wake_lock_init(dhd->wl_nanwake, dhd_bus_to_dev(dhd->pub.bus), "wlan_nan_wake"); in dhd_os_wake_lock_init()
21946 while (dhd_os_wake_unlock(&dhd->pub)); in dhd_os_wake_lock_destroy()
21951 bool dhd_os_check_if_up(dhd_pub_t *pub) in dhd_os_check_if_up() argument
21953 if (!pub) in dhd_os_check_if_up()
21955 return pub->up; in dhd_os_check_if_up()
22000 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_ioctl_entry_local()
22002 ret = dhd_wl_ioctl(&dhd->pub, ifidx, ioc, ioc->buf, ioc->len); in dhd_ioctl_entry_local()
22003 dhd_check_hang(net, &dhd->pub, ret); in dhd_ioctl_entry_local()
22005 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_ioctl_entry_local()
22041 dhdp = &dhd->pub; in dhd_deepsleep()
22697 dhdp = &dhd->pub; in dhd_mem_dump()
22751 if (write_dump_to_file(&dhd->pub, dump->buf, dump->bufsize, "mem_dump")) { in dhd_mem_dump()
22774 dhd->pub.memdump_success = FALSE; in dhd_mem_dump()
22790 dhd_d2h_minidump(&dhd->pub); in dhd_mem_dump()
22796 if (write_dump_to_file(&dhd->pub, dump->buf, dump->bufsize, "mem_dump")) { in dhd_mem_dump()
22799 dhd->pub.memdump_success = FALSE; in dhd_mem_dump()
22804 if (write_dump_to_file(&dhd->pub, dump->hscb_buf, in dhd_mem_dump()
22808 dhd->pub.memdump_success = FALSE; in dhd_mem_dump()
22860 if (dhd->pub.memdump_enabled == DUMP_MEMFILE_BUGON && in dhd_mem_dump()
22866 dhd->pub.memdump_type != DUMP_TYPE_BY_SYSDUMP && in dhd_mem_dump()
22868 dhd->pub.memdump_type != DUMP_TYPE_BY_USER && in dhd_mem_dump()
22870 dhd->pub.memdump_success == TRUE && in dhd_mem_dump()
22873 dhd->pub.memdump_type != DUMP_TYPE_DONGLE_HOST_EVENT && in dhd_mem_dump()
22875 dhd->pub.memdump_type != DUMP_TYPE_CFG_VENDOR_TRIGGERED) { in dhd_mem_dump()
22898 MFREE(dhd->pub.osh, dump, sizeof(dhd_dump_t)); in dhd_mem_dump()
22901 DHD_BUS_BUSY_CLEAR_IN_MEMDUMP(&dhd->pub); in dhd_mem_dump()
23123 dhd_pub_t *dhdp = &dhd_info->pub; in dhd_sssr_dump_dig_buf_before()
23140 dhd_pub_t *dhdp = &dhd_info->pub; in dhd_sssr_dump_d11_buf_before()
23157 dhd_pub_t *dhdp = &dhd_info->pub; in dhd_sssr_dump_dig_buf_after()
23174 dhd_pub_t *dhdp = &dhd_info->pub; in dhd_sssr_dump_d11_buf_after()
23207 dhdp = &dhd->pub; in dhd_sssr_dump_to_file()
23384 wl_flush_fw_log_buffer(dhd_linux_get_primary_netdev(&dhd->pub), in dhd_log_dump()
23399 dhd_os_logdump_lock(&dhd->pub); in dhd_log_dump()
23400 DHD_OS_WAKE_LOCK(&dhd->pub); in dhd_log_dump()
23401 if (do_dhd_log_dump(&dhd->pub, type) != BCME_OK) { in dhd_log_dump()
23404 DHD_OS_WAKE_UNLOCK(&dhd->pub); in dhd_log_dump()
23405 dhd_os_logdump_unlock(&dhd->pub); in dhd_log_dump()
23694 dhd_pub_t *dhdp = &dhd_info->pub; in dhd_nla_put_sssr_dump_len()
23723 dhdp = &dhd_info->pub; in dhd_get_ext_trap_len()
23747 dhdp = &dhd_info->pub; in dhd_get_health_chk_len()
23771 dhdp = &dhd_info->pub; in dhd_get_dhd_dump_len()
23800 dhdp = &dhd_info->pub; in dhd_get_cookie_log_len()
23825 dhdp = &dhd_info->pub; in dhd_get_flowring_len()
23883 dhdp = &dhd_info->pub; in dhd_get_ecntrs_len()
23910 dhdp = &dhd_info->pub; in dhd_get_dld_log_dump()
23990 if (dhd_info->pub.dongle_edl_support) { in dhd_log_flush()
24032 dhdp = &dhd_info->pub; in dhd_get_debug_dump_file_name()
24141 dhdp = &dhd_info->pub; in dhd_print_health_chk_data()
24186 dhdp = &dhd_info->pub; in dhd_print_ext_trap_data()
24232 dhdp = &dhd_info->pub; in dhd_print_dump_data()
24273 dhdp = &dhd_info->pub; in dhd_print_cookie_data()
24297 dhdp = &dhd_info->pub; in dhd_print_flowring_data()
24352 dhdp = &dhd_info->pub; in dhd_print_ecntrs_data()
24382 dhdp = &dhd_info->pub; in dhd_print_rtt_data()
24408 dhdp = &dhd_info->pub; in dhd_print_status_log_data()
24426 dhdp = &dhd_info->pub; in dhd_get_status_log_len()
24833 MFREE(dhd->pub.osh, wf, sizeof(dhd_write_file_t)); in dhd_inform_dhd_monitor_handler()
24874 dhd_pub_t *dhdp = &dhd->pub; in _dhd_schedule_macdbg_dump()
24990 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_socram_dump()
25021 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_get_socram_dump()
25052 dhdp = &dhd_info->pub; in dhd_get_rtt_len()
25094 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_get_pktlog_dump()
25113 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_get_pktlog_dump_size()
25126 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_get_pktlogdump_filename()
25137 dhd_pub_t *dhdp = &dhd->pub; in dhd_os_get_axi_error_dump()
25442 if (!dhd->pub.conf->xps_cpus) in dhd_xps_cpus_enable()
25446 if (dhd->pub.op_mode == DHD_FLAG_IBSS_MODE) { in dhd_xps_cpus_enable()
25545 if (!dhd->pub.conf->rps_cpus) in dhd_rps_cpus_enable()
25549 if (dhd->pub.op_mode == DHD_FLAG_IBSS_MODE) { in dhd_rps_cpus_enable()
26065 dhd_send_trap_to_fw(dhd_pub_t * pub, int reason, int trap) in dhd_send_trap_to_fw() argument
26078 dhd_send_trap_to_fw_for_timeout(dhd_pub_t * pub, timeout_reasons_t reason) in dhd_send_trap_to_fw_for_timeout() argument
26102 dhd_send_trap_to_fw(pub, to_reason, trap); in dhd_send_trap_to_fw_for_timeout()
26675 dmaxfer_free_prev_dmaaddr(&dhd_info->pub, dmmap);
27182 dhdp = &dhd->pub;
27877 err = dhd_bus_iovar_op(&(dhd->pub), iovar,
27893 err = dhd_bus_iovar_op(&(dhd->pub), iovar, NULL, 0,
27897 err = dhd_bus_iovar_op(&(dhd->pub), iovar, (char *)read_params, (uint)read_plen,
28013 err = dhd_bus_iovar_op(&(dhd->pub), iovar, NULL, 0, (char *)buf, sizeof(*buf) * 3,
28021 err = dhd_bus_iovar_op(&(dhd->pub), iovar, (char *)buf, sizeof(*buf) * 2,
28372 dhdp = &dhd->pub;
28468 if (dhd_pktlog_dump_write_file(&dhd->pub)) {
28494 dhdp = &ifp->info->pub;
28542 (OSL_ATOMIC_READ(ifp->info->pub->osh, &ifp->m4state) == M4_TXFAILED)) {
28619 dhdp = (dhd_pub_t *)cfg->pub;
29785 dhd_os_hp2plock(dhd_pub_t *pub)
29790 dhd = (dhd_info_t *)(pub->info);
29800 dhd_os_hp2punlock(dhd_pub_t *pub, unsigned long flags)
29804 dhd = (dhd_info_t *)(pub->info);
29823 dhdp = &dhd->pub;
29928 dhdp = &dhd->pub;
30085 return (void *)&dhdinfo->pub;
30096 return (void *)dhdinfo->pub.conf;
30105 dhd_pub_t *pub = bus;
30106 dhd_info_t *dhd = (dhd_info_t *)pub->info;
30128 pdev = dhd->pub.info->iflist[i]->net;