On Tue, Aug 30, 2011 at 03:21:24PM +0530, Vasanthakumar Thiagarajan wrote:
On Tue, Aug 30, 2011 at 12:33:46PM +0300, Kalle Valo wrote:
quoted
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?.
Oops, obviously i misread it.
Vasanth