aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-03-30 09:53:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-01 16:09:41 -0400
commit5ce69003dc92cd4a685a9f22a586b56a25f19624 (patch)
tree901905e2d5e8ee39377c68679be950a3f4168791 /drivers/net/wireless/rt2x00/rt2x00.h
parent71d6c1bb34d65f304495786853cb51101328d9a2 (diff)
rt2x00: introduce rt2x00_set_{rt,rf} helpers
The new helpers can be used to set the type of the RT and RF chipsets separately. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> 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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index cdf26ede7270..0d02d16ca166 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1106,6 +1106,23 @@ static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev,
1106 rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); 1106 rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev);
1107} 1107}
1108 1108
1109static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev,
1110 const u16 rt, const u16 rev)
1111{
1112 rt2x00dev->chip.rt = rt;
1113 rt2x00dev->chip.rev = rev;
1114
1115 INFO(rt2x00dev, "RT chipset %04x, rev %04x detected\n",
1116 rt2x00dev->chip.rt, rt2x00dev->chip.rev);
1117}
1118
1119static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf)
1120{
1121 rt2x00dev->chip.rf = rf;
1122
1123 INFO(rt2x00dev, "RF chipset %04x detected\n", rt2x00dev->chip.rf);
1124}
1125
1109static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) 1126static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt)
1110{ 1127{
1111 return (rt2x00dev->chip.rt == rt); 1128 return (rt2x00dev->chip.rt == rt);