From 12d23aa04385369d86468d080b114a82ef8a3b38 Mon Sep 17 00:00:00 2001
From: Rex Lu <rex.lu@mediatek.com>
Date: Wed, 29 May 2024 14:08:06 +0800
Subject: [PATCH] fix 5G and 6G connect fail

---
 src/wifi_hal_hostapd.c       | 20 +++---------------
 src/wifi_hal_nl80211.c       | 39 +++++++++---------------------------
 src/wifi_hal_nl80211_utils.c | 20 ++++++++++++++++--
 3 files changed, 30 insertions(+), 49 deletions(-)

diff --git a/src/wifi_hal_hostapd.c b/src/wifi_hal_hostapd.c
index 7921406..96f1f56 100644
--- a/src/wifi_hal_hostapd.c
+++ b/src/wifi_hal_hostapd.c
@@ -1397,7 +1397,6 @@ int update_hostap_iface(wifi_interface_info_t *interface)
     */
 #endif
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
     iface->drv_flags = radio->driver_data.capa.flags;
     //iface->drv_flags |= WPA_DRIVER_FLAGS_INACTIVITY_TIMER;
     iface->drv_flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
@@ -1435,20 +1434,7 @@ int update_hostap_iface(wifi_interface_info_t *interface)
     iface->extended_capa = radio->driver_data.extended_capa;
     iface->extended_capa_mask = radio->driver_data.extended_capa_mask;
     iface->extended_capa_len = radio->driver_data.extended_capa_len;
-#else
-    iface->drv_flags = WPA_DRIVER_FLAGS_INACTIVITY_TIMER;
-    iface->drv_flags |= WPA_DRIVER_FLAGS_EAPOL_TX_STATUS;
-    iface->drv_flags |= WPA_DRIVER_FLAGS_AP_MLME;
-    iface->drv_flags |= WPA_DRIVER_FLAGS_AP_CSA;
-    // XXX: Such ability should be retrieved during NL80211_CMD_GET_WIPHY
-    if (g_wifi_hal.platform_flags & PLATFORM_FLAGS_PROBE_RESP_OFFLOAD) {
-        iface->drv_flags |= WPA_DRIVER_FLAGS_PROBE_RESP_OFFLOAD;
-    }
 
-    if (iface->current_mode->vht_capab & VHT_CAP_SUPP_CHAN_WIDTH_160MHZ) {
-        iface->conf->vht_capab |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
-    }
-#endif // CMXB7_PORT && VNTXER5_PORT
     if(preassoc_supp_rates) {
       os_free(preassoc_supp_rates);
       preassoc_supp_rates = NULL;
@@ -1669,14 +1655,14 @@ int update_hostap_config_params(wifi_radio_info_t *radio)
     }
 
     if (param->variant & WIFI_80211_VARIANT_AX) {
-        if (param->band == WIFI_FREQUENCY_5_BAND) {
+        if (param->band == WIFI_FREQUENCY_5_BAND || param->band == WIFI_FREQUENCY_6_BAND) {
             iconf->hw_mode = HOSTAPD_MODE_IEEE80211A;
             iconf->ieee80211ac = 1;
         } else {
             iconf->hw_mode = HOSTAPD_MODE_IEEE80211G;
         }
         iconf->ieee80211ax = 1;
-        //iconf->ieee80211n = 1;
+        iconf->ieee80211n = 1;
         //iconf->require_ht = 1;
         //iconf->require_vht = 1;
     }
@@ -1733,7 +1719,7 @@ int update_hostap_config_params(wifi_radio_info_t *radio)
     }
 #endif
     iconf->vht_oper_chwidth = bandwidth;
-    
+    iconf->op_class = param->op_class;
     //validate_config_params
     if (hostapd_config_check(iconf, 1) < 0) {
         pthread_mutex_unlock(&g_wifi_hal.hapd_lock);
diff --git a/src/wifi_hal_nl80211.c b/src/wifi_hal_nl80211.c
index dd5da8b..4d27e45 100644
--- a/src/wifi_hal_nl80211.c
+++ b/src/wifi_hal_nl80211.c
@@ -57,7 +57,6 @@ struct family_data {
     int id;
 };
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
 struct phy_info_arg {
     u16 *num_modes;
     struct hostapd_hw_modes *modes;
@@ -65,7 +64,6 @@ struct phy_info_arg {
     int failed;
     u8 dfs_domain;
 };
-#endif
 
 void prepare_interface_fdset(wifi_hal_priv_t *priv)
 {
@@ -2540,7 +2538,6 @@ skip:   found = 0;
     return mode;
 }
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
 static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
                  enum ieee80211_op_mode opmode,
                  struct nlattr **tb, struct nlattr **tb_flags)
@@ -2548,9 +2545,7 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
     enum nl80211_iftype iftype;
     size_t len;
     struct he_capabilities *he_capab = &mode->he_capab[opmode];
-#ifdef CMXB7_PORT
     struct eht_capabilities *eht_capab = &mode->eht_capab[opmode];
-#endif // CMXB7_PORT
 
     switch (opmode) {
     case IEEE80211_MODE_INFRA:
@@ -2623,7 +2618,6 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
               len);
     }
 
-#ifdef CMXB7_PORT
     if (tb[NL80211_BAND_IFTYPE_ATTR_HE_6GHZ_CAPA]) {
         u16 capa;
 
@@ -2676,7 +2670,6 @@ static void phy_info_iftype_copy(struct hostapd_hw_modes *mode,
               nla_data(tb[NL80211_BAND_IFTYPE_ATTR_EHT_CAP_PPE]),
               len);
     }
-#endif // CMXB7_PORT
 }
 
 static int wiphy_info_iface_comb_process(wifi_radio_info_t *radio,
@@ -2835,7 +2828,6 @@ static unsigned int get_akm_suites_info(struct nlattr *tb)
     return key_mgmt;
 }
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
 static void get_iface_akm_suites_info(wifi_radio_info_t *radio,
                     struct nlattr *nl_akms)
 {
@@ -2900,7 +2892,6 @@ static void get_iface_akm_suites_info(wifi_radio_info_t *radio,
                 key_mgmt);
     }
 }
-#endif // CMXB7_PORT && VNTXER5_PORT
 
 static void wiphy_info_feature_flags(wifi_radio_info_t *radio,
                      struct nlattr *tb)
@@ -3038,12 +3029,12 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
                   NL80211_EXT_FEATURE_BEACON_RATE_VHT)) {
         capa->flags |= WPA_DRIVER_FLAGS_BEACON_RATE_VHT;
     }
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+
     if (ext_feature_isset(ext_features, len,
                   NL80211_EXT_FEATURE_BEACON_RATE_HE)) {
         capa->flags2 |= WPA_DRIVER_FLAGS2_BEACON_RATE_HE;
     }
-#endif // CMXB7_PORT
+
     if (ext_feature_isset(ext_features, len,
                   NL80211_EXT_FEATURE_SET_SCAN_DWELL)) {
         capa->rrm_flags |= WPA_DRIVER_FLAGS_SUPPORT_SET_SCAN_DWELL;
@@ -3106,7 +3097,7 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
         capa->flags |= WPA_DRIVER_FLAGS_OCE_STA;
     }
 #endif /* CONFIG_MBO */
-#if defined CMXB7_PORT || defined(VNTXER5_PORT)
+
     if (ext_feature_isset(ext_features, len,
                   NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER)) {
         capa->flags |= WPA_DRIVER_FLAGS_FTM_RESPONDER;
@@ -3172,7 +3163,7 @@ static void wiphy_info_ext_feature_flags(wifi_radio_info_t *radio,
                   NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION)) {
         capa->flags2 |= WPA_DRIVER_FLAGS2_OCV;
     }
-#endif // CMXB7_PORT
+
     /* XXX: is not present in nl80211_copy.h, maybe needs to be fixed
     if (ext_feature_isset(ext_features, len,
                   NL80211_EXT_FEATURE_RADAR_BACKGROUND)) {
@@ -3348,7 +3339,6 @@ static int phy_info_iftype(struct hostapd_hw_modes *mode,
 
     return NL_OK;
 }
-#endif
 
 static int phy_info_band(wifi_radio_info_t *radio, struct nlattr *nl_band)
 {
@@ -3460,9 +3450,7 @@ static int regulatory_domain_set_info_handler(struct nl_msg *msg, void *arg)
 static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
 {
     wifi_radio_info_t *radio;
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
     struct wpa_driver_capa *capa;
-#endif // CMXB7_PORT && VNTXER5_PORT
     struct nlattr *tb[NL80211_ATTR_MAX + 1];
     struct genlmsghdr *gnlh;
     //unsigned int *cmd;
@@ -3479,14 +3467,12 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
 
     nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL);
 
-#if !defined(VNTXER5_PORT)
     for (j = 0; j < g_wifi_hal.num_radios; j++)
     {
         if (strcmp(g_wifi_hal.radio_info[j].name, nla_get_string(tb[NL80211_ATTR_WIPHY_NAME])) == 0) {
             return NL_SKIP;
         }
     }
-#endif
 
     phy_index = nla_get_u32(tb[NL80211_ATTR_WIPHY]);
     rdk_radio_index = get_rdk_radio_index(phy_index);
@@ -3525,7 +3511,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
     if (tb[NL80211_ATTR_WIPHY_NAME]) {
         strcpy(radio->name, nla_get_string(tb[NL80211_ATTR_WIPHY_NAME]));
     }
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+
     capa = &radio->driver_data.capa;
 
     if (tb[NL80211_ATTR_MAX_NUM_SCAN_SSIDS]) {
@@ -3691,7 +3677,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
         wifi_hal_info_print("%s:%d: nl80211: wiphy supported key_mgmt 0x%x\n", __func__, __LINE__,
                 capa->key_mgmt);
     }
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
+
     if (tb[NL80211_ATTR_IFTYPE_AKM_SUITES]) {
         struct nlattr *nl_if;
         int rem_if;
@@ -3699,7 +3685,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
         nla_for_each_nested(nl_if, tb[NL80211_ATTR_IFTYPE_AKM_SUITES], rem_if)
             get_iface_akm_suites_info(radio, nl_if);
     }
-#endif // CMXB7_PORT && VNTXER5_PORT
+
     if (tb[NL80211_ATTR_OFFCHANNEL_TX_OK]) {
         wifi_hal_info_print("%s:%d: nl80211: Using driver-based off-channel TX\n", __func__, __LINE__);
         capa->flags |= WPA_DRIVER_FLAGS_OFFCHANNEL_TX;
@@ -3787,7 +3773,7 @@ static int wiphy_dump_handler(struct nl_msg *msg, void *arg)
     if (tb[NL80211_ATTR_WIPHY_SELF_MANAGED_REG]) {
         capa->flags |= WPA_DRIVER_FLAGS_SELF_MANAGED_REGULATORY;
     }
-#endif // CMXB7_PORT && VNTXER5_PORT
+
     if (tb[NL80211_ATTR_WDEV]) {
         radio->dev_id = nla_get_u64(tb[NL80211_ATTR_WDEV]);
     }
@@ -4024,7 +4010,6 @@ static int interface_info_handler(struct nl_msg *msg, void *arg)
     return NL_SKIP;
 }
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
 static int phy_info_rates_get_hw_features(struct hostapd_hw_modes *mode, struct nlattr *tb)
 {
     static struct nla_policy rate_policy[NL80211_BITRATE_ATTR_MAX + 1] = {
@@ -4067,7 +4052,6 @@ static int phy_info_rates_get_hw_features(struct hostapd_hw_modes *mode, struct
 
     return NL_OK;
 }
-#endif
 
 static int phy_info_handler(struct nl_msg *msg, void *arg)
 {
@@ -4470,7 +4454,6 @@ int init_nl80211()
     for (i = 0; i < g_wifi_hal.num_radios; i++) {
         radio = &g_wifi_hal.radio_info[i];
 
-#ifdef CMXB7_PORT
         if (radio->driver_data.auth_supported) {
             radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_SME;
         }
@@ -4518,7 +4501,7 @@ int init_nl80211()
         if (radio->driver_data.update_ft_ies_supported) {
             radio->driver_data.capa.flags |= WPA_DRIVER_FLAGS_UPDATE_FT_IES;
         }
-#endif
+
         // initialize the interface map
         radio->interface_map = hash_map_create();
 
@@ -8513,7 +8496,6 @@ fail:
     return ret;
 }
 
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
 static int cw2ecw(unsigned int cw)
 {
     int bit;
@@ -9366,12 +9348,10 @@ static int nl80211_set_regulatory_flags(struct phy_info_arg *results)
 
     return nl80211_send_and_recv(msg, nl80211_get_reg, results, NULL, NULL);
 }
-#endif
 
 struct hostapd_hw_modes *
 wifi_drv_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs_domain)
 {
-#if defined(CMXB7_PORT) || defined(VNTXER5_PORT)
     struct nl_msg *msg; 
     struct phy_info_arg result = {
         .num_modes = num_modes,
@@ -9426,7 +9406,6 @@ wifi_drv_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags, u8 *dfs_dom
         nl80211_dump_chan_list(modes, *num_modes);
         return modes;
     }
-#endif
     return NULL;
 }
 
diff --git a/src/wifi_hal_nl80211_utils.c b/src/wifi_hal_nl80211_utils.c
index da9dc33..b524ecd 100644
--- a/src/wifi_hal_nl80211_utils.c
+++ b/src/wifi_hal_nl80211_utils.c
@@ -1825,11 +1825,27 @@ int get_op_class_from_radio_params(wifi_radio_operationParam_t *param)
 
 #if HOSTAPD_VERSION >= 210 //2.10
     if (param->band == WIFI_FREQUENCY_6_BAND) {
-        int freq, global_op_class = -1;
+        int freq, idx, global_op_class = -1;
 
         freq = (param->channel == 2) ? 5935 : (5950 + (param->channel * 5));
         if (is_6ghz_freq(freq)) {
-            global_op_class = 131 + center_idx_to_bw_6ghz(param->channel);
+            switch (param->channelWidth) {
+            case WIFI_CHANNELBANDWIDTH_40MHZ:
+                idx = 1;
+                break;
+            case WIFI_CHANNELBANDWIDTH_80MHZ:
+                idx = 2;
+                break;
+            case WIFI_CHANNELBANDWIDTH_160MHZ:
+                idx = 3;
+                break;
+            case WIFI_CHANNELBANDWIDTH_20MHZ:
+            default:
+                idx = 0;
+                break;
+            }
+
+            global_op_class = 131 + idx;
         }
         return global_op_class;
     }
-- 
2.18.0

