aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2007-10-09 09:04:14 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:22 -0400
commit04799fae8ecb42b2c687fa85fe32ff79ea0e9dc9 (patch)
tree0074cb7fed2e9f17593a25ada1568aa398223840 /drivers
parentcc32613792b9789cebb40240a56bd4a7675b86fc (diff)
[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 <hs4233@mail.mn-solutions.de> Acked-By: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/wext.c34
1 files changed, 7 insertions, 27 deletions
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index 0b2103e0af57..c6f5aa3cb465 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,
237static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info, 237static int wlan_get_nick(struct net_device *dev, struct iw_request_info *info,
238 struct iw_point *dwrq, char *extra) 238 struct iw_point *dwrq, char *extra)
239{ 239{
240 const char *cp; 240 wlan_private *priv = dev->priv;
241 char comm[6] = { "COMM-" }; 241 wlan_adapter *adapter = priv->adapter;
242 char mrvl[6] = { "MRVL-" };
243 int cnt;
244 242
245 lbs_deb_enter(LBS_DEB_WEXT); 243 lbs_deb_enter(LBS_DEB_WEXT);
246 244
247 /* 245 dwrq->length = strlen(adapter->nodename);
248 * Nick Name is not used internally in this mode, 246 memcpy(extra, adapter->nodename, dwrq->length);
249 * therefore return something useful instead. Jean II 247 extra[dwrq->length] = '\0';
250 */
251
252 strcpy(extra, mrvl);
253
254 cp = strstr(libertas_driver_version, comm);
255 if (cp == libertas_driver_version) //skip leading "COMM-"
256 cp = libertas_driver_version + strlen(comm);
257 else
258 cp = libertas_driver_version;
259 248
260 cnt = strlen(mrvl); 249 dwrq->flags = 1; /* active */
261 extra += cnt;
262 while (cnt < 16 && (*cp != '-')) {
263 *extra++ = toupper(*cp++);
264 cnt++;
265 }
266
267 /*
268 * Push it out !
269 */
270 dwrq->length = cnt;
271 250
272 lbs_deb_leave(LBS_DEB_WEXT); 251 lbs_deb_leave(LBS_DEB_WEXT);
273 return 0; 252 return 0;
@@ -297,6 +276,7 @@ static int mesh_get_nick(struct net_device *dev, struct iw_request_info *info,
297 lbs_deb_leave(LBS_DEB_WEXT); 276 lbs_deb_leave(LBS_DEB_WEXT);
298 return 0; 277 return 0;
299} 278}
279
300static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info, 280static int wlan_set_rts(struct net_device *dev, struct iw_request_info *info,
301 struct iw_param *vwrq, char *extra) 281 struct iw_param *vwrq, char *extra)
302{ 282{