From: Jerome Pouiller <Jerome.Pouiller@silabs.com>
To: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"David S . Miller" <davem@davemloft.net>,
Kalle Valo <kvalo@codeaurora.org>
Subject: [PATCH v2 09/17] staging: wfx: fix access to le32 attribute 'event_id'
Date: Tue, 12 May 2020 17:04:06 +0200 [thread overview]
Message-ID: <20200512150414.267198-10-Jerome.Pouiller@silabs.com> (raw)
In-Reply-To: <20200512150414.267198-1-Jerome.Pouiller@silabs.com>
From: Jérôme Pouiller <jerome.pouiller@silabs.com>
The attribute event_id 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>
---
drivers/staging/wfx/hif_rx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wfx/hif_rx.c b/drivers/staging/wfx/hif_rx.c
index 87d5107a7757..966315edbab8 100644
--- a/drivers/staging/wfx/hif_rx.c
+++ b/drivers/staging/wfx/hif_rx.c
@@ -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 type = le32_to_cpu(body->event_id);
int cause;
if (!wvif) {
@@ -165,7 +166,7 @@ static int hif_event_indication(struct wfx_dev *wdev,
return 0;
}
- switch (body->event_id) {
+ switch (type) {
case HIF_EVENT_IND_RCPI_RSSI:
wfx_event_report_rssi(wvif, body->event_data.rcpi_rssi);
break;
@@ -187,7 +188,7 @@ static int hif_event_indication(struct wfx_dev *wdev,
break;
default:
dev_warn(wdev->dev, "unhandled event indication: %.2x\n",
- body->event_id);
+ type);
break;
}
return 0;
--
2.26.2
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2020-05-12 15:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 15:03 [PATCH v2 00/17] staging: wfx: fix support for big-endian hosts Jerome Pouiller
2020-05-12 15:03 ` [PATCH v2 01/17] staging: wfx: fix use of cpu_to_le32 instead of le32_to_cpu Jerome Pouiller
2020-05-12 15:03 ` [PATCH v2 02/17] staging: wfx: take advantage of le32_to_cpup() Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 03/17] staging: wfx: fix cast operator Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 04/17] staging: wfx: fix wrong bytes order Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 05/17] staging: wfx: fix output of rx_stats on big endian hosts Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 06/17] staging: wfx: fix endianness of fields media_delay and tx_queue_delay Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 07/17] staging: wfx: fix endianness of hif_req_read_mib fields Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 08/17] staging: wfx: fix access to le32 attribute 'ps_mode_error' Jerome Pouiller
2020-05-12 15:04 ` Jerome Pouiller [this message]
2020-05-12 15:04 ` [PATCH v2 10/17] staging: wfx: fix access to le32 attribute 'indication_type' Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 11/17] staging: wfx: declare the field 'packet_id' with native byte order Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 12/17] staging: wfx: fix endianness of the struct hif_ind_startup Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 13/17] staging: wfx: fix access to le32 attribute 'len' Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 14/17] staging: wfx: fix endianness of the field 'status' Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 15/17] staging: wfx: fix endianness of the field 'num_tx_confs' Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 16/17] staging: wfx: fix endianness of the field 'channel_number' Jerome Pouiller
2020-05-12 15:04 ` [PATCH v2 17/17] staging: wfx: update TODO Jerome Pouiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200512150414.267198-10-Jerome.Pouiller@silabs.com \
--to=jerome.pouiller@silabs.com \
--cc=davem@davemloft.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).