Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1430406
| From | Prasun Maiti <prasunmaiti87@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME |
| Date | 2016-06-24 09:00 +0200 |
| Message-ID | <rNtfP-4HG-11@gated-at.bofh.it> (permalink) |
| References | <rKwWB-3vg-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Jun 16, 2016 at 9:49 AM, Prasun Maiti <prasunmaiti87@gmail.com> wrote: > The two members min_scan_time and max_scan_time of structure > "mwifiex_ie_types_btcoex_scan_time" are of two bytes each. The values > are assigned directtly from firmware without endian conversion handling. > So, wrong datas will get saved in big-endian systems. > > This patch converts the values into cpu's byte order before assigning them > into the local members. > > Signed-off-by: Prasun Maiti <prasunmaiti87@gmail.com> > --- > drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/marvell/mwifiex/sta_event.c b/drivers/net/wireless/marvell/mwifiex/sta_event.c > index 0104108..7dff452 100644 > --- a/drivers/net/wireless/marvell/mwifiex/sta_event.c > +++ b/drivers/net/wireless/marvell/mwifiex/sta_event.c > @@ -474,8 +474,8 @@ void mwifiex_bt_coex_wlan_param_update_event(struct mwifiex_private *priv, > scantlv = > (struct mwifiex_ie_types_btcoex_scan_time *)tlv; > adapter->coex_scan = scantlv->coex_scan; > - adapter->coex_min_scan_time = scantlv->min_scan_time; > - adapter->coex_max_scan_time = scantlv->max_scan_time; > + adapter->coex_min_scan_time = le16_to_cpu(scantlv->min_scan_time); > + adapter->coex_max_scan_time = le16_to_cpu(scantlv->max_scan_time); > break; > > default: > -- > 1.9.1 > Hi Amitkumar, Please let me know your opinion about this patch. -- Thanks, Prasun
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-16 06:20 +0200
Re: [PATCH] mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-24 09:00 +0200
RE: [PATCH] mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Amitkumar Karwar <akarwar@marvell.com> - 2016-06-30 09:40 +0200
[PATCH v2] mwifiex: Fix endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-30 10:40 +0200
Re: [PATCH v2] mwifiex: Fix endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-30 10:50 +0200
RE: [PATCH v2] mwifiex: Fix endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Amitkumar Karwar <akarwar@marvell.com> - 2016-06-30 11:30 +0200
Re: [v2] mwifiex: Fix endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Kalle Valo <kvalo@codeaurora.org> - 2016-07-08 15:50 +0200
Re: [PATCH] mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Prasun Maiti <prasunmaiti87@gmail.com> - 2016-06-30 10:50 +0200
Re: mwifiex: Fixed endianness for event TLV type TLV_BTCOEX_WL_SCANTIME Kalle Valo <kvalo@codeaurora.org> - 2016-06-29 18:00 +0200
csiph-web