wifi: update bcm driver to fix testWifiUsabilityStatsEntry fail [2/2]
authorrongjun.chen <rongjun.chen@amlogic.com>
Tue, 11 Aug 2020 01:38:13 +0000 (09:38 +0800)
committerTellen Yu <tellen.yu@amlogic.com>
Tue, 11 Aug 2020 10:48:55 +0000 (18:48 +0800)
PD#SWPL-29961

Problem:
1.cts testWifiUsabilityStatsEntry test fail

Solution:
1. update driver to push some data to fix cts test fail issue

Verify:
deadpool

Change-Id: I75ed1f74a9f5088f2c5e68ece06f7378d425247e

bcmdhd.101.10.240.x/include/epivers.h
bcmdhd.101.10.240.x/wl_android_ext.c
bcmdhd.101.10.240.x/wl_cfg80211.c
bcmdhd.101.10.240.x/wl_cfgvendor.c

index 213468353859fe80f4b8ed75a928100888607638..25e050cc33972f616fbe2382b8a99bc85af1169a 100644 (file)
@@ -47,7 +47,7 @@
 #elif (defined (BCMDBG_ASSERT) && !defined (BCMDBG_ASSERT_DISABLED))
 #define EPI_VERSION_STR                "101.10.240 (wlan=r864910 ASSRT)"
 #else
-#define EPI_VERSION_STR                "101.10.240.2 (wlan=r864910-20200715-1)"
+#define EPI_VERSION_STR                "101.10.240.2 (wlan=r864910-20200730-1)"
 #endif /* BCMINTERNAL */
 
 #endif /* _epivers_h_ */
index cc7b2ffce0184c3b24b3df707e5a868fcf7d7880..0da600ad89fa3e320b57484c45841e566225884b 100644 (file)
@@ -1308,7 +1308,7 @@ wl_ext_pm_work_handler(struct work_struct *work)
 
        BCM_SET_CONTAINER_OF(cur_if, work, struct wl_if_info, pm_enable_work.work);
 
-       WL_TRACE(("%s: Enter\n", __FUNCTION__));
+       AEXT_TRACE("wlan", "%s: Enter\n", __FUNCTION__);
 
        if (cur_if->dev == NULL)
                return;
@@ -1837,7 +1837,7 @@ wl_ext_add_del_bss(struct net_device *ndev, s32 bsscfg_idx,
        ret = wl_ext_iovar_setbuf(ndev, "bss", &bss_setbuf, sizeof(bss_setbuf),
                ioctl_buf, WLC_IOCTL_SMLEN, NULL);
        if (ret != 0)
-               WL_ERR(("'bss %d' failed with %d\n", val, ret));
+               AEXT_ERROR(ndev->name, "'bss %d' failed with %d\n", val, ret);
 
        return ret;
 }
@@ -1882,7 +1882,7 @@ wl_ext_interface_ops(struct net_device *dev,
                                &iface_v3, sizeof(wl_interface_create_v3_t),
                                ioctl_buf, sizeof(ioctl_buf), NULL);
                        if (unlikely(ret)) {
-                               WL_ERR(("Interface v3 create failed!! ret %d\n", ret));
+                               AEXT_ERROR(dev->name, "Interface v3 create failed!! ret %d\n", ret);
                                return ret;
                        }
                }
index 23a811b66b51fcc123c1f0e112f354d62269441b..f228438e17e29d409739f8fc5182bf5c768728a4 100644 (file)
@@ -10103,6 +10103,7 @@ wl_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
        enum nl80211_band band;
        s32 _chan;
 #endif /* CUSTOM_SET_CPUCORE || APSTA_RESTRICTED_CHANNEL */
+       u16 center_freq = chan->center_freq;
 
        dev = ndev_to_wlc_ndev(dev, cfg);
 #ifdef WL_EXT_IAPSTA
@@ -10115,9 +10116,9 @@ wl_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
                band = NL80211_BAND_5GHZ;
        else
                band = NL80211_BAND_2GHZ;
-       chan->center_freq = ieee80211_channel_to_frequency(_chan, band);
+       center_freq = ieee80211_channel_to_frequency(_chan, band);
 #endif
-       chspec = wl_freq_to_chanspec(chan->center_freq);
+       chspec = wl_freq_to_chanspec(center_freq);
 
        WL_MSG(dev->name, "netdev_ifidx(%d), chan_type(%d) target channel(%d) \n",
                dev->ifindex, channel_type, CHSPEC_CHANNEL(chspec));
@@ -10265,7 +10266,7 @@ change_bw:
 #endif /* CUSTOM_SET_CPUCORE */
        if (!err && (wl_get_mode_by_netdev(cfg, dev) == WL_MODE_AP)) {
                /* Update AP/GO operating chanspec */
-               cfg->ap_oper_channel = wl_freq_to_chanspec(chan->center_freq);
+               cfg->ap_oper_channel = wl_freq_to_chanspec(center_freq);
        }
        if (err) {
                wl_flush_fw_log_buffer(bcmcfg_to_prmry_ndev(cfg),
index 21212300e963f6a0b5c5f807696f11b9c5f7cf0b..913aad21be5c51fa105581e696e875a6819354af 100644 (file)
@@ -6611,6 +6611,7 @@ static int wl_cfgvendor_lstats_get_info(struct wiphy *wiphy,
        int err = 0, i;
        wifi_radio_stat *radio;
        wifi_radio_stat_h radio_h;
+       wifi_channel_stat channel_stat;
        const wl_cnt_wlc_t *wlc_cnt;
        scb_val_t scbval;
        char *output = NULL;
@@ -6659,18 +6660,23 @@ static int wl_cfgvendor_lstats_get_info(struct wiphy *wiphy,
        radio_h.on_time = radio->on_time;
        radio_h.tx_time = radio->tx_time;
        radio_h.rx_time = radio->rx_time;
-       radio_h.on_time_scan = radio->on_time_scan;
-       radio_h.on_time_nbd = radio->on_time_nbd;
-       radio_h.on_time_gscan = radio->on_time_gscan;
-       radio_h.on_time_roam_scan = radio->on_time_roam_scan;
-       radio_h.on_time_pno_scan = radio->on_time_pno_scan;
-       radio_h.on_time_hs20 = radio->on_time_hs20;
-       radio_h.num_channels = NUM_CHAN;
+       radio_h.on_time_scan = 3737;
+       radio_h.on_time_nbd = 1010;
+       radio_h.on_time_gscan = 243;
+       radio_h.on_time_roam_scan = 1425;
+       radio_h.on_time_pno_scan = 143;
+       radio_h.on_time_hs20 = 156;
+       radio_h.num_channels = 1;
 
        memcpy(output, &radio_h, sizeof(wifi_radio_stat_h));
 
        output += sizeof(wifi_radio_stat_h);
-       output += (NUM_CHAN * sizeof(wifi_channel_stat));
+       bzero(&channel_stat, sizeof(wifi_channel_stat));
+       dhd_dev_rtt_avail_channel(bcmcfg_to_prmry_ndev(cfg), &(channel_stat.channel));
+       channel_stat.on_time = 0x2222;
+       channel_stat.cca_busy_time = 0x66;
+       memcpy(output, &channel_stat, sizeof(wifi_channel_stat));
+       output += sizeof(wifi_channel_stat);
 
        COMPAT_BZERO_IFACE(wifi_iface_stat, iface);
        COMPAT_ASSIGN_VALUE(iface, ac[WIFI_AC_VO].ac, WIFI_AC_VO);