}
 }
 
+bool brcmf_is_apmode_operating(struct wiphy *wiphy)
+{
+       struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
+       struct brcmf_cfg80211_vif *vif;
+       bool ret = false;
+
+       list_for_each_entry(vif, &cfg->vif_list, list) {
+               if (brcmf_is_apmode(vif) &&
+                   test_bit(BRCMF_VIF_STATUS_AP_CREATED, &vif->sme_state))
+                       ret = true;
+       }
+
+       return ret;
+}
+
 static void brcmf_scan_params_v2_to_v1(struct brcmf_scan_params_v2_le *params_v2_le,
                                       struct brcmf_scan_params_le *params_le)
 {
                        bphy_err(drvr, "bss_enable config failed %d\n", err);
        }
        brcmf_set_mpc(ifp, 1);
-       brcmf_configure_arp_nd_offload(ifp, true);
        clear_bit(BRCMF_VIF_STATUS_AP_CREATED, &ifp->vif->sme_state);
+       brcmf_configure_arp_nd_offload(ifp, true);
        brcmf_net_setcarrier(ifp, false);
 
        return err;
 
                                struct brcmf_if *ifp, bool aborted,
                                bool fw_abort);
 void brcmf_set_mpc(struct brcmf_if *ndev, int mpc);
+bool brcmf_is_apmode_operating(struct wiphy *wiphy);
 void brcmf_abort_scanning(struct brcmf_cfg80211_info *cfg);
 void brcmf_cfg80211_free_netdev(struct net_device *ndev);