2016-06-17 13:11:41

by Prasun Maiti

[permalink] [raw]
Subject: [Query] mwifiex: few observations to reduce number of endian conversions

Hi Amitkumar,

I have two observations:

1. I have found that in the command response path for host command
"HostCmd_CMD_802_11_EEPROM_ACCESS", a "0" value has been endian
converted. It can only be a safe futuristic approach for any non-zero
value there however! Otherwise, the endian conversion can be removed.

2. For multiple Host Commands (e.g HostCmd_CMD_802_11_EEPROM_ACCESS
etc.) "cpu_to_leX"-converted values are saved to driver. So
"leX_to_cpu" conversion is required too many times afterwards in
driver.
On the contrary, we can save the values to driver without any
conversion, and only command buffer(s) are prepared with endian
converted values. In this way we can gain some efficiency [code size /
time] by reducing the number of endian conversion considerably.

Please let me know your opinion on the above.

--
Thanks,
Prasun


2016-06-21 10:52:12

by Prasun Maiti

[permalink] [raw]
Subject: Re: [Query] mwifiex: few observations to reduce number of endian conversions

Hi Amitkumar,


On Tue, Jun 21, 2016 at 3:47 PM, Amitkumar Karwar <[email protected]> wrote:

> I agree with your observations. We'll prepare a cleanup patch to address this.
>
> Regards,
> Amitkumar

I have already made some changes. I will send you a patch for this.

--
Thanks,
Prasun

2016-06-21 10:18:13

by Amitkumar Karwar

[permalink] [raw]
Subject: RE: [Query] mwifiex: few observations to reduce number of endian conversions

SGkgUHJhc3VuLA0KDQo+IEZyb206IFByYXN1biBNYWl0aSBbbWFpbHRvOnByYXN1bm1haXRpODdA
Z21haWwuY29tXQ0KPiBTZW50OiBGcmlkYXksIEp1bmUgMTcsIDIwMTYgNjo0MiBQTQ0KPiBUbzog
QW1pdGt1bWFyIEthcndhcjsgTmlzaGFudCBTYXJtdWthZGFtDQo+IENjOiBMaW51eCBLZXJuZWw7
IExpbnV4IE5leHQ7IFdpRmkgTWFpbGluZyBMaXN0OyBKb2hhbm5lcyBCZXJnDQo+IFN1YmplY3Q6
IFtRdWVyeV0gbXdpZmlleDogZmV3IG9ic2VydmF0aW9ucyB0byByZWR1Y2UgbnVtYmVyIG9mIGVu
ZGlhbg0KPiBjb252ZXJ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