Return-path: Received: from mail-yk0-f169.google.com ([209.85.160.169]:35275 "EHLO mail-yk0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbbK2Axe (ORCPT ); Sat, 28 Nov 2015 19:53:34 -0500 MIME-Version: 1.0 In-Reply-To: References: <1444972259-24260-1-git-send-email-motobud@gmail.com> Date: Sun, 29 Nov 2015 02:53:34 +0200 Message-ID: (sfid-20151129_015426_710436_B54DFE07) Subject: Re: [PATCH] ath6kl: Use vmalloc for loading firmware using api1 method From: Andy Shevchenko To: Brent Taylor Cc: Kalle Valo , linux-wireless , netdev , "linux-kernel@vger.kernel.org" , ath6kl@lists.infradead.org Content-Type: text/plain; charset=UTF-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, Nov 28, 2015 at 8:58 PM, Brent Taylor wrote: > Sorry, the first e-mail was sent via gmail and I forgot about sending > it in plain text mode. > > Whats the status on this patch? I don't see it on patchwork anymore > nor is it in any of the git trees I checked. > You forget to use kvfree() instead of kfree() in core.c. > Thanks, > Brent > > On Fri, Oct 16, 2015 at 12:10 AM, Brent Taylor wrote: >> Signed-off-by: Brent Taylor >> --- >> drivers/net/wireless/ath/ath6kl/init.c | 15 +++++++++++---- >> 1 file changed, 11 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c >> index 6e473fa..2155739 100644 >> --- a/drivers/net/wireless/ath/ath6kl/init.c >> +++ b/drivers/net/wireless/ath/ath6kl/init.c >> @@ -673,10 +673,17 @@ static int ath6kl_get_fw(struct ath6kl *ar, const char *filename, >> return ret; >> >> *fw_len = fw_entry->size; >> - *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL); >> - >> - if (*fw == NULL) >> - ret = -ENOMEM; >> + if (&ar->fw == fw) { >> + *fw = vmalloc(fw_entry->size); >> + if (*fw == NULL) >> + ret = -ENOMEM; >> + else >> + memcpy(*fw, fw_entry->data, fw_entry->size); >> + } else { >> + *fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL); >> + if (*fw == NULL) >> + ret = -ENOMEM; >> + } >> >> release_firmware(fw_entry); >> >> -- >> 2.6.1 >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ -- With Best Regards, Andy Shevchenko