struct cfg80211_ibss_params *params)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_join_params join_params;
        size_t join_params_size = 0;
        s32 err = 0;
 static s32 brcmf_set_wpa_version(struct net_device *ndev,
                                 struct cfg80211_connect_params *sme)
 {
-       struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        s32 val = 0;
        s32 err = 0;
 static s32 brcmf_set_auth_type(struct net_device *ndev,
                               struct cfg80211_connect_params *sme)
 {
-       struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        s32 val = 0;
        s32 err = 0;
 brcmf_set_set_cipher(struct net_device *ndev,
                     struct cfg80211_connect_params *sme)
 {
-       struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        s32 pval = 0;
        s32 gval = 0;
 static s32
 brcmf_set_key_mgmt(struct net_device *ndev, struct cfg80211_connect_params *sme)
 {
-       struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        s32 val = 0;
        s32 err = 0;
 brcmf_set_sharedkey(struct net_device *ndev,
                    struct cfg80211_connect_params *sme)
 {
-       struct brcmf_cfg80211_info *cfg = ndev_to_cfg(ndev);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        struct brcmf_wsec_key key;
        s32 val;
                    struct cfg80211_connect_params *sme)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct ieee80211_channel *chan = sme->channel;
        struct brcmf_join_params join_params;
        size_t join_params_size;
                       u16 reason_code)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_scb_val_le scbval;
        s32 err = 0;
 
                    void (*callback) (void *cookie, struct key_params * params))
 {
        struct key_params params;
-       struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_security *sec;
        s32 wsec;
        s32 err = 0;
                           u8 *mac, struct station_info *sinfo)
 {
        struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_scb_val_le scb_val;
        int rssi;
        s32 rate;
 
 static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg)
 {
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
-       struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg));
+       struct net_device *ndev = cfg_to_ndev(cfg);
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
+       struct brcmf_if *ifp = netdev_priv(ndev);
        struct brcmf_bss_info_le *bi;
        struct brcmf_ssid *ssid;
        struct brcmf_tlv *tim;
        struct parsed_vndr_ies new_vndr_ies;
        struct parsed_vndr_ie_info *vndrie_info;
        s32 i;
-       s32 bssidx = brcmf_ndev_bssidx(ndev);
        u8 *ptr;
        int remained_buf_len;
 
-       WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag);
+       WL_TRACE("bssidx %d, pktflag : 0x%02X\n",
+                brcmf_ndev_bssidx(ndev), pktflag);
        iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL);
        if (!iovar_ie_buf)
                return -ENOMEM;
        vif->pm_block = pm_block;
        vif->roam_off = -1;
 
+       brcmf_init_prof(&vif->profile);
+
        list_add_tail(&vif->list, &cfg->vif_list);
        cfg->vif_cnt++;
        return vif;
                       struct net_device *ndev,
                       const struct brcmf_event_msg *e)
 {
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
        struct wiphy *wiphy = cfg_to_wiphy(cfg);
        struct ieee80211_channel *notify_channel = NULL;
                       struct net_device *ndev, const struct brcmf_event_msg *e,
                       bool completed)
 {
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
        s32 err = 0;
 
                            struct net_device *ndev,
                            const struct brcmf_event_msg *e, void *data)
 {
-       struct brcmf_cfg80211_profile *profile = cfg->profile;
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        s32 err = 0;
 
        if (cfg->conf->mode == WL_MODE_AP) {
                                brcmf_link_down(cfg);
                        }
                }
-               brcmf_init_prof(cfg->profile);
+               brcmf_init_prof(ndev_to_prof(ndev));
        } else if (brcmf_is_nonetwork(cfg, e)) {
                if (brcmf_is_ibssmode(cfg))
                        clear_bit(WL_STATUS_CONNECTING, &cfg->status);
        cfg->bss_info = NULL;
        kfree(cfg->conf);
        cfg->conf = NULL;
-       kfree(cfg->profile);
-       cfg->profile = NULL;
        kfree(cfg->scan_req_int);
        cfg->scan_req_int = NULL;
        kfree(cfg->escan_ioctl_buf);
        cfg->conf = kzalloc(sizeof(*cfg->conf), GFP_KERNEL);
        if (!cfg->conf)
                goto init_priv_mem_out;
-       cfg->profile = kzalloc(sizeof(*cfg->profile), GFP_KERNEL);
-       if (!cfg->profile)
-               goto init_priv_mem_out;
        cfg->bss_info = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL);
        if (!cfg->bss_info)
                goto init_priv_mem_out;
                return err;
        brcmf_init_escan(cfg);
        brcmf_init_conf(cfg->conf);
-       brcmf_init_prof(cfg->profile);
        brcmf_link_down(cfg);
 
        return err;
 
 static int brcmf_debugfs_add_netdev_params(struct brcmf_cfg80211_info *cfg)
 {
+       struct net_device *ndev = cfg_to_ndev(cfg);
+       struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev);
        char buf[10+IFNAMSIZ];
        struct dentry *fd;
        s32 err = 0;
 
-       sprintf(buf, "netdev:%s", cfg_to_ndev(cfg)->name);
+       sprintf(buf, "netdev:%s", ndev->name);
        cfg->debugfsdir = debugfs_create_dir(buf,
                                        cfg_to_wiphy(cfg)->debugfsdir);
 
        fd = debugfs_create_u16("beacon_int", S_IRUGO, cfg->debugfsdir,
-               (u16 *)&cfg->profile->beacon_interval);
+               (u16 *)&profile->beacon_interval);
        if (!fd) {
                err = -ENOMEM;
                goto err_out;
        }
 
        fd = debugfs_create_u8("dtim_period", S_IRUGO, cfg->debugfsdir,
-               (u8 *)&cfg->profile->dtim_period);
+               (u8 *)&profile->dtim_period);
        if (!fd) {
                err = -ENOMEM;
                goto err_out;
 
  *
  * @ifp: lower layer interface pointer
  * @wdev: wireless device.
+ * @profile: profile information.
  * @mode: operating mode.
  * @roam_off: roaming state.
  * @pm_block: power-management blocked.
 struct brcmf_cfg80211_vif {
        struct brcmf_if *ifp;
        struct wireless_dev wdev;
+       struct brcmf_cfg80211_profile profile;
        s32 mode;
        s32 roam_off;
        bool pm_block;
  * @scan_req_int: internal scan request object.
  * @bss_info: bss information for cfg80211 layer.
  * @ie: information element object for internal purpose.
- * @profile: holding dongle profile.
  * @iscan: iscan controller information.
  * @conn_info: association info.
  * @pmk_list: wpa2 pmk list.
        struct brcmf_cfg80211_scan_req *scan_req_int;
        struct wl_cfg80211_bss_info *bss_info;
        struct brcmf_cfg80211_ie ie;
-       struct brcmf_cfg80211_profile *profile;
        struct brcmf_cfg80211_iscan_ctrl *iscan;
        struct brcmf_cfg80211_connect_info conn_info;
        struct brcmf_cfg80211_pmk_list *pmk_list;
        return wdev_to_cfg(ndev->ieee80211_ptr);
 }
 
+static inline struct brcmf_cfg80211_profile *ndev_to_prof(struct net_device *nd)
+{
+       struct brcmf_if *ifp = netdev_priv(nd);
+       return &ifp->vif->profile;
+}
+
 #define iscan_to_cfg(i) ((struct brcmf_cfg80211_info *)(i->data))
 #define cfg_to_iscan(w) (w->iscan)