[rdkb][common][hal][Refactor wifi_setRadioHwMode]

[Description]
Refactor wifi_setRadioHwMode
1. fix uci config hwmode=11a and band=5g set fail
2. fix uci config without hwmode and band=5g set success and cause wifi bring up fail issue

[Release-log]

diff --git a/src/wifi/wifi_hal.c b/src/wifi/wifi_hal.c
index d03650f..63b05e8 100644
--- a/src/wifi/wifi_hal.c
+++ b/src/wifi/wifi_hal.c
@@ -2016,10 +2016,13 @@
     WIFI_ENTRY_EXIT_DEBUG("Inside %s:%d\n", __func__, __LINE__);
 
     band = wifi_index_to_band(radioIndex);
-    if (strncmp(hw_mode, "a", 1) == 0 && (band != band_5 || band != band_6))
+
+    if (strncmp(hw_mode, "a", 1) == 0 && (band != band_5 && band != band_6))
         return RETURN_ERR;
     else if ((strncmp(hw_mode, "b", 1) == 0 || strncmp(hw_mode, "g", 1) == 0) && band != band_2_4)
         return RETURN_ERR;
+    else if ((strncmp(hw_mode, "a", 1) && strncmp(hw_mode, "b", 1) && strncmp(hw_mode, "g", 1)) || band == band_invalid)
+        return RETURN_ERR;
 
     sprintf(config_file, "%s%d.conf", CONFIG_PREFIX, radioIndex);
     params.name = "hw_mode";