wifi(implementation): Turn on DFS flag for STA

DFS flag needs to be turned on in the legacy HAL for STA operations. So,
initialize this flag on creation of STA iface.
PS: Not adding an explicit HIDL API for this since there is no need to
toggle this from framework and since the HIDL API's are frozen now.

Bug: 36169790
Test: Verified the fix with regression tests: b/37528903.
Change-Id: I214097fcb399cef7fc0cbd2c278622fac259a3e3
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index ba57ba7..6641be5 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -581,6 +581,11 @@
   return {status, std::move(freqs)};
 }
 
+wifi_error WifiLegacyHal::setDfsFlag(bool dfs_on) {
+  return global_func_table_.wifi_set_nodfs_flag(
+      wlan_interface_handle_, dfs_on ? 0 : 1);
+}
+
 wifi_error WifiLegacyHal::enableLinkLayerStats(bool debug) {
   wifi_link_layer_params params;
   params.mpdu_size_threshold = kLinkLayerStatsDataMpduSizeThreshold;