On Wed, May 29, 2019 at 10:52 PM Chris Chiu <chiu@xxxxxxxxxxxx> wrote: > You mean moving the ratr_index to be the 4th function parameter of > update_rate_mask which has 2 candidates rtl8xxxu_update_rate_mask > and rtl8xxxu_gen2_update_rate_mask? I was planning to keep the > rtl8xxxu_update_rate_mask the same because old chips seems don't > need the rate index when invoking H2C command to change rate mask. > And rate index is not a common phrase/term for rate adaptive. Theoretically > we just need packet error rate, sgi and other factors to determine the rate > mask. This rate index seems to be only specific to newer Realtek drivers > or firmware for rate adaptive algorithm. I'd like to keep this for gen2 but > I admit it's ugly to put it in the priv structure. Any suggestion is > appreciated. I think it's cleaner to have it as a function parameter, even if the old chips don't use it. The rest of the implementation is in the core, so we aren't exactly dealing with chip-specific code here, at least the way it's currently done. The vendor driver also has it as a function parameter from what I can see. Daniel