Linux wireless drivers development
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: linux-wireless@vger.kernel.org, libertas-dev@lists.infradead.org
Subject: Re: [PATCH] libertas: let get nick return what set nick has set
Date: Tue, 09 Oct 2007 10:16:47 -0400	[thread overview]
Message-ID: <1191939407.17254.8.camel@localhost.localdomain> (raw)
In-Reply-To: <200710091504.14903.hs4233@mail.mn-solutions.de>

On Tue, 2007-10-09 at 15:04 +0200, Holger Schurig wrote:
> Make the get-nickname wireless extension actually work. Before
> this patch, I could do "iwconfig eth1 nick BLAH" but "iwconfig
> eth1" would have still showed "MRVL-USB8388" to me. Hey, and that
> was wrong anyway, I'm on a CF card, not on USB :-)
> 
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>

Acked-by: Dan Williams <dcbw@redhat.com>

> 
> Index: libertas-2.6/drivers/net/wireless/libertas/wext.c
> ===================================================================
> --- libertas-2.6.orig/drivers/net/wireless/libertas/wext.c	2007-10-09 15:50:49.000000000 +0200
> +++ libertas-2.6/drivers/net/wireless/libertas/wext.c	2007-10-09 16:04:26.000000000 +0200
> @@ -251,37 +251,16 @@ static int wlan_set_nick(struct net_devi
>  static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info,
>  			 struct iw_point *dwrq, char *extra)
>  {
> -	const char *cp;
> -	char comm[6] = { "COMM-" };
> -	char mrvl[6] = { "MRVL-" };
> -	int cnt;
> +	wlan_private *priv = dev->priv;
> +	wlan_adapter *adapter = priv->adapter;
>  
>  	lbs_deb_enter(LBS_DEB_WEXT);
>  
> -	/*
> -	 * Nick Name is not used internally in this mode,
> -	 * therefore return something useful instead. Jean II
> -	 */
> -
> -	strcpy(extra, mrvl);
> -
> -	cp = strstr(libertas_driver_version, comm);
> -	if (cp == libertas_driver_version)	//skip leading "COMM-"
> -		cp = libertas_driver_version + strlen(comm);
> -	else
> -		cp = libertas_driver_version;
> -
> -	cnt = strlen(mrvl);
> -	extra += cnt;
> -	while (cnt < 16 && (*cp != '-')) {
> -		*extra++ = toupper(*cp++);
> -		cnt++;
> -	}
> +	dwrq->length = strlen(adapter->nodename);
> +	memcpy(extra, adapter->nodename, dwrq->length);
> +	extra[dwrq->length] = '\0';
>  
> -	/*
> -	 * Push it out !
> -	 */
> -	dwrq->length = cnt;
> +	dwrq->flags = 1;	/* active */
>  
>  	lbs_deb_leave(LBS_DEB_WEXT);
>  	return 0;
> @@ -311,6 +290,7 @@ static int mesh_get_nick(struct net_devi
>  	lbs_deb_leave(LBS_DEB_WEXT);
>  	return 0;
>  }
> +
>  static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
>  			struct iw_param *vwrq, char *extra)
>  {


      reply	other threads:[~2007-10-09 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-09 13:04 [PATCH] libertas: let get nick return what set nick has set Holger Schurig
2007-10-09 14:16 ` Dan Williams [this message]

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=1191939407.17254.8.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=hs4233@mail.mn-solutions.de \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /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