Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=04799fae8ecb42b2c687fa85fe32ff79ea0e9dc9
Commit:     04799fae8ecb42b2c687fa85fe32ff79ea0e9dc9
Parent:     cc32613792b9789cebb40240a56bd4a7675b86fc
Author:     Holger Schurig <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 9 15:04:14 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:55:22 2007 -0700

    [PATCH] libertas: let get nick return what set nick has set
    
    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 <[EMAIL PROTECTED]>
    Acked-By: Dan Williams <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/libertas/wext.c |   34 +++++++---------------------------
 1 files changed, 7 insertions(+), 27 deletions(-)

diff --git a/drivers/net/wireless/libertas/wext.c 
b/drivers/net/wireless/libertas/wext.c
index 0b2103e..c6f5aa3 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -237,37 +237,16 @@ static int wlan_set_nick(struct net_device *dev, struct 
iw_request_info *info,
 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;
+       dwrq->length = strlen(adapter->nodename);
+       memcpy(extra, adapter->nodename, dwrq->length);
+       extra[dwrq->length] = '\0';
 
-       cnt = strlen(mrvl);
-       extra += cnt;
-       while (cnt < 16 && (*cp != '-')) {
-               *extra++ = toupper(*cp++);
-               cnt++;
-       }
-
-       /*
-        * Push it out !
-        */
-       dwrq->length = cnt;
+       dwrq->flags = 1;        /* active */
 
        lbs_deb_leave(LBS_DEB_WEXT);
        return 0;
@@ -297,6 +276,7 @@ static int mesh_get_nick(struct net_device *dev, struct 
iw_request_info *info,
        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)
 {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to