Lines Matching refs:cur_if

340 #define wl_get_isam_status(cur_if, stat) \  argument
341 (test_bit(ISAM_STATUS_ ## stat, &(cur_if)->status))
342 #define wl_set_isam_status(cur_if, stat) \ argument
343 (set_bit(ISAM_STATUS_ ## stat, &(cur_if)->status))
344 #define wl_clr_isam_status(cur_if, stat) \ argument
345 (clear_bit(ISAM_STATUS_ ## stat, &(cur_if)->status))
346 #define wl_chg_isam_status(cur_if, stat) \ argument
347 (change_bit(ISAM_STATUS_ ## stat, &(cur_if)->status))
358 struct wl_if_info *cur_if = NULL, *tmp_if = NULL; in wl_get_cur_if() local
364 cur_if = tmp_if; in wl_get_cur_if()
369 return cur_if; in wl_get_cur_if()
388 struct wl_if_info *cur_if; in wl_ext_pm_work_handler() local
392 BCM_SET_CONTAINER_OF(cur_if, work, struct wl_if_info, pm_enable_work.work); in wl_ext_pm_work_handler()
396 if (cur_if->dev == NULL) in wl_ext_pm_work_handler()
405 dhd = dhd_get_pub(cur_if->dev); in wl_ext_pm_work_handler()
408 IAPSTA_TRACE(cur_if->ifname, "dhd is null or not up\n"); in wl_ext_pm_work_handler()
413 wl_ext_ioctl(cur_if->dev, WLC_SET_PM, &pm, sizeof(pm), 1); in wl_ext_pm_work_handler()
426 struct wl_if_info *cur_if = NULL; in wl_ext_add_remove_pm_enable_work() local
430 cur_if = wl_get_cur_if(dev); in wl_ext_add_remove_pm_enable_work()
431 if (!cur_if) in wl_ext_add_remove_pm_enable_work()
434 mutex_lock(&cur_if->pm_sync); in wl_ext_add_remove_pm_enable_work()
441 if (delayed_work_pending(&cur_if->pm_enable_work)) { in wl_ext_add_remove_pm_enable_work()
442 cancel_delayed_work_sync(&cur_if->pm_enable_work); in wl_ext_add_remove_pm_enable_work()
455 wl_ext_ioctl(cur_if->dev, WLC_SET_PM, &pm, sizeof(pm), 1); in wl_ext_add_remove_pm_enable_work()
458 if (schedule_delayed_work(&cur_if->pm_enable_work, in wl_ext_add_remove_pm_enable_work()
462 IAPSTA_ERROR(cur_if->ifname, "Can't schedule pm work handler\n"); in wl_ext_add_remove_pm_enable_work()
466 mutex_unlock(&cur_if->pm_sync); in wl_ext_add_remove_pm_enable_work()
534 wl_ext_set_bgnmode(struct wl_if_info *cur_if) in wl_ext_set_bgnmode() argument
536 struct net_device *dev = cur_if->dev; in wl_ext_set_bgnmode()
537 bgnmode_t bgnmode = cur_if->bgnmode; in wl_ext_set_bgnmode()
580 wl_ext_set_amode(struct wl_if_info *cur_if) in wl_ext_set_amode() argument
582 struct net_device *dev = cur_if->dev; in wl_ext_set_amode()
583 authmode_t amode = cur_if->amode; in wl_ext_set_amode()
587 if (cur_if->ifmode == IMESH_MODE) { in wl_ext_set_amode()
621 if (cur_if->ifmode == IMESH_MODE) { in wl_ext_set_amode()
626 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_set_amode()
638 wl_ext_set_emode(struct wl_if_info *cur_if) in wl_ext_set_emode() argument
640 struct net_device *dev = cur_if->dev; in wl_ext_set_emode()
645 authmode_t amode = cur_if->amode; in wl_ext_set_emode()
646 encmode_t emode = cur_if->emode; in wl_ext_set_emode()
648 char *key = cur_if->key; in wl_ext_set_emode()
654 if (cur_if->ifmode == IMESH_MODE) { in wl_ext_set_emode()
688 if (dhd->conf->chip == BCM43430_CHIP_ID && cur_if->ifidx > 0 && wsec >= 2 && in wl_ext_set_emode()
696 if (cur_if->ifmode == IMESH_MODE) { in wl_ext_set_emode()
714 if (cur_if->ifmode == ISTA_MODE) in wl_ext_set_emode()
723 wl_ext_set_chan_info(struct wl_if_info *cur_if, uint band, uint16 chan) in wl_ext_set_chan_info() argument
725 cur_if->chan_info.band = band; in wl_ext_set_chan_info()
726 cur_if->chan_info.chan = chan; in wl_ext_set_chan_info()
901 struct wl_if_info *cur_if; in wl_ext_send_event_msg() local
905 cur_if = wl_get_cur_if(dev); in wl_ext_send_event_msg()
906 if (!cur_if) in wl_ext_send_event_msg()
913 memcpy(&msg.addr, &cur_if->bssid, ETHER_ADDR_LEN); in wl_ext_send_event_msg()
983 struct wl_if_info *cur_if; in wl_ext_connect_timeout() local
990 cur_if = wl_get_cur_if(dev); in wl_ext_connect_timeout()
991 if (!cur_if) in wl_ext_connect_timeout()
995 cur_if->assoc_info.reassoc = 0; in wl_ext_connect_timeout()
1089 struct wl_if_info *cur_if; in wl_ext_mesh_peer_status() local
1103 cur_if = wl_get_cur_if(dev); in wl_ext_mesh_peer_status()
1104 if (cur_if && cur_if->ifmode == IMESH_MODE) { in wl_ext_mesh_peer_status()
1114 } else if (cur_if) { in wl_ext_mesh_peer_status()
1116 cur_if->ifname, cur_if->prefix); in wl_ext_mesh_peer_status()
1409 wl_mesh_event_handler(struct wl_if_info *cur_if, in wl_mesh_event_handler() argument
1412 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_mesh_event_handler()
1422 if (cur_if->ifmode == IMESH_MODE) in wl_mesh_event_handler()
1423 mesh_if = cur_if; in wl_mesh_event_handler()
1434 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_mesh_event_handler()
1454 else if (cur_if->ifmode == IMESH_MODE && apsta_params->macs) { in wl_mesh_event_handler()
1636 wl_ext_master_if(struct wl_if_info *cur_if) in wl_ext_master_if() argument
1638 if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) in wl_ext_master_if()
1645 wl_ext_if_down(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_ext_if_down() argument
1655 WL_MSG(cur_if->ifname, "[%c] Turning off...\n", cur_if->prefix); in wl_ext_if_down()
1657 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_if_down()
1658 wl_ext_ioctl(cur_if->dev, WLC_DISASSOC, NULL, 0, 1); in wl_ext_if_down()
1660 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_if_down()
1663 wl_ext_ioctl(cur_if->dev, WLC_SCB_DEAUTHENTICATE, &scbval.ea, ETHER_ADDR_LEN, 1); in wl_ext_if_down()
1667 wl_ext_ioctl(cur_if->dev, WLC_DOWN, NULL, 0, 1); in wl_ext_if_down()
1671 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, sizeof(bss_setbuf), in wl_ext_if_down()
1674 wl_clr_isam_status(cur_if, AP_CREATED); in wl_ext_if_down()
1680 wl_ext_if_up(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if, in wl_ext_if_up() argument
1683 struct wl_chan_info *chan_info = &cur_if->chan_info; in wl_ext_if_up()
1695 if (cur_if->ifmode != IAP_MODE && cur_if->ifmode != IGO_MODE) { in wl_ext_if_up()
1696 IAPSTA_ERROR(cur_if->ifname, "Wrong ifmode\n"); in wl_ext_if_up()
1701 WL_MSG(cur_if->ifname, "[%c] skip DFS channel %d\n", in wl_ext_if_up()
1702 cur_if->prefix, chan_info->chan); in wl_ext_if_up()
1704 } else if (wl_ext_passive_chan(cur_if->dev, chan_info)) { in wl_ext_if_up()
1705 WL_MSG(cur_if->ifname, "[%c] skip PASSIVE channel %d\n", in wl_ext_if_up()
1706 cur_if->prefix, chan_info->chan); in wl_ext_if_up()
1709 WL_MSG(cur_if->ifname, "[%c] no valid channel\n", cur_if->prefix); in wl_ext_if_up()
1713 WL_MSG(cur_if->ifname, "[%c] Turning on...\n", cur_if->prefix); in wl_ext_if_up()
1715 wl_ext_set_chanspec(cur_if->dev, chan_info, &fw_chspec); in wl_ext_if_up()
1717 wl_clr_isam_status(cur_if, AP_CREATED); in wl_ext_if_up()
1718 wl_set_isam_status(cur_if, AP_CREATING); in wl_ext_if_up()
1720 wl_ext_ioctl(cur_if->dev, WLC_UP, NULL, 0, 1); in wl_ext_if_up()
1724 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, in wl_ext_if_up()
1732 wl_get_isam_status(cur_if, AP_CREATED), in wl_ext_if_up()
1734 if (timeout <= 0 || !wl_get_isam_status(cur_if, AP_CREATED)) { in wl_ext_if_up()
1735 wl_ext_if_down(apsta_params, cur_if); in wl_ext_if_up()
1736 WL_MSG(cur_if->ifname, "[%c] failed to up with SSID: \"%s\"\n", in wl_ext_if_up()
1737 cur_if->prefix, cur_if->ssid); in wl_ext_if_up()
1741 wl_ext_ioctl(cur_if->dev, WLC_GET_SSID, &ssid, sizeof(ssid), 0); in wl_ext_if_up()
1742 chanspec = wl_ext_get_chanspec(cur_if->dev, chan_info); in wl_ext_if_up()
1743 WL_MSG(cur_if->ifname, "[%c] enabled with SSID: \"%s\" on channel %s-%d(0x%x)\n", in wl_ext_if_up()
1744 cur_if->prefix, ssid.SSID, CHSPEC2BANDSTR(chanspec), in wl_ext_if_up()
1747 wl_clr_isam_status(cur_if, AP_CREATING); in wl_ext_if_up()
1749 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_if_up()
1777 struct wl_if_info *cur_if, bool nodfs) in wl_ext_get_same_band_chan() argument
1786 max_prio = cur_if->prio; in wl_ext_get_same_band_chan()
1789 if (cur_if != tmp_if && wl_get_isam_status(tmp_if, IF_READY) && in wl_ext_get_same_band_chan()
1795 if (chan_info.chan && (cur_if->chan_info.band == chan_info.band)) { in wl_ext_get_same_band_chan()
1807 const struct wl_if_info *cur_if, const struct wl_if_info *target_if) in wl_ext_get_vsdb_chan() argument
1810 uint cur_band = cur_if->chan_info.band; in wl_ext_get_vsdb_chan()
1811 uint16 cur_chan = cur_if->chan_info.chan; in wl_ext_get_vsdb_chan()
1815 if (cur_if->vsdb && target_if->vsdb) in wl_ext_get_vsdb_chan()
1822 IAPSTA_INFO(cur_if->ifname, "cur_chan=%s-%d, target_chan=%s-%d\n", in wl_ext_get_vsdb_chan()
1839 struct wl_if_info *cur_if) in wl_ext_rsdb_core_conflict() argument
1847 wl_ext_get_chan(cur_if->dev, &cur_chan_info); in wl_ext_rsdb_core_conflict()
1850 if (tmp_if != cur_if && wl_get_isam_status(tmp_if, IF_READY) && in wl_ext_rsdb_core_conflict()
1851 tmp_if->prio > cur_if->prio) { in wl_ext_rsdb_core_conflict()
1857 wl_ext_rsdb_band(cur_chan_info.band, cur_if->chan_info.chan)) in wl_ext_rsdb_core_conflict()
1860 wl_ext_rsdb_band(cur_chan_info.band, cur_if->chan_info.chan)) in wl_ext_rsdb_core_conflict()
1869 wl_ext_trigger_csa(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_ext_trigger_csa() argument
1874 if (wl_ext_master_if(cur_if) && (apsta_params->csa & CSA_DRV_BIT)) { in wl_ext_trigger_csa()
1875 if (!cur_if->chan_info.chan) { in wl_ext_trigger_csa()
1876 WL_MSG(cur_if->ifname, "[%c] no valid channel\n", cur_if->prefix); in wl_ext_trigger_csa()
1877 } else if (wl_ext_dfs_chan(&cur_if->chan_info) && !apsta_params->radar) { in wl_ext_trigger_csa()
1878 WL_MSG(cur_if->ifname, "[%c] skip DFS channel %d\n", in wl_ext_trigger_csa()
1879 cur_if->prefix, cur_if->chan_info.chan); in wl_ext_trigger_csa()
1880 wl_ext_if_down(apsta_params, cur_if); in wl_ext_trigger_csa()
1886 csa_arg.chspec = wl_ext_chan_to_chanspec(cur_if->dev, &cur_if->chan_info); in wl_ext_trigger_csa()
1887 core_conflict = wl_ext_rsdb_core_conflict(apsta_params, cur_if); in wl_ext_trigger_csa()
1889 WL_MSG(cur_if->ifname, "[%c] Skip CSA due to rsdb core conflict\n", in wl_ext_trigger_csa()
1890 cur_if->prefix); in wl_ext_trigger_csa()
1892 WL_MSG(cur_if->ifname, "[%c] Trigger CSA to channel %d(0x%x)\n", in wl_ext_trigger_csa()
1893 cur_if->prefix, cur_if->chan_info.chan, csa_arg.chspec); in wl_ext_trigger_csa()
1894 wl_set_isam_status(cur_if, AP_CREATING); in wl_ext_trigger_csa()
1895 wl_ext_iovar_setbuf(cur_if->dev, "csa", &csa_arg, sizeof(csa_arg), in wl_ext_trigger_csa()
1898 wl_clr_isam_status(cur_if, AP_CREATING); in wl_ext_trigger_csa()
1899 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_trigger_csa()
1901 IAPSTA_ERROR(cur_if->ifname, "fail to get chanspec\n"); in wl_ext_trigger_csa()
1911 struct wl_if_info *cur_if) in wl_ext_move_cur_dfs_channel() argument
1913 struct wl_chan_info *cur_chan_info = &cur_if->chan_info; in wl_ext_move_cur_dfs_channel()
1918 if (!apsta_params->radar && wl_ext_master_if(cur_if) && in wl_ext_move_cur_dfs_channel()
1920 wl_ext_get_default_chan(cur_if->dev, &chan_2g, &chan_5g, TRUE); in wl_ext_move_cur_dfs_channel()
1923 WL_MSG(cur_if->ifname, "[%c] no valid channel\n", cur_if->prefix); in wl_ext_move_cur_dfs_channel()
1928 wl_ext_set_chan_info(cur_if, WLC_BAND_5G, chan_5g); in wl_ext_move_cur_dfs_channel()
1930 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, chan_2g); in wl_ext_move_cur_dfs_channel()
1931 auto_chan = wl_ext_get_same_band_chan(apsta_params, cur_if, TRUE); in wl_ext_move_cur_dfs_channel()
1933 auto_chan = wl_ext_autochannel(cur_if->dev, ACS_FW_BIT|ACS_DRV_BIT, in wl_ext_move_cur_dfs_channel()
1942 wl_ext_set_chan_info(cur_if, WLC_BAND_5G, chan_5g); in wl_ext_move_cur_dfs_channel()
1943 auto_chan = wl_ext_get_same_band_chan(apsta_params, cur_if, FALSE); in wl_ext_move_cur_dfs_channel()
1946 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, chan_2g); in wl_ext_move_cur_dfs_channel()
1947 auto_chan = wl_ext_get_same_band_chan(apsta_params, cur_if, TRUE); in wl_ext_move_cur_dfs_channel()
1951 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, chan_2g); in wl_ext_move_cur_dfs_channel()
1952 auto_chan = wl_ext_get_same_band_chan(apsta_params, cur_if, TRUE); in wl_ext_move_cur_dfs_channel()
1955 auto_chan = wl_ext_autochannel(cur_if->dev, ACS_FW_BIT|ACS_DRV_BIT, in wl_ext_move_cur_dfs_channel()
1964 wl_ext_set_chan_info(cur_if, WLC_BAND_5G, chan_5g); in wl_ext_move_cur_dfs_channel()
1965 auto_chan = wl_ext_get_same_band_chan(apsta_params, cur_if, FALSE); in wl_ext_move_cur_dfs_channel()
1969 auto_chan = wl_ext_autochannel(cur_if->dev, ACS_FW_BIT|ACS_DRV_BIT, in wl_ext_move_cur_dfs_channel()
1977 WL_MSG(cur_if->ifname, "[%c] move channel %s-%d => %s-%d\n", in wl_ext_move_cur_dfs_channel()
1978 cur_if->prefix, WLCBAND2STR(cur_band), cur_chan, in wl_ext_move_cur_dfs_channel()
2042 struct wl_if_info *cur_if) in wl_ext_move_cur_channel() argument
2055 max_prio = cur_if->prio; in wl_ext_move_cur_channel()
2058 if (cur_if != tmp_if && wl_get_isam_status(tmp_if, IF_READY) && in wl_ext_move_cur_channel()
2060 tmp_chan = wl_ext_get_vsdb_chan(apsta_params, cur_if, tmp_if); in wl_ext_move_cur_channel()
2071 wl_ext_get_chan(cur_if->dev, &cur_chan_info); in wl_ext_move_cur_channel()
2075 WL_MSG(cur_if->ifname, "[%c] keep on current channel %s-%d\n", in wl_ext_move_cur_channel()
2076 cur_if->prefix, WLCBAND2STR(cur_chan_info.band), cur_chan_info.chan); in wl_ext_move_cur_channel()
2077 cur_if->chan_info.chan = 0; in wl_ext_move_cur_channel()
2079 WL_MSG(cur_if->ifname, "[%c] channel=%s-%d => %s[%c] channel=%s-%d\n", in wl_ext_move_cur_channel()
2080 cur_if->prefix, in wl_ext_move_cur_channel()
2081 WLCBAND2STR(cur_if->chan_info.band), cur_if->chan_info.chan, in wl_ext_move_cur_channel()
2084 wl_ext_set_chan_info(cur_if, tgt_chan_info.band, tgt_chan_info.chan); in wl_ext_move_cur_channel()
2089 wl_ext_move_cur_dfs_channel(apsta_params, cur_if); in wl_ext_move_cur_channel()
2091 return cur_if->chan_info.chan; in wl_ext_move_cur_channel()
2096 struct wl_if_info *cur_if) in wl_ext_move_other_channel() argument
2103 if (apsta_params->vsdb || !cur_if->chan_info.chan) { in wl_ext_move_other_channel()
2108 cur_prio = cur_if->prio; in wl_ext_move_other_channel()
2111 if (cur_if != tmp_if && wl_get_isam_status(tmp_if, IF_READY) && in wl_ext_move_other_channel()
2113 tmp_chan = wl_ext_get_vsdb_chan(apsta_params, cur_if, tmp_if); in wl_ext_move_other_channel()
2125 cur_if->ifname, WLCBAND2STR(cur_if->chan_info.band), cur_if->chan_info.chan); in wl_ext_move_other_channel()
2126 wl_ext_set_chan_info(target_if, cur_if->chan_info.band, cur_if->chan_info.chan); in wl_ext_move_other_channel()
2130 wl_ext_move_other_channel(apsta_params, cur_if); in wl_ext_move_other_channel()
2146 struct wl_if_info *cur_if) in wl_ext_wait_other_enabling() argument
2155 if (tmp_if->dev && tmp_if->dev != cur_if->dev) { in wl_ext_wait_other_enabling()
2161 WL_MSG(cur_if->ifname, "waiting for %s[%c] enabling...\n", in wl_ext_wait_other_enabling()
2180 WL_MSG(cur_if->ifname, "%s[%c] is still enabling...\n", in wl_ext_wait_other_enabling()
2214 struct wl_if_info *cur_if = NULL; in wl_ext_sta_connecting() local
2218 cur_if = wl_get_cur_if(dev); in wl_ext_sta_connecting()
2219 if (!cur_if) in wl_ext_sta_connecting()
2222 if (cur_if->ifmode != ISTA_MODE && cur_if->ifmode != IGC_MODE) in wl_ext_sta_connecting()
2225 state = cur_if->conn_state; in wl_ext_sta_connecting()
2237 struct wl_if_info *cur_if = NULL; in wl_ext_sta_handshaking() local
2241 cur_if = wl_get_cur_if(dev); in wl_ext_sta_handshaking()
2242 if (!cur_if) in wl_ext_sta_handshaking()
2245 if (cur_if->ifmode != ISTA_MODE && cur_if->ifmode != IGC_MODE) in wl_ext_sta_handshaking()
2248 state = cur_if->conn_state; in wl_ext_sta_handshaking()
2262 struct wl_if_info *cur_if; in wl_ext_any_sta_handshaking() local
2266 cur_if = &apsta_params->if_info[i]; in wl_ext_any_sta_handshaking()
2267 if (cur_if->dev && cur_if->ifmode == ISTA_MODE) { in wl_ext_any_sta_handshaking()
2268 state = cur_if->conn_state; in wl_ext_any_sta_handshaking()
2283 struct wl_if_info *tmp_if, *cur_if = NULL; in wl_ext_get_wlfc_maxcount() local
2292 cur_if = tmp_if; in wl_ext_get_wlfc_maxcount()
2293 maxcount = cur_if->transit_maxcount; in wl_ext_get_wlfc_maxcount()
2297 if (cur_if) in wl_ext_get_wlfc_maxcount()
2298 IAPSTA_INFO(cur_if->ifname, "update maxcount %d\n", maxcount); in wl_ext_get_wlfc_maxcount()
2360 struct wl_if_info *cur_if = NULL; in wl_ext_get_dfs_master_if() local
2365 cur_if = &apsta_params->if_info[i]; in wl_ext_get_dfs_master_if()
2366 if (!cur_if->dev || !wl_ext_master_if(cur_if)) in wl_ext_get_dfs_master_if()
2369 wl_ext_get_chan(cur_if->dev, &chan_info); in wl_ext_get_dfs_master_if()
2371 return cur_if; in wl_ext_get_dfs_master_if()
2381 struct wl_if_info *cur_if = NULL; in wl_ext_save_master_channel() local
2389 cur_if = &apsta_params->if_info[i]; in wl_ext_save_master_channel()
2390 if (!cur_if->dev || !wl_ext_master_if(cur_if)) in wl_ext_save_master_channel()
2393 wl_ext_get_chan(cur_if->dev, &chan_info); in wl_ext_save_master_channel()
2395 cur_if->prev_channel = chan_info.chan; in wl_ext_save_master_channel()
2396 cur_if->post_channel = post_channel; in wl_ext_save_master_channel()
2406 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_enable_master_if() local
2410 cur_if = &apsta_params->if_info[i]; in wl_ext_iapsta_enable_master_if()
2411 if (cur_if && cur_if->post_channel) { in wl_ext_iapsta_enable_master_if()
2413 cur_if->chan_info.chan = cur_if->post_channel; in wl_ext_iapsta_enable_master_if()
2415 cur_if->chan_info.chan = cur_if->prev_channel; in wl_ext_iapsta_enable_master_if()
2416 if (wl_ext_associated(cur_if->dev)) in wl_ext_iapsta_enable_master_if()
2417 wl_ext_if_down(apsta_params, cur_if); in wl_ext_iapsta_enable_master_if()
2418 wl_ext_if_up(apsta_params, cur_if, TRUE, 0); in wl_ext_iapsta_enable_master_if()
2419 cur_if->prev_channel = 0; in wl_ext_iapsta_enable_master_if()
2420 cur_if->post_channel = 0; in wl_ext_iapsta_enable_master_if()
2482 struct wl_if_info *cur_if = NULL, *target_if = NULL; in wl_ext_iapsta_update_channel() local
2485 cur_if = wl_get_cur_if(dev); in wl_ext_iapsta_update_channel()
2486 if (cur_if) { in wl_ext_iapsta_update_channel()
2487 struct wl_chan_info *chan_info = &cur_if->chan_info; in wl_ext_iapsta_update_channel()
2489 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_iapsta_update_channel()
2490 wl_ext_set_chan_info(cur_if, CHSPEC2WLC_BAND(chanspec), in wl_ext_iapsta_update_channel()
2492 if (wl_ext_master_if(cur_if) && apsta_params->acs) { in wl_ext_iapsta_update_channel()
2493 chan_info->chan = wl_ext_autochannel(cur_if->dev, apsta_params->acs, in wl_ext_iapsta_update_channel()
2497 chan_info->chan = wl_ext_move_cur_channel(apsta_params, cur_if); in wl_ext_iapsta_update_channel()
2499 if (cur_if->ifmode == ISTA_MODE && wl_ext_dfs_chan(chan_info)) in wl_ext_iapsta_update_channel()
2501 target_if = wl_ext_move_other_channel(apsta_params, cur_if); in wl_ext_iapsta_update_channel()
2503 cur_if->ifmode == ISTA_MODE && !target_if) { in wl_ext_iapsta_update_channel()
2512 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_iapsta_update_channel()
2516 wl_ext_set_chanspec(cur_if->dev, chan_info, &fw_chspec); in wl_ext_iapsta_update_channel()
2518 wl_set_isam_status(cur_if, STA_CONNECTING); in wl_ext_iapsta_update_channel()
2556 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_update_iftype() local
2562 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_update_iftype()
2565 if (cur_if) { in wl_ext_iapsta_update_iftype()
2567 cur_if->ifmode = ISTA_MODE; in wl_ext_iapsta_update_iftype()
2568 cur_if->prio = PRIO_STA; in wl_ext_iapsta_update_iftype()
2569 cur_if->vsdb = TRUE; in wl_ext_iapsta_update_iftype()
2570 cur_if->prefix = 'S'; in wl_ext_iapsta_update_iftype()
2574 } else if (wl_iftype == WL_IF_TYPE_AP && cur_if->ifmode != IMESH_MODE) { in wl_ext_iapsta_update_iftype()
2575 cur_if->ifmode = IAP_MODE; in wl_ext_iapsta_update_iftype()
2576 cur_if->prio = PRIO_AP; in wl_ext_iapsta_update_iftype()
2577 cur_if->vsdb = FALSE; in wl_ext_iapsta_update_iftype()
2578 cur_if->prefix = 'A'; in wl_ext_iapsta_update_iftype()
2580 cur_if->ifmode = IGO_MODE; in wl_ext_iapsta_update_iftype()
2581 cur_if->prio = PRIO_P2P; in wl_ext_iapsta_update_iftype()
2582 cur_if->vsdb = TRUE; in wl_ext_iapsta_update_iftype()
2583 cur_if->prefix = 'P'; in wl_ext_iapsta_update_iftype()
2585 cur_if->ifmode = IGC_MODE; in wl_ext_iapsta_update_iftype()
2586 cur_if->prio = PRIO_P2P; in wl_ext_iapsta_update_iftype()
2587 cur_if->vsdb = TRUE; in wl_ext_iapsta_update_iftype()
2588 cur_if->prefix = 'P'; in wl_ext_iapsta_update_iftype()
2590 cur_if->ifmode = IAP_MODE; in wl_ext_iapsta_update_iftype()
2591 cur_if->prio = PRIO_AP; in wl_ext_iapsta_update_iftype()
2592 cur_if->vsdb = FALSE; in wl_ext_iapsta_update_iftype()
2593 cur_if->prefix = 'H'; in wl_ext_iapsta_update_iftype()
2594 wl_ext_iovar_setint(cur_if->dev, "assoc_retry_max", 3); in wl_ext_iapsta_update_iftype()
2604 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_ifadding() local
2608 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_ifadding()
2609 wl_set_isam_status(cur_if, IF_ADDING); in wl_ext_iapsta_ifadding()
2618 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_iftype_enabled() local
2622 cur_if = wl_ext_if_enabled(apsta_params, ifmode); in wl_ext_iapsta_iftype_enabled()
2623 if (cur_if) in wl_ext_iapsta_iftype_enabled()
2634 struct wl_if_info *cur_if; in wl_ext_iapsta_mesh_creating() local
2639 cur_if = &apsta_params->if_info[i]; in wl_ext_iapsta_mesh_creating()
2640 if (cur_if->ifmode==IMESH_MODE && wl_get_isam_status(cur_if, IF_ADDING)) in wl_ext_iapsta_mesh_creating()
2652 struct wl_if_info *cur_if = NULL; in wl_ext_fw_reinit_incsa() local
2654 cur_if = wl_get_cur_if(dev); in wl_ext_fw_reinit_incsa()
2655 if (!cur_if) in wl_ext_fw_reinit_incsa()
2659 if (cur_if->ifmode == ISTA_MODE && in wl_ext_fw_reinit_incsa()
2683 wl_ext_disc_recon_retry(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_ext_disc_recon_retry() argument
2685 int sta_disc_recon_cnt = cur_if->sta_disc_recon_cnt; in wl_ext_disc_recon_retry()
2686 struct osl_timespec *sta_disc_conn_ts = &cur_if->sta_disc_conn_ts; in wl_ext_disc_recon_retry()
2697 IAPSTA_INFO(cur_if->ifname, "sta_disc_recon_cnt=%d, diff_ms = %dms\n", in wl_ext_disc_recon_retry()
2702 cur_if->sta_disc_recon_cnt = 0; in wl_ext_disc_recon_retry()
2712 cur_if->sta_disc_recon_cnt++; in wl_ext_disc_recon_retry()
2728 struct wl_if_info *cur_if; in wl_ext_update_assoc_info() local
2730 cur_if = wl_get_cur_if(dev); in wl_ext_update_assoc_info()
2731 if (cur_if) { in wl_ext_update_assoc_info()
2732 assoc_info = &cur_if->assoc_info; in wl_ext_update_assoc_info()
2743 wldev_ioctl(dev, WLC_GET_BSSID, &cur_if->bssid, ETHER_ADDR_LEN, 0); in wl_ext_update_assoc_info()
2744 memcpy(&assoc_info->bssid, &cur_if->bssid, ETHER_ADDR_LEN); in wl_ext_update_assoc_info()
2763 struct wl_if_info *cur_if; in wl_ext_connect_retry() local
2778 cur_if = wl_get_cur_if(dev); in wl_ext_connect_retry()
2779 if (!cur_if) in wl_ext_connect_retry()
2781 sta_conn_ts = &cur_if->sta_conn_ts; in wl_ext_connect_retry()
2791 assoc_info = &cur_if->assoc_info; in wl_ext_connect_retry()
2797 wl_timer_mod(dhd, &cur_if->reconnect_timer, 0); in wl_ext_connect_retry()
2834 wl_timer_mod(dhd, &cur_if->reconnect_timer, max_wait_time); in wl_ext_connect_retry()
2839 else if (cur_if->conn_state >= CONN_STATE_CONNECTED && in wl_ext_connect_retry()
2846 if (wl_ext_disc_recon_retry(apsta_params, cur_if)) { in wl_ext_connect_retry()
2848 WL_MSG(dev->name, "retry join cnt %d\n", cur_if->sta_disc_recon_cnt); in wl_ext_connect_retry()
2856 wl_timer_mod(dhd, &cur_if->connect_timer, STA_CONNECT_TIMEOUT); in wl_ext_connect_retry()
2858 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTING); in wl_ext_connect_retry()
2868 wl_timer_mod(dhd, &cur_if->reconnect_timer, max_wait_time); in wl_ext_connect_retry()
2874 cur_if->sta_disc_recon_cnt, STA_DISCONNECT_RECONNECT_TIMEOUT); in wl_ext_connect_retry()
2892 struct wl_if_info *cur_if; in wl_ext_set_connect_retry() local
2896 cur_if = wl_get_cur_if(dev); in wl_ext_set_connect_retry()
2897 if (!cur_if) in wl_ext_set_connect_retry()
2900 wl_timer_mod(dhd, &cur_if->reconnect_timer, 0); in wl_ext_set_connect_retry()
2901 memset(&cur_if->assoc_info, 0, sizeof(wlcfg_assoc_info_t)); in wl_ext_set_connect_retry()
2904 memcpy(&cur_if->bssid, assoc_info->bssid, ETHER_ADDR_LEN); in wl_ext_set_connect_retry()
2905 memcpy(&cur_if->assoc_info, assoc_info, sizeof(wlcfg_assoc_info_t)); in wl_ext_set_connect_retry()
2913 wl_timer_mod(dhd, &cur_if->reconnect_timer, max_wait_time); in wl_ext_set_connect_retry()
3113 struct wl_if_info *cur_if) in wl_ext_wait_netif_change() argument
3117 wl_get_isam_status(cur_if, IF_READY), in wl_ext_wait_netif_change()
3124 struct wl_if_info *cur_if, int iftype, u8 *addr) in wl_ext_interface_create() argument
3128 wl_set_isam_status(cur_if, IF_ADDING); in wl_ext_interface_create()
3133 wl_ext_wait_netif_change(apsta_params, cur_if); in wl_ext_interface_create()
3141 struct wl_if_info *cur_if; in wl_ext_iapsta_intf_add() local
3150 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3151 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3156 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3157 wl_set_isam_status(cur_if, IF_ADDING); in wl_ext_iapsta_intf_add()
3160 wl_ext_wait_netif_change(apsta_params, cur_if); in wl_ext_iapsta_intf_add()
3163 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3166 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_STA, in wl_ext_iapsta_intf_add()
3170 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3171 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3176 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3181 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, in wl_ext_iapsta_intf_add()
3183 cur_if = &apsta_params->if_info[IF_VIF2]; in wl_ext_iapsta_intf_add()
3188 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, in wl_ext_iapsta_intf_add()
3193 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3194 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_STA, NULL); in wl_ext_iapsta_intf_add()
3197 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3198 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3201 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3202 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3203 cur_if = &apsta_params->if_info[IF_VIF2]; in wl_ext_iapsta_intf_add()
3204 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_STA, NULL); in wl_ext_iapsta_intf_add()
3207 cur_if = &apsta_params->if_info[IF_VIF]; in wl_ext_iapsta_intf_add()
3208 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3209 cur_if = &apsta_params->if_info[IF_VIF2]; in wl_ext_iapsta_intf_add()
3210 wl_ext_interface_create(dev, apsta_params, cur_if, WL_INTERFACE_TYPE_AP, NULL); in wl_ext_iapsta_intf_add()
3221 struct wl_if_info *cur_if = NULL; in wl_ext_update_conn_state() local
3227 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_update_conn_state()
3231 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_ext_update_conn_state()
3232 if (wl_ext_sta_connecting(cur_if->dev) || in wl_ext_update_conn_state()
3237 IAPSTA_INFO(cur_if->dev->name, "skip update %d\n", conn_state); in wl_ext_update_conn_state()
3250 wl_ext_calc_eapol_intvl(struct wl_if_info *cur_if, bool rx) in wl_ext_calc_eapol_intvl() argument
3255 if (rx && cur_if->pend_eapol_pkt && !cur_if->eapol_retry) { in wl_ext_calc_eapol_intvl()
3257 diff_ms = osl_do_gettimediff(&cur_ts, &cur_if->eapol_tx_ts)/1000; in wl_ext_calc_eapol_intvl()
3260 if (diff_ms > cur_if->eapol_max_intvl) in wl_ext_calc_eapol_intvl()
3261 cur_if->eapol_max_intvl = diff_ms; in wl_ext_calc_eapol_intvl()
3262 if (!cur_if->eapol_cnt || diff_ms < cur_if->eapol_min_intvl || in wl_ext_calc_eapol_intvl()
3263 cur_if->eapol_min_intvl == 0) in wl_ext_calc_eapol_intvl()
3264 cur_if->eapol_min_intvl = diff_ms; in wl_ext_calc_eapol_intvl()
3266 if (cur_if->eapol_cnt) in wl_ext_calc_eapol_intvl()
3267 cur_if->eapol_avg_intvl = in wl_ext_calc_eapol_intvl()
3268 (cur_if->eapol_avg_intvl * cur_if->eapol_cnt + diff_ms) / in wl_ext_calc_eapol_intvl()
3269 (cur_if->eapol_cnt+1); in wl_ext_calc_eapol_intvl()
3271 cur_if->eapol_avg_intvl = (diff_ms + STA_EAPOL_TIMEOUT) / 2; in wl_ext_calc_eapol_intvl()
3272 cur_if->eapol_cnt++; in wl_ext_calc_eapol_intvl()
3274 if (cur_if->eapol_avg_intvl <= (cur_if->eapol_min_intvl + 2) || in wl_ext_calc_eapol_intvl()
3275 cur_if->eapol_avg_intvl <= 10) { in wl_ext_calc_eapol_intvl()
3276 cur_if->eapol_avg_intvl = (cur_if->eapol_max_intvl+STA_EAPOL_TIMEOUT)/2; in wl_ext_calc_eapol_intvl()
3277 cur_if->eapol_cnt = 1; in wl_ext_calc_eapol_intvl()
3284 wl_ext_free_eapol_txpkt(struct wl_if_info *cur_if, bool rx) in wl_ext_free_eapol_txpkt() argument
3286 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_free_eapol_txpkt()
3291 wl_timer_mod(dhd, &cur_if->eapol_timer, 0); in wl_ext_free_eapol_txpkt()
3293 if (cur_if->pend_eapol_pkt) { in wl_ext_free_eapol_txpkt()
3294 PKTCFREE(dhd->osh, cur_if->pend_eapol_pkt, TRUE); in wl_ext_free_eapol_txpkt()
3295 cur_if->pend_eapol_pkt = NULL; in wl_ext_free_eapol_txpkt()
3296 IAPSTA_TRACE(cur_if->dev->name, "release eapol pkt\n"); in wl_ext_free_eapol_txpkt()
3304 struct wl_if_info *cur_if = NULL; in wl_ext_release_eapol_txpkt() local
3308 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_release_eapol_txpkt()
3311 wl_ext_calc_eapol_intvl(cur_if, rx); in wl_ext_release_eapol_txpkt()
3313 cur_if->eapol_retry = FALSE; in wl_ext_release_eapol_txpkt()
3315 wl_ext_free_eapol_txpkt(cur_if, rx); in wl_ext_release_eapol_txpkt()
3324 struct wl_if_info *cur_if = NULL; in wl_ext_backup_eapol_txpkt() local
3329 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_backup_eapol_txpkt()
3330 if (cur_if->dev && cur_if->ifmode == ISTA_MODE && in wl_ext_backup_eapol_txpkt()
3331 wl_ext_sta_connecting(cur_if->dev)) { in wl_ext_backup_eapol_txpkt()
3333 wl_ext_free_eapol_txpkt(cur_if, TRUE); in wl_ext_backup_eapol_txpkt()
3334 cur_if->pend_eapol_pkt = skb_copy(pkt, GFP_ATOMIC); in wl_ext_backup_eapol_txpkt()
3335 if (cur_if->pend_eapol_pkt) { in wl_ext_backup_eapol_txpkt()
3337 osl_do_gettimeofday(&cur_if->eapol_tx_ts); in wl_ext_backup_eapol_txpkt()
3338 if (cur_if->eapol_retry) in wl_ext_backup_eapol_txpkt()
3339 interval = cur_if->eapol_max_intvl; in wl_ext_backup_eapol_txpkt()
3341 interval = (cur_if->eapol_avg_intvl + cur_if->eapol_max_intvl) / 2; in wl_ext_backup_eapol_txpkt()
3343 cur_if->eapol_avg_intvl = (cur_if->eapol_max_intvl+STA_EAPOL_TIMEOUT)/2; in wl_ext_backup_eapol_txpkt()
3344 cur_if->eapol_cnt = 1; in wl_ext_backup_eapol_txpkt()
3346 cur_if->eapol_resend_intvl = interval; in wl_ext_backup_eapol_txpkt()
3350 wl_timer_mod(dhd, &cur_if->eapol_timer, interval); in wl_ext_backup_eapol_txpkt()
3351 IAPSTA_TRACE(cur_if->dev->name, "backup eapol pkt\n"); in wl_ext_backup_eapol_txpkt()
3359 wl_resend_eapol_handler(struct wl_if_info *cur_if, in wl_resend_eapol_handler() argument
3362 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_resend_eapol_handler()
3364 struct net_device *dev = cur_if->dev; in wl_resend_eapol_handler()
3373 if (cur_if->pend_eapol_pkt && wl_ext_sta_connecting(cur_if->dev)) { in wl_resend_eapol_handler()
3374 pend_eapol_pkt = skb_copy(cur_if->pend_eapol_pkt, GFP_ATOMIC); in wl_resend_eapol_handler()
3377 cur_if->eapol_retry = TRUE; in wl_resend_eapol_handler()
3379 cur_if->eapol_resend_intvl, in wl_resend_eapol_handler()
3380 cur_if->eapol_min_intvl, cur_if->eapol_avg_intvl, in wl_resend_eapol_handler()
3381 cur_if->eapol_max_intvl, STA_EAPOL_TIMEOUT, in wl_resend_eapol_handler()
3382 cur_if->eapol_cnt); in wl_resend_eapol_handler()
3391 dhd_sendpkt(dhd, cur_if->ifidx, pend_eapol_pkt); in wl_resend_eapol_handler()
3445 wl_ext_key_install_handler(struct wl_if_info *cur_if, in wl_ext_key_install_handler() argument
3448 struct net_device *dev = cur_if->dev; in wl_ext_key_install_handler()
3456 if (cur_if->conn_state >= CONN_STATE_4WAY_M4 && in wl_ext_key_install_handler()
3461 cur_if->key_install_cnt++; in wl_ext_key_install_handler()
3462 if (cur_if->key_install_cnt > STA_KEY_INSTALL_MAX) { in wl_ext_key_install_handler()
3465 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_key_install_handler()
3467 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTED); in wl_ext_key_install_handler()
3468 wl_ext_ioctl(cur_if->dev, WLC_DISASSOC, NULL, 0, 1); in wl_ext_key_install_handler()
3469 wl_timer_mod(dhd, &cur_if->key_install_timer, 0); in wl_ext_key_install_handler()
3470 cur_if->key_install_cnt = 0; in wl_ext_key_install_handler()
3473 STA_KEY_INSTALL_INTERVAL, cur_if->key_install_cnt); in wl_ext_key_install_handler()
3474 wl_timer_mod(dhd, &cur_if->key_install_timer, STA_KEY_INSTALL_INTERVAL); in wl_ext_key_install_handler()
3478 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_key_install_handler()
3481 wl_timer_mod(dhd, &cur_if->connect_timer, 0); in wl_ext_key_install_handler()
3482 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTED); in wl_ext_key_install_handler()
3483 cur_if->key_install_cnt = 0; in wl_ext_key_install_handler()
3491 wl_key_installed(struct wl_if_info *cur_if) in wl_key_installed() argument
3493 struct net_device *dev = cur_if->dev; in wl_key_installed()
3505 wl_timer_mod(dhd, &cur_if->key_install_timer, 0); in wl_key_installed()
3508 wl_timer_mod(dhd, &cur_if->key_install_timer, STA_KEY_INSTALL_INTERVAL); in wl_key_installed()
3614 wl_ext_scan_busy(dhd_pub_t *dhd, struct wl_if_info *cur_if) in wl_ext_scan_busy() argument
3631 IAPSTA_INFO(cur_if->dev->name, "reset scan_busy_cnt\n"); in wl_ext_scan_busy()
3638 IAPSTA_INFO(cur_if->dev->name, in wl_ext_scan_busy()
3667 wl_ext_net_setcarrier(struct wl_if_info *cur_if, bool on, bool force) in wl_ext_net_setcarrier() argument
3669 IAPSTA_TRACE(cur_if->ifname, "carrier=%d\n", on); in wl_ext_net_setcarrier()
3671 if (!netif_carrier_ok(cur_if->dev) || force) in wl_ext_net_setcarrier()
3672 netif_carrier_on(cur_if->dev); in wl_ext_net_setcarrier()
3674 if (netif_carrier_ok(cur_if->dev) || force) in wl_ext_net_setcarrier()
3675 netif_carrier_off(cur_if->dev); in wl_ext_net_setcarrier()
3681 wl_set_btc_in4way(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if, in wl_set_btc_in4way() argument
3684 struct net_device *dev = cur_if->dev; in wl_set_btc_in4way()
3687 if (cur_if->ifidx == 0) { in wl_set_btc_in4way()
3707 wl_wait_disconnect(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if, in wl_wait_disconnect() argument
3710 struct net_device *dev = cur_if->dev; in wl_wait_disconnect()
3711 struct osl_timespec cur_ts, *sta_disc_ts = &cur_if->sta_disc_ts; in wl_wait_disconnect()
3713 int cur_conn_state = cur_if->conn_state; in wl_wait_disconnect()
3737 struct wl_if_info *cur_if; in wl_iapsta_wait_event_complete() local
3741 cur_if = &apsta_params->if_info[i]; in wl_iapsta_wait_event_complete()
3742 if (cur_if->dev && cur_if->ifmode == ISTA_MODE) { in wl_iapsta_wait_event_complete()
3743 wl_ext_wait_event_complete(dhd, cur_if->ifidx); in wl_iapsta_wait_event_complete()
3749 wl_iapsta_suspend_resume_ap(dhd_pub_t *dhd, struct wl_if_info *cur_if, in wl_iapsta_suspend_resume_ap() argument
3757 WL_MSG(cur_if->ifname, "suspend %d\n", suspend); in wl_iapsta_suspend_resume_ap()
3761 cur_if->chan_info.chan = wl_ext_get_chan(cur_if->dev, &cur_if->chan_info); in wl_iapsta_suspend_resume_ap()
3762 if (cur_if->chan_info.chan) in wl_iapsta_suspend_resume_ap()
3763 wl_ext_if_down(apsta_params, cur_if); in wl_iapsta_suspend_resume_ap()
3767 if (cur_if->chan_info.chan) in wl_iapsta_suspend_resume_ap()
3768 wl_ext_if_up(apsta_params, cur_if, FALSE, 0); in wl_iapsta_suspend_resume_ap()
3779 struct wl_if_info *cur_if; in wl_iapsta_suspend_resume() local
3788 cur_if = &apsta_params->if_info[i]; in wl_iapsta_suspend_resume()
3789 if (cur_if->dev && cur_if->ifmode == ISTA_MODE) { in wl_iapsta_suspend_resume()
3791 memcpy(&dhd->conf->bssid_insuspend, &cur_if->bssid, ETHER_ADDR_LEN); in wl_iapsta_suspend_resume()
3792 dhd_conf_suspend_resume_sta(dhd, cur_if->ifidx, suspend); in wl_iapsta_suspend_resume()
3794 memcpy(&cur_if->bssid, &dhd->conf->bssid_insuspend, ETHER_ADDR_LEN); in wl_iapsta_suspend_resume()
3796 else if (cur_if->dev && cur_if->ifmode == IAP_MODE) { in wl_iapsta_suspend_resume()
3797 wl_iapsta_suspend_resume_ap(dhd, cur_if, suspend); in wl_iapsta_suspend_resume()
3810 wl_ext_in4way_sync_sta(dhd_pub_t *dhd, struct wl_if_info *cur_if, in wl_ext_in4way_sync_sta() argument
3815 struct net_device *dev = cur_if->dev; in wl_ext_in4way_sync_sta()
3816 struct osl_timespec cur_ts, *sta_disc_ts = &cur_if->sta_disc_ts; in wl_ext_in4way_sync_sta()
3817 struct osl_timespec *sta_conn_ts = &cur_if->sta_conn_ts; in wl_ext_in4way_sync_sta()
3832 cur_conn_state = cur_if->conn_state; in wl_ext_in4way_sync_sta()
3861 ret = wl_ext_scan_busy(dhd, cur_if); in wl_ext_in4way_sync_sta()
3885 (cur_if->empty_scan >= STA_EMPTY_SCAN_MAX)) { in wl_ext_in4way_sync_sta()
3886 cur_if->empty_scan = 0; in wl_ext_in4way_sync_sta()
3899 cur_if->empty_scan++; in wl_ext_in4way_sync_sta()
3900 if ((assoc && cur_if->empty_scan >= STA_EMPTY_SCAN_MAX) || in wl_ext_in4way_sync_sta()
3906 wl_ext_ioctl(cur_if->dev, WLC_DISASSOC, NULL, 0, 1); in wl_ext_in4way_sync_sta()
3915 cur_if->empty_scan = 0; in wl_ext_in4way_sync_sta()
3921 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_in4way_sync_sta()
3924 wl_timer_mod(dhd, &cur_if->key_install_timer, 0); in wl_ext_in4way_sync_sta()
3926 wl_timer_mod(dhd, &cur_if->connect_timer, 0); in wl_ext_in4way_sync_sta()
3928 wl_timer_mod(dhd, &cur_if->reconnect_timer, 0); in wl_ext_in4way_sync_sta()
3929 memset(&cur_if->assoc_info, 0, sizeof(wlcfg_assoc_info_t)); in wl_ext_in4way_sync_sta()
3931 cur_if->sta_disc_recon_cnt = 0; in wl_ext_in4way_sync_sta()
3941 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_IDLE); in wl_ext_in4way_sync_sta()
3944 wl_set_btc_in4way(apsta_params, cur_if, status, FALSE); in wl_ext_in4way_sync_sta()
3947 wl_ext_btc_config(cur_if->dev, FALSE); in wl_ext_in4way_sync_sta()
3950 wl_wait_disconnect(apsta_params, cur_if, status); in wl_ext_in4way_sync_sta()
3960 cur_if->sta_disc_recon_cnt = 0; in wl_ext_in4way_sync_sta()
3963 wl_timer_mod(dhd, &cur_if->connect_timer, STA_CONNECT_TIMEOUT); in wl_ext_in4way_sync_sta()
3965 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTING); in wl_ext_in4way_sync_sta()
3967 wl_set_btc_in4way(apsta_params, cur_if, status, TRUE); in wl_ext_in4way_sync_sta()
3973 wl_timer_mod(dhd, &cur_if->connect_timer, 0); in wl_ext_in4way_sync_sta()
3974 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTED); in wl_ext_in4way_sync_sta()
3976 wl_ext_btc_config(cur_if->dev, TRUE); in wl_ext_in4way_sync_sta()
3984 wl_timer_mod(dhd, &cur_if->reconnect_timer, max_wait_time); in wl_ext_in4way_sync_sta()
3986 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_in4way_sync_sta()
3987 dhd_conf_set_wme(dhd, cur_if->ifidx, 0); in wl_ext_in4way_sync_sta()
3990 else if (cur_if->ifmode == IGC_MODE) { in wl_ext_in4way_sync_sta()
3997 wl_timer_mod(dhd, &cur_if->connect_timer, STA_CONNECT_TIMEOUT); in wl_ext_in4way_sync_sta()
3999 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_CONNECTING); in wl_ext_in4way_sync_sta()
4001 wl_ext_btc_config(cur_if->dev, TRUE); in wl_ext_in4way_sync_sta()
4009 wl_timer_mod(dhd, &cur_if->reconnect_timer, max_wait_time); in wl_ext_in4way_sync_sta()
4012 wl_timer_mod(dhd, &cur_if->key_install_timer, 0); in wl_ext_in4way_sync_sta()
4014 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_in4way_sync_sta()
4015 dhd_conf_set_wme(dhd, cur_if->ifidx, 0); in wl_ext_in4way_sync_sta()
4021 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_in4way_sync_sta()
4031 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_in4way_sync_sta()
4034 wl_timer_mod(dhd, &cur_if->key_install_timer, 0); in wl_ext_in4way_sync_sta()
4037 wl_timer_mod(dhd, &cur_if->reconnect_timer, 0); in wl_ext_in4way_sync_sta()
4038 memset(&cur_if->assoc_info, 0, sizeof(wlcfg_assoc_info_t)); in wl_ext_in4way_sync_sta()
4040 cur_if->sta_disc_recon_cnt = 0; in wl_ext_in4way_sync_sta()
4050 wl_timer_mod(dhd, &cur_if->connect_timer, 0); in wl_ext_in4way_sync_sta()
4054 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_IDLE); in wl_ext_in4way_sync_sta()
4056 wl_set_btc_in4way(apsta_params, cur_if, status, FALSE); in wl_ext_in4way_sync_sta()
4059 wl_ext_btc_config(cur_if->dev, FALSE); in wl_ext_in4way_sync_sta()
4066 wl_timer_mod(dhd, &cur_if->connect_timer, 0); in wl_ext_in4way_sync_sta()
4068 wl_timer_mod(dhd, &cur_if->reconnect_timer, 0); in wl_ext_in4way_sync_sta()
4071 key_installed = wl_key_installed(cur_if); in wl_ext_in4way_sync_sta()
4075 wl_ext_update_conn_state(dhd, cur_if->ifidx, conn_state); in wl_ext_in4way_sync_sta()
4080 wl_ext_release_eapol_txpkt(dhd, cur_if->ifidx, FALSE); in wl_ext_in4way_sync_sta()
4083 wl_set_btc_in4way(apsta_params, cur_if, status, FALSE); in wl_ext_in4way_sync_sta()
4086 wl_ext_btc_config(cur_if->dev, TRUE); in wl_ext_in4way_sync_sta()
4099 wl_ext_in4way_sync_ap(dhd_pub_t *dhd, struct wl_if_info *cur_if, in wl_ext_in4way_sync_ap() argument
4103 struct net_device *dev = cur_if->dev; in wl_ext_in4way_sync_ap()
4104 struct osl_timespec cur_ts, *ap_disc_sta_ts = &cur_if->ap_disc_sta_ts; in wl_ext_in4way_sync_ap()
4105 u8 *ap_disc_sta_bssid = (u8*)&cur_if->ap_disc_sta_bssid; in wl_ext_in4way_sync_ap()
4126 wl_timer_mod(dhd, &cur_if->restart_ap_timer, AP_RESTART_TIMEOUT); in wl_ext_in4way_sync_ap()
4131 wl_timer_mod(dhd, &cur_if->restart_ap_timer, 0); in wl_ext_in4way_sync_ap()
4133 if (cur_if->ifmode == IAP_MODE) in wl_ext_in4way_sync_ap()
4134 dhd_conf_set_wme(dhd, cur_if->ifidx, 1); in wl_ext_in4way_sync_ap()
4135 else if (cur_if->ifmode == IGO_MODE) in wl_ext_in4way_sync_ap()
4140 wl_timer_mod(dhd, &cur_if->restart_ap_timer, 0); in wl_ext_in4way_sync_ap()
4147 if (cur_if->ifmode == IAP_MODE && in wl_ext_in4way_sync_ap()
4151 } else if (cur_if->ifmode == IGO_MODE && in wl_ext_in4way_sync_ap()
4152 cur_if->conn_state == CONN_STATE_WSC_DONE && in wl_ext_in4way_sync_ap()
4158 status, cur_if->ap_recon_sta, max_wait_time); in wl_ext_in4way_sync_ap()
4160 timeout = wait_event_interruptible_timeout(cur_if->ap_recon_sta_event, in wl_ext_in4way_sync_ap()
4161 cur_if->ap_recon_sta, msecs_to_jiffies(max_wait_time)); in wl_ext_in4way_sync_ap()
4164 status, cur_if->ap_recon_sta, timeout); in wl_ext_in4way_sync_ap()
4172 status, cur_if->ap_recon_sta); in wl_ext_in4way_sync_ap()
4173 cur_if->ap_recon_sta = FALSE; in wl_ext_in4way_sync_ap()
4174 if (cur_if->ifmode == IGO_MODE) in wl_ext_in4way_sync_ap()
4175 wl_ext_update_conn_state(dhd, cur_if->ifidx, CONN_STATE_IDLE); in wl_ext_in4way_sync_ap()
4182 ap_disc_sta_bssid, cur_if->ap_recon_sta); in wl_ext_in4way_sync_ap()
4185 cur_if->ap_recon_sta = FALSE; in wl_ext_in4way_sync_ap()
4195 status, cur_if->ap_recon_sta); in wl_ext_in4way_sync_ap()
4196 cur_if->ap_recon_sta = TRUE; in wl_ext_in4way_sync_ap()
4197 wake_up_interruptible(&cur_if->ap_recon_sta_event); in wl_ext_in4way_sync_ap()
4199 cur_if->ap_recon_sta = FALSE; in wl_ext_in4way_sync_ap()
4216 struct wl_if_info *cur_if = NULL; in wl_ext_in4way_sync() local
4220 cur_if = wl_get_cur_if(dev); in wl_ext_in4way_sync()
4221 if (cur_if) { in wl_ext_in4way_sync()
4222 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) in wl_ext_in4way_sync()
4223 ret = wl_ext_in4way_sync_sta(dhd, cur_if, action, status, context); in wl_ext_in4way_sync()
4224 else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IGO_MODE) in wl_ext_in4way_sync()
4225 ret = wl_ext_in4way_sync_ap(dhd, cur_if, action, status, context); in wl_ext_in4way_sync()
4227 IAPSTA_INFO(dev->name, "Unknown mode %d\n", cur_if->ifmode); in wl_ext_in4way_sync()
4239 struct wl_if_info *cur_if = NULL; in wl_ext_update_extsae_4way() local
4244 cur_if = wl_get_cur_if(dev); in wl_ext_update_extsae_4way()
4245 if (!cur_if) in wl_ext_update_extsae_4way()
4252 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_ext_update_extsae_4way()
4264 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IGO_MODE) { in wl_ext_update_extsae_4way()
4286 wl_ext_update_conn_state(dhd, cur_if->ifidx, conn_state); in wl_ext_update_extsae_4way()
4314 struct wl_if_info *cur_if = NULL; in wl_ext_in4way_sync_wext() local
4322 cur_if = wl_get_cur_if(dev); in wl_ext_in4way_sync_wext()
4323 if (cur_if && cur_if->ifmode == ISTA_MODE) { in wl_ext_in4way_sync_wext()
4329 ret = wl_ext_in4way_sync_sta(dhd, cur_if, 0, status, NULL); in wl_ext_in4way_sync_wext()
4533 struct wl_if_info *cur_if = NULL; in wl_phy_rssi_ant() local
4539 cur_if = wl_get_cur_if(dev); in wl_phy_rssi_ant()
4540 if (!cur_if) in wl_phy_rssi_ant()
4550 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_phy_rssi_ant()
4619 wl_cur_if_tput_dump(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_cur_if_tput_dump() argument
4631 wl_tput_dump(apsta_params, cur_if->dev, &cur_if->tput_info); in wl_cur_if_tput_dump()
4633 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_cur_if_tput_dump()
4634 wldev_ioctl(cur_if->dev, WLC_GET_BSSID, &bssid, sizeof(bssid), 0); in wl_cur_if_tput_dump()
4636 wl_sta_info_dump(cur_if->dev, &bssid); in wl_cur_if_tput_dump()
4639 else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IGO_MODE) { in wl_cur_if_tput_dump()
4646 ret = wl_ext_ioctl(cur_if->dev, WLC_GET_ASSOCLIST, assoc_maclist, sizeof(mac_buf), 0); in wl_cur_if_tput_dump()
4651 wl_sta_info_dump(cur_if->dev, &assoc_maclist->ea[i]); in wl_cur_if_tput_dump()
4656 if (dwds_if->dev && cur_if->bssidx == dwds_if->bssidx) { in wl_cur_if_tput_dump()
4707 wl_tput_monitor_handler(struct wl_if_info *cur_if, in wl_tput_monitor_handler() argument
4710 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_tput_monitor_handler()
4769 wl_btc_dump(cur_if->dev); in wl_tput_monitor_handler()
4770 wl_tvpm_dump(cur_if->dev); in wl_tput_monitor_handler()
4771 wl_ampdu_dump(cur_if->dev); in wl_tput_monitor_handler()
4786 else if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_tput_monitor_handler()
4790 } else if (!wl_ext_iapsta_other_if_enabled(cur_if->dev)) { in wl_tput_monitor_handler()
4795 else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IGO_MODE) { in wl_tput_monitor_handler()
4803 if (!wl_ext_iapsta_other_if_enabled(cur_if->dev)) { in wl_tput_monitor_handler()
4817 struct wl_if_info *cur_if) in wl_ext_max_prio_if() argument
4828 max_prio = cur_if->prio; in wl_ext_max_prio_if()
4831 if (cur_if != tmp_if && wl_get_isam_status(tmp_if, IF_READY) && in wl_ext_max_prio_if()
4843 wl_ext_acs_scan(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_ext_acs_scan() argument
4846 if (wl_ext_associated(cur_if->dev)) { in wl_ext_acs_scan()
4848 cur_if->escan->autochannel = 1; in wl_ext_acs_scan()
4849 cur_scan_time = wl_ext_set_scan_time(cur_if->dev, 80, in wl_ext_acs_scan()
4851 WL_MSG(cur_if->dev->name, "ACS_SCAN\n"); in wl_ext_acs_scan()
4852 wl_ext_drv_scan(cur_if->dev, WLC_BAND_AUTO, FALSE); in wl_ext_acs_scan()
4854 ret = wl_ext_ioctl(cur_if->dev, WLC_SET_SCAN_CHANNEL_TIME, in wl_ext_acs_scan()
4862 wl_ext_acs(struct wl_apsta_params *apsta_params, struct wl_if_info *cur_if) in wl_ext_acs() argument
4869 wl_ext_get_chan(cur_if->dev, &chan_info); in wl_ext_acs()
4872 cur_if->chan_info.chan = cur_if->escan->best_5g_ch; in wl_ext_acs()
4874 cur_if->chan_info.chan = cur_if->escan->best_2g_ch; in wl_ext_acs()
4875 wl_ext_move_cur_channel(apsta_params, cur_if); in wl_ext_acs()
4876 if (!wl_ext_same_chan(&cur_if->chan_info, &chan_info)) { in wl_ext_acs()
4877 WL_MSG(cur_if->dev->name, "move channel %s-%d => %s-%d\n", in wl_ext_acs()
4879 WLCBAND2STR(cur_if->chan_info.band), cur_if->chan_info.chan); in wl_ext_acs()
4880 wl_ext_if_down(apsta_params, cur_if); in wl_ext_acs()
4881 wl_ext_move_other_channel(apsta_params, cur_if); in wl_ext_acs()
4882 wl_ext_if_up(apsta_params, cur_if, FALSE, 500); in wl_ext_acs()
4913 wl_acs_handler(struct wl_if_info *cur_if, const wl_event_msg_t *e, void *data) in wl_acs_handler() argument
4915 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_acs_handler()
4922 if (wl_get_isam_status(cur_if, AP_CREATED)) { in wl_acs_handler()
4927 wl_timer_mod(dhd, &cur_if->acs_timer, acs_tmo*1000); in wl_acs_handler()
4933 wl_timer_mod(dhd, &cur_if->acs_timer, 0); in wl_acs_handler()
4934 cur_if->escan->autochannel = 0; in wl_acs_handler()
4939 wl_timer_mod(dhd, &cur_if->acs_timer, 0); in wl_acs_handler()
4945 wl_timer_mod(dhd, &cur_if->acs_timer, acs_tmo*1000); in wl_acs_handler()
4949 if (!wl_ext_assoclist_num(cur_if->dev) && in wl_acs_handler()
4950 !wl_ext_max_prio_if(apsta_params, cur_if)) { in wl_acs_handler()
4951 wl_ext_acs_scan(apsta_params, cur_if); in wl_acs_handler()
4952 wl_timer_mod(dhd, &cur_if->acs_timer, acs_tmo*1000); in wl_acs_handler()
4954 wl_timer_mod(dhd, &cur_if->acs_timer, 0); in wl_acs_handler()
4963 cur_if->escan->autochannel = 0; in wl_acs_handler()
4964 if (!wl_ext_assoclist_num(cur_if->dev) && in wl_acs_handler()
4965 !wl_ext_max_prio_if(apsta_params, cur_if)) { in wl_acs_handler()
4966 wl_ext_acs(apsta_params, cur_if); in wl_acs_handler()
4968 wl_timer_mod(dhd, &cur_if->acs_timer, 0); in wl_acs_handler()
4975 wl_acs_detach(struct wl_if_info *cur_if) in wl_acs_detach() argument
4977 IAPSTA_TRACE(cur_if->dev->name, "Enter\n"); in wl_acs_detach()
4978 wl_timer_deregister(cur_if->dev, &cur_if->acs_timer); in wl_acs_detach()
4979 if (cur_if->escan) { in wl_acs_detach()
4980 cur_if->escan = NULL; in wl_acs_detach()
4985 wl_acs_attach(dhd_pub_t *dhd, struct wl_if_info *cur_if) in wl_acs_attach() argument
4987 IAPSTA_TRACE(cur_if->dev->name, "Enter\n"); in wl_acs_attach()
4988 cur_if->escan = dhd->escan; in wl_acs_attach()
4989 wl_timer_register(cur_if->dev, &cur_if->acs_timer, wl_acs_timer); in wl_acs_attach()
5018 wl_ext_restart_ap_handler(struct wl_if_info *cur_if, in wl_ext_restart_ap_handler() argument
5021 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_restart_ap_handler()
5027 if (!wl_get_isam_status(cur_if, AP_CREATED)) { in wl_ext_restart_ap_handler()
5028 if (!wl_ext_associated(cur_if->dev)) { in wl_ext_restart_ap_handler()
5029 WL_MSG(cur_if->ifname, "restart AP\n"); in wl_ext_restart_ap_handler()
5030 wl_ext_if_down(apsta_params, cur_if); in wl_ext_restart_ap_handler()
5031 wl_ext_if_up(apsta_params, cur_if, FALSE, 1); in wl_ext_restart_ap_handler()
5032 wl_timer_mod(dhd, &cur_if->restart_ap_timer, AP_RESTART_TIMEOUT); in wl_ext_restart_ap_handler()
5034 WL_MSG(cur_if->ifname, "skip restart AP\n"); in wl_ext_restart_ap_handler()
5046 struct wl_if_info *cur_if = ctx; in wl_ext_counters_cbfn() local
5047 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_counters_cbfn()
5060 cur_if->txbcnfrm = dtoh32(cnt->txbcnfrm); in wl_ext_counters_cbfn()
5074 IAPSTA_ERROR(cur_if->ifname, in wl_ext_counters_cbfn()
5080 cur_if->txbcnfrm = dtoh32(cnt->txbcnfrm); in wl_ext_counters_cbfn()
5094 IAPSTA_ERROR(cur_if->ifname, in wl_ext_counters_cbfn()
5100 cur_if->txbcnfrm = dtoh32(cnt->txbcnfrm); in wl_ext_counters_cbfn()
5117 wl_ext_counters_update(struct wl_if_info *cur_if, int war_reason) in wl_ext_counters_update() argument
5119 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_counters_update()
5127 ret = wldev_iovar_getbuf(cur_if->dev, "counters", NULL, 0, in wl_ext_counters_update()
5130 IAPSTA_ERROR(cur_if->ifname, in wl_ext_counters_update()
5140 IAPSTA_ERROR(cur_if->ifname, in wl_ext_counters_update()
5149 ret = wl_ext_ioctl(cur_if->dev, WLC_GET_REVINFO, &revinfo, sizeof(revinfo), 0); in wl_ext_counters_update()
5151 IAPSTA_ERROR(cur_if->ifname, "WLC_GET_REVINFO failed %d\n", ret); in wl_ext_counters_update()
5158 IAPSTA_ERROR(cur_if->ifname, "wl_cntbuf_to_xtlv_format failed %d\n", ret); in wl_ext_counters_update()
5163 if ((ret = bcm_unpack_xtlv_buf(cur_if, cntinfo->data, cntinfo->datalen, in wl_ext_counters_update()
5165 IAPSTA_ERROR(cur_if->ifname, "bcm_unpack_xtlv_buf failed %d\n", ret); in wl_ext_counters_update()
5199 wl_ext_reset_ap_handler(struct wl_if_info *cur_if, in wl_ext_reset_ap_handler() argument
5202 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_reset_ap_handler()
5210 if (wl_get_isam_status(cur_if, AP_CREATED)) { in wl_ext_reset_ap_handler()
5215 wl_ext_counters_update(cur_if, ISAM_RC_AP_RESET); in wl_ext_reset_ap_handler()
5216 wl_timer_mod(dhd, &cur_if->reset_ap_timer, AP_TXBCNFRM_TIMEOUT); in wl_ext_reset_ap_handler()
5219 txbcnfrm = cur_if->txbcnfrm; in wl_ext_reset_ap_handler()
5220 ret = wl_ext_counters_update(cur_if, ISAM_RC_AP_RESET); in wl_ext_reset_ap_handler()
5223 if ((cur_if->txbcnfrm != 0) && (txbcnfrm == cur_if->txbcnfrm)) { in wl_ext_reset_ap_handler()
5224 WL_MSG(cur_if->ifname, "reset AP mode\n"); in wl_ext_reset_ap_handler()
5225 wl_ext_if_down(apsta_params, cur_if); in wl_ext_reset_ap_handler()
5226 wl_ext_if_up(apsta_params, cur_if, FALSE, 500); in wl_ext_reset_ap_handler()
5229 wl_timer_mod(dhd, &cur_if->reset_ap_timer, AP_TXBCNFRM_TIMEOUT); in wl_ext_reset_ap_handler()
5261 wl_ext_rxf0ovfl_reinit_handler(struct wl_if_info *cur_if, const wl_event_msg_t *e, void *data) in wl_ext_rxf0ovfl_reinit_handler() argument
5263 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_rxf0ovfl_reinit_handler()
5273 if ((cur_if->ifmode == ISTA_MODE) && in wl_ext_rxf0ovfl_reinit_handler()
5276 wl_ext_counters_update(cur_if, ISAM_RC_RXF0OVFL_REINIT); in wl_ext_rxf0ovfl_reinit_handler()
5279 else if ((cur_if->ifmode == IAP_MODE) && in wl_ext_rxf0ovfl_reinit_handler()
5284 wl_ext_counters_update(cur_if, ISAM_RC_RXF0OVFL_REINIT); in wl_ext_rxf0ovfl_reinit_handler()
5288 (wl_ext_iapsta_other_if_enabled(cur_if->dev))) { in wl_ext_rxf0ovfl_reinit_handler()
5291 wl_ext_counters_update(cur_if, ISAM_RC_RXF0OVFL_REINIT); in wl_ext_rxf0ovfl_reinit_handler()
5297 IAPSTA_INFO(cur_if->ifname, in wl_ext_rxf0ovfl_reinit_handler()
5310 WL_MSG(cur_if->ifname, "wl reinit\n"); in wl_ext_rxf0ovfl_reinit_handler()
5311 wl_ext_ioctl(cur_if->dev, WLC_INIT, NULL, 0, 1); in wl_ext_rxf0ovfl_reinit_handler()
5322 wl_ext_iapsta_link(struct wl_if_info *cur_if, in wl_ext_iapsta_link() argument
5325 struct dhd_pub *dhd = dhd_get_pub(cur_if->dev); in wl_ext_iapsta_link()
5332 if (cur_if->ifmode == ISTA_MODE || cur_if->ifmode == IGC_MODE) { in wl_ext_iapsta_link()
5335 WL_MSG(cur_if->ifname, in wl_ext_iapsta_link()
5337 cur_if->prefix, &e->addr, bcmevent_get_name(event_type), in wl_ext_iapsta_link()
5340 wl_ext_net_setcarrier(cur_if, FALSE, FALSE); in wl_ext_iapsta_link()
5342 wl_clr_isam_status(cur_if, STA_CONNECTED); in wl_ext_iapsta_link()
5344 WL_MSG(cur_if->ifname, "[%c] Link UP with %pM\n", in wl_ext_iapsta_link()
5345 cur_if->prefix, &e->addr); in wl_ext_iapsta_link()
5347 wl_ext_net_setcarrier(cur_if, TRUE, FALSE); in wl_ext_iapsta_link()
5349 wl_set_isam_status(cur_if, STA_CONNECTED); in wl_ext_iapsta_link()
5351 wl_clr_isam_status(cur_if, STA_CONNECTING); in wl_ext_iapsta_link()
5358 WL_MSG(cur_if->ifname, in wl_ext_iapsta_link()
5361 wl_clr_isam_status(cur_if, STA_CONNECTING); in wl_ext_iapsta_link()
5369 WL_MSG(cur_if->ifname, "[%c] Link down with %pM, %s(%d), reason %d\n", in wl_ext_iapsta_link()
5370 cur_if->prefix, &e->addr, bcmevent_get_name(event_type), in wl_ext_iapsta_link()
5373 wl_ext_net_setcarrier(cur_if, FALSE, FALSE); in wl_ext_iapsta_link()
5377 else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IGO_MODE || in wl_ext_iapsta_link()
5378 cur_if->ifmode == IMESH_MODE) { in wl_ext_iapsta_link()
5382 if (wl_get_isam_status(cur_if, AP_CREATING)) { in wl_ext_iapsta_link()
5383 WL_MSG(cur_if->ifname, "[%c] Link up (etype=%d)\n", in wl_ext_iapsta_link()
5384 cur_if->prefix, event_type); in wl_ext_iapsta_link()
5385 wl_set_isam_status(cur_if, AP_CREATED); in wl_ext_iapsta_link()
5388 wl_set_isam_status(cur_if, AP_CREATED); in wl_ext_iapsta_link()
5389 WL_MSG(cur_if->ifname, "[%c] Link up w/o creating? (etype=%d)\n", in wl_ext_iapsta_link()
5390 cur_if->prefix, event_type); in wl_ext_iapsta_link()
5393 wl_ext_net_setcarrier(cur_if, TRUE, FALSE); in wl_ext_iapsta_link()
5402 wl_clr_isam_status(cur_if, AP_CREATED); in wl_ext_iapsta_link()
5403 WL_MSG(cur_if->ifname, "[%c] Link down, reason=%d\n", in wl_ext_iapsta_link()
5404 cur_if->prefix, reason); in wl_ext_iapsta_link()
5406 wl_ext_net_setcarrier(cur_if, FALSE, FALSE); in wl_ext_iapsta_link()
5414 WL_MSG(cur_if->ifname, "[%c] connected device %pM\n", in wl_ext_iapsta_link()
5415 cur_if->prefix, &e->addr); in wl_ext_iapsta_link()
5416 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_iapsta_link()
5421 WL_MSG_RLMT(cur_if->ifname, &e->addr, ETHER_ADDR_LEN, in wl_ext_iapsta_link()
5423 cur_if->prefix, &e->addr, bcmevent_get_name(event_type), in wl_ext_iapsta_link()
5425 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_iapsta_link()
5438 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_event() local
5440 cur_if = wl_get_cur_if(dev); in wl_ext_iapsta_event()
5441 if (!cur_if || !cur_if->dev) { in wl_ext_iapsta_event()
5446 wl_ext_iapsta_link(cur_if, e, data); in wl_ext_iapsta_event()
5449 wl_tput_monitor_handler(cur_if, e, data); in wl_ext_iapsta_event()
5453 wl_mesh_event_handler(cur_if, e, data); in wl_ext_iapsta_event()
5457 wl_acs_handler(cur_if, e, data); in wl_ext_iapsta_event()
5460 wl_resend_eapol_handler(cur_if, e, data); in wl_ext_iapsta_event()
5463 wl_ext_key_install_handler(cur_if, e, data); in wl_ext_iapsta_event()
5466 wl_ext_restart_ap_handler(cur_if, e, data); in wl_ext_iapsta_event()
5469 wl_ext_reset_ap_handler(cur_if, e, data); in wl_ext_iapsta_event()
5472 wl_ext_rxf0ovfl_reinit_handler(cur_if, e, data); in wl_ext_iapsta_event()
5479 wl_ext_parse_config(struct wl_if_info *cur_if, char *command, char **pick_next) in wl_ext_parse_config() argument
5577 memset(cur_if->ssid, 0, sizeof(cur_if->ssid)); in wl_ext_parse_config()
5579 strncpy(cur_if->ssid, &pick_tmp[1], len-2); in wl_ext_parse_config()
5581 strcpy(cur_if->ssid, pick_tmp); in wl_ext_parse_config()
5585 ((u8 *)&cur_if->bssid)[j] = (int)simple_strtol(pch, NULL, 16); in wl_ext_parse_config()
5590 cur_if->bgnmode = IEEE80211B; in wl_ext_parse_config()
5592 cur_if->bgnmode = IEEE80211G; in wl_ext_parse_config()
5594 cur_if->bgnmode = IEEE80211BG; in wl_ext_parse_config()
5596 cur_if->bgnmode = IEEE80211BGN; in wl_ext_parse_config()
5598 cur_if->bgnmode = IEEE80211BGNAC; in wl_ext_parse_config()
5600 IAPSTA_ERROR(cur_if->dev->name, "bgnmode [b|g|bg|bgn|bgnac]\n"); in wl_ext_parse_config()
5605 cur_if->hidden = 0; in wl_ext_parse_config()
5607 cur_if->hidden = 1; in wl_ext_parse_config()
5609 IAPSTA_ERROR(cur_if->dev->name, "hidden [y|n]\n"); in wl_ext_parse_config()
5613 cur_if->maxassoc = (int)simple_strtol(pick_tmp, NULL, 10); in wl_ext_parse_config()
5616 cur_if->amode = WLC_BAND_2G; in wl_ext_parse_config()
5618 cur_if->amode = WLC_BAND_5G; in wl_ext_parse_config()
5621 cur_if->amode = WLC_BAND_6G; in wl_ext_parse_config()
5624 IAPSTA_ERROR(cur_if->dev->name, "band [2g|5g|6g]\n"); in wl_ext_parse_config()
5628 cur_if->chan_info.chan = (int)simple_strtol(pick_tmp, NULL, 10); in wl_ext_parse_config()
5629 if (!cur_if->chan_info.band) in wl_ext_parse_config()
5630 cur_if->chan_info.band = WL_GET_BAND(cur_if->chan_info.chan); in wl_ext_parse_config()
5633 cur_if->amode = AUTH_OPEN; in wl_ext_parse_config()
5635 cur_if->amode = AUTH_SHARED; in wl_ext_parse_config()
5637 cur_if->amode = AUTH_WPAPSK; in wl_ext_parse_config()
5639 cur_if->amode = AUTH_WPA2PSK; in wl_ext_parse_config()
5641 cur_if->amode = AUTH_WPAWPA2PSK; in wl_ext_parse_config()
5643 cur_if->amode = AUTH_SAE; in wl_ext_parse_config()
5645 IAPSTA_ERROR(cur_if->dev->name, "amode [open|shared|wpapsk|wpa2psk|wpawpa2psk]\n"); in wl_ext_parse_config()
5650 cur_if->emode = ENC_NONE; in wl_ext_parse_config()
5652 cur_if->emode = ENC_WEP; in wl_ext_parse_config()
5654 cur_if->emode = ENC_TKIP; in wl_ext_parse_config()
5656 cur_if->emode = ENC_AES; in wl_ext_parse_config()
5658 cur_if->emode = ENC_TKIPAES; in wl_ext_parse_config()
5660 IAPSTA_ERROR(cur_if->dev->name, "emode [none|wep|tkip|aes|tkipaes]\n"); in wl_ext_parse_config()
5665 memset(cur_if->key, 0, sizeof(cur_if->key)); in wl_ext_parse_config()
5667 strncpy(cur_if->key, &pick_tmp[1], len-2); in wl_ext_parse_config()
5669 strcpy(cur_if->key, pick_tmp); in wl_ext_parse_config()
5683 struct wl_if_info *cur_if; in wl_ext_iapsta_preinit() local
5691 cur_if = &apsta_params->if_info[i]; in wl_ext_iapsta_preinit()
5692 if (i >= 1 && !strlen(cur_if->ifname)) in wl_ext_iapsta_preinit()
5693 snprintf(cur_if->ifname, IFNAMSIZ, "wlan%d", i); in wl_ext_iapsta_preinit()
5694 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_iapsta_preinit()
5695 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 0); in wl_ext_iapsta_preinit()
5696 cur_if->maxassoc = -1; in wl_ext_iapsta_preinit()
5697 cur_if->prio = PRIO_STA; in wl_ext_iapsta_preinit()
5698 cur_if->vsdb = TRUE; in wl_ext_iapsta_preinit()
5699 cur_if->prefix = 'S'; in wl_ext_iapsta_preinit()
5700 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_sta"); in wl_ext_iapsta_preinit()
5701 } else if (cur_if->ifmode == IAP_MODE) { in wl_ext_iapsta_preinit()
5702 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 1); in wl_ext_iapsta_preinit()
5703 cur_if->maxassoc = -1; in wl_ext_iapsta_preinit()
5704 cur_if->prio = PRIO_AP; in wl_ext_iapsta_preinit()
5705 cur_if->vsdb = FALSE; in wl_ext_iapsta_preinit()
5706 cur_if->prefix = 'A'; in wl_ext_iapsta_preinit()
5707 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_ap"); in wl_ext_iapsta_preinit()
5709 } else if (cur_if->ifmode == IMESH_MODE) { in wl_ext_iapsta_preinit()
5710 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 1); in wl_ext_iapsta_preinit()
5711 cur_if->maxassoc = -1; in wl_ext_iapsta_preinit()
5712 cur_if->prio = PRIO_MESH; in wl_ext_iapsta_preinit()
5713 cur_if->vsdb = FALSE; in wl_ext_iapsta_preinit()
5714 cur_if->prefix = 'M'; in wl_ext_iapsta_preinit()
5715 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_mesh"); in wl_ext_iapsta_preinit()
5842 struct wl_if_info *cur_if = NULL, *tmp_if = NULL; in wl_ext_disable_iface() local
5847 cur_if = tmp_if; in wl_ext_disable_iface()
5851 if (!cur_if) { in wl_ext_disable_iface()
5857 WL_MSG(ifname, "[%c] Disabling...\n", cur_if->prefix); in wl_ext_disable_iface()
5859 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_disable_iface()
5860 wl_ext_ioctl(cur_if->dev, WLC_DISASSOC, NULL, 0, 1); in wl_ext_disable_iface()
5862 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_disable_iface()
5865 wl_ext_ioctl(cur_if->dev, WLC_SCB_DEAUTHENTICATE, &scbval.ea, ETHER_ADDR_LEN, 1); in wl_ext_disable_iface()
5873 cur_if->ifmode == IAP_MODE) { in wl_ext_disable_iface()
5876 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, sizeof(bss_setbuf), in wl_ext_disable_iface()
5899 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, sizeof(bss_setbuf), in wl_ext_disable_iface()
5906 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, sizeof(bss_setbuf), in wl_ext_disable_iface()
5908 if (cur_if->ifmode == IMESH_MODE) { in wl_ext_disable_iface()
5921 wl_clr_isam_status(cur_if, AP_CREATED); in wl_ext_disable_iface()
5923 WL_MSG(ifname, "[%c] Exit\n", cur_if->prefix); in wl_ext_disable_iface()
5942 struct wl_if_info *cur_if = NULL, *tmp_if = NULL; in wl_ext_enable_iface() local
5950 cur_if = tmp_if; in wl_ext_enable_iface()
5954 if (!cur_if) { in wl_ext_enable_iface()
5962 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
5963 wl_set_isam_status(cur_if, STA_CONNECTING); in wl_ext_enable_iface()
5964 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
5965 wl_set_isam_status(cur_if, AP_CREATING); in wl_ext_enable_iface()
5968 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_enable_iface()
5969 WL_MSG(ifname, "[%c] Enabling...\n", cur_if->prefix); in wl_ext_enable_iface()
5971 wl_ext_wait_other_enabling(apsta_params, cur_if); in wl_ext_enable_iface()
5973 if (wl_ext_master_if(cur_if) && apsta_params->acs) { in wl_ext_enable_iface()
5975 wl_ext_get_default_chan(cur_if->dev, &chan_2g, &chan_5g, TRUE); in wl_ext_enable_iface()
5976 if ((chan_2g && cur_if->chan_info.band == WLC_BAND_2G) || in wl_ext_enable_iface()
5977 (chan_5g && cur_if->chan_info.band == WLC_BAND_5G)) { in wl_ext_enable_iface()
5978 cur_if->chan_info.chan = wl_ext_autochannel(cur_if->dev, apsta_params->acs, in wl_ext_enable_iface()
5979 cur_if->chan_info.band); in wl_ext_enable_iface()
5980 cur_if->chan_info.chan = wf_chspec_ctlchan(cur_if->chan_info.chan); in wl_ext_enable_iface()
5988 wl_ext_move_cur_channel(apsta_params, cur_if); in wl_ext_enable_iface()
5990 if (wl_ext_master_if(cur_if) && !cur_if->chan_info.chan) { in wl_ext_enable_iface()
5997 wl_ext_get_chan(cur_if->dev, &chan_info); in wl_ext_enable_iface()
5999 IAPSTA_INFO(cur_if->ifname, "Associated\n"); in wl_ext_enable_iface()
6000 if (!wl_ext_same_chan(&cur_if->chan_info, &chan_info)) { in wl_ext_enable_iface()
6001 wl_ext_trigger_csa(apsta_params, cur_if); in wl_ext_enable_iface()
6005 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
6006 wl_clr_isam_status(cur_if, STA_CONNECTED); in wl_ext_enable_iface()
6007 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
6008 wl_clr_isam_status(cur_if, AP_CREATED); in wl_ext_enable_iface()
6011 wl_ext_move_other_channel(apsta_params, cur_if); in wl_ext_enable_iface()
6013 if (cur_if->ifidx > 0) { in wl_ext_enable_iface()
6014 wl_ext_iovar_setbuf(cur_if->dev, "cur_etheraddr", (u8 *)cur_if->dev->dev_addr, in wl_ext_enable_iface()
6019 ssid.SSID_len = strlen(cur_if->ssid); in wl_ext_enable_iface()
6020 memcpy(ssid.SSID, cur_if->ssid, ssid.SSID_len); in wl_ext_enable_iface()
6021 if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
6026 wl_ext_iovar_setbuf_bsscfg(cur_if->dev, "ssid", &ssid, sizeof(ssid), in wl_ext_enable_iface()
6027 iovar_buf, WLC_IOCTL_SMLEN, cur_if->bssidx, NULL); in wl_ext_enable_iface()
6031 if (wl_ext_master_if(cur_if)) { in wl_ext_enable_iface()
6032 wl_ext_set_bgnmode(cur_if); in wl_ext_enable_iface()
6033 if (!cur_if->chan_info.chan) { in wl_ext_enable_iface()
6034 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 1); in wl_ext_enable_iface()
6036 ret = wl_ext_set_chanspec(cur_if->dev, &cur_if->chan_info, &fw_chspec); in wl_ext_enable_iface()
6041 wl_ext_set_amode(cur_if); in wl_ext_enable_iface()
6042 wl_ext_set_emode(cur_if); in wl_ext_enable_iface()
6044 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
6045 conn_info.bssidx = cur_if->bssidx; in wl_ext_enable_iface()
6046 conn_info.channel = cur_if->chan_info.chan; in wl_ext_enable_iface()
6047 memcpy(conn_info.ssid.SSID, cur_if->ssid, strlen(cur_if->ssid)); in wl_ext_enable_iface()
6048 conn_info.ssid.SSID_len = strlen(cur_if->ssid); in wl_ext_enable_iface()
6049 memcpy(&conn_info.bssid, &cur_if->bssid, ETHER_ADDR_LEN); in wl_ext_enable_iface()
6051 if (cur_if->ifmode == IAP_MODE) { in wl_ext_enable_iface()
6052 if (cur_if->maxassoc >= 0) in wl_ext_enable_iface()
6053 wl_ext_iovar_setint(dev, "maxassoc", cur_if->maxassoc); in wl_ext_enable_iface()
6055 if (cur_if->hidden > 0) { in wl_ext_enable_iface()
6056 wl_ext_ioctl(cur_if->dev, WLC_SET_CLOSED, &cur_if->hidden, in wl_ext_enable_iface()
6057 sizeof(cur_if->hidden), 1); in wl_ext_enable_iface()
6059 cur_if->prefix, cur_if->hidden ? "OFF":"ON"); in wl_ext_enable_iface()
6064 wl_ext_connect(cur_if->dev, &conn_info); in wl_ext_enable_iface()
6066 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &ssid, sizeof(ssid), 1); in wl_ext_enable_iface()
6069 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
6070 wl_ext_connect(cur_if->dev, &conn_info); in wl_ext_enable_iface()
6073 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &ssid, sizeof(ssid), 1); in wl_ext_enable_iface()
6075 bss_setbuf.cfg = htod32(cur_if->bssidx); in wl_ext_enable_iface()
6077 wl_ext_iovar_setbuf(cur_if->dev, "bss", &bss_setbuf, in wl_ext_enable_iface()
6100 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &ssid, sizeof(ssid), 1); in wl_ext_enable_iface()
6102 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
6103 wl_ext_connect(cur_if->dev, &conn_info); in wl_ext_enable_iface()
6104 } else if (cur_if->ifmode == IAP_MODE) { in wl_ext_enable_iface()
6105 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &ssid, sizeof(ssid), 1); in wl_ext_enable_iface()
6107 IAPSTA_ERROR(cur_if->ifname, "wrong ifmode %d\n", cur_if->ifmode); in wl_ext_enable_iface()
6113 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_enable_iface()
6114 wl_ext_connect(cur_if->dev, &conn_info); in wl_ext_enable_iface()
6115 } else if (cur_if->ifmode == IAP_MODE) { in wl_ext_enable_iface()
6116 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &ssid, sizeof(ssid), 1); in wl_ext_enable_iface()
6117 } else if (cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
6121 join_params.ssid.SSID_len = strlen(cur_if->ssid); in wl_ext_enable_iface()
6122 memcpy((void *)join_params.ssid.SSID, cur_if->ssid, strlen(cur_if->ssid)); in wl_ext_enable_iface()
6125 wl_ext_ioctl(cur_if->dev, WLC_SET_SSID, &join_params, sizeof(join_params), 1); in wl_ext_enable_iface()
6127 IAPSTA_ERROR(cur_if->ifname, "wrong ifmode %d\n", cur_if->ifmode); in wl_ext_enable_iface()
6134 } else if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
6136 wl_get_isam_status(cur_if, AP_CREATED), in wl_ext_enable_iface()
6138 if (timeout <= 0 || !wl_get_isam_status(cur_if, AP_CREATED)) { in wl_ext_enable_iface()
6141 wl_ext_disable_iface(dev, cur_if->ifname); in wl_ext_enable_iface()
6143 cur_if->prefix, cur_if->ssid); in wl_ext_enable_iface()
6148 if (wl_get_isam_status(cur_if, AP_CREATED) && in wl_ext_enable_iface()
6149 (cur_if->ifmode == IMESH_MODE || cur_if->ifmode == IAP_MODE) && in wl_ext_enable_iface()
6153 wl_ext_set_scan_time(cur_if->dev, 80, in wl_ext_enable_iface()
6157 wl_ext_isam_status(cur_if->dev, NULL, 0); in wl_ext_enable_iface()
6160 if (cur_if->ifmode == IAP_MODE || cur_if->ifmode == IMESH_MODE) { in wl_ext_enable_iface()
6161 wl_clr_isam_status(cur_if, AP_CREATING); in wl_ext_enable_iface()
6163 WL_MSG(ifname, "[%c] Exit ret=%d\n", cur_if->prefix, ret); in wl_ext_enable_iface()
6226 struct wl_if_info *cur_if = NULL; in wl_ext_isam_status() local
6247 cur_if = &apsta_params->if_info[i]; in wl_ext_isam_status()
6248 if (cur_if->dev) { in wl_ext_isam_status()
6249 dump_written += wl_ext_isam_dev_status(cur_if->dev, in wl_ext_isam_status()
6250 cur_if->ifmode, cur_if->prefix, in wl_ext_isam_status()
6254 if (cur_if->ifmode == IAP_MODE) { in wl_ext_isam_status()
6302 struct wl_if_info *cur_if = NULL; in wl_ext_isam_param() local
6304 cur_if = wl_get_cur_if(dev); in wl_ext_isam_param()
6305 if (!cur_if) in wl_ext_isam_param()
6311 wl_timer_mod(dhd, &cur_if->acs_timer, 0); in wl_ext_isam_param()
6399 struct wl_if_info *cur_if = NULL, *tmp_if = NULL; in wl_ext_iapsta_config() local
6428 cur_if = tmp_if; in wl_ext_iapsta_config()
6432 if (!cur_if) { in wl_ext_iapsta_config()
6438 ret = wl_ext_parse_config(cur_if, pick_tmp, &pick_next); in wl_ext_iapsta_config()
6612 struct wl_if_info *cur_if; in wl_ext_iapsta_alive_postinit() local
6631 cur_if = &apsta_params->if_info[i]; in wl_ext_iapsta_alive_postinit()
6632 if (i == 1 && !strlen(cur_if->ifname)) in wl_ext_iapsta_alive_postinit()
6633 strcpy(cur_if->ifname, "wlan1"); in wl_ext_iapsta_alive_postinit()
6634 if (i == 2 && !strlen(cur_if->ifname)) in wl_ext_iapsta_alive_postinit()
6635 strcpy(cur_if->ifname, "wlan2"); in wl_ext_iapsta_alive_postinit()
6636 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_iapsta_alive_postinit()
6637 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 0); in wl_ext_iapsta_alive_postinit()
6638 cur_if->maxassoc = -1; in wl_ext_iapsta_alive_postinit()
6639 wl_set_isam_status(cur_if, IF_READY); in wl_ext_iapsta_alive_postinit()
6640 cur_if->prio = PRIO_STA; in wl_ext_iapsta_alive_postinit()
6641 cur_if->vsdb = TRUE; in wl_ext_iapsta_alive_postinit()
6642 cur_if->prefix = 'S'; in wl_ext_iapsta_alive_postinit()
6643 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_sta"); in wl_ext_iapsta_alive_postinit()
6645 else if (cur_if->ifmode == IAP_MODE) { in wl_ext_iapsta_alive_postinit()
6646 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 1); in wl_ext_iapsta_alive_postinit()
6647 cur_if->maxassoc = -1; in wl_ext_iapsta_alive_postinit()
6648 wl_set_isam_status(cur_if, IF_READY); in wl_ext_iapsta_alive_postinit()
6649 cur_if->prio = PRIO_AP; in wl_ext_iapsta_alive_postinit()
6650 cur_if->vsdb = FALSE; in wl_ext_iapsta_alive_postinit()
6651 cur_if->prefix = 'A'; in wl_ext_iapsta_alive_postinit()
6652 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_ap"); in wl_ext_iapsta_alive_postinit()
6655 else if (cur_if->ifmode == IMESH_MODE) { in wl_ext_iapsta_alive_postinit()
6656 wl_ext_set_chan_info(cur_if, WLC_BAND_2G, 1); in wl_ext_iapsta_alive_postinit()
6657 cur_if->maxassoc = -1; in wl_ext_iapsta_alive_postinit()
6658 wl_set_isam_status(cur_if, IF_READY); in wl_ext_iapsta_alive_postinit()
6659 cur_if->prio = PRIO_MESH; in wl_ext_iapsta_alive_postinit()
6660 cur_if->vsdb = FALSE; in wl_ext_iapsta_alive_postinit()
6661 cur_if->prefix = 'M'; in wl_ext_iapsta_alive_postinit()
6662 snprintf(cur_if->ssid, DOT11_MAX_SSID_LEN, "ttt_mesh"); in wl_ext_iapsta_alive_postinit()
6698 wl_ext_iapsta_postinit(struct net_device *net, struct wl_if_info *cur_if) in wl_ext_iapsta_postinit() argument
6704 IAPSTA_TRACE(cur_if->ifname, "ifidx=%d\n", cur_if->ifidx); in wl_ext_iapsta_postinit()
6705 if (cur_if->ifidx == 0) { in wl_ext_iapsta_postinit()
6714 cur_if->ifmode = ISTA_MODE; in wl_ext_iapsta_postinit()
6715 cur_if->prio = PRIO_STA; in wl_ext_iapsta_postinit()
6716 cur_if->vsdb = TRUE; in wl_ext_iapsta_postinit()
6717 cur_if->prefix = 'S'; in wl_ext_iapsta_postinit()
6721 if (cur_if->ifmode == ISTA_MODE) { in wl_ext_iapsta_postinit()
6722 wl_ext_iovar_setint(cur_if->dev, "roam_off", dhd->conf->roam_off); in wl_ext_iapsta_postinit()
6723 wl_ext_iovar_setint(cur_if->dev, "bcn_timeout", dhd->conf->bcn_timeout); in wl_ext_iapsta_postinit()
6728 wl_ext_ioctl(cur_if->dev, WLC_SET_PM, &pm, sizeof(pm), 1); in wl_ext_iapsta_postinit()
6729 wl_ext_iovar_setint(cur_if->dev, "assoc_retry_max", 10); in wl_ext_iapsta_postinit()
6732 else if (cur_if->ifmode == IMESH_MODE) { in wl_ext_iapsta_postinit()
6734 wl_ext_ioctl(cur_if->dev, WLC_SET_PM, &pm, sizeof(pm), 1); in wl_ext_iapsta_postinit()
6761 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_attach_name() local
6765 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_attach_name()
6768 strcpy(cur_if->ifname, net->name); in wl_ext_iapsta_attach_name()
6769 wl_ext_iapsta_postinit(net, cur_if); in wl_ext_iapsta_attach_name()
6770 wl_set_isam_status(cur_if, IF_READY); in wl_ext_iapsta_attach_name()
6771 } else if (cur_if && wl_get_isam_status(cur_if, IF_ADDING)) { in wl_ext_iapsta_attach_name()
6772 strcpy(cur_if->ifname, net->name); in wl_ext_iapsta_attach_name()
6773 wl_ext_iapsta_postinit(net, cur_if); in wl_ext_iapsta_attach_name()
6774 wl_clr_isam_status(cur_if, IF_ADDING); in wl_ext_iapsta_attach_name()
6775 wl_set_isam_status(cur_if, IF_READY); in wl_ext_iapsta_attach_name()
6789 struct wl_if_info *cur_if = NULL, *primary_if; in wl_ext_iapsta_update_net_device() local
6793 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_update_net_device()
6795 if (cur_if && wl_get_isam_status(cur_if, IF_ADDING)) { in wl_ext_iapsta_update_net_device()
6797 if (strlen(cur_if->ifname)) { in wl_ext_iapsta_update_net_device()
6799 strcpy(net->name, cur_if->ifname); in wl_ext_iapsta_update_net_device()
6824 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_attach_dwds_netdev() local
6828 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_attach_dwds_netdev()
6829 if (cur_if->bssidx == bssidx) { in wl_ext_iapsta_attach_dwds_netdev()
6834 if (cur_if) { in wl_ext_iapsta_attach_dwds_netdev()
6854 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_dettach_dwds_netdev() local
6858 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_dettach_dwds_netdev()
6859 if (cur_if->bssidx == bssidx) { in wl_ext_iapsta_dettach_dwds_netdev()
6864 if (cur_if) { in wl_ext_iapsta_dettach_dwds_netdev()
6918 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_attach_netdev() local
6922 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_attach_netdev()
6927 strcpy(cur_if->ifname, net->name); in wl_ext_iapsta_attach_netdev()
6936 if (ifidx == 0 || (cur_if && wl_get_isam_status(cur_if, IF_ADDING))) { in wl_ext_iapsta_attach_netdev()
6937 cur_if->dev = net; in wl_ext_iapsta_attach_netdev()
6938 cur_if->ifidx = ifidx; in wl_ext_iapsta_attach_netdev()
6939 cur_if->bssidx = bssidx; in wl_ext_iapsta_attach_netdev()
6940 mutex_init(&cur_if->pm_sync); in wl_ext_iapsta_attach_netdev()
6941 INIT_DELAYED_WORK(&cur_if->pm_enable_work, wl_ext_pm_work_handler); in wl_ext_iapsta_attach_netdev()
6942 init_waitqueue_head(&cur_if->ap_recon_sta_event); in wl_ext_iapsta_attach_netdev()
6946 wl_mesh_escan_attach(dhd, cur_if); in wl_ext_iapsta_attach_netdev()
6949 wl_acs_attach(dhd, cur_if); in wl_ext_iapsta_attach_netdev()
6952 wl_ext_net_setcarrier(cur_if, FALSE, TRUE); in wl_ext_iapsta_attach_netdev()
6954 wl_timer_register(net, &cur_if->connect_timer, wl_ext_connect_timeout); in wl_ext_iapsta_attach_netdev()
6956 wl_timer_register(net, &cur_if->reconnect_timer, wl_ext_reconnect_timeout); in wl_ext_iapsta_attach_netdev()
6959 wl_timer_register(net, &cur_if->restart_ap_timer, wl_ext_restart_ap_timeout); in wl_ext_iapsta_attach_netdev()
6962 wl_timer_register(net, &cur_if->reset_ap_timer, wl_ext_reset_ap_timeout); in wl_ext_iapsta_attach_netdev()
6965 wl_timer_register(net, &cur_if->eapol_timer, wl_eapol_timer); in wl_ext_iapsta_attach_netdev()
6968 wl_timer_register(net, &cur_if->key_install_timer, wl_ext_key_install_timeout); in wl_ext_iapsta_attach_netdev()
6980 struct wl_if_info *cur_if = NULL; in wl_ext_iapsta_dettach_netdev() local
6987 cur_if = &apsta_params->if_info[ifidx]; in wl_ext_iapsta_dettach_netdev()
6990 if (ifidx == 0 || (cur_if && (wl_get_isam_status(cur_if, IF_READY) || in wl_ext_iapsta_dettach_netdev()
6991 wl_get_isam_status(cur_if, IF_ADDING)))) { in wl_ext_iapsta_dettach_netdev()
6996 wl_timer_deregister(net, &cur_if->key_install_timer); in wl_ext_iapsta_dettach_netdev()
6998 wl_timer_deregister(net, &cur_if->connect_timer); in wl_ext_iapsta_dettach_netdev()
7000 wl_timer_deregister(net, &cur_if->reconnect_timer); in wl_ext_iapsta_dettach_netdev()
7003 wl_timer_deregister(net, &cur_if->restart_ap_timer); in wl_ext_iapsta_dettach_netdev()
7006 wl_timer_deregister(net, &cur_if->reset_ap_timer); in wl_ext_iapsta_dettach_netdev()
7009 wl_ext_net_setcarrier(cur_if, FALSE, FALSE); in wl_ext_iapsta_dettach_netdev()
7013 wl_acs_detach(cur_if); in wl_ext_iapsta_dettach_netdev()
7016 wl_mesh_escan_detach(dhd, cur_if); in wl_ext_iapsta_dettach_netdev()
7022 memset(cur_if, 0, sizeof(struct wl_if_info)); in wl_ext_iapsta_dettach_netdev()