Browse Source

qcacld-3.0: Add attribute for propagation absolute delay

qcacld-2.0 to qcacld-3.0 propagation

A new 32-bit NL80211 vendor attribute is added to configure propagation
absolute delay for 2G/5G band (unit in us).

Change-Id: I2aecaa8b007c67fa2843ad3922857f923f9b8294
CRs-Fixed: 2031008
Zhang Qian 8 years ago
parent
commit
e9fd14b726
2 changed files with 12 additions and 1 deletions
  1. 11 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 1 0
      core/hdd/src/wlan_hdd_cfg80211.h

+ 11 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -4515,6 +4515,7 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
 	struct sir_set_tx_rx_aggregation_size request;
 	QDF_STATUS qdf_status;
 	uint8_t retry, delay;
+	uint32_t abs_delay;
 	int param_id;
 	uint32_t tx_fail_count;
 
@@ -4672,9 +4673,18 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
 				QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_DELAY]);
 		delay = delay > CFG_PROPAGATION_DELAY_MAX ?
 				CFG_PROPAGATION_DELAY_MAX : delay;
+		abs_delay = delay + CFG_PROPAGATION_DELAY_BASE;
 		param_id = WMI_PDEV_PARAM_PROPAGATION_DELAY;
 		ret_val = wma_cli_set_command(adapter->sessionId, param_id,
-					      delay, PDEV_CMD);
+					      abs_delay, PDEV_CMD);
+	}
+
+	if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_ABS_DELAY]) {
+		abs_delay = nla_get_u8(tb[
+			QCA_WLAN_VENDOR_ATTR_CONFIG_PROPAGATION_ABS_DELAY]);
+		param_id = WMI_PDEV_PARAM_PROPAGATION_DELAY;
+		ret_val = wma_cli_set_command(adapter->sessionId, param_id,
+					      abs_delay, PDEV_CMD);
 	}
 
 	if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_TX_FAIL_COUNT]) {

+ 1 - 0
core/hdd/src/wlan_hdd_cfg80211.h

@@ -194,6 +194,7 @@ typedef struct sHddAvoidFreqList {
 #define CFG_MGMT_RETRY_MAX                     (31)
 #define CFG_CTRL_RETRY_MAX                     (31)
 #define CFG_PROPAGATION_DELAY_MAX              (63)
+#define CFG_PROPAGATION_DELAY_BASE             (64)
 #define CFG_AGG_RETRY_MIN                      (5)
 
 struct cfg80211_bss *wlan_hdd_cfg80211_update_bss_db(hdd_adapter_t *pAdapter,