Skip to content

Commit

Permalink
[PATCH] rtl8187: fix endianness issue in rtl8225 register writing
Browse files Browse the repository at this point in the history
I failed to notice that a u16 was being passed to the hardware.
This fixes it.

Thanks to Kasper F. Brandt for finding this!

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Michael Wu authored and John W. Linville committed Jul 10, 2007
1 parent d082b9b commit 899413d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/rtl8187_rtl8225.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static void rtl8225_write_bitbang(struct ieee80211_hw *dev, u8 addr, u16 data)
msleep(2);
}

static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, u16 data)
static void rtl8225_write_8051(struct ieee80211_hw *dev, u8 addr, __le16 data)
{
struct rtl8187_priv *priv = dev->priv;
u16 reg80, reg82, reg84;
Expand Down Expand Up @@ -106,7 +106,7 @@ void rtl8225_write(struct ieee80211_hw *dev, u8 addr, u16 data)
struct rtl8187_priv *priv = dev->priv;

if (priv->asic_rev)
rtl8225_write_8051(dev, addr, data);
rtl8225_write_8051(dev, addr, cpu_to_le16(data));
else
rtl8225_write_bitbang(dev, addr, data);
}
Expand Down

0 comments on commit 899413d

Please sign in to comment.