From: Francois Romieu <romieu@fr.zoreil.com>
To: Gary Zambrano <zambrano@broadcom.com>
Cc: Jeff Garzik <jeff@garzik.org>, netdev@vger.kernel.org
Subject: Re: [PATCH 2/4] b44: wol setup for older 4401
Date: Thu, 25 May 2006 00:13:06 +0200 [thread overview]
Message-ID: <20060524221306.GB2863@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1148481647.2976.52.camel@dhcp-10-7-81-7.broadcom.com>
Gary Zambrano <zambrano@broadcom.com> :
[...]
> diff --git a/drivers/net/b44.c b/drivers/net/b44.c
> index b9e2462..6f4d1d4 100644
> --- a/drivers/net/b44.c
> +++ b/drivers/net/b44.c
[...]
> +static void b44_setup_pseudo_magicp(struct b44 *bp)
> +{
> +
> + u32 val;
> + int plen0, plen1, max, i, j;
> + u8 *pwol_pattern;
> + u8 *pwol_mask;
> +
> + pwol_pattern = kmalloc(B44_WOL_PATTERN_SIZE, GFP_KERNEL);
> + pwol_mask = kmalloc(B44_WOL_MASK_SIZE, GFP_KERNEL);
> +
> + /* UDP magic packet pattern */
> + memset(pwol_pattern, 0, B44_WOL_PATTERN_SIZE);
> + memset(pwol_pattern + 42, 0xff, 6); /* sync pattern */
kmalloc can fail. It should be checked.
> + max = ETH_ALEN;
> + for (i = 0; i < 14; ++i) {
> + if (i == 13)
> + max = 2;
> + for (j = 0; j < max; ++j) {
> + pwol_pattern[42 + 6 +
> + (i * ETH_ALEN) + j] =
> + bp->dev->dev_addr[j];
Indentation went strange here.
--
Ueimor
next prev parent reply other threads:[~2006-05-24 22:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-24 14:40 [PATCH 2/4] b44: wol setup for older 4401 Gary Zambrano
2006-05-24 22:13 ` Francois Romieu [this message]
2006-05-24 15:33 ` Gary Zambrano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060524221306.GB2863@electric-eye.fr.zoreil.com \
--to=romieu@fr.zoreil.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=zambrano@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox