Return-path: Received: from wolverine01.qualcomm.com ([199.106.114.254]:54534 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738Ab1H3Jvm (ORCPT ); Tue, 30 Aug 2011 05:51:42 -0400 Date: Tue, 30 Aug 2011 15:21:24 +0530 From: Vasanthakumar Thiagarajan To: Kalle Valo CC: Jouni Malinen , , Edward Lu Subject: Re: [PATCH 11/20] ath6kl: Support channel set request for startscan command Message-ID: <20110830095123.GA31713@vasanth-laptop> (sfid-20110830_115147_404015_40C366D8) References: <1314620641-24257-1-git-send-email-jouni@qca.qualcomm.com> <1314620641-24257-12-git-send-email-jouni@qca.qualcomm.com> <4E5CAE7A.8000809@qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" In-Reply-To: <4E5CAE7A.8000809@qca.qualcomm.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: On Tue, Aug 30, 2011 at 12:33:46PM +0300, Kalle Valo wrote: > On 08/29/2011 03:23 PM, Jouni Malinen wrote: > > From: Edward Lu > > - 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