Thread (45 messages) read the whole thread 45 messages, 4 authors, 2011-08-30

Re: [PATCH 11/20] ath6kl: Support channel set request for startscan command

From: Vasanthakumar Thiagarajan <hidden>
Date: 2011-08-30 09:51:42

On Tue, Aug 30, 2011 at 12:33:46PM +0300, Kalle Valo wrote:
On 08/29/2011 03:23 PM, Jouni Malinen wrote:
quoted
From: Edward Lu <redacted>
-	if (num_chan)
-		memcpy(sc->ch_list, ch_list, num_chan * sizeof(u16));
+	if (num_chan) {
+		for (i = 0; i < num_chan; i++)
+			sc->ch_list[i] = cpu_to_le16(ch_list[i]);
+	}
if (num_chan) is not needed, the for loop is enough.
It is not that for loop would run once when num_chan is 0,
may be it needs to  go from 0 to num_chan -1?.

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