Commit 802d7d0b authored by Aviya Erenfeld's avatar Aviya Erenfeld Committed by Greg Kroah-Hartman
Browse files

staging: wlan-ng: Avoid bogus endianness



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: default avatarAviya Erenfeld <aviyae42@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a5251b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}