aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2009-11-14 14:20:35 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-16 14:17:12 -0500
commit16475b095a9c952f16e626c142b30bc95cfeadb3 (patch)
tree4957c6a7ce58354c50c8e236e1519d1152578f5d /drivers/net/wireless/rt2x00/rt2x00.h
parentcce5fc45f9e9570f320009431d033d5a8f6144cc (diff)
rt2x00: Log RT/RF chipset information correctly.
Some drivers (rt2800* most notably) cannot set the RF and RT chipset in the correct order to have the information logging in rt2x00_set_chip be correct. Fix this by decoupling the setting of the chipset information from the logging of the chipset information so that drivers can determine themselves when all information is set. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 62da572795a8..1cbb7ac2f32f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -906,10 +906,6 @@ static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev,
906static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, 906static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev,
907 const u16 rt, const u16 rf, const u32 rev) 907 const u16 rt, const u16 rf, const u32 rev)
908{ 908{
909 INFO(rt2x00dev,
910 "Chipset detected - rt: %04x, rf: %04x, rev: %08x.\n",
911 rt, rf, rev);
912
913 rt2x00dev->chip.rt = rt; 909 rt2x00dev->chip.rt = rt;
914 rt2x00dev->chip.rf = rf; 910 rt2x00dev->chip.rf = rf;
915 rt2x00dev->chip.rev = rev; 911 rt2x00dev->chip.rev = rev;
@@ -927,6 +923,13 @@ static inline void rt2x00_set_chip_rf(struct rt2x00_dev *rt2x00dev,
927 rt2x00_set_chip(rt2x00dev, rt2x00dev->chip.rt, rf, rev); 923 rt2x00_set_chip(rt2x00dev, rt2x00dev->chip.rt, rf, rev);
928} 924}
929 925
926static inline void rt2x00_print_chip(struct rt2x00_dev *rt2x00dev)
927{
928 INFO(rt2x00dev,
929 "Chipset detected - rt: %04x, rf: %04x, rev: %08x.\n",
930 rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev);
931}
932
930static inline char rt2x00_rt(const struct rt2x00_chip *chipset, const u16 chip) 933static inline char rt2x00_rt(const struct rt2x00_chip *chipset, const u16 chip)
931{ 934{
932 return (chipset->rt == chip); 935 return (chipset->rt == chip);