wlan: Correctly report 20 MHz bandwidth in Linux 4.x

qcacld-3.0 to prima propagation.

Linux kernel 4.0 introduced a new way for drivers to report bandwidth
information to userspace.  Prior to this rate information was
indicated by setting an appropriate BW flag in the struct rate_info
flags field, and 20MHz bandwidth was assumed if no flag was set.
Linux 4.0 introduced a new bw field to struct rate_info, and the
driver was updated to set this field in all cases where previously a
bandwidth-specific flag had been set.  Unfortunately in the 20 MHz
bandwidth case the driver was not previously setting a
bandwidth-specific flag, and hence in the current case it is not
setting the bw field.  This manifests itself in the following warning
emitted by the kernel when the device is associated to an Access Point
with a 20MHz bandwidth:
    WARNING: at kernel/msm-4.4/net/wireless/util.c:1137
    Modules linked in: wlan(O)
    PC is at cfg80211_calculate_bitrate+0xdc/0x1f0
    LR is at nl80211_put_sta_rate+0x64/0x1dc

Fix this issue by initializing the rate_info bw field to 20 MHz prior
to calculating the bandwidth.  If the bandwidth is anything other than
20 MHz then this default value will later be overwritten.

Change-Id: I734b05e0e41c7a859939372fe4d8a3668a08c668
CRs-Fixed: 2234166
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 8f8de37..6d0c721 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -18193,6 +18193,11 @@
             (int) pAdapter->hdd_stats.ClassA_stat.mcs_index);
 #endif //LINKSPEED_DEBUG_ENABLED
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 0, 0)) || defined(WITH_BACKPORTS)
+    /* assume basic BW. anything else will override this later */
+    sinfo->txrate.bw = RATE_INFO_BW_20;
+#endif
+
     if (eHDD_LINK_SPEED_REPORT_ACTUAL != pCfg->reportMaxLinkSpeed)
     {
         // we do not want to necessarily report the current speed