mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-10 15:39:38 +00:00
rtl8188eu: Fix an endian issue that was missed
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
7c7f632ac7
commit
64a0fd240e
1 changed files with 9 additions and 42 deletions
|
@ -185,9 +185,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
u16 index;
|
||||||
u16 len;
|
u16 len;
|
||||||
u8 data=0;
|
u8 data;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x01;//read_in
|
requesttype = 0x01;//read_in
|
||||||
|
@ -197,11 +195,7 @@ static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
len = 1;
|
len = 1;
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
|
static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
|
@ -211,9 +205,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
u16 index;
|
||||||
u16 len;
|
u16 len;
|
||||||
u16 data=0;
|
__le32 data;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x01;//read_in
|
requesttype = 0x01;//read_in
|
||||||
|
@ -223,11 +215,7 @@ static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
len = 2;
|
len = 2;
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
return le32_to_cpu(data) & 0xffff;
|
||||||
;
|
|
||||||
|
|
||||||
return data;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
|
static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
|
@ -237,9 +225,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
u16 index;
|
||||||
u16 len;
|
u16 len;
|
||||||
u32 data=0;
|
__le32 data;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x01;//read_in
|
requesttype = 0x01;//read_in
|
||||||
|
@ -250,10 +236,7 @@ static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
|
|
||||||
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
|
||||||
;
|
return le32_to_cpu(data);
|
||||||
|
|
||||||
return data;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
||||||
|
@ -266,8 +249,6 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
||||||
u8 data;
|
u8 data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x00;//write_out
|
requesttype = 0x00;//write_out
|
||||||
index = 0;//n/a
|
index = 0;//n/a
|
||||||
|
@ -279,10 +260,7 @@ static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
|
||||||
|
|
||||||
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
||||||
|
@ -292,11 +270,9 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
u16 index;
|
||||||
u16 len;
|
u16 len;
|
||||||
u16 data;
|
__le32 data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x00;//write_out
|
requesttype = 0x00;//write_out
|
||||||
index = 0;//n/a
|
index = 0;//n/a
|
||||||
|
@ -304,14 +280,11 @@ static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
|
||||||
wvalue = (u16)(addr&0x0000ffff);
|
wvalue = (u16)(addr&0x0000ffff);
|
||||||
len = 2;
|
len = 2;
|
||||||
|
|
||||||
data = val;
|
data = cpu_to_le32(val);
|
||||||
|
|
||||||
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
||||||
|
@ -321,10 +294,9 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
||||||
u16 wvalue;
|
u16 wvalue;
|
||||||
u16 index;
|
u16 index;
|
||||||
u16 len;
|
u16 len;
|
||||||
u32 data;
|
__le32 data;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x00;//write_out
|
requesttype = 0x00;//write_out
|
||||||
|
@ -332,14 +304,11 @@ static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
|
||||||
|
|
||||||
wvalue = (u16)(addr&0x0000ffff);
|
wvalue = (u16)(addr&0x0000ffff);
|
||||||
len = 4;
|
len = 4;
|
||||||
data =val;
|
data = cpu_to_le32(val);
|
||||||
|
|
||||||
ret =usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
ret =usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata)
|
static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata)
|
||||||
|
@ -352,8 +321,6 @@ static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata
|
||||||
u8 buf[VENDOR_CMD_MAX_DATA_LEN]={0};
|
u8 buf[VENDOR_CMD_MAX_DATA_LEN]={0};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
request = 0x05;
|
request = 0x05;
|
||||||
requesttype = 0x00;//write_out
|
requesttype = 0x00;//write_out
|
||||||
index = 0;//n/a
|
index = 0;//n/a
|
||||||
|
|
Loading…
Reference in a new issue