]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/blobdiff - drivers/net/wireless/bcmdhd/dhd_linux.c
net:wireless:bcmdhd: set rpt_hitxrate
[sojka/nv-tegra/linux-3.10.git] / drivers / net / wireless / bcmdhd / dhd_linux.c
index d81b030143d9ed2800481b9e7ca5ad585c41cd8f..832ea510c4b9b9dce0fb2fc19583b221256aff77 100644 (file)
@@ -3887,6 +3887,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        char eventmask[WL_EVENTING_MASK_LEN];
        char iovbuf[WL_EVENTING_MASK_LEN + 12]; /*  Room for "event_msgs" + '\0' + bitvec  */
        uint32 buf_key_b4_m4 = 1;
+       uint32 rpt_hitxrate = 1;
 #if defined(CUSTOM_AMPDU_BA_WSIZE)
        uint32 ampdu_ba_wsize = 0;
 #endif 
@@ -4261,6 +4262,21 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        }
 #endif /* SUPPORT_2G_VHT */
 
+       /* Set the rpt_hitxrate to 1 so that link speed updated by WLC_GET_RATE
+       *  is the maximum trasnmit rate
+       *  rpt_hitxrate 0 : Here the rate reported is the most used rate in
+       *                       the link.
+       *  rpt_hitxrate 1 : Here the rate reported is the highest used rate
+       *                       in the link.
+       */
+       bcm_mkiovar("rpt_hitxrate", (char *)&rpt_hitxrate, 4, iovbuf,
+                       sizeof(iovbuf));
+       ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf,
+                               sizeof(iovbuf), TRUE, 0);
+       if (ret < 0) {
+               DHD_ERROR(("%s Set rpt_hitxrate failed  %d\n", __FUNCTION__, ret));
+       }
+
        bcm_mkiovar("buf_key_b4_m4", (char *)&buf_key_b4_m4, 4, iovbuf, sizeof(iovbuf));
        if ((ret = dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf,
                sizeof(iovbuf), TRUE, 0)) < 0) {