linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Query] mwifiex: few observations to reduce number of endian conversions
@ 2016-06-17 13:11 Prasun Maiti
  2016-06-21 10:17 ` Amitkumar Karwar
  0 siblings, 1 reply; 3+ messages in thread
From: Prasun Maiti @ 2016-06-17 13:11 UTC (permalink / raw)
  To: Amitkumar Karwar, Nishant Sarmukadam
  Cc: Linux Kernel, Linux Next, WiFi Mailing List, Johannes Berg

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [Query] mwifiex: few observations to reduce number of endian conversions
  2016-06-17 13:11 [Query] mwifiex: few observations to reduce number of endian conversions Prasun Maiti
@ 2016-06-21 10:17 ` Amitkumar Karwar
  2016-06-21 10:45   ` Prasun Maiti
  0 siblings, 1 reply; 3+ messages in thread
From: Amitkumar Karwar @ 2016-06-21 10:17 UTC (permalink / raw)
  To: Prasun Maiti, Nishant Sarmukadam
  Cc: Linux Kernel, Linux Next, WiFi Mailing List, Johannes Berg

Hi Prasun,

> From: Prasun Maiti [mailto:prasunmaiti87@gmail.com]
> Sent: Friday, June 17, 2016 6:42 PM
> To: Amitkumar Karwar; Nishant Sarmukadam
> Cc: Linux Kernel; Linux Next; WiFi Mailing List; Johannes Berg
> 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.
> 

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

Regards,
Amitkumar

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Query] mwifiex: few observations to reduce number of endian conversions
  2016-06-21 10:17 ` Amitkumar Karwar
@ 2016-06-21 10:45   ` Prasun Maiti
  0 siblings, 0 replies; 3+ messages in thread
From: Prasun Maiti @ 2016-06-21 10:45 UTC (permalink / raw)
  To: Amitkumar Karwar
  Cc: Nishant Sarmukadam, Linux Kernel, Linux Next, WiFi Mailing List,
	Johannes Berg

Hi Amitkumar,


On Tue, Jun 21, 2016 at 3:47 PM, Amitkumar Karwar <akarwar@marvell.com> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-21 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-17 13:11 [Query] mwifiex: few observations to reduce number of endian conversions Prasun Maiti
2016-06-21 10:17 ` Amitkumar Karwar
2016-06-21 10:45   ` Prasun Maiti

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).