• Ivo van Doorn's avatar
    rt2x00: Split rt2x00dev->flags · 7dab73b3
    Ivo van Doorn authored
    The number of flags defined for the rt2x00dev->flags field,
    has been growing over the years. Currently we are approaching
    the maximum number of bits which are available in the field.
    
    A secondary problem, is that one part of the field are initialized only
    during boot, because the driver requirements are initialized or device
    requirements are loaded from the EEPROM. In both cases, the flags are
    fixed and will not change during device operation. The other flags are
    the device state, and will change frequently. So far this resulted in the fact
    that for some flags, the atomic bit accessors are used, while for the others
    the non-atomic variants are used.
    
    By splitting the flags up into a "flags" and "cap_flags" we can put all flags
    which are fixed inside "cap_flags". This field can then be read non-atomically.
    In the "flags" field we keep the device state, which is going to be read atomically.
    
    This adds more room for more flags in the future, and sanitizes the field access methods.
    Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
    Acked-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    7dab73b3
rt2400pci.c 52.3 KB