All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Craig <philipc@snapgear.com>
To: Ron Mercer <ron.mercer@qlogic.com>
Cc: Andrew Morton <akpm@osdl.org>,
	jeff@garzik.org, linux-driver@qlogic.com, netdev@vger.kernel.org
Subject: Re: New Qlogic qla3xxx NIC Driver v2.02.00k31 for upstream inclusion
Date: Fri, 23 Jun 2006 10:51:03 +1000	[thread overview]
Message-ID: <449B3AF7.70801@snapgear.com> (raw)
In-Reply-To: <20060621215531.14812d7c.akpm@osdl.org>

On 06/22/2006 02:55 PM, Andrew Morton wrote:
> - Is there a better way of doing this?
>
> static void ql_swap_mac_addr(u8 * macAddress)
> {
> #ifdef __BIG_ENDIAN
> 	u8 temp;
> 	temp = macAddress[0];
> 	macAddress[0] = macAddress[1];
> 	macAddress[1] = temp;
> 	temp = macAddress[2];
> 	macAddress[2] = macAddress[3];
> 	macAddress[3] = temp;
> 	temp = macAddress[4];
> 	macAddress[4] = macAddress[5];
> 	macAddress[5] = temp;
> #endif
> }

Perhaps something like:

static void ql_swap_mac_addr(u8 * macAddress)
{
	u16 *p = (u16 *)macAddress;

	cpu_to_le16s(p);
	cpu_to_le16s(p+1);
	cpu_to_le16s(p+2);
}

You could use cpu_to_le16s for the version/numPorts conversion too.


  reply	other threads:[~2006-06-23  0:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21 21:24 New Qlogic qla3xxx NIC Driver v2.02.00k31 for upstream inclusion Ron Mercer
2006-06-21 22:06 ` Francois Romieu
2006-06-22  4:55 ` Andrew Morton
2006-06-23  0:51   ` Philip Craig [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-22 21:00 Ron Mercer
2006-06-22 21:22 ` Andrew Morton
2006-06-22 21:35   ` Jeff Garzik
2006-06-12 20:33 Ron Mercer

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=449B3AF7.70801@snapgear.com \
    --to=philipc@snapgear.com \
    --cc=akpm@osdl.org \
    --cc=jeff@garzik.org \
    --cc=linux-driver@qlogic.com \
    --cc=netdev@vger.kernel.org \
    --cc=ron.mercer@qlogic.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.