mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
staging: wfx: fix access to le32 attribute 'ps_mode_error'
The attribute ps_mode_error is little-endian. We have to take to the endianness when we access it. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200512150414.267198-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
270f54b83f
commit
99414d8d26
@@ -158,6 +158,7 @@ static int hif_event_indication(struct wfx_dev *wdev,
|
||||
{
|
||||
struct wfx_vif *wvif = wdev_to_wvif(wdev, hif->interface);
|
||||
const struct hif_ind_event *body = buf;
|
||||
int cause;
|
||||
|
||||
if (!wvif) {
|
||||
dev_warn(wdev->dev, "received event for non-existent vif\n");
|
||||
@@ -176,10 +177,10 @@ static int hif_event_indication(struct wfx_dev *wdev,
|
||||
dev_dbg(wdev->dev, "ignore BSSREGAINED indication\n");
|
||||
break;
|
||||
case HIF_EVENT_IND_PS_MODE_ERROR:
|
||||
cause = le32_to_cpu(body->event_data.ps_mode_error);
|
||||
dev_warn(wdev->dev, "error while processing power save request: %d\n",
|
||||
body->event_data.ps_mode_error);
|
||||
if (body->event_data.ps_mode_error ==
|
||||
HIF_PS_ERROR_AP_NOT_RESP_TO_POLL) {
|
||||
cause);
|
||||
if (cause == HIF_PS_ERROR_AP_NOT_RESP_TO_POLL) {
|
||||
wvif->bss_not_support_ps_poll = true;
|
||||
schedule_work(&wvif->update_pm_work);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user