Skip to content

Commit

Permalink
rt2x00: introduce rt2x00_set_{rt,rf} helpers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gabor Juhos authored and John W. Linville committed Apr 1, 2013
1 parent 71d6c1b commit 5ce6900
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions drivers/net/wireless/rt2x00/rt2x00.h
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,23 @@ static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev,
rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev);
}

static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev,
const u16 rt, const u16 rev)
{
rt2x00dev->chip.rt = rt;
rt2x00dev->chip.rev = rev;

INFO(rt2x00dev, "RT chipset %04x, rev %04x detected\n",
rt2x00dev->chip.rt, rt2x00dev->chip.rev);
}

static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf)
{
rt2x00dev->chip.rf = rf;

INFO(rt2x00dev, "RF chipset %04x detected\n", rt2x00dev->chip.rf);
}

static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt)
{
return (rt2x00dev->chip.rt == rt);
Expand Down

0 comments on commit 5ce6900

Please sign in to comment.