Lines 47-58
int set_essid(struct ndis_device *wnd, const char *ssid, int ssid_len)
Link Here
|
47 |
req.length = ssid_len; |
47 |
req.length = ssid_len; |
48 |
if (ssid_len) |
48 |
if (ssid_len) |
49 |
memcpy(&req.essid, ssid, ssid_len); |
49 |
memcpy(&req.essid, ssid, ssid_len); |
50 |
DBG_BLOCK(2) { |
50 |
TRACE2("ssid = '%.*s'", ssid_len, ssid); |
51 |
char buf[NDIS_ESSID_MAX_SIZE+1]; |
|
|
52 |
memcpy(buf, ssid, ssid_len); |
53 |
buf[ssid_len] = 0; |
54 |
TRACE2("ssid = '%s'", buf); |
55 |
} |
56 |
|
51 |
|
57 |
res = mp_set(wnd, OID_802_11_SSID, &req, sizeof(req)); |
52 |
res = mp_set(wnd, OID_802_11_SSID, &req, sizeof(req)); |
58 |
if (res) { |
53 |
if (res) { |
Lines 125-131
static int iw_get_essid(struct net_device *dev, struct iw_request_info *info,
Link Here
|
125 |
EXIT2(return -EOPNOTSUPP); |
120 |
EXIT2(return -EOPNOTSUPP); |
126 |
} |
121 |
} |
127 |
memcpy(extra, req.essid, req.length); |
122 |
memcpy(extra, req.essid, req.length); |
128 |
extra[req.length] = 0; |
|
|
129 |
if (req.length > 0) |
123 |
if (req.length > 0) |
130 |
wrqu->essid.flags = 1; |
124 |
wrqu->essid.flags = 1; |
131 |
else |
125 |
else |
Lines 1000-1006
static int iw_set_nick(struct net_device *dev, struct iw_request_info *info,
Link Here
|
1000 |
|
994 |
|
1001 |
if (wrqu->data.length > IW_ESSID_MAX_SIZE || wrqu->data.length <= 0) |
995 |
if (wrqu->data.length > IW_ESSID_MAX_SIZE || wrqu->data.length <= 0) |
1002 |
return -EINVAL; |
996 |
return -EINVAL; |
1003 |
memset(wnd->nick, 0, sizeof(wnd->nick)); |
997 |
wnd->nick_len = wrqu->data.length; |
1004 |
memcpy(wnd->nick, extra, wrqu->data.length); |
998 |
memcpy(wnd->nick, extra, wrqu->data.length); |
1005 |
return 0; |
999 |
return 0; |
1006 |
} |
1000 |
} |
Lines 1010-1016
static int iw_get_nick(struct net_device *dev, struct iw_request_info *info,
Link Here
|
1010 |
{ |
1004 |
{ |
1011 |
struct ndis_device *wnd = netdev_priv(dev); |
1005 |
struct ndis_device *wnd = netdev_priv(dev); |
1012 |
|
1006 |
|
1013 |
wrqu->data.length = strlen(wnd->nick); |
1007 |
wrqu->data.length = wnd->nick_len; |
1014 |
memcpy(extra, wnd->nick, wrqu->data.length); |
1008 |
memcpy(extra, wnd->nick, wrqu->data.length); |
1015 |
return 0; |
1009 |
return 0; |
1016 |
} |
1010 |
} |