Lines Matching full:ifp

548 send_key_to_dongle(struct brcmf_if *ifp, struct brcmf_wsec_key *key)  in send_key_to_dongle()  argument
550 struct brcmf_pub *drvr = ifp->drvr; in send_key_to_dongle()
556 brcmf_netdev_wait_pend8021x(ifp); in send_key_to_dongle()
558 err = brcmf_fil_bsscfg_data_set(ifp, "wsec_key", &key_le, in send_key_to_dongle()
570 struct brcmf_if *ifp; in brcmf_cfg80211_update_proto_addr_mode() local
573 ifp = vif->ifp; in brcmf_cfg80211_update_proto_addr_mode()
578 brcmf_proto_configure_addr_mode(ifp->drvr, ifp->ifidx, in brcmf_cfg80211_update_proto_addr_mode()
581 brcmf_proto_configure_addr_mode(ifp->drvr, ifp->ifidx, in brcmf_cfg80211_update_proto_addr_mode()
600 static void brcmf_set_vif_sta_macaddr(struct brcmf_if *ifp, u8 *mac_addr) in brcmf_set_vif_sta_macaddr() argument
602 u8 mac_idx = ifp->drvr->sta_mac_idx; in brcmf_set_vif_sta_macaddr()
605 memcpy(mac_addr, ifp->mac_addr, ETH_ALEN); in brcmf_set_vif_sta_macaddr()
610 ifp->drvr->sta_mac_idx = mac_idx; in brcmf_set_vif_sta_macaddr()
613 static int brcmf_cfg80211_request_sta_if(struct brcmf_if *ifp, u8 *macaddr) in brcmf_cfg80211_request_sta_if() argument
629 brcmf_set_vif_sta_macaddr(ifp, iface_v1.mac_addr); in brcmf_cfg80211_request_sta_if()
631 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_sta_if()
650 brcmf_set_vif_sta_macaddr(ifp, iface_v2.mac_addr); in brcmf_cfg80211_request_sta_if()
652 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_sta_if()
666 err = brcmf_fil_bsscfg_int_query(ifp, "interface_create", in brcmf_cfg80211_request_sta_if()
682 brcmf_set_vif_sta_macaddr(ifp, iface_v3.mac_addr); in brcmf_cfg80211_request_sta_if()
684 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_sta_if()
707 static int brcmf_cfg80211_request_ap_if(struct brcmf_if *ifp) in brcmf_cfg80211_request_ap_if() argument
713 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_request_ap_if()
724 brcmf_set_vif_sta_macaddr(ifp, iface_v1.mac_addr); in brcmf_cfg80211_request_ap_if()
726 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_ap_if()
743 brcmf_set_vif_sta_macaddr(ifp, iface_v2.mac_addr); in brcmf_cfg80211_request_ap_if()
745 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_ap_if()
759 err = brcmf_fil_bsscfg_int_query(ifp, "interface_create", in brcmf_cfg80211_request_ap_if()
772 brcmf_set_vif_sta_macaddr(ifp, iface_v3.mac_addr); in brcmf_cfg80211_request_ap_if()
774 err = brcmf_fil_iovar_data_get(ifp, "interface_create", in brcmf_cfg80211_request_ap_if()
792 bsscfgidx = brcmf_get_first_free_bsscfgidx(ifp->drvr); in brcmf_cfg80211_request_ap_if()
800 err = brcmf_fil_bsscfg_data_set(ifp, "bsscfg:ssid", &mbss_ssid_le, in brcmf_cfg80211_request_ap_if()
824 struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); in brcmf_apsta_add_vif() local
844 err = brcmf_cfg80211_request_sta_if(ifp, params->macaddr); in brcmf_apsta_add_vif()
846 err = brcmf_cfg80211_request_ap_if(ifp); in brcmf_apsta_add_vif()
863 ifp = vif->ifp; in brcmf_apsta_add_vif()
864 if (!ifp) { in brcmf_apsta_add_vif()
870 strscpy(ifp->ndev->name, name, sizeof(ifp->ndev->name)); in brcmf_apsta_add_vif()
871 err = brcmf_net_attach(ifp, true); in brcmf_apsta_add_vif()
874 free_netdev(ifp->ndev); in brcmf_apsta_add_vif()
878 return &ifp->vif->wdev; in brcmf_apsta_add_vif()
910 struct brcmf_if *ifp; in brcmf_mon_add_vif() local
924 ndev = alloc_netdev(sizeof(*ifp), name, NET_NAME_UNKNOWN, ether_setup); in brcmf_mon_add_vif()
935 ifp = netdev_priv(ndev); in brcmf_mon_add_vif()
936 ifp->vif = vif; in brcmf_mon_add_vif()
937 ifp->ndev = ndev; in brcmf_mon_add_vif()
938 ifp->drvr = cfg->pub; in brcmf_mon_add_vif()
940 vif->ifp = ifp; in brcmf_mon_add_vif()
943 err = brcmf_net_mon_attach(ifp); in brcmf_mon_add_vif()
950 cfg->pub->mon_if = ifp; in brcmf_mon_add_vif()
1022 static void brcmf_scan_config_mpc(struct brcmf_if *ifp, int mpc) in brcmf_scan_config_mpc() argument
1024 if (brcmf_feat_is_quirk_enabled(ifp, BRCMF_FEAT_QUIRK_NEED_MPC)) in brcmf_scan_config_mpc()
1025 brcmf_set_mpc(ifp, mpc); in brcmf_scan_config_mpc()
1028 void brcmf_set_mpc(struct brcmf_if *ifp, int mpc) in brcmf_set_mpc() argument
1030 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_mpc()
1033 if (check_vif_up(ifp->vif)) { in brcmf_set_mpc()
1034 err = brcmf_fil_iovar_int_set(ifp, "mpc", mpc); in brcmf_set_mpc()
1166 struct brcmf_if *ifp, bool aborted, in brcmf_notify_escan_complete() argument
1192 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_V2)) { in brcmf_notify_escan_complete()
1193 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, in brcmf_notify_escan_complete()
1200 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCAN, in brcmf_notify_escan_complete()
1209 brcmf_scan_config_mpc(ifp, 1); in brcmf_notify_escan_complete()
1250 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_apsta_iface() local
1255 brcmf_cfg80211_arm_vif_event(cfg, ifp->vif); in brcmf_cfg80211_del_apsta_iface()
1257 err = brcmf_fil_bsscfg_data_set(ifp, "interface_remove", NULL, 0); in brcmf_cfg80211_del_apsta_iface()
1272 brcmf_remove_interface(ifp, true); in brcmf_cfg80211_del_apsta_iface()
1294 cfg->escan_info.ifp == netdev_priv(ndev)) in brcmf_cfg80211_del_iface()
1329 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_iface() local
1330 struct brcmf_cfg80211_vif *vif = ifp->vif; in brcmf_cfg80211_change_iface()
1336 brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, type=%d\n", ifp->bsscfgidx, in brcmf_cfg80211_change_iface()
1404 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, infra); in brcmf_cfg80211_change_iface()
1424 brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, in brcmf_run_escan() argument
1453 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_V2)) { in brcmf_run_escan()
1472 err = brcmf_fil_iovar_data_set(ifp, "escan", params, params_size); in brcmf_run_escan()
1487 brcmf_do_escan(struct brcmf_if *ifp, struct cfg80211_scan_request *request) in brcmf_do_escan() argument
1489 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_do_escan()
1495 escan->ifp = ifp; in brcmf_do_escan()
1499 brcmf_scan_config_mpc(ifp, 0); in brcmf_do_escan()
1505 err = escan->run(cfg, ifp, request); in brcmf_do_escan()
1507 brcmf_scan_config_mpc(ifp, 1); in brcmf_do_escan()
1563 err = brcmf_do_escan(vif->ifp, request); in brcmf_cfg80211_scan()
1582 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_rts() local
1583 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_rts()
1586 err = brcmf_fil_iovar_int_set(ifp, "rtsthresh", rts_threshold); in brcmf_set_rts()
1595 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_frag() local
1596 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_frag()
1599 err = brcmf_fil_iovar_int_set(ifp, "fragthresh", in brcmf_set_frag()
1609 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_retry() local
1610 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_retry()
1614 err = brcmf_fil_cmd_int_set(ifp, cmd, retry); in brcmf_set_retry()
1626 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_wiphy_params() local
1630 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_wiphy_params()
1690 int brcmf_set_wsec(struct brcmf_if *ifp, const u8 *key, u16 key_len, u16 flags) in brcmf_set_wsec() argument
1692 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_wsec()
1710 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_WSEC_PMK, in brcmf_set_wsec()
1720 static int brcmf_set_pmk(struct brcmf_if *ifp, const u8 *pmk_data, u16 pmk_len) in brcmf_set_pmk() argument
1722 return brcmf_set_wsec(ifp, pmk_data, pmk_len, 0); in brcmf_set_pmk()
1738 err = brcmf_fil_cmd_data_set(vif->ifp, in brcmf_link_down()
1757 brcmf_set_pmk(vif->ifp, NULL, 0); in brcmf_link_down()
1768 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_join_ibss() local
1769 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_join_ibss()
1780 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_join_ibss()
1790 set_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_join_ibss()
1833 err = brcmf_fil_iovar_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_join_ibss()
1845 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, bcnprd); in brcmf_cfg80211_join_ibss()
1889 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_CHANNEL, in brcmf_cfg80211_join_ibss()
1901 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_join_ibss()
1910 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_join_ibss()
1918 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_leave_ibss() local
1921 if (!check_vif_up(ifp->vif)) { in brcmf_cfg80211_leave_ibss()
1929 brcmf_link_down(ifp->vif, WLAN_REASON_DEAUTH_LEAVING, true); in brcmf_cfg80211_leave_ibss()
1930 brcmf_net_setcarrier(ifp, false); in brcmf_cfg80211_leave_ibss()
1940 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_wpa_version() local
1942 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_wpa_version()
1956 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", val); in brcmf_set_wpa_version()
1969 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_auth_type() local
1971 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_auth_type()
1995 err = brcmf_fil_bsscfg_int_set(ifp, "auth", val); in brcmf_set_auth_type()
2009 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_wsec_mode() local
2011 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_wsec_mode()
2069 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_set_wsec_mode()
2085 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_key_mgmt() local
2086 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_set_key_mgmt()
2087 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_key_mgmt()
2185 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_set_key_mgmt()
2234 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_set_sharedkey() local
2235 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_sharedkey()
2284 err = send_key_to_dongle(ifp, &key); in brcmf_set_sharedkey()
2291 err = brcmf_fil_bsscfg_int_set(ifp, "auth", val); in brcmf_set_sharedkey()
2299 enum nl80211_auth_type brcmf_war_auth_type(struct brcmf_if *ifp, in brcmf_war_auth_type() argument
2303 brcmf_feat_is_quirk_enabled(ifp, BRCMF_FEAT_QUIRK_AUTO_AUTH)) { in brcmf_war_auth_type()
2310 static void brcmf_set_join_pref(struct brcmf_if *ifp, in brcmf_set_join_pref() argument
2313 struct brcmf_pub *drvr = ifp->drvr; in brcmf_set_join_pref()
2322 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_ASSOC_PREFER, WLC_BAND_AUTO); in brcmf_set_join_pref()
2326 brcmf_c_set_joinpref_default(ifp); in brcmf_set_join_pref()
2349 err = brcmf_fil_iovar_data_set(ifp, "join_pref", join_pref_params, in brcmf_set_join_pref()
2360 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_connect() local
2361 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_connect()
2363 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_connect()
2376 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_connect()
2390 if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif) { in brcmf_cfg80211_connect()
2409 brcmf_fil_iovar_data_set(ifp, "wpaie", ie, ie_len); in brcmf_cfg80211_connect()
2412 err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG, in brcmf_cfg80211_connect()
2419 set_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_connect()
2440 sme->auth_type = brcmf_war_auth_type(ifp, sme->auth_type); in brcmf_cfg80211_connect()
2477 err = brcmf_fil_iovar_int_set(ifp, "sup_wpa", 1); in brcmf_cfg80211_connect()
2485 err = brcmf_set_pmk(ifp, sme->crypto.psk, in brcmf_cfg80211_connect()
2489 err = brcmf_fil_iovar_data_set(ifp, "wpaie", NULL, 0); in brcmf_cfg80211_connect()
2494 err = brcmf_fwvid_set_sae_password(ifp, &sme->crypto); in brcmf_cfg80211_connect()
2496 err = brcmf_set_pmk(ifp, sme->crypto.psk, in brcmf_cfg80211_connect()
2556 brcmf_set_join_pref(ifp, &sme->bss_select); in brcmf_cfg80211_connect()
2558 err = brcmf_fil_bsscfg_data_set(ifp, "join", ext_join_params, in brcmf_cfg80211_connect()
2582 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_connect()
2589 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_connect()
2599 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_disconnect() local
2600 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_disconnect()
2606 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_disconnect()
2609 clear_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2610 clear_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2611 clear_bit(BRCMF_VIF_STATUS_EAP_SUCCESS, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2612 clear_bit(BRCMF_VIF_STATUS_ASSOC_SUCCESS, &ifp->vif->sme_state); in brcmf_cfg80211_disconnect()
2617 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_DISASSOC, in brcmf_cfg80211_disconnect()
2632 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_tx_power() local
2639 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_tx_power()
2664 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_RADIO, disable); in brcmf_cfg80211_set_tx_power()
2668 err = brcmf_fil_iovar_int_set(ifp, "qtxpower", qdbm); in brcmf_cfg80211_set_tx_power()
2691 err = brcmf_fil_iovar_int_get(vif->ifp, "qtxpower", &qdbm); in brcmf_cfg80211_get_tx_power()
2708 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_config_default_key() local
2709 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_config_default_key()
2716 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_config_default_key()
2719 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_config_default_key()
2728 err = brcmf_fil_cmd_int_set(ifp, in brcmf_cfg80211_config_default_key()
2743 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_key() local
2750 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_key()
2758 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_del_key()
2770 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_del_key()
2782 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_add_key() local
2793 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_add_key()
2818 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_add_key()
2851 if (!brcmf_is_apmode(ifp->vif)) { in brcmf_cfg80211_add_key()
2877 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_add_key()
2881 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_add_key()
2887 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_add_key()
2907 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_get_key() local
2908 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_get_key()
2916 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_get_key()
2921 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_get_key()
2960 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_config_default_mgmt_key() local
2964 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_cfg80211_config_default_mgmt_key()
2973 brcmf_cfg80211_reconfigure_wep(struct brcmf_if *ifp) in brcmf_cfg80211_reconfigure_wep() argument
2975 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_reconfigure_wep()
2982 key = &ifp->vif->profile.key[key_idx]; in brcmf_cfg80211_reconfigure_wep()
2990 err = send_key_to_dongle(ifp, key); in brcmf_cfg80211_reconfigure_wep()
2995 err = brcmf_fil_bsscfg_int_get(ifp, "wsec", &wsec); in brcmf_cfg80211_reconfigure_wep()
3001 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_cfg80211_reconfigure_wep()
3027 static void brcmf_fill_bss_param(struct brcmf_if *ifp, struct station_info *si) in brcmf_fill_bss_param() argument
3029 struct brcmf_pub *drvr = ifp->drvr; in brcmf_fill_bss_param()
3042 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, buf, in brcmf_fill_bss_param()
3064 brcmf_cfg80211_get_station_ibss(struct brcmf_if *ifp, in brcmf_cfg80211_get_station_ibss() argument
3067 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_get_station_ibss()
3075 err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_RATE, &rate); in brcmf_cfg80211_get_station_ibss()
3084 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI, &scbval, in brcmf_cfg80211_get_station_ibss()
3094 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_GET_PKTCNTS, &pktcnt, in brcmf_cfg80211_get_station_ibss()
3117 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_get_station() local
3131 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_get_station()
3134 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_cfg80211_get_station()
3135 return brcmf_cfg80211_get_station_ibss(ifp, sinfo); in brcmf_cfg80211_get_station()
3139 err = brcmf_fil_iovar_data_get(ifp, "tdls_sta_info", in brcmf_cfg80211_get_station()
3144 err = brcmf_fil_iovar_data_get(ifp, "sta_info", in brcmf_cfg80211_get_station()
3165 brcmf_fill_bss_param(ifp, sinfo); in brcmf_cfg80211_get_station()
3214 &ifp->vif->sme_state)) { in brcmf_cfg80211_get_station()
3216 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_RSSI, in brcmf_cfg80211_get_station()
3240 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_dump_station() local
3248 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_ASSOCLIST, in brcmf_cfg80211_dump_station()
3277 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_power_mgmt() local
3290 if (!check_vif_up(ifp->vif)) { in brcmf_cfg80211_set_power_mgmt()
3298 if (ifp->vif->wdev.iftype == NL80211_IFTYPE_P2P_CLIENT) { in brcmf_cfg80211_set_power_mgmt()
3304 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm); in brcmf_cfg80211_set_power_mgmt()
3312 err = brcmf_fil_iovar_int_set(ifp, "pm2_sleep_ret", in brcmf_cfg80211_set_power_mgmt()
3504 struct brcmf_if *ifp) in brcmf_update_bss_info() argument
3511 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_update_bss_info()
3515 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, in brcmf_update_bss_info()
3536 brcmf_notify_escan_complete(cfg, escan->ifp, true, true); in brcmf_abort_scanning()
3549 brcmf_notify_escan_complete(cfg, cfg->escan_info.ifp, true, true); in brcmf_cfg80211_escan_timeout_worker()
3604 brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, in brcmf_cfg80211_escan_handler() argument
3607 struct brcmf_pub *drvr = ifp->drvr; in brcmf_cfg80211_escan_handler()
3626 ifp->bsscfgidx); in brcmf_cfg80211_escan_handler()
3707 brcmf_notify_escan_complete(cfg, ifp, aborted, false); in brcmf_cfg80211_escan_handler()
3786 static int brcmf_start_internal_escan(struct brcmf_if *ifp, u32 fwmap, in brcmf_start_internal_escan() argument
3789 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_start_internal_escan()
3803 err = brcmf_do_escan(ifp, request); in brcmf_start_internal_escan()
3841 brcmf_notify_sched_scan_results(struct brcmf_if *ifp, in brcmf_notify_sched_scan_results() argument
3844 struct brcmf_pub *drvr = ifp->drvr; in brcmf_notify_sched_scan_results()
3916 err = brcmf_start_internal_escan(ifp, bucket_map, request); in brcmf_notify_sched_scan_results()
3933 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_sched_scan_start() local
3951 return brcmf_pno_start_sched_scan(ifp, req); in brcmf_cfg80211_sched_scan_start()
3958 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_sched_scan_stop() local
3961 brcmf_pno_stop_sched_scan(ifp, reqid); in brcmf_cfg80211_sched_scan_stop()
3963 brcmf_notify_escan_complete(cfg, ifp, true, true); in brcmf_cfg80211_sched_scan_stop()
3977 static s32 brcmf_config_wowl_pattern(struct brcmf_if *ifp, u8 cmd[4], in brcmf_config_wowl_pattern() argument
4009 ret = brcmf_fil_iovar_data_set(ifp, "wowl_pattern", buf, bufsize); in brcmf_config_wowl_pattern()
4016 brcmf_wowl_nd_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, in brcmf_wowl_nd_results() argument
4019 struct brcmf_pub *drvr = ifp->drvr; in brcmf_wowl_nd_results()
4066 static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_report_wowl_wakeind() argument
4077 err = brcmf_fil_iovar_data_get(ifp, "wowl_wakeind", &wake_ind_le, in brcmf_report_wowl_wakeind()
4132 cfg80211_report_wowlan_wakeup(&ifp->vif->wdev, wakeup, GFP_KERNEL); in brcmf_report_wowl_wakeind()
4137 static void brcmf_report_wowl_wakeind(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_report_wowl_wakeind() argument
4147 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_resume() local
4152 brcmf_report_wowl_wakeind(wiphy, ifp); in brcmf_cfg80211_resume()
4153 brcmf_fil_iovar_int_set(ifp, "wowl_clear", 0); in brcmf_cfg80211_resume()
4154 brcmf_config_wowl_pattern(ifp, "clr", NULL, 0, NULL, 0); in brcmf_cfg80211_resume()
4155 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND)) in brcmf_cfg80211_resume()
4156 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_resume()
4157 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, in brcmf_cfg80211_resume()
4161 brcmf_cfg80211_sched_scan_stop(cfg->wiphy, ifp->ndev, 0); in brcmf_cfg80211_resume()
4172 struct brcmf_if *ifp, in brcmf_configure_wowl() argument
4181 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND)) in brcmf_configure_wowl()
4182 brcmf_configure_arp_nd_offload(ifp, false); in brcmf_configure_wowl()
4183 brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PM, &cfg->wowl.pre_pmmode); in brcmf_configure_wowl()
4184 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, PM_MAX); in brcmf_configure_wowl()
4194 brcmf_config_wowl_pattern(ifp, "add", in brcmf_configure_wowl()
4202 brcmf_cfg80211_sched_scan_start(cfg->wiphy, ifp->ndev, in brcmf_configure_wowl()
4215 if (!test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state)) in brcmf_configure_wowl()
4219 brcmf_fil_iovar_data_set(ifp, "wowl_wakeind", &wowl_wakeind, in brcmf_configure_wowl()
4221 brcmf_fil_iovar_int_set(ifp, "wowl", wowl_config); in brcmf_configure_wowl()
4222 brcmf_fil_iovar_int_set(ifp, "wowl_activate", 1); in brcmf_configure_wowl()
4227 static int brcmf_keepalive_start(struct brcmf_if *ifp, unsigned int interval) in brcmf_keepalive_start() argument
4238 ret = brcmf_fil_iovar_data_set(ifp, "mkeep_alive", &kalive, sizeof(kalive)); in brcmf_keepalive_start()
4250 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_suspend() local
4258 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_suspend()
4262 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) in brcmf_cfg80211_suspend()
4286 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_suspend()
4290 brcmf_configure_wowl(cfg, ifp, wowl); in brcmf_cfg80211_suspend()
4293 brcmf_keepalive_start(ifp, 30); in brcmf_cfg80211_suspend()
4304 brcmf_pmksa_v3_op(struct brcmf_if *ifp, struct cfg80211_pmksa *pmksa, in brcmf_pmksa_v3_op() argument
4339 ret = brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_op, sizeof(*pmk_op)); in brcmf_pmksa_v3_op()
4345 brcmf_update_pmklist(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) in brcmf_update_pmklist() argument
4358 return brcmf_fil_iovar_data_set(ifp, "pmkid_info", pmk_list, in brcmf_update_pmklist()
4367 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_pmksa() local
4374 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_set_pmksa()
4380 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) in brcmf_cfg80211_set_pmksa()
4381 return brcmf_pmksa_v3_op(ifp, pmksa, true); in brcmf_cfg80211_set_pmksa()
4401 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_set_pmksa()
4412 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_pmksa() local
4419 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_pmksa()
4424 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) in brcmf_cfg80211_del_pmksa()
4425 return brcmf_pmksa_v3_op(ifp, pmksa, false); in brcmf_cfg80211_del_pmksa()
4447 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_del_pmksa()
4458 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_flush_pmksa() local
4462 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_flush_pmksa()
4465 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PMKID_V3)) in brcmf_cfg80211_flush_pmksa()
4466 return brcmf_pmksa_v3_op(ifp, NULL, false); in brcmf_cfg80211_flush_pmksa()
4471 err = brcmf_update_pmklist(cfg, ifp); in brcmf_cfg80211_flush_pmksa()
4478 static s32 brcmf_configure_opensecurity(struct brcmf_if *ifp) in brcmf_configure_opensecurity() argument
4480 struct brcmf_pub *drvr = ifp->drvr; in brcmf_configure_opensecurity()
4485 err = brcmf_fil_bsscfg_int_set(ifp, "auth", 0); in brcmf_configure_opensecurity()
4491 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", 0); in brcmf_configure_opensecurity()
4497 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_configure_opensecurity()
4501 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_val); in brcmf_configure_opensecurity()
4519 brcmf_configure_wpaie(struct brcmf_if *ifp, in brcmf_configure_wpaie() argument
4523 struct brcmf_pub *drvr = ifp->drvr; in brcmf_configure_wpaie()
4705 err = brcmf_fil_bsscfg_int_set(ifp, "wme_bss_disable", in brcmf_configure_wpaie()
4716 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP) && in brcmf_configure_wpaie()
4718 err = brcmf_fil_bsscfg_data_set(ifp, "bip", in brcmf_configure_wpaie()
4731 err = brcmf_fil_bsscfg_int_set(ifp, "auth", auth); in brcmf_configure_wpaie()
4737 err = brcmf_fil_bsscfg_int_set(ifp, "wsec", wsec); in brcmf_configure_wpaie()
4745 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) { in brcmf_configure_wpaie()
4746 err = brcmf_fil_bsscfg_int_set(ifp, "mfp", mfp); in brcmf_configure_wpaie()
4753 err = brcmf_fil_bsscfg_int_set(ifp, "wpa_auth", wpa_auth); in brcmf_configure_wpaie()
4838 struct brcmf_if *ifp; in brcmf_vif_set_mgmt_ie() local
4858 ifp = vif->ifp; in brcmf_vif_set_mgmt_ie()
4859 drvr = ifp->drvr; in brcmf_vif_set_mgmt_ie()
4862 brcmf_dbg(TRACE, "bsscfgidx %d, pktflag : 0x%02X\n", ifp->bsscfgidx, in brcmf_vif_set_mgmt_ie()
4988 err = brcmf_fil_bsscfg_data_set(ifp, "vndr_ie", iovar_ie_buf, in brcmf_vif_set_mgmt_ie()
5019 struct brcmf_pub *drvr = vif->ifp->drvr; in brcmf_config_ap_mgmt_ie()
5053 brcmf_parse_configure_security(struct brcmf_if *ifp, in brcmf_parse_configure_security() argument
5073 err = brcmf_configure_wpaie(ifp, wpa_ie, false); in brcmf_parse_configure_security()
5082 err = brcmf_configure_wpaie(ifp, tmp_ie, true); in brcmf_parse_configure_security()
5088 brcmf_configure_opensecurity(ifp); in brcmf_parse_configure_security()
5100 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_start_ap() local
5102 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_start_ap()
5124 dev_role = ifp->vif->wdev.iftype; in brcmf_cfg80211_start_ap()
5125 mbss = ifp->vif->mbss; in brcmf_cfg80211_start_ap()
5128 if (brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_REGULATORY, in brcmf_cfg80211_start_ap()
5129 &ifp->vif->is_11d)) { in brcmf_cfg80211_start_ap()
5158 brcmf_set_mpc(ifp, 0); in brcmf_cfg80211_start_ap()
5159 brcmf_configure_arp_nd_offload(ifp, false); in brcmf_cfg80211_start_ap()
5164 if ((supports_11d) && (is_11d != ifp->vif->is_11d)) { in brcmf_cfg80211_start_ap()
5165 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, in brcmf_cfg80211_start_ap()
5174 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_BCNPRD, in brcmf_cfg80211_start_ap()
5183 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_DTIMPRD, in brcmf_cfg80211_start_ap()
5193 ((ifp->ifidx == 0) || in brcmf_cfg80211_start_ap()
5194 (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB) && in brcmf_cfg80211_start_ap()
5195 !brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN)))) { in brcmf_cfg80211_start_ap()
5196 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_start_ap()
5202 brcmf_fil_iovar_int_set(ifp, "apsta", 0); in brcmf_cfg80211_start_ap()
5205 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_INFRA, 1); in brcmf_cfg80211_start_ap()
5210 } else if (WARN_ON(supports_11d && (is_11d != ifp->vif->is_11d))) { in brcmf_cfg80211_start_ap()
5218 if ((brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) && (!mbss)) in brcmf_cfg80211_start_ap()
5219 brcmf_fil_iovar_int_set(ifp, "mbss", 1); in brcmf_cfg80211_start_ap()
5221 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 1); in brcmf_cfg80211_start_ap()
5231 err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); in brcmf_cfg80211_start_ap()
5238 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1); in brcmf_cfg80211_start_ap()
5247 err = brcmf_set_pmk(ifp, crypto->psk, in brcmf_cfg80211_start_ap()
5255 err = brcmf_fwvid_set_sae_password(ifp, crypto); in brcmf_cfg80211_start_ap()
5262 err = brcmf_parse_configure_security(ifp, settings, in brcmf_cfg80211_start_ap()
5272 brcmf_cfg80211_reconfigure_wep(ifp); in brcmf_cfg80211_start_ap()
5278 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_start_ap()
5287 err = brcmf_fil_iovar_int_set(ifp, "closednet", closednet); in brcmf_cfg80211_start_ap()
5297 err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); in brcmf_cfg80211_start_ap()
5304 err = brcmf_parse_configure_security(ifp, settings, in brcmf_cfg80211_start_ap()
5311 err = brcmf_fil_bsscfg_data_set(ifp, "ssid", &ssid_le, in brcmf_cfg80211_start_ap()
5317 bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); in brcmf_cfg80211_start_ap()
5319 err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, in brcmf_cfg80211_start_ap()
5331 brcmf_config_ap_mgmt_ie(ifp->vif, &settings->beacon); in brcmf_cfg80211_start_ap()
5332 set_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); in brcmf_cfg80211_start_ap()
5333 brcmf_net_setcarrier(ifp, true); in brcmf_cfg80211_start_ap()
5337 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_start_ap()
5338 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_start_ap()
5347 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_stop_ap() local
5349 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_cfg80211_stop_ap()
5356 if (ifp->vif->wdev.iftype == NL80211_IFTYPE_AP) { in brcmf_cfg80211_stop_ap()
5365 brcmf_set_pmk(ifp, NULL, 0); in brcmf_cfg80211_stop_ap()
5367 brcmf_fwvid_set_sae_password(ifp, &crypto); in brcmf_cfg80211_stop_ap()
5371 if (ifp->vif->mbss) { in brcmf_cfg80211_stop_ap()
5372 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_stop_ap()
5377 if (ifp->bsscfgidx == 0) in brcmf_cfg80211_stop_ap()
5378 brcmf_fil_iovar_int_set(ifp, "closednet", 0); in brcmf_cfg80211_stop_ap()
5381 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, in brcmf_cfg80211_stop_ap()
5385 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_DOWN, 1); in brcmf_cfg80211_stop_ap()
5388 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_AP, 0); in brcmf_cfg80211_stop_ap()
5391 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) in brcmf_cfg80211_stop_ap()
5392 brcmf_fil_iovar_int_set(ifp, "mbss", 0); in brcmf_cfg80211_stop_ap()
5393 brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_REGULATORY, in brcmf_cfg80211_stop_ap()
5394 ifp->vif->is_11d); in brcmf_cfg80211_stop_ap()
5396 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1); in brcmf_cfg80211_stop_ap()
5400 brcmf_vif_clear_mgmt_ies(ifp->vif); in brcmf_cfg80211_stop_ap()
5402 bss_enable.bsscfgidx = cpu_to_le32(ifp->bsscfgidx); in brcmf_cfg80211_stop_ap()
5404 err = brcmf_fil_iovar_data_set(ifp, "bss", &bss_enable, in brcmf_cfg80211_stop_ap()
5409 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_stop_ap()
5410 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_cfg80211_stop_ap()
5411 clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state); in brcmf_cfg80211_stop_ap()
5412 brcmf_net_setcarrier(ifp, false); in brcmf_cfg80211_stop_ap()
5421 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_beacon() local
5425 return brcmf_config_ap_mgmt_ie(ifp->vif, &info->beacon); in brcmf_cfg80211_change_beacon()
5435 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_del_station() local
5443 if (ifp->vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif) in brcmf_cfg80211_del_station()
5444 ifp = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif->ifp; in brcmf_cfg80211_del_station()
5445 if (!check_vif_up(ifp->vif)) in brcmf_cfg80211_del_station()
5450 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SCB_DEAUTHENTICATE_FOR_REASON, in brcmf_cfg80211_del_station()
5466 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_change_station() local
5480 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_AUTHORIZE, in brcmf_cfg80211_change_station()
5483 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SCB_DEAUTHORIZE, in brcmf_cfg80211_change_station()
5586 brcmf_fil_cmd_int_get(vif->ifp, BRCMF_C_GET_CHANNEL, in brcmf_cfg80211_mgmt_tx()
5617 struct brcmf_if *ifp; in brcmf_cfg80211_set_cqm_rssi_range_config() local
5622 ifp = netdev_priv(ndev); in brcmf_cfg80211_set_cqm_rssi_range_config()
5623 vif = ifp->vif; in brcmf_cfg80211_set_cqm_rssi_range_config()
5642 err = brcmf_fil_iovar_data_set(ifp, "rssi_event", &config, in brcmf_cfg80211_set_cqm_rssi_range_config()
5673 brcmf_p2p_cancel_remain_on_channel(vif->ifp); in brcmf_cfg80211_cancel_remain_on_channel()
5774 brcmf_notify_tdls_peer_event(struct brcmf_if *ifp, in brcmf_notify_tdls_peer_event() argument
5783 brcmf_proto_add_tdls_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_tdls_peer_event()
5787 brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_tdls_peer_event()
5821 struct brcmf_if *ifp; in brcmf_cfg80211_tdls_oper() local
5829 ifp = netdev_priv(ndev); in brcmf_cfg80211_tdls_oper()
5835 ret = brcmf_fil_iovar_data_set(ifp, "tdls_endpoint", in brcmf_cfg80211_tdls_oper()
5851 struct brcmf_if *ifp; in brcmf_cfg80211_update_conn_params() local
5857 ifp = netdev_priv(ndev); in brcmf_cfg80211_update_conn_params()
5858 err = brcmf_vif_set_mgmt_ie(ifp->vif, BRCMF_VNDR_IE_ASSOCREQ_FLAG, in brcmf_cfg80211_update_conn_params()
5875 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_set_rekey_data() local
5879 brcmf_dbg(TRACE, "Enter, bssidx=%d\n", ifp->bsscfgidx); in brcmf_cfg80211_set_rekey_data()
5886 ret = brcmf_fil_iovar_data_set(ifp, "gtk_key_info", &gtk_le, in brcmf_cfg80211_set_rekey_data()
5898 struct brcmf_if *ifp; in brcmf_cfg80211_set_pmk() local
5903 ifp = netdev_priv(dev); in brcmf_cfg80211_set_pmk()
5904 if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) in brcmf_cfg80211_set_pmk()
5910 return brcmf_set_pmk(ifp, conf->pmk, conf->pmk_len); in brcmf_cfg80211_set_pmk()
5916 struct brcmf_if *ifp; in brcmf_cfg80211_del_pmk() local
5919 ifp = netdev_priv(dev); in brcmf_cfg80211_del_pmk()
5920 if (WARN_ON(ifp->vif->profile.use_fwsup != BRCMF_PROFILE_FWSUP_1X)) in brcmf_cfg80211_del_pmk()
5923 return brcmf_set_pmk(ifp, NULL, 0); in brcmf_cfg80211_del_pmk()
5994 struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); in brcmf_alloc_vif() local
6008 brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) { in brcmf_alloc_vif()
6032 struct brcmf_if *ifp; in brcmf_cfg80211_free_netdev() local
6034 ifp = netdev_priv(ndev); in brcmf_cfg80211_free_netdev()
6035 vif = ifp->vif; in brcmf_cfg80211_free_netdev()
6266 struct brcmf_if *ifp) in brcmf_get_assoc_ies() argument
6278 err = brcmf_fil_iovar_data_get(ifp, "assoc_info", in brcmf_get_assoc_ies()
6294 err = brcmf_fil_iovar_data_get(ifp, "assoc_req_ies", in brcmf_get_assoc_ies()
6312 err = brcmf_fil_iovar_data_get(ifp, "assoc_resp_ies", in brcmf_get_assoc_ies()
6326 err = brcmf_fil_iovar_data_get(ifp, "wme_ac_sta", in brcmf_get_assoc_ies()
6351 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_bss_roaming_done() local
6352 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_bss_roaming_done()
6366 brcmf_get_assoc_ies(cfg, ifp); in brcmf_bss_roaming_done()
6368 brcmf_update_bss_info(cfg, ifp); in brcmf_bss_roaming_done()
6378 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BSS_INFO, in brcmf_bss_roaming_done()
6414 set_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state); in brcmf_bss_roaming_done()
6424 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_bss_connect_done() local
6425 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_bss_connect_done()
6432 &ifp->vif->sme_state)) { in brcmf_bss_connect_done()
6435 brcmf_get_assoc_ies(cfg, ifp); in brcmf_bss_connect_done()
6436 brcmf_update_bss_info(cfg, ifp); in brcmf_bss_connect_done()
6438 &ifp->vif->sme_state); in brcmf_bss_connect_done()
6442 &ifp->vif->sme_state); in brcmf_bss_connect_done()
6444 &ifp->vif->sme_state); in brcmf_bss_connect_done()
6507 brcmf_notify_connect_status(struct brcmf_if *ifp, in brcmf_notify_connect_status() argument
6510 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_connect_status()
6511 struct net_device *ndev = ifp->ndev; in brcmf_notify_connect_status()
6512 struct brcmf_cfg80211_profile *profile = &ifp->vif->profile; in brcmf_notify_connect_status()
6520 brcmf_proto_delete_peer(ifp->drvr, ifp->ifidx, (u8 *)e->addr); in brcmf_notify_connect_status()
6523 if (brcmf_is_apmode(ifp->vif)) { in brcmf_notify_connect_status()
6525 } else if (brcmf_is_linkup(ifp->vif, e)) { in brcmf_notify_connect_status()
6527 if (brcmf_is_ibssmode(ifp->vif)) { in brcmf_notify_connect_status()
6533 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6535 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6538 brcmf_net_setcarrier(ifp, true); in brcmf_notify_connect_status()
6539 } else if (brcmf_is_linkdown(ifp->vif, e)) { in brcmf_notify_connect_status()
6541 if (!brcmf_is_ibssmode(ifp->vif) && in brcmf_notify_connect_status()
6543 &ifp->vif->sme_state) || in brcmf_notify_connect_status()
6545 &ifp->vif->sme_state))) { in brcmf_notify_connect_status()
6547 &ifp->vif->sme_state) && in brcmf_notify_connect_status()
6552 brcmf_link_down(ifp->vif, in brcmf_notify_connect_status()
6561 brcmf_net_setcarrier(ifp, false); in brcmf_notify_connect_status()
6564 if (brcmf_is_ibssmode(ifp->vif)) in brcmf_notify_connect_status()
6566 &ifp->vif->sme_state); in brcmf_notify_connect_status()
6575 brcmf_notify_roaming_status(struct brcmf_if *ifp, in brcmf_notify_roaming_status() argument
6578 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_roaming_status()
6584 &ifp->vif->sme_state)) { in brcmf_notify_roaming_status()
6585 brcmf_bss_roaming_done(cfg, ifp->ndev, e); in brcmf_notify_roaming_status()
6587 brcmf_bss_connect_done(cfg, ifp->ndev, e, true); in brcmf_notify_roaming_status()
6588 brcmf_net_setcarrier(ifp, true); in brcmf_notify_roaming_status()
6596 brcmf_notify_mic_status(struct brcmf_if *ifp, in brcmf_notify_mic_status() argument
6607 cfg80211_michael_mic_failure(ifp->ndev, (u8 *)&e->addr, key_type, -1, in brcmf_notify_mic_status()
6613 static s32 brcmf_notify_rssi(struct brcmf_if *ifp, in brcmf_notify_rssi() argument
6616 struct brcmf_cfg80211_vif *vif = ifp->vif; in brcmf_notify_rssi()
6643 cfg80211_cqm_rssi_notify(ifp->ndev, in brcmf_notify_rssi()
6648 cfg80211_cqm_rssi_notify(ifp->ndev, in brcmf_notify_rssi()
6656 static s32 brcmf_notify_vif_event(struct brcmf_if *ifp, in brcmf_notify_vif_event() argument
6659 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_notify_vif_event()
6680 ifp->vif = vif; in brcmf_notify_vif_event()
6681 vif->ifp = ifp; in brcmf_notify_vif_event()
6682 if (ifp->ndev) { in brcmf_notify_vif_event()
6683 vif->wdev.netdev = ifp->ndev; in brcmf_notify_vif_event()
6684 ifp->ndev->ieee80211_ptr = &vif->wdev; in brcmf_notify_vif_event()
6685 SET_NETDEV_DEV(ifp->ndev, wiphy_dev(cfg->wiphy)); in brcmf_notify_vif_event()
6832 static s32 brcmf_dongle_roam(struct brcmf_if *ifp) in brcmf_dongle_roam() argument
6834 struct brcmf_pub *drvr = ifp->drvr; in brcmf_dongle_roam()
6841 if (ifp->drvr->settings->roamoff) in brcmf_dongle_roam()
6845 err = brcmf_fil_iovar_int_set(ifp, "bcn_timeout", bcn_timeout); in brcmf_dongle_roam()
6855 ifp->drvr->settings->roamoff ? "Off" : "On"); in brcmf_dongle_roam()
6856 err = brcmf_fil_iovar_int_set(ifp, "roam_off", in brcmf_dongle_roam()
6857 ifp->drvr->settings->roamoff); in brcmf_dongle_roam()
6865 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_TRIGGER, in brcmf_dongle_roam()
6872 err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_ROAM_DELTA, in brcmf_dongle_roam()
6884 brcmf_dongle_scantime(struct brcmf_if *ifp) in brcmf_dongle_scantime() argument
6886 struct brcmf_pub *drvr = ifp->drvr; in brcmf_dongle_scantime()
6889 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_CHANNEL_TIME, in brcmf_dongle_scantime()
6895 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_UNASSOC_TIME, in brcmf_dongle_scantime()
6902 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_SCAN_PASSIVE_TIME, in brcmf_dongle_scantime()
6939 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_construct_chaninfo() local
6957 err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, in brcmf_construct_chaninfo()
7050 err = brcmf_fil_bsscfg_int_query(ifp, "per_chan_info", in brcmf_construct_chaninfo()
7072 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_enable_bw40_2g() local
7085 err = brcmf_fil_iovar_int_query(ifp, "bw_cap", &val); in brcmf_enable_bw40_2g()
7091 err = brcmf_fil_iovar_data_set(ifp, "bw_cap", &band_bwcap, in brcmf_enable_bw40_2g()
7096 err = brcmf_fil_iovar_int_set(ifp, "mimo_bw_cap", val); in brcmf_enable_bw40_2g()
7115 err = brcmf_fil_iovar_data_get(ifp, "chanspecs", pbuf, in brcmf_enable_bw40_2g()
7154 static void brcmf_get_bwcap(struct brcmf_if *ifp, u32 bw_cap[]) in brcmf_get_bwcap() argument
7156 struct brcmf_pub *drvr = ifp->drvr; in brcmf_get_bwcap()
7161 err = brcmf_fil_iovar_int_query(ifp, "bw_cap", &band); in brcmf_get_bwcap()
7165 err = brcmf_fil_iovar_int_query(ifp, "bw_cap", &band); in brcmf_get_bwcap()
7174 err = brcmf_fil_iovar_int_get(ifp, "mimo_bw_cap", &mimo_bwcap); in brcmf_get_bwcap()
7267 struct brcmf_if *ifp = brcmf_get_ifp(drvr, 0); in brcmf_setup_wiphybands() local
7281 (void)brcmf_fil_iovar_int_get(ifp, "vhtmode", &vhtmode); in brcmf_setup_wiphybands()
7282 err = brcmf_fil_iovar_int_get(ifp, "nmode", &nmode); in brcmf_setup_wiphybands()
7286 brcmf_get_bwcap(ifp, bw_cap); in brcmf_setup_wiphybands()
7292 err = brcmf_fil_iovar_int_get(ifp, "rxchain", &rxchain); in brcmf_setup_wiphybands()
7314 (void)brcmf_fil_iovar_int_get(ifp, "txstreams", &txstreams); in brcmf_setup_wiphybands()
7315 (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfe_cap", in brcmf_setup_wiphybands()
7317 (void)brcmf_fil_iovar_int_get(ifp, "txbf_bfr_cap", in brcmf_setup_wiphybands()
7379 * @ifp: interface object needed for feat module api.
7412 static int brcmf_setup_ifmodes(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_setup_ifmodes() argument
7421 mon_flag = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MONITOR_FLAG); in brcmf_setup_ifmodes()
7422 mbss = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS); in brcmf_setup_ifmodes()
7423 p2p = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_P2P); in brcmf_setup_ifmodes()
7424 rsdb = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_RSDB); in brcmf_setup_ifmodes()
7425 mchan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MCHAN); in brcmf_setup_ifmodes()
7544 static void brcmf_wiphy_wowl_params(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_wiphy_wowl_params() argument
7559 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) { in brcmf_wiphy_wowl_params()
7560 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ND)) { in brcmf_wiphy_wowl_params()
7566 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK)) { in brcmf_wiphy_wowl_params()
7575 static int brcmf_setup_wiphy(struct wiphy *wiphy, struct brcmf_if *ifp) in brcmf_setup_wiphy() argument
7577 struct brcmf_pub *drvr = ifp->drvr; in brcmf_setup_wiphy()
7590 err = brcmf_setup_ifmodes(wiphy, ifp); in brcmf_setup_wiphy()
7615 if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MFP)) in brcmf_setup_wiphy()
7626 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS)) in brcmf_setup_wiphy()
7628 if (!ifp->drvr->settings->roamoff) in brcmf_setup_wiphy()
7630 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWSUP)) { in brcmf_setup_wiphy()
7635 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE)) in brcmf_setup_wiphy()
7639 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_FWAUTH)) { in brcmf_setup_wiphy()
7642 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SAE)) in brcmf_setup_wiphy()
7648 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_PNO)) { in brcmf_setup_wiphy()
7649 gscan = brcmf_feat_is_enabled(ifp, BRCMF_FEAT_GSCAN); in brcmf_setup_wiphy()
7656 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL)) in brcmf_setup_wiphy()
7657 brcmf_wiphy_wowl_params(wiphy, ifp); in brcmf_setup_wiphy()
7658 err = brcmf_fil_cmd_data_get(ifp, BRCMF_C_GET_BANDLIST, &bandlist, in brcmf_setup_wiphy()
7704 brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DOT11H)) in brcmf_setup_wiphy()
7720 struct brcmf_if *ifp; in brcmf_config_dongle() local
7729 ifp = netdev_priv(ndev); in brcmf_config_dongle()
7732 brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 0); in brcmf_config_dongle()
7734 brcmf_dongle_scantime(ifp); in brcmf_config_dongle()
7737 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, power_mode); in brcmf_config_dongle()
7743 err = brcmf_dongle_roam(ifp); in brcmf_config_dongle()
7751 brcmf_configure_arp_nd_offload(ifp, true); in brcmf_config_dongle()
7753 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_FAKEFRAG, 1); in brcmf_config_dongle()
7766 static s32 __brcmf_cfg80211_up(struct brcmf_if *ifp) in __brcmf_cfg80211_up() argument
7768 set_bit(BRCMF_VIF_STATUS_READY, &ifp->vif->sme_state); in __brcmf_cfg80211_up()
7770 return brcmf_config_dongle(ifp->drvr->config); in __brcmf_cfg80211_up()
7773 static s32 __brcmf_cfg80211_down(struct brcmf_if *ifp) in __brcmf_cfg80211_down() argument
7775 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in __brcmf_cfg80211_down()
7781 if (check_vif_up(ifp->vif)) { in __brcmf_cfg80211_down()
7782 brcmf_link_down(ifp->vif, WLAN_REASON_UNSPECIFIED, true); in __brcmf_cfg80211_down()
7792 clear_bit(BRCMF_VIF_STATUS_READY, &ifp->vif->sme_state); in __brcmf_cfg80211_down()
7799 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_up() local
7800 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_cfg80211_up()
7804 err = __brcmf_cfg80211_up(ifp); in brcmf_cfg80211_up()
7812 struct brcmf_if *ifp = netdev_priv(ndev); in brcmf_cfg80211_down() local
7813 struct brcmf_cfg80211_info *cfg = ifp->drvr->config; in brcmf_cfg80211_down()
7817 err = __brcmf_cfg80211_down(ifp); in brcmf_cfg80211_down()
8022 brcmf_dump_obss(struct brcmf_if *ifp, struct cca_msrmnt_query req, in brcmf_dump_obss() argument
8034 err = brcmf_fil_iovar_data_get(ifp, "dump_obss", in brcmf_dump_obss()
8056 struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); in brcmf_set_channel() local
8064 err = brcmf_fil_iovar_int_set(ifp, "chanspec", chspec); in brcmf_set_channel()
8082 struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg)); in brcmf_cfg80211_dump_survey() local
8093 if ((test_bit(BRCMF_VIF_STATUS_CONNECTING, &ifp->vif->sme_state)) || in brcmf_cfg80211_dump_survey()
8094 (test_bit(BRCMF_VIF_STATUS_CONNECTED, &ifp->vif->sme_state))) { in brcmf_cfg80211_dump_survey()
8119 brcmf_set_mpc(ifp, 0); in brcmf_cfg80211_dump_survey()
8122 err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_UP, 1); in brcmf_cfg80211_dump_survey()
8129 err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PHY_NOISE, &noise); in brcmf_cfg80211_dump_survey()
8138 err = brcmf_dump_obss(ifp, req, &survey); in brcmf_cfg80211_dump_survey()
8147 err = brcmf_dump_obss(ifp, req, &survey); in brcmf_cfg80211_dump_survey()
8168 if (!brcmf_is_apmode(ifp->vif)) in brcmf_cfg80211_dump_survey()
8169 brcmf_set_mpc(ifp, 1); in brcmf_cfg80211_dump_survey()
8177 struct brcmf_if *ifp = brcmf_get_ifp(cfg->pub, 0); in brcmf_cfg80211_reg_notifier() local
8198 err = brcmf_fil_iovar_data_get(ifp, "country", &ccreq, sizeof(ccreq)); in brcmf_cfg80211_reg_notifier()
8204 err = brcmf_translate_country_code(ifp->drvr, req->alpha2, &ccreq); in brcmf_cfg80211_reg_notifier()
8208 err = brcmf_fil_iovar_data_set(ifp, "country", &ccreq, sizeof(ccreq)); in brcmf_cfg80211_reg_notifier()
8250 struct brcmf_if *ifp; in brcmf_cfg80211_attach() local
8275 ifp = netdev_priv(ndev); in brcmf_cfg80211_attach()
8276 vif->ifp = ifp; in brcmf_cfg80211_attach()
8287 ifp->vif = vif; in brcmf_cfg80211_attach()
8290 err = brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_VERSION, &io_type); in brcmf_cfg80211_attach()
8303 err = brcmf_setup_wiphy(wiphy, ifp); in brcmf_cfg80211_attach()
8321 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_GTK)) in brcmf_cfg80211_attach()
8324 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_DUMP_OBSS)) in brcmf_cfg80211_attach()
8345 err = brcmf_fil_iovar_int_set(ifp, "obss_coex", in brcmf_cfg80211_attach()
8351 err = brcmf_fweh_activate_events(ifp); in brcmf_cfg80211_attach()
8376 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_TDLS)) { in brcmf_cfg80211_attach()
8377 err = brcmf_fil_iovar_int_set(ifp, "tdls_enable", 1); in brcmf_cfg80211_attach()
8388 err = brcmf_fweh_activate_events(ifp); in brcmf_cfg80211_attach()
8395 if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_SCAN_RANDOM_MAC)) { in brcmf_cfg80211_attach()
8415 ifp->vif = NULL; in brcmf_cfg80211_attach()