Thread (9 messages) 9 messages, 5 authors, 2021-11-03

Re: [PATCH] mwifiex: Add quirk to disable deep sleep with certain hardware revision

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-11-03 14:16:10
Also in: linux-wireless, lkml

On Wed, Nov 03, 2021 at 02:37:53PM +0100, Jonas Dreßler wrote:
On 11/3/21 13:25, Jonas Dreßler wrote:
...
quoted
quoted
quoted
+               if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) {
Rather than memorize the 128-size array here, maybe use
sizeof(ver_ext->version_str) ?
Sounds like a good idea, yeah.
Nevermind, the reason I did this was for consistency in the
function, right underneath in the same function it also assumes
a fixed size of 128 characters, so I'd rather use the same
length.
quoted
		memcpy(version_ext->version_str, ver_ext->version_str,
		       sizeof(char) * 128);
Besides sizeof(char)...
quoted
		memcpy(priv->version_str, ver_ext->version_str, 128);
Might be a good idea to #define it as MWIFIEX_VERSION_STR_LENGTH
in fw.h though...
...I think you simply need a precursor patch that changes this
to sizeof() / #define approach.

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help