Explorar o código

qcacmn: Use correct opclass table to populate 6 GHz op class

'wifitool athX setbssidpref' command is used to the
set bssid preference value  for mac address.
'wifitool athX sendbstmreq' command is used to
trigger BTM request frame from the AP to make MCC STA roam from
one AP to another.The preference value from the 'setbssidpref'
command is not reflected in the 'Neighbor report' IE in the
BTM request frame in 5 GHz device. In case of 5 GHz device, 6 GHz op
class are not populated since two global op class structure are
maintained and  6 GHz channels are missing from the list of channels
supported from the old structure (global_operating_class).
This is causing the AP to exclude the preference value
from setbssidpref command.

To fix this, popluate 6 GHz supported op class from new
global_op_class structure instead of old global_operating_class structure.

Change-Id: Id2275c9862518c613773d6ae810d59dea8b854b1
CRs-Fixed: 3549953
Divya R %!s(int64=2) %!d(string=hai) anos
pai
achega
50956c4387

+ 12 - 0
umac/regulatory/core/src/reg_opclass.c

@@ -2343,4 +2343,16 @@ QDF_STATUS reg_enable_disable_opclass_chans(struct wlan_objmgr_pdev *pdev,
 	return QDF_STATUS_E_INVAL;
 }
 #endif /* #ifndef CONFIG_REG_CLIENT */
+
+QDF_STATUS reg_get_opclass_from_map(const struct reg_dmn_op_class_map_t **map,
+				    bool is_global_op_table_needed)
+{
+	if (is_global_op_table_needed)
+		*map = global_op_class;
+	else
+		reg_get_op_class_tbl_by_chan_map(map);
+
+	return QDF_STATUS_SUCCESS;
+}
+
 #endif

+ 17 - 0
umac/regulatory/core/src/reg_opclass.h

@@ -128,6 +128,16 @@ QDF_STATUS reg_get_opclass_details(struct wlan_objmgr_pdev *pdev,
 				   bool global_tbl_lookup,
 				   enum supported_6g_pwr_types in_6g_pwr_mode);
 
+/**
+ * reg_get_opclass_from_map() - Get opclass from map.
+ * @map: Pointer to pointer to regdmn_ap_cap_opclass_t.
+ * @is_global_op_table_needed: Whether to lookup global op class table.
+ *
+ * Return: QDF_STATUS_SUCCESS if success, else return QDF_STATUS_FAILURE.
+ */
+QDF_STATUS reg_get_opclass_from_map(const struct reg_dmn_op_class_map_t **map,
+				    bool is_global_op_table_needed);
+
 /**
  * reg_get_opclass_for_cur_hwmode() - Get details about the opclasses for
  * the current hwmode.
@@ -370,6 +380,13 @@ QDF_STATUS reg_get_opclass_details(struct wlan_objmgr_pdev *pdev,
 	return QDF_STATUS_E_FAILURE;
 }
 
+static inline
+QDF_STATUS reg_get_opclass_from_map(const struct reg_dmn_op_class_map_t **map,
+				    bool is_global_op_table_needed);
+{
+	return QDF_STATUS_E_FAILURE;
+}
+
 static inline
 bool reg_is_5ghz_op_class(const uint8_t *country, uint8_t op_class)
 {

+ 11 - 0
umac/regulatory/dispatcher/inc/wlan_reg_services_api.h

@@ -2928,4 +2928,15 @@ wlan_reg_unregister_is_chan_connected_callback(struct wlan_objmgr_psoc *psoc,
 qdf_freq_t
 wlan_reg_get_endchan_cen_from_bandstart(qdf_freq_t band_start,
 					uint16_t bw);
+
+/**
+ * wlan_reg_get_opclass_from_map() - Get op class from map.
+ * @map: Pointer to reg_dmn_op_class_map_t.
+ * @is_global_op_table_needed: Whether to lookup global op class tbl.
+ *
+ * Return: QDF_STATUS_SUCCESS if success, else return QDF_STATUS_FAILURE.
+ */
+QDF_STATUS
+wlan_reg_get_opclass_from_map(const struct reg_dmn_op_class_map_t **map,
+			      bool is_global_op_table_needed);
 #endif

+ 7 - 0
umac/regulatory/dispatcher/src/wlan_reg_services_api.c

@@ -1980,3 +1980,10 @@ wlan_reg_get_endchan_cen_from_bandstart(qdf_freq_t band_start,
 {
 	return reg_get_endchan_cen_from_bandstart(band_start, bw);
 }
+
+QDF_STATUS
+wlan_reg_get_opclass_from_map(const struct reg_dmn_op_class_map_t **map,
+			      bool is_global_op_table_needed)
+{
+	return reg_get_opclass_from_map(map, is_global_op_table_needed);
+}