Browse Source

qcacld-3.0: Apply cached KEEPALIVE interval after STA connection

Currently host rejects SET_KEEP_ALIVE_INTERVAL command if STA
is not connected. Instead of rejcting cache the KEEPALIVE
interval and apply after STA connection.

Change-Id: Ic45bceb6248f37afd2ab6348545a8c1eeb9e56d0
CRs-Fixed: 3814077
Asutosh Mohapatra 1 year ago
parent
commit
288a41b8e8
2 changed files with 6 additions and 8 deletions
  1. 5 6
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 1 2
      core/hdd/src/wlan_hdd_cm_connect.c

+ 5 - 6
core/hdd/src/wlan_hdd_cfg80211.c

@@ -11886,22 +11886,21 @@ static int hdd_vdev_set_sta_keep_alive_interval(
 		return -EINVAL;
 	}
 
-	hdd_debug("sta keep alive interval = %u", keep_alive_interval);
-
 	if (device_mode != QDF_STA_MODE) {
 		hdd_debug("This command is not supported for %s device mode",
 			  device_mode_to_string(device_mode));
 		return -EINVAL;
 	}
 
+	hdd_debug("sta keep alive interval = %u", keep_alive_interval);
+	wlan_hdd_save_sta_keep_alive_interval(adapter, keep_alive_interval);
+
 	if (!hdd_is_vdev_in_conn_state(link_info)) {
-		hdd_debug("Vdev (id %d) not in connected/started state, cannot accept command",
+		hdd_debug("Vdev (id %d) not in connected/started state, configure KEEPALIVE interval after connection",
 			  link_info->vdev_id);
-		return -EINVAL;
+		return 0;
 	}
 
-	wlan_hdd_save_sta_keep_alive_interval(adapter, keep_alive_interval);
-
 	if (!wlan_vdev_mlme_is_mlo_vdev(vdev))
 		return hdd_vdev_send_sta_keep_alive_interval(link_info,
 							hdd_ctx,

+ 1 - 2
core/hdd/src/wlan_hdd_cm_connect.c

@@ -1799,8 +1799,7 @@ hdd_cm_connect_success_pre_user_update(struct wlan_objmgr_vdev *vdev,
 		ucfg_dp_nud_indicate_roam(vdev);
 	 /* hdd_objmgr_set_peer_mlme_auth_state */
 
-	if (adapter->keep_alive_interval &&
-	    (is_roam ||	wlan_vdev_mlme_is_mlo_link_switch_in_progress(vdev)))
+	if (adapter->keep_alive_interval)
 		hdd_vdev_send_sta_keep_alive_interval(link_info, hdd_ctx,
 						adapter->keep_alive_interval);
 }