On Wed, Oct 16, 2019 at 8:33 PM <yhchuang@xxxxxxxxxxx> wrote: > > From: Tzu-En Huang <tehuang@xxxxxxxxxxx> > > + > + band = hal->current_band_type; > + if (band == RTW_BAND_2G) { > + band = NL80211_BAND_2GHZ; > + cfg_mask = mask->control[band].legacy; > + } else if (band == RTW_BAND_5G) { > + band = NL80211_BAND_5GHZ; > + cfg_mask = mask->control[band].legacy << 4; > + } > + > + if (!is_vht_enable) { > + if (ra_mask & RA_MASK_HT_RATES_1SS) > + cfg_mask |= mask->control[band].ht_mcs[0] << 12; > + if (ra_mask & RA_MASK_HT_RATES_2SS) > + cfg_mask |= mask->control[band].ht_mcs[1] << 20; > + } else { > + if (ra_mask & RA_MASK_VHT_RATES_1SS) > + cfg_mask |= mask->control[band].vht_mcs[0] << 12; > + if (ra_mask & RA_MASK_VHT_RATES_2SS) > + cfg_mask |= mask->control[band].vht_mcs[1] << 22; > + } > + > + ra_mask &= cfg_mask; > + > + return ra_mask; > +} > + I believe you can replace the 4, 12, 20, 22 with a more descriptive macro. Chris > -- > 2.17.1 >