This patch removes redundant memset in rate scale. In rs_alloc_sta,
kzalloc is used so the memset can be avoided. In rs_rate_init, it is
a bug fix since it overrides everything set in other handlers namely
add_debugfs.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
if (crl == NULL)
return NULL;
-
- memset(crl, 0, sizeof(struct iwl_rate_scale_priv));
crl->lq.sta_id = 0xff;
+
for (j = 0; j < LQ_SIZE; j++)
for (i = 0; i < IWL_RATE_COUNT; i++)
rs_rate_scale_clear_window(&(crl->lq_info[j].win[i]));
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
struct iwl_rate_scale_priv *crl = priv_sta;
- memset(crl, 0, sizeof(struct iwl_rate_scale_priv));
-
- crl->lq.sta_id = 0xff;
crl->flush_timer = 0;
sta->txrate = 3;
for (j = 0; j < LQ_SIZE; j++)