diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 16aa850d3700..4de505b98331 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -929,12 +929,12 @@ static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, | |||
929 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); | 929 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); |
930 | } | 930 | } |
931 | 931 | ||
932 | static inline char rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) | 932 | static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) |
933 | { | 933 | { |
934 | return (rt2x00dev->chip.rt == rt); | 934 | return (rt2x00dev->chip.rt == rt); |
935 | } | 935 | } |
936 | 936 | ||
937 | static inline char rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) | 937 | static inline bool rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) |
938 | { | 938 | { |
939 | return (rt2x00dev->chip.rf == rf); | 939 | return (rt2x00dev->chip.rf == rf); |
940 | } | 940 | } |
@@ -944,6 +944,24 @@ static inline u16 rt2x00_rev(struct rt2x00_dev *rt2x00dev) | |||
944 | return rt2x00dev->chip.rev; | 944 | return rt2x00dev->chip.rev; |
945 | } | 945 | } |
946 | 946 | ||
947 | static inline bool rt2x00_rt_rev(struct rt2x00_dev *rt2x00dev, | ||
948 | const u16 rt, const u16 rev) | ||
949 | { | ||
950 | return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) == rev); | ||
951 | } | ||
952 | |||
953 | static inline bool rt2x00_rt_rev_lt(struct rt2x00_dev *rt2x00dev, | ||
954 | const u16 rt, const u16 rev) | ||
955 | { | ||
956 | return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) < rev); | ||
957 | } | ||
958 | |||
959 | static inline bool rt2x00_rt_rev_gte(struct rt2x00_dev *rt2x00dev, | ||
960 | const u16 rt, const u16 rev) | ||
961 | { | ||
962 | return (rt2x00_rt(rt2x00dev, rt) && rt2x00_rev(rt2x00dev) >= rev); | ||
963 | } | ||
964 | |||
947 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, | 965 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, |
948 | enum rt2x00_chip_intf intf) | 966 | enum rt2x00_chip_intf intf) |
949 | { | 967 | { |