wlan: Update MCS index appropriately

When AP is configured with MCS index less than 4(43Mbps) then Host
reports invalid MCS Index to upper-layer, leading to display invalid
link speed on GUI.
Updating MCS index with valid value and thereby updating correct MCS
index to upper-layer

Change-Id: Ibd1503be3825c879b7fa52bdfb6ff07423c39023
CRs-Fixed: 855022
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index dbb6e22..a127e73 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -13335,16 +13335,16 @@
                         if (supported_mcs_rate[j].beacon_rate_index == MCSRates[i])
                         {
                             currentRate = supported_mcs_rate[j].supported_rate[rateFlag];
+                            maxMCSIdx   = supported_mcs_rate[j].beacon_rate_index;
                             break;
                         }
                     }
                     if ((j < temp) && (currentRate > maxRate))
                     {
                         maxRate     = currentRate;
-                        maxSpeedMCS = 1;
-                        maxMCSIdx   = supported_mcs_rate[j].beacon_rate_index;
                     }
                 }
+                maxSpeedMCS = 1;
             }
         }