• Gertjan van Wingerde's avatar
    rt2x00: Fix hw mode registration with mac80211. · 47ac2683
    Gertjan van Wingerde authored
    The supported_bands field of struct hw_mode_spec now represents a bitfield,
    so bitfield operators need to be tested with when setting the band data.
    
    The current code generates the following warning:
    
    [176624.986244] WARNING: at /usr/local/src/incoming/compat-wireless-2.6/net/wireless/core.c:269 wiphy_register()
    [176624.986249] Pid: 12548, comm: modprobe Tainted: P        2.6.24.2#4
    [176624.986251]
    [176624.986251] Call Trace:
    [176624.986277]  [<ffffffff881c56bf>] :cfg80211:wiphy_register+0x17f/0x1a0
    [176624.986282]  [<ffffffff881ddf80>] :rt61pci:rt61pci_eepromregister_write+0x0/0x80
    [176624.986302]  [<ffffffff88b7e4bc>] :mac80211:ieee80211_register_hw+0x2c/0x2b0
    [176624.986310]  [<ffffffff881cdc80>] :rt2x00lib:rt2x00lib_probe_dev+0x350/0x3f0
    [176624.986318]  [<ffffffff881d74b9>] :rt2x00pci:rt2x00pci_probe+0x149/0x200
    [176624.986325]  [<ffffffff8030c858>] pci_device_probe+0xf8/0x170
    [176624.986331]  [<ffffffff803594fc>] driver_probe_device+0x9c/0x1c0
    [176624.986335]  [<ffffffff80359700>] __driver_attach+0x0/0xb0
    [176624.986337]  [<ffffffff803597a5>] __driver_attach+0xa5/0xb0
    [176624.986341]  [<ffffffff8035877d>] bus_for_each_dev+0x4d/0x80
    [176624.986347]  [<ffffffff80358b8c>] bus_add_driver+0xac/0x210
    [176624.986351]  [<ffffffff8030cad3>] __pci_register_driver+0x73/0xc0
    [176624.986357]  [<ffffffff8025689e>] sys_init_module+0x18e/0x1a20
    [176624.986374]  [<ffffffff8020c42e>] system_call+0x7e/0x83
    Signed-off-by: default avatarGertjan van Wingerde <gwingerde@kpnplanet.nl>
    Signed-off-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    47ac2683
rt2x00dev.c 32.8 KB