Lines Matching refs:ifp
472 send_key_to_dongle(struct brcmf_if *ifp, struct brcmf_wsec_key *key) in send_key_to_dongle() argument
474 struct brcmf_pub *drvr = ifp->drvr; in send_key_to_dongle()
480 brcmf_netdev_wait_pend8021x(ifp); in send_key_to_dongle()
482 err = brcmf_fil_bsscfg_data_set(ifp, "wsec_key", &key_le, in send_key_to_dongle()
494 struct brcmf_if *ifp; in brcmf_cfg80211_update_proto_addr_mode() local
497 ifp = vif->ifp; in brcmf_cfg80211_update_proto_addr_mode()
502 brcmf_proto_configure_addr_mode(ifp->drvr, ifp->ifidx, in brcmf_cfg80211_update_proto_addr_mode()
505 brcmf_proto_configure_addr_mode(ifp->drvr, ifp->ifidx, in brcmf_cfg80211_update_proto_addr_mode()
524 static int brcmf_cfg80211_request_ap_if(struct brcmf_if *ifp) in brcmf_cfg80211_request_ap_if() argument
526 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_request_ap_if()
532 bsscfgidx = brcmf_get_first_free_bsscfgidx(ifp->drvr); in brcmf_cfg80211_request_ap_if()
540 err = brcmf_fil_bsscfg_data_set(ifp, "bsscfg:ssid", &mbss_ssid_le, in brcmf_cfg80211_request_ap_if()
560 struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); in brcmf_ap_add_vif() local
576 err = brcmf_cfg80211_request_ap_if(ifp); in brcmf_ap_add_vif()
593 ifp = vif->ifp; in brcmf_ap_add_vif()
594 if (!ifp) { in brcmf_ap_add_vif()
600 strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1); in brcmf_ap_add_vif()
601 err = brcmf_net_attach(ifp, true); in brcmf_ap_add_vif()
604 free_netdev(ifp->ndev); in brcmf_ap_add_vif()
608 return &ifp->vif->wdev; in brcmf_ap_add_vif()
640 struct brcmf_if *ifp; in brcmf_mon_add_vif() local
654 ndev = alloc_netdev(sizeof(*ifp), name, NET_NAME_UNKNOWN, ether_setup); in brcmf_mon_add_vif()
665 ifp = netdev_priv(ndev); in brcmf_mon_add_vif()
666 ifp->vif = vif; in brcmf_mon_add_vif()
667 ifp->ndev = ndev; in brcmf_mon_add_vif()
668 ifp->drvr = cfg->pub; in brcmf_mon_add_vif()
670 vif->ifp = ifp; in brcmf_mon_add_vif()
673 err = brcmf_net_mon_attach(ifp); in brcmf_mon_add_vif()
680 cfg->pub->mon_if = ifp; in brcmf_mon_add_vif()
752 static void brcmf_scan_config_mpc(struct brcmf_if *ifp, int mpc) in brcmf_scan_config_mpc() argument
754 if (brcmf_feat_is_quirk_enabled(ifp, BRCMF_FEAT_QUIRK_NEED_MPC)) in brcmf_scan_config_mpc()
755 brcmf_set_mpc(ifp, mpc); in brcmf_scan_config_mpc()
758 void brcmf_set_mpc(struct brcmf_if *ifp, int mpc) in brcmf_set_mpc() argument
760 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_mpc()
763 if (check_vif_up(ifp->vif)) { in brcmf_set_mpc()
764 err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc); in brcmf_set_mpc()
774 struct brcmf_if *ifp, bool aborted, in brcmf_notify_escan_complete() argument
809 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, in brcmf_notify_escan_complete()
815 brcmf_scan_config_mpc(ifp, 1); in brcmf_notify_escan_complete()
856 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_ap_iface() local
861 brcmf_cfg80211_arm_vif_event(cfg, ifp->vif); in brcmf_cfg80211_del_ap_iface()
863 err = brcmf_fil_bsscfg_data_set(ifp, "interface_remove", NULL, 0); in brcmf_cfg80211_del_ap_iface()
878 brcmf_remove_interface(ifp, true); in brcmf_cfg80211_del_ap_iface()
900 cfg->escan_info.ifp == netdev_priv(ndev)) in brcmf_cfg80211_del_iface()
935 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_iface() local
936 struct brcmf_cfg80211_vif *vif = ifp->vif; in brcmf_cfg80211_change_iface()
942 brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, type=%d\n", ifp->bsscfgidx, in brcmf_cfg80211_change_iface()
1010 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, infra); in brcmf_cfg80211_change_iface()
1100 brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, in brcmf_run_escan() argument
1130 err = brcmf_fil_iovar_data_set(ifp, "escan", params, params_size); in brcmf_run_escan()
1144 brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request) in brcmf_do_escan() argument
1146 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_do_escan()
1152 escan->ifp = ifp; in brcmf_do_escan()
1156 brcmf_scan_config_mpc(ifp, 0); in brcmf_do_escan()
1162 err = escan->run(cfg, ifp, request); in brcmf_do_escan()
1164 brcmf_scan_config_mpc(ifp, 1); in brcmf_do_escan()
1220 err = brcmf_do_escan(vif->ifp, request); in brcmf_cfg80211_scan()
1239 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_rts() local
1240 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_rts()
1243 err = brcmf_fil_iovar_int_set(ifp, "rtsthresh", rts_threshold); in brcmf_set_rts()
1252 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_frag() local
1253 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_frag()
1256 err = brcmf_fil_iovar_int_set(ifp, "fragthresh", in brcmf_set_frag()
1266 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_retry() local
1267 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_retry()
1271 err = brcmf_fil_cmd_int_set(ifp, cmd, retry); in brcmf_set_retry()
1283 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_wiphy_params() local
1287 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_wiphy_params()
1347 static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len) in brcmf_set_pmk() argument
1349 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_pmk()
1360 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK, in brcmf_set_pmk()
1369 static int brcmf_set_sae_password(struct brcmf_if *ifp, const u8 *pwd_data, in brcmf_set_sae_password() argument
1372 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_sae_password()
1385 err = brcmf_fil_iovar_data_set(ifp, "sae_password", &sae_pwd, in brcmf_set_sae_password()
1407 err = brcmf_fil_cmd_data_set(vif->ifp, in brcmf_link_down()
1424 brcmf_set_pmk(vif->ifp, NULL, 0); in brcmf_link_down()
1435 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_join_ibss() local
1436 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_join_ibss()
1447 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_join_ibss()
1457 set_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_join_ibss()
1500 err = brcmf_fil_iovar_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_join_ibss()
1512 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, bcnprd); in brcmf_cfg80211_join_ibss()
1556 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_CHANNEL, in brcmf_cfg80211_join_ibss()
1568 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_join_ibss()
1577 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_join_ibss()
1585 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_leave_ibss() local
1588 if (!check_vif_up(ifp->vif)) { in brcmf_cfg80211_leave_ibss()
1596 brcmf_link_down(ifp->vif, WLAN_REASON_DEAUTH_LEAVING, true); in brcmf_cfg80211_leave_ibss()
1597 brcmf_net_setcarrier(ifp, false); in brcmf_cfg80211_leave_ibss()
1607 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_wpa_version() local
1609 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_wpa_version()
1623 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", val); in brcmf_set_wpa_version()
1636 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_auth_type() local
1638 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_auth_type()
1662 err = brcmf_fil_bsscfg_int_set(ifp, "auth", val); in brcmf_set_auth_type()
1676 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_wsec_mode() local
1678 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_wsec_mode()
1736 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_set_wsec_mode()
1752 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_key_mgmt() local
1753 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_set_key_mgmt()
1754 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_key_mgmt()
1851 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_set_key_mgmt()
1900 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_sharedkey() local
1901 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_sharedkey()
1950 err = send_key_to_dongle(ifp, &key); in brcmf_set_sharedkey()
1957 err = brcmf_fil_bsscfg_int_set(ifp, "auth", val); in brcmf_set_sharedkey()
1965 enum nl80211_auth_type brcmf_war_auth_type(struct brcmf_if *ifp, in brcmf_war_auth_type() argument
1969 brcmf_feat_is_quirk_enabled(ifp, BRCMF_FEAT_QUIRK_AUTO_AUTH)) { in brcmf_war_auth_type()
1976 static void brcmf_set_join_pref(struct brcmf_if *ifp, in brcmf_set_join_pref() argument
1979 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_join_pref()
1988 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_ASSOC_PREFER, WLC_BAND_AUTO); in brcmf_set_join_pref()
1992 brcmf_c_set_joinpref_default(ifp); in brcmf_set_join_pref()
2015 err = brcmf_fil_iovar_data_set(ifp, "join_pref", join_pref_params, in brcmf_set_join_pref()
2026 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_connect() local
2027 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_connect()
2029 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_connect()
2042 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_connect()
2050 if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif) { in brcmf_cfg80211_connect()
2069 brcmf_fil_iovar_data_set(ifp, "wpaie", ie, ie_len); in brcmf_cfg80211_connect()
2072 err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG, in brcmf_cfg80211_connect()
2079 set_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_connect()
2100 sme->auth_type = brcmf_war_auth_type(ifp, sme->auth_type); in brcmf_cfg80211_connect()
2137 err = brcmf_fil_iovar_int_set(ifp, "sup_wpa", 1); in brcmf_cfg80211_connect()
2145 err = brcmf_set_pmk(ifp, sme->crypto.psk, in brcmf_cfg80211_connect()
2149 err = brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0); in brcmf_cfg80211_connect()
2154 err = brcmf_set_sae_password(ifp, sme->crypto.sae_pwd, in brcmf_cfg80211_connect()
2157 err = brcmf_set_pmk(ifp, sme->crypto.psk, in brcmf_cfg80211_connect()
2217 brcmf_set_join_pref(ifp, &sme->bss_select); in brcmf_cfg80211_connect()
2219 err = brcmf_fil_bsscfg_data_set(ifp, "join", ext_join_params, in brcmf_cfg80211_connect()
2243 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_connect()
2250 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_connect()
2260 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_disconnect() local
2261 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_disconnect()
2267 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_disconnect()
2270 clear_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2271 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2276 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_DISASSOC, in brcmf_cfg80211_disconnect()
2291 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_tx_power() local
2298 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_tx_power()
2323 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_RADIO, disable); in brcmf_cfg80211_set_tx_power()
2327 err = brcmf_fil_iovar_int_set(ifp, "qtxpower", qdbm); in brcmf_cfg80211_set_tx_power()
2350 err = brcmf_fil_iovar_int_get(vif->ifp, "qtxpower", &qdbm); in brcmf_cfg80211_get_tx_power()
2367 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_config_default_key() local
2368 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_config_default_key()
2375 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_config_default_key()
2378 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_config_default_key()
2387 err = brcmf_fil_cmd_int_set(ifp, in brcmf_cfg80211_config_default_key()
2402 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_key() local
2409 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_key()
2417 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_del_key()
2429 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_del_key()
2441 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_add_key() local
2452 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_add_key()
2477 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_add_key()
2510 if (!brcmf_is_apmode(ifp->vif)) { in brcmf_cfg80211_add_key()
2536 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_add_key()
2540 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_add_key()
2546 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_add_key()
2566 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_get_key() local
2567 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_get_key()
2575 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_get_key()
2580 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_get_key()
2619 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_config_default_mgmt_key() local
2623 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_cfg80211_config_default_mgmt_key()
2632 brcmf_cfg80211_reconfigure_wep(struct brcmf_if *ifp) in brcmf_cfg80211_reconfigure_wep() argument
2634 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_reconfigure_wep()
2641 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_reconfigure_wep()
2649 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_reconfigure_wep()
2654 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_reconfigure_wep()
2660 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_reconfigure_wep()
2686 static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) in brcmf_fill_bss_param() argument
2688 struct brcmf_pub *drvr = ifp->drvr; in brcmf_fill_bss_param()
2701 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, buf, in brcmf_fill_bss_param()
2723 brcmf_cfg80211_get_station_ibss(struct brcmf_if *ifp, in brcmf_cfg80211_get_station_ibss() argument
2726 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_get_station_ibss()
2734 err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_RATE, &rate); in brcmf_cfg80211_get_station_ibss()
2743 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI, &scbval, in brcmf_cfg80211_get_station_ibss()
2753 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_GET_PKTCNTS, &pktcnt, in brcmf_cfg80211_get_station_ibss()
2776 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_get_station() local
2790 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_get_station()
2793 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_cfg80211_get_station()
2794 return brcmf_cfg80211_get_station_ibss(ifp, sinfo); in brcmf_cfg80211_get_station()
2798 err = brcmf_fil_iovar_data_get(ifp, "tdls_sta_info", in brcmf_cfg80211_get_station()
2803 err = brcmf_fil_iovar_data_get(ifp, "sta_info", in brcmf_cfg80211_get_station()
2824 brcmf_fill_bss_param(ifp, sinfo); in brcmf_cfg80211_get_station()
2873 &ifp->vif->sme_state)) { in brcmf_cfg80211_get_station()
2875 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI, in brcmf_cfg80211_get_station()
2899 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_dump_station() local
2907 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_ASSOCLIST, in brcmf_cfg80211_dump_station()
2936 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_power_mgmt() local
2949 if (!check_vif_up(ifp->vif)) { in brcmf_cfg80211_set_power_mgmt()
2957 if (ifp->vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) { in brcmf_cfg80211_set_power_mgmt()
2963 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm); in brcmf_cfg80211_set_power_mgmt()
2971 err = brcmf_fil_iovar_int_set(ifp, "pm2_sleep_ret", in brcmf_cfg80211_set_power_mgmt()
3164 struct brcmf_if *ifp) in brcmf_update_bss_info() argument
3171 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_update_bss_info()
3175 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, in brcmf_update_bss_info()
3196 brcmf_notify_escan_complete(cfg, escan->ifp, true, true); in brcmf_abort_scanning()
3209 brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); in brcmf_cfg80211_escan_timeout_worker()
3264 brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, in brcmf_cfg80211_escan_handler() argument
3267 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_escan_handler()
3286 ifp->bsscfgidx); in brcmf_cfg80211_escan_handler()
3367 brcmf_notify_escan_complete(cfg, ifp, aborted, false); in brcmf_cfg80211_escan_handler()
3444 static int brcmf_start_internal_escan(struct brcmf_if *ifp, u32 fwmap, in brcmf_start_internal_escan() argument
3447 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_start_internal_escan()
3461 err = brcmf_do_escan(ifp, request); in brcmf_start_internal_escan()
3499 brcmf_notify_sched_scan_results(struct brcmf_if *ifp, in brcmf_notify_sched_scan_results() argument
3502 struct brcmf_pub *drvr = ifp->drvr; in brcmf_notify_sched_scan_results()
3574 err = brcmf_start_internal_escan(ifp, bucket_map, request); in brcmf_notify_sched_scan_results()
3591 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_sched_scan_start() local
3609 return brcmf_pno_start_sched_scan(ifp, req); in brcmf_cfg80211_sched_scan_start()
3616 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_sched_scan_stop() local
3619 brcmf_pno_stop_sched_scan(ifp, reqid); in brcmf_cfg80211_sched_scan_stop()
3621 brcmf_notify_escan_complete(cfg, ifp, true, true); in brcmf_cfg80211_sched_scan_stop()
3635 static s32 brcmf_config_wowl_pattern(struct brcmf_if *ifp, u8 cmd[4], in brcmf_config_wowl_pattern() argument
3667 ret = brcmf_fil_iovar_data_set(ifp, "wowl_pattern", buf, bufsize); in brcmf_config_wowl_pattern()
3674 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, in brcmf_wowl_nd_results() argument
3677 struct brcmf_pub *drvr = ifp->drvr; in brcmf_wowl_nd_results()
3724 static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_report_wowl_wakeind() argument
3735 err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le, in brcmf_report_wowl_wakeind()
3790 cfg80211_report_wowlan_wakeup(&ifp->vif->wdev, wakeup, GFP_KERNEL); in brcmf_report_wowl_wakeind()
3795 static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_report_wowl_wakeind() argument
3805 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_resume() local
3810 brcmf_report_wowl_wakeind(wiphy, ifp); in brcmf_cfg80211_resume()
3811 brcmf_fil_iovar_int_set(ifp, "wowl_clear", 0); in brcmf_cfg80211_resume()
3812 brcmf_config_wowl_pattern(ifp, "clr", NULL, 0, NULL, 0); in brcmf_cfg80211_resume()
3813 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND)) in brcmf_cfg80211_resume()
3814 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_resume()
3815 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, in brcmf_cfg80211_resume()
3819 brcmf_cfg80211_sched_scan_stop(cfg->wiphy, ifp->ndev, 0); in brcmf_cfg80211_resume()
3830 struct brcmf_if *ifp, in brcmf_configure_wowl() argument
3839 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND)) in brcmf_configure_wowl()
3840 brcmf_configure_arp_nd_offload(ifp, false); in brcmf_configure_wowl()
3841 brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PM, &cfg->wowl.pre_pmmode); in brcmf_configure_wowl()
3842 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, PM_MAX); in brcmf_configure_wowl()
3852 brcmf_config_wowl_pattern(ifp, "add", in brcmf_configure_wowl()
3860 brcmf_cfg80211_sched_scan_start(cfg->wiphy, ifp->ndev, in brcmf_configure_wowl()
3873 if (!test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state)) in brcmf_configure_wowl()
3877 brcmf_fil_iovar_data_set(ifp, "wowl_wakeind", &wowl_wakeind, in brcmf_configure_wowl()
3879 brcmf_fil_iovar_int_set(ifp, "wowl", wowl_config); in brcmf_configure_wowl()
3880 brcmf_fil_iovar_int_set(ifp, "wowl_activate", 1); in brcmf_configure_wowl()
3885 static int brcmf_keepalive_start(struct brcmf_if *ifp, unsigned int interval) in brcmf_keepalive_start() argument
3896 ret = brcmf_fil_iovar_data_set(ifp, "mkeep_alive", &kalive, sizeof(kalive)); in brcmf_keepalive_start()
3908 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_suspend() local
3916 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_suspend()
3920 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) in brcmf_cfg80211_suspend()
3944 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_suspend()
3948 brcmf_configure_wowl(cfg, ifp, wowl); in brcmf_cfg80211_suspend()
3951 brcmf_keepalive_start(ifp, 30); in brcmf_cfg80211_suspend()
3962 brcmf_update_pmklist(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) in brcmf_update_pmklist() argument
3975 return brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_list, in brcmf_update_pmklist()
3984 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_pmksa() local
3991 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_pmksa()
4013 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_set_pmksa()
4024 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_pmksa() local
4031 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_pmksa()
4054 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_del_pmksa()
4065 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_flush_pmksa() local
4069 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_flush_pmksa()
4073 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_flush_pmksa()
4080 static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp) in brcmf_configure_opensecurity() argument
4082 struct brcmf_pub *drvr = ifp->drvr; in brcmf_configure_opensecurity()
4087 err = brcmf_fil_bsscfg_int_set(ifp, "auth", 0); in brcmf_configure_opensecurity()
4093 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", 0); in brcmf_configure_opensecurity()
4099 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_configure_opensecurity()
4103 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val); in brcmf_configure_opensecurity()
4121 brcmf_configure_wpaie(struct brcmf_if *ifp, in brcmf_configure_wpaie() argument
4125 struct brcmf_pub *drvr = ifp->drvr; in brcmf_configure_wpaie()
4307 err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable", in brcmf_configure_wpaie()
4318 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP) && in brcmf_configure_wpaie()
4320 err = brcmf_fil_bsscfg_data_set(ifp, "bip", in brcmf_configure_wpaie()
4333 err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth); in brcmf_configure_wpaie()
4339 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_configure_wpaie()
4347 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) { in brcmf_configure_wpaie()
4348 err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp); in brcmf_configure_wpaie()
4355 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_auth); in brcmf_configure_wpaie()
4440 struct brcmf_if *ifp; in brcmf_vif_set_mgmt_ie() local
4460 ifp = vif->ifp; in brcmf_vif_set_mgmt_ie()
4461 drvr = ifp->drvr; in brcmf_vif_set_mgmt_ie()
4464 brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx, in brcmf_vif_set_mgmt_ie()
4590 err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf, in brcmf_vif_set_mgmt_ie()
4621 struct brcmf_pub *drvr = vif->ifp->drvr; in brcmf_config_ap_mgmt_ie()
4655 brcmf_parse_configure_security(struct brcmf_if *ifp, in brcmf_parse_configure_security() argument
4675 err = brcmf_configure_wpaie(ifp, wpa_ie, false); in brcmf_parse_configure_security()
4684 err = brcmf_configure_wpaie(ifp, tmp_ie, true); in brcmf_parse_configure_security()
4690 brcmf_configure_opensecurity(ifp); in brcmf_parse_configure_security()
4702 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_start_ap() local
4704 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_start_ap()
4725 dev_role = ifp->vif->wdev.iftype; in brcmf_cfg80211_start_ap()
4726 mbss = ifp->vif->mbss; in brcmf_cfg80211_start_ap()
4729 if (brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_REGULATORY, in brcmf_cfg80211_start_ap()
4730 &ifp->vif->is_11d)) { in brcmf_cfg80211_start_ap()
4759 brcmf_set_mpc(ifp, 0); in brcmf_cfg80211_start_ap()
4760 brcmf_configure_arp_nd_offload(ifp, false); in brcmf_cfg80211_start_ap()
4765 if ((supports_11d) && (is_11d != ifp->vif->is_11d)) { in brcmf_cfg80211_start_ap()
4766 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, in brcmf_cfg80211_start_ap()
4775 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, in brcmf_cfg80211_start_ap()
4784 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD, in brcmf_cfg80211_start_ap()
4794 ((ifp->ifidx == 0) || in brcmf_cfg80211_start_ap()
4795 (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB) && in brcmf_cfg80211_start_ap()
4796 !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN)))) { in brcmf_cfg80211_start_ap()
4797 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_start_ap()
4803 brcmf_fil_iovar_int_set(ifp, "apsta", 0); in brcmf_cfg80211_start_ap()
4806 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1); in brcmf_cfg80211_start_ap()
4811 } else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) { in brcmf_cfg80211_start_ap()
4819 if ((brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) && (!mbss)) in brcmf_cfg80211_start_ap()
4820 brcmf_fil_iovar_int_set(ifp, "mbss", 1); in brcmf_cfg80211_start_ap()
4822 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1); in brcmf_cfg80211_start_ap()
4832 err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); in brcmf_cfg80211_start_ap()
4839 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1); in brcmf_cfg80211_start_ap()
4848 err = brcmf_set_pmk(ifp, crypto->psk, in brcmf_cfg80211_start_ap()
4856 err = brcmf_set_sae_password(ifp, crypto->sae_pwd, in brcmf_cfg80211_start_ap()
4864 err = brcmf_parse_configure_security(ifp, settings, in brcmf_cfg80211_start_ap()
4874 brcmf_cfg80211_reconfigure_wep(ifp); in brcmf_cfg80211_start_ap()
4880 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_start_ap()
4887 err = brcmf_fil_iovar_int_set(ifp, "closednet", in brcmf_cfg80211_start_ap()
4899 err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); in brcmf_cfg80211_start_ap()
4906 err = brcmf_parse_configure_security(ifp, settings, in brcmf_cfg80211_start_ap()
4913 err = brcmf_fil_bsscfg_data_set(ifp, "ssid", &ssid_le, in brcmf_cfg80211_start_ap()
4919 bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); in brcmf_cfg80211_start_ap()
4921 err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, in brcmf_cfg80211_start_ap()
4933 brcmf_config_ap_mgmt_ie(ifp->vif, &settings->beacon); in brcmf_cfg80211_start_ap()
4934 set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); in brcmf_cfg80211_start_ap()
4935 brcmf_net_setcarrier(ifp, true); in brcmf_cfg80211_start_ap()
4939 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_start_ap()
4940 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_start_ap()
4949 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_stop_ap() local
4951 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_stop_ap()
4958 if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) { in brcmf_cfg80211_stop_ap()
4965 brcmf_set_pmk(ifp, NULL, 0); in brcmf_cfg80211_stop_ap()
4967 brcmf_set_sae_password(ifp, NULL, 0); in brcmf_cfg80211_stop_ap()
4971 if (ifp->vif->mbss) { in brcmf_cfg80211_stop_ap()
4972 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_stop_ap()
4977 if (ifp->bsscfgidx == 0) in brcmf_cfg80211_stop_ap()
4978 brcmf_fil_iovar_int_set(ifp, "closednet", 0); in brcmf_cfg80211_stop_ap()
4981 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_stop_ap()
4985 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_stop_ap()
4988 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0); in brcmf_cfg80211_stop_ap()
4991 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) in brcmf_cfg80211_stop_ap()
4992 brcmf_fil_iovar_int_set(ifp, "mbss", 0); in brcmf_cfg80211_stop_ap()
4993 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, in brcmf_cfg80211_stop_ap()
4994 ifp->vif->is_11d); in brcmf_cfg80211_stop_ap()
4996 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1); in brcmf_cfg80211_stop_ap()
5000 brcmf_vif_clear_mgmt_ies(ifp->vif); in brcmf_cfg80211_stop_ap()
5002 bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); in brcmf_cfg80211_stop_ap()
5004 err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, in brcmf_cfg80211_stop_ap()
5009 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_stop_ap()
5010 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_stop_ap()
5011 clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); in brcmf_cfg80211_stop_ap()
5012 brcmf_net_setcarrier(ifp, false); in brcmf_cfg80211_stop_ap()
5021 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_beacon() local
5025 return brcmf_config_ap_mgmt_ie(ifp->vif, info); in brcmf_cfg80211_change_beacon()
5035 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_station() local
5043 if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) in brcmf_cfg80211_del_station()
5044 ifp = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; in brcmf_cfg80211_del_station()
5045 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_station()
5050 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON, in brcmf_cfg80211_del_station()
5066 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_station() local
5080 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_AUTHORIZE, in brcmf_cfg80211_change_station()
5083 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE, in brcmf_cfg80211_change_station()
5186 brcmf_fil_cmd_int_get(vif->ifp, BRCMF_C_GET_CHANNEL, in brcmf_cfg80211_mgmt_tx()
5217 struct brcmf_if *ifp; in brcmf_cfg80211_set_cqm_rssi_range_config() local
5222 ifp = netdev_priv(ndev); in brcmf_cfg80211_set_cqm_rssi_range_config()
5223 vif = ifp->vif; in brcmf_cfg80211_set_cqm_rssi_range_config()
5242 err = brcmf_fil_iovar_data_set(ifp, "rssi_event", &config, in brcmf_cfg80211_set_cqm_rssi_range_config()
5273 brcmf_p2p_cancel_remain_on_channel(vif->ifp); in brcmf_cfg80211_cancel_remain_on_channel()
5374 brcmf_notify_tdls_peer_event(struct brcmf_if *ifp, in brcmf_notify_tdls_peer_event() argument
5383 brcmf_proto_add_tdls_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_tdls_peer_event()
5387 brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_tdls_peer_event()
5421 struct brcmf_if *ifp; in brcmf_cfg80211_tdls_oper() local
5429 ifp = netdev_priv(ndev); in brcmf_cfg80211_tdls_oper()
5435 ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint", in brcmf_cfg80211_tdls_oper()
5451 struct brcmf_if *ifp; in brcmf_cfg80211_update_conn_params() local
5457 ifp = netdev_priv(ndev); in brcmf_cfg80211_update_conn_params()
5458 err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG, in brcmf_cfg80211_update_conn_params()
5475 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_rekey_data() local
5479 brcmf_dbg(TRACE, "Enter, bssidx=%d\n", ifp->bsscfgidx); in brcmf_cfg80211_set_rekey_data()
5486 ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", >k_le, in brcmf_cfg80211_set_rekey_data()
5498 struct brcmf_if *ifp; in brcmf_cfg80211_set_pmk() local
5503 ifp = netdev_priv(dev); in brcmf_cfg80211_set_pmk()
5504 if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) in brcmf_cfg80211_set_pmk()
5510 return brcmf_set_pmk(ifp, conf->pmk, conf->pmk_len); in brcmf_cfg80211_set_pmk()
5516 struct brcmf_if *ifp; in brcmf_cfg80211_del_pmk() local
5519 ifp = netdev_priv(dev); in brcmf_cfg80211_del_pmk()
5520 if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) in brcmf_cfg80211_del_pmk()
5523 return brcmf_set_pmk(ifp, NULL, 0); in brcmf_cfg80211_del_pmk()
5594 struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); in brcmf_alloc_vif() local
5608 brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) { in brcmf_alloc_vif()
5632 struct brcmf_if *ifp; in brcmf_cfg80211_free_netdev() local
5634 ifp = netdev_priv(ndev); in brcmf_cfg80211_free_netdev()
5635 vif = ifp->vif; in brcmf_cfg80211_free_netdev()
5866 struct brcmf_if *ifp) in brcmf_get_assoc_ies() argument
5878 err = brcmf_fil_iovar_data_get(ifp, "assoc_info", in brcmf_get_assoc_ies()
5889 err = brcmf_fil_iovar_data_get(ifp, "assoc_req_ies", in brcmf_get_assoc_ies()
5907 err = brcmf_fil_iovar_data_get(ifp, "assoc_resp_ies", in brcmf_get_assoc_ies()
5921 err = brcmf_fil_iovar_data_get(ifp, "wme_ac_sta", in brcmf_get_assoc_ies()
5946 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_bss_roaming_done() local
5947 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_bss_roaming_done()
5961 brcmf_get_assoc_ies(cfg, ifp); in brcmf_bss_roaming_done()
5963 brcmf_update_bss_info(cfg, ifp); in brcmf_bss_roaming_done()
5973 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, in brcmf_bss_roaming_done()
6009 set_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); in brcmf_bss_roaming_done()
6019 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_bss_connect_done() local
6020 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_bss_connect_done()
6027 &ifp->vif->sme_state)) { in brcmf_bss_connect_done()
6030 brcmf_get_assoc_ies(cfg, ifp); in brcmf_bss_connect_done()
6031 brcmf_update_bss_info(cfg, ifp); in brcmf_bss_connect_done()
6033 &ifp->vif->sme_state); in brcmf_bss_connect_done()
6098 brcmf_notify_connect_status(struct brcmf_if *ifp, in brcmf_notify_connect_status() argument
6101 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_connect_status()
6102 struct net_device *ndev = ifp->ndev; in brcmf_notify_connect_status()
6103 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_notify_connect_status()
6111 brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_connect_status()
6114 if (brcmf_is_apmode(ifp->vif)) { in brcmf_notify_connect_status()
6116 } else if (brcmf_is_linkup(ifp->vif, e)) { in brcmf_notify_connect_status()
6118 if (brcmf_is_ibssmode(ifp->vif)) { in brcmf_notify_connect_status()
6124 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6126 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6129 brcmf_net_setcarrier(ifp, true); in brcmf_notify_connect_status()
6130 } else if (brcmf_is_linkdown(ifp->vif, e)) { in brcmf_notify_connect_status()
6132 if (!brcmf_is_ibssmode(ifp->vif) && in brcmf_notify_connect_status()
6134 &ifp->vif->sme_state)) { in brcmf_notify_connect_status()
6139 brcmf_link_down(ifp->vif, in brcmf_notify_connect_status()
6148 brcmf_net_setcarrier(ifp, false); in brcmf_notify_connect_status()
6151 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_notify_connect_status()
6153 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6162 brcmf_notify_roaming_status(struct brcmf_if *ifp, in brcmf_notify_roaming_status() argument
6165 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_roaming_status()
6171 &ifp->vif->sme_state)) { in brcmf_notify_roaming_status()
6172 brcmf_bss_roaming_done(cfg, ifp->ndev, e); in brcmf_notify_roaming_status()
6174 brcmf_bss_connect_done(cfg, ifp->ndev, e, true); in brcmf_notify_roaming_status()
6175 brcmf_net_setcarrier(ifp, true); in brcmf_notify_roaming_status()
6183 brcmf_notify_mic_status(struct brcmf_if *ifp, in brcmf_notify_mic_status() argument
6194 cfg80211_michael_mic_failure(ifp->ndev, (u8 *)&e->addr, key_type, -1, in brcmf_notify_mic_status()
6200 static s32 brcmf_notify_rssi(struct brcmf_if *ifp, in brcmf_notify_rssi() argument
6203 struct brcmf_cfg80211_vif *vif = ifp->vif; in brcmf_notify_rssi()
6228 cfg80211_cqm_rssi_notify(ifp->ndev, in brcmf_notify_rssi()
6233 cfg80211_cqm_rssi_notify(ifp->ndev, in brcmf_notify_rssi()
6241 static s32 brcmf_notify_vif_event(struct brcmf_if *ifp, in brcmf_notify_vif_event() argument
6244 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_vif_event()
6265 ifp->vif = vif; in brcmf_notify_vif_event()
6266 vif->ifp = ifp; in brcmf_notify_vif_event()
6267 if (ifp->ndev) { in brcmf_notify_vif_event()
6268 vif->wdev.netdev = ifp->ndev; in brcmf_notify_vif_event()
6269 ifp->ndev->ieee80211_ptr = &vif->wdev; in brcmf_notify_vif_event()
6270 SET_NETDEV_DEV(ifp->ndev, wiphy_dev(cfg->wiphy)); in brcmf_notify_vif_event()
6417 static s32 brcmf_dongle_roam(struct brcmf_if *ifp) in brcmf_dongle_roam() argument
6419 struct brcmf_pub *drvr = ifp->drvr; in brcmf_dongle_roam()
6426 if (ifp->drvr->settings->roamoff) in brcmf_dongle_roam()
6430 err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); in brcmf_dongle_roam()
6440 ifp->drvr->settings->roamoff ? "Off" : "On"); in brcmf_dongle_roam()
6441 err = brcmf_fil_iovar_int_set(ifp, "roam_off", in brcmf_dongle_roam()
6442 ifp->drvr->settings->roamoff); in brcmf_dongle_roam()
6450 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER, in brcmf_dongle_roam()
6457 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA, in brcmf_dongle_roam()
6469 brcmf_dongle_scantime(struct brcmf_if *ifp) in brcmf_dongle_scantime() argument
6471 struct brcmf_pub *drvr = ifp->drvr; in brcmf_dongle_scantime()
6474 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_CHANNEL_TIME, in brcmf_dongle_scantime()
6480 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_UNASSOC_TIME, in brcmf_dongle_scantime()
6487 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_PASSIVE_TIME, in brcmf_dongle_scantime()
6524 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_construct_chaninfo() local
6542 err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, in brcmf_construct_chaninfo()
6628 err = brcmf_fil_bsscfg_int_get(ifp, "per_chan_info", in brcmf_construct_chaninfo()
6650 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_enable_bw40_2g() local
6663 err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &val); in brcmf_enable_bw40_2g()
6669 err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap, in brcmf_enable_bw40_2g()
6674 err = brcmf_fil_iovar_int_set(ifp, "mimo_bw_cap", val); in brcmf_enable_bw40_2g()
6693 err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, in brcmf_enable_bw40_2g()
6725 static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) in brcmf_get_bwcap() argument
6727 struct brcmf_pub *drvr = ifp->drvr; in brcmf_get_bwcap()
6732 err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); in brcmf_get_bwcap()
6736 err = brcmf_fil_iovar_int_get(ifp, "bw_cap", &band); in brcmf_get_bwcap()
6746 err = brcmf_fil_iovar_int_get(ifp, "mimo_bw_cap", &mimo_bwcap); in brcmf_get_bwcap()
6839 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_setup_wiphybands() local
6853 (void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode); in brcmf_setup_wiphybands()
6854 err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode); in brcmf_setup_wiphybands()
6858 brcmf_get_bwcap(ifp, bw_cap); in brcmf_setup_wiphybands()
6864 err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); in brcmf_setup_wiphybands()
6886 (void)brcmf_fil_iovar_int_get(ifp, "txstreams", &txstreams); in brcmf_setup_wiphybands()
6887 (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfe_cap", in brcmf_setup_wiphybands()
6889 (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfr_cap", in brcmf_setup_wiphybands()
6984 static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_setup_ifmodes() argument
6993 mon_flag = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MONITOR_FLAG); in brcmf_setup_ifmodes()
6994 mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS); in brcmf_setup_ifmodes()
6995 p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P); in brcmf_setup_ifmodes()
6996 rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB); in brcmf_setup_ifmodes()
6997 mchan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN); in brcmf_setup_ifmodes()
7116 static void brcmf_wiphy_wowl_params(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_wiphy_wowl_params() argument
7131 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) { in brcmf_wiphy_wowl_params()
7132 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ND)) { in brcmf_wiphy_wowl_params()
7138 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK)) { in brcmf_wiphy_wowl_params()
7147 static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_setup_wiphy() argument
7149 struct brcmf_pub *drvr = ifp->drvr; in brcmf_setup_wiphy()
7162 err = brcmf_setup_ifmodes(wiphy, ifp); in brcmf_setup_wiphy()
7187 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_setup_wiphy()
7198 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS)) in brcmf_setup_wiphy()
7200 if (!ifp->drvr->settings->roamoff) in brcmf_setup_wiphy()
7202 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWSUP)) { in brcmf_setup_wiphy()
7207 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE)) in brcmf_setup_wiphy()
7211 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWAUTH)) { in brcmf_setup_wiphy()
7214 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE)) in brcmf_setup_wiphy()
7220 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) { in brcmf_setup_wiphy()
7221 gscan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_GSCAN); in brcmf_setup_wiphy()
7228 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL)) in brcmf_setup_wiphy()
7229 brcmf_wiphy_wowl_params(wiphy, ifp); in brcmf_setup_wiphy()
7230 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist, in brcmf_setup_wiphy()
7276 brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DOT11H)) in brcmf_setup_wiphy()
7292 struct brcmf_if *ifp; in brcmf_config_dongle() local
7301 ifp = netdev_priv(ndev); in brcmf_config_dongle()
7304 brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 0); in brcmf_config_dongle()
7306 brcmf_dongle_scantime(ifp); in brcmf_config_dongle()
7309 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, power_mode); in brcmf_config_dongle()
7315 err = brcmf_dongle_roam(ifp); in brcmf_config_dongle()
7323 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_config_dongle()
7325 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1); in brcmf_config_dongle()
7338 static s32 __brcmf_cfg80211_up(struct brcmf_if *ifp) in __brcmf_cfg80211_up() argument
7340 set_bit(BRCMF_VIF_STATUS_READY, &ifp->vif->sme_state); in __brcmf_cfg80211_up()
7342 return brcmf_config_dongle(ifp->drvr->config); in __brcmf_cfg80211_up()
7345 static s32 __brcmf_cfg80211_down(struct brcmf_if *ifp) in __brcmf_cfg80211_down() argument
7347 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in __brcmf_cfg80211_down()
7353 if (check_vif_up(ifp->vif)) { in __brcmf_cfg80211_down()
7354 brcmf_link_down(ifp->vif, WLAN_REASON_UNSPECIFIED, true); in __brcmf_cfg80211_down()
7364 clear_bit(BRCMF_VIF_STATUS_READY, &ifp->vif->sme_state); in __brcmf_cfg80211_down()
7371 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_up() local
7372 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_cfg80211_up()
7376 err = __brcmf_cfg80211_up(ifp); in brcmf_cfg80211_up()
7384 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_down() local
7385 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_cfg80211_down()
7389 err = __brcmf_cfg80211_down(ifp); in brcmf_cfg80211_down()
7395 enum nl80211_iftype brcmf_cfg80211_get_iftype(struct brcmf_if *ifp) in brcmf_cfg80211_get_iftype() argument
7397 struct wireless_dev *wdev = &ifp->vif->wdev; in brcmf_cfg80211_get_iftype()
7532 struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); in brcmf_cfg80211_reg_notifier() local
7553 err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq)); in brcmf_cfg80211_reg_notifier()
7559 err = brcmf_translate_country_code(ifp->drvr, req->alpha2, &ccreq); in brcmf_cfg80211_reg_notifier()
7563 err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq)); in brcmf_cfg80211_reg_notifier()
7605 struct brcmf_if *ifp; in brcmf_cfg80211_attach() local
7630 ifp = netdev_priv(ndev); in brcmf_cfg80211_attach()
7631 vif->ifp = ifp; in brcmf_cfg80211_attach()
7642 ifp->vif = vif; in brcmf_cfg80211_attach()
7645 err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type); in brcmf_cfg80211_attach()
7658 err = brcmf_setup_wiphy(wiphy, ifp); in brcmf_cfg80211_attach()
7676 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK)) in brcmf_cfg80211_attach()
7697 err = brcmf_fil_iovar_int_set(ifp, "obss_coex", in brcmf_cfg80211_attach()
7703 err = brcmf_fweh_activate_events(ifp); in brcmf_cfg80211_attach()
7728 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS)) { in brcmf_cfg80211_attach()
7729 err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1); in brcmf_cfg80211_attach()
7740 err = brcmf_fweh_activate_events(ifp); in brcmf_cfg80211_attach()
7747 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_RANDOM_MAC)) { in brcmf_cfg80211_attach()
7767 ifp->vif = NULL; in brcmf_cfg80211_attach()