Przeglądaj źródła

qcacld-3.0: Add support for configuring modulated DTIM dynamically

qcacld-2.0 to qcacld-3.0 Propagation.

Wifi OFF/ON is needed to update the gEnableModuleDTIM ini param.

Add private ioctl to configure modulated DTIM at runtime.

CRs-Fixed: 2002662
Change-Id: I28be432da775a9aa026cd702c63dee5666260d33
SaidiReddy Yenuga 8 lat temu
rodzic
commit
a92f8cc9a1
1 zmienionych plików z 38 dodań i 0 usunięć
  1. 38 0
      core/hdd/src/wlan_hdd_wext.c

+ 38 - 0
core/hdd/src/wlan_hdd_wext.c

@@ -1143,6 +1143,28 @@ static const struct ccp_freq_chan_map freq_chan_map[] = {
  */
 #define WE_SET_PDEV_RESET    95
 
+/*
+ * setModDTIM - Change Modulated DTIM
+ *
+ * @INPUT: set_value.
+ *
+ * @OUTPUT: None
+ *
+ * This IOCTL is used to change modulated DTIM
+ * value without WIFI OFF/ON.
+ *
+ * @E.g: iwpriv wlan0 setModDTIM <value>
+ * iwpriv wlan0 setModDTIM 2
+ *
+ * Supported Feature: N/A
+ *
+ * Usage: Internal/External
+ *
+ * </ioctl>
+ */
+#define WE_SET_MODULATED_DTIM                 96
+
+
 /* Private ioctls and their sub-ioctls */
 #define WLAN_PRIV_SET_NONE_GET_INT    (SIOCIWFIRSTPRIV + 1)
 #define WE_GET_11D_STATE     1
@@ -9225,6 +9247,18 @@ static int __iw_setint_getnone(struct net_device *dev,
 	case WE_SET_PDEV_RESET:
 		ret = hdd_handle_pdev_reset(adapter, set_value);
 		break;
+	case WE_SET_MODULATED_DTIM:
+	{
+		if ((set_value < CFG_ENABLE_MODULATED_DTIM_MIN) ||
+				(set_value > CFG_ENABLE_MODULATED_DTIM_MAX)) {
+			hdd_err("Invalid gEnableModuleDTIM value %d",
+				set_value);
+			return -EINVAL;
+		} else {
+			hdd_ctx->config->enableModulatedDTIM = set_value;
+		}
+		break;
+	}
 	default:
 		hdd_err("Invalid sub command %d", sub_cmd);
 		ret = -EINVAL;
@@ -13744,6 +13778,10 @@ static const struct iw_priv_args we_private_args[] = {
 	 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
 	 0, "pdev_reset" },
 
+	{WE_SET_MODULATED_DTIM,
+	 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+	 0, "setModDTIM" },
+
 	{WLAN_PRIV_SET_NONE_GET_INT,
 	 0,
 	 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,