}
 }
 
+/* This function maps IEEE HT secondary channel type to NL80211 channel type
+ */
+u8 mwifiex_sec_chan_offset_to_chan_type(u8 second_chan_offset)
+{
+       switch (second_chan_offset) {
+       case IEEE80211_HT_PARAM_CHA_SEC_NONE:
+               return NL80211_CHAN_HT20;
+       case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+               return NL80211_CHAN_HT40PLUS;
+       case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+               return NL80211_CHAN_HT40MINUS;
+       default:
+               return NL80211_CHAN_HT20;
+       }
+}
+
 /*
  * This function checks whether WEP is set.
  */
                return -EINVAL;
        }
 
-       mwifiex_uap_set_channel(bss_cfg, params->chandef);
+       mwifiex_uap_set_channel(priv, bss_cfg, params->chandef);
        mwifiex_set_uap_rates(bss_cfg, params);
 
        if (mwifiex_set_secure_params(priv, bss_cfg, params)) {
        return 0;
 }
 
+static int mwifiex_cfg80211_get_channel(struct wiphy *wiphy,
+                                       struct wireless_dev *wdev,
+                                       struct cfg80211_chan_def *chandef)
+{
+       struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
+       struct mwifiex_bssdescriptor *curr_bss;
+       struct ieee80211_channel *chan;
+       u8 second_chan_offset;
+       enum nl80211_channel_type chan_type;
+       enum ieee80211_band band;
+       int freq;
+       int ret = -ENODATA;
+
+       if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP &&
+           cfg80211_chandef_valid(&priv->bss_chandef)) {
+               *chandef = priv->bss_chandef;
+               ret = 0;
+       } else if (priv->media_connected) {
+               curr_bss = &priv->curr_bss_params.bss_descriptor;
+               band = mwifiex_band_to_radio_type(priv->curr_bss_params.band);
+               freq = ieee80211_channel_to_frequency(curr_bss->channel, band);
+               chan = ieee80211_get_channel(wiphy, freq);
+
+               if (curr_bss->bcn_ht_oper) {
+                       second_chan_offset = curr_bss->bcn_ht_oper->ht_param &
+                                       IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
+                       chan_type = mwifiex_sec_chan_offset_to_chan_type
+                                                       (second_chan_offset);
+                       cfg80211_chandef_create(chandef, chan, chan_type);
+               } else {
+                       cfg80211_chandef_create(chandef, chan,
+                                               NL80211_CHAN_NO_HT);
+               }
+               ret = 0;
+       }
+
+       return ret;
+}
+
 static int
 mwifiex_cfg80211_start_radar_detection(struct wiphy *wiphy,
                                       struct net_device *dev,
        .tdls_oper = mwifiex_cfg80211_tdls_oper,
        .add_station = mwifiex_cfg80211_add_station,
        .change_station = mwifiex_cfg80211_change_station,
+       .get_channel = mwifiex_cfg80211_get_channel,
        .start_radar_detection = mwifiex_cfg80211_start_radar_detection,
        .channel_switch = mwifiex_cfg80211_channel_switch,
 };
 
        u8 del_list_idx;
        bool hs2_enabled;
        struct mwifiex_uap_bss_param bss_cfg;
+       struct cfg80211_chan_def bss_chandef;
        struct station_parameters *sta_params;
        struct sk_buff_head tdls_txq;
        u8 check_tdls_tx;
                                        struct mwifiex_bssdescriptor *bss_desc);
 
 u8 mwifiex_chan_type_to_sec_chan_offset(enum nl80211_channel_type chan_type);
+u8 mwifiex_sec_chan_offset_to_chan_type(u8 second_chan_offset);
 
 struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
                                              const char *name,
                         struct cfg80211_beacon_data *data);
 int mwifiex_del_mgmt_ies(struct mwifiex_private *priv);
 u8 *mwifiex_11d_code_2_region(u8 code);
-void mwifiex_uap_set_channel(struct mwifiex_uap_bss_param *bss_cfg,
+void mwifiex_uap_set_channel(struct mwifiex_private *priv,
+                            struct mwifiex_uap_bss_param *bss_cfg,
                             struct cfg80211_chan_def chandef);
 int mwifiex_config_start_uap(struct mwifiex_private *priv,
                             struct mwifiex_uap_bss_param *bss_cfg);