From: Wu Gao Date: Fri, 13 Dec 2024 07:16:24 +0000 (-0800) Subject: Add QCA vendor attributes to configure antenna selection X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e5d2dbea7671f7413bdbf999615d08576d88057;p=thirdparty%2Fhostap.git Add QCA vendor attributes to configure antenna selection Add following attributes to configure antenna selection: QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_COUNT_WLAN QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_COUNT_BT QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_WLAN_RSSI_THRESHOLD QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_BT_RSSI_THRESHOLD QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SWITCH_WLAN_RSSI_DIFF QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SWITCH_BT_RSSI_DIFF If WLAN or BT RSSI is lower than the threshold, the firmware will start a probe and then get RSSI of other antenna, and then select a better antenna if RSSI difference is larger than the setting. Signed-off-by: Wu Gao --- diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index e59e29524..6c80589c0 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -3815,6 +3815,40 @@ enum qca_wlan_vendor_attr_config { */ QCA_WLAN_VENDOR_ATTR_CONFIG_DFS_OWNER_DISABLE = 123, + /* 16-bit unsigned value. For probing RSSI on other antennas, this + * attribute specifies the number of WLAN probes. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_COUNT_WLAN = 124, + + /* 16-bit unsigned value. For probing RSSI on other antennas, this + * attribute specifies the number of BT probes. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_COUNT_BT = 125, + + /* 16-bit unsigned value. This attribute specifies the WLAN RSSI + * threshold. The firmware will start to probe RSSI on other antenna + * if WLAN RSSI is lower than the threshold. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_WLAN_RSSI_THRESHOLD = 126, + + /* 16-bit unsigned value. This attribute specifies the BT RSSI + * threshold. The firmware will start to probe RSSI on other antenna + * if BT RSSI is lower than the threshold. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_PROBE_BT_RSSI_THRESHOLD = 127, + + /* 16-bit unsigned value. This attribute specifies the WLAN RSSI + * difference. The firmware will select a better antenna if WLAN RSSI + * difference is larger than the value. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SWITCH_WLAN_RSSI_DIFF = 128, + + /* 16-bit unsigned value. This attribute specifies the BT RSSI + * difference. The firmware will select a better antenna if WLAN RSSI + * difference larger than the value. + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ANT_DIV_SWITCH_BT_RSSI_DIFF = 129, + /* keep last */ QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =