Re: [PATCH 1/3] rtlwifi: avoid accessing RCR directly

From: Peter Wu
Date: Fri Feb 14 2014 - 16:46:40 EST


On Friday 14 February 2014 15:28:44 Larry Finger wrote:
> On 02/14/2014 12:03 PM, Peter Wu wrote:
> > The rtl*_set_check_bssid functions are mostly the same, but access the
> > RCR register in different ways. Use the get_hw_reg abstraction layer
> > (which reads rtlpci->receive_config for PCI devices and mac->rx_conf for
> > USB).
> >
> > There is no functional change for cases where receive_config was
> > accessed directly. For rtl8192ce, there is still no change because
> > nothing modifies REG_RCR or receive_config. For rtl8192cu, it now also
> > applies changes to rx_conf from configure_filter, but that can be
> > considered a bug which is fixed later.
> >
> > Signed-off-by: Peter Wu <lekensteyn@xxxxxxxxx>
>
> Acked-by: Larry Finger <Larry.Finger@lwfinger>

TLD is missing ;)

> With this change it will not take much work to move all the
> *_set_check_bssid functions into a common version in rtlwifi. But that
> will have to wait as I have one new driver submitted, but not merged, and
> two others that are not quite ready for submission.

There are three variants of the set_check_bssid functions:
- four that modify the beacon filter (through _rtl*_set_bcn_ctrl_reg)
- one (rtl8192se) that does not modify the beacon filter and writes
less bits (just RCR_BSSID instead of RCR_BSSID_{DATA,BCN})
- one (rtl8192cu) that modifies the beacon filter, and depending on
the chip version, sets the same bits as rtl8192se, or the other four.

I was not sure where to move the set_bcn_ctrl_reg functions, these
depend on a value from rtl*/reg.h. Perhaps the [gs]et_hw_reg functions
can be extended with these registers?

Thanks,
Peter

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/