Hello
The following patch fixes a bug in the mac80211 rtl8187 driver that
would prevent it from initializing the hardware correctly on
big-endian machines.
--- a/drivers/net/wireless/mac80211/rtl818x/rtl8187_rtl8225.c 2007-06-14
00:24:52.000000000 +0200
+++ b/drivers/net/wireless/mac80211/rtl818x/rtl8187_rtl8225.c 2007-06-14
00:27:17.000000000 +0200
@@ -70,6 +70,7 @@
{
struct rtl8187_priv *priv = dev->priv;
u16 reg80, reg82, reg84;
+ __le16 buf;
reg80 = rtl818x_ioread16(priv, &priv->map->RFPinsOutput);
reg82 = rtl818x_ioread16(priv, &priv->map->RFPinsEnable);
@@ -88,9 +89,11 @@
rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80);
udelay(10);
+ buf = cpu_to_le16(data);
+
usb_control_msg(priv->udev, usb_sndctrlpipe(priv->udev, 0),
RTL8187_REQ_SET_REG, RTL8187_REQT_WRITE,
- addr, 0x8225, &data, sizeof(data), HZ / 2);
+ addr, 0x8225, &buf, sizeof(buf), HZ / 2);
rtl818x_iowrite16(priv, &priv->map->RFPinsOutput, reg80 | (1 << 2));
udelay(10);
------------------------------
- Kasper F. Brandt
On Wednesday 13 June 2007 15:59, Kasper F. Brandt wrote:
> Hello
>
> The following patch fixes a bug in the mac80211 rtl8187 driver that
> would prevent it from initializing the hardware correctly on
> big-endian machines.
>
Thanks for finding this!
I used a slightly different approach to fixing this in the attached patch, but
it's the same idea.
This applies to wireless-dev, but should be applied to the driver in
wireless-2.6 also.
-Michael Wu