Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1730576
| From | Aviya Erenfeld <aviyae42@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging: wlan-ng: Avoid bogus endianness |
| Date | 2017-09-12 01:00 +0200 |
| Message-ID | <uoFQl-1dE-7@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The linkstatus variable in the info struct received as __le16
but handled in every other place in the driver as u16
Fix that and remove the sparse warning that occurred due to it:
prism2sta.c:1450:29: warning: incorrect type in assignment (different base types)
prism2sta.c:1450:29: expected unsigned short [unsigned] [usertype] link_status_new
prism2sta.c:1450:29: got restricted __le16 [usertype] linkstatus
Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index c9df450..070a237 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1447,7 +1447,7 @@ static void prism2sta_inf_linkstatus(struct wlandevice *wlandev,
{
struct hfa384x *hw = wlandev->priv;
- hw->link_status_new = inf->info.linkstatus.linkstatus;
+ hw->link_status_new = le16_to_cpu(inf->info.linkstatus.linkstatus);
schedule_work(&hw->link_bh);
}
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] staging: wlan-ng: Avoid bogus endianness Aviya Erenfeld <aviyae42@gmail.com> - 2017-09-12 01:00 +0200 Re: [PATCH] staging: wlan-ng: Avoid bogus endianness Dan Carpenter <dan.carpenter@oracle.com> - 2017-09-12 10:30 +0200
csiph-web