Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 239371
Collapse All | Expand All

(-)a/ubuntu/ndiswrapper/iw_ndis.c (-9 / +3 lines)
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
}
(-)a/ubuntu/ndiswrapper/ndis.h (+1 lines)
Lines 878-883 struct ndis_device { Link Here
878
	unsigned long scan_timestamp;
878
	unsigned long scan_timestamp;
879
	struct encr_info encr_info;
879
	struct encr_info encr_info;
880
	char nick[IW_ESSID_MAX_SIZE];
880
	char nick[IW_ESSID_MAX_SIZE];
881
	size_t nick_len;
881
	struct ndis_essid essid;
882
	struct ndis_essid essid;
882
	struct auth_encr_capa capa;
883
	struct auth_encr_capa capa;
883
	enum ndis_infrastructure_mode infrastructure_mode;
884
	enum ndis_infrastructure_mode infrastructure_mode;
(-)a/ubuntu/ndiswrapper/proc.c (-4 / +2 lines)
Lines 97-106 static int procfs_read_ndis_encr(char *page, char **start, off_t off, Link Here
97
	p += sprintf(p, "\n");
97
	p += sprintf(p, "\n");
98
98
99
	res = mp_query(wnd, OID_802_11_SSID, &essid, sizeof(essid));
99
	res = mp_query(wnd, OID_802_11_SSID, &essid, sizeof(essid));
100
	if (!res) {
100
	if (!res)
101
		essid.essid[essid.length] = '\0';
101
		p += sprintf(p, "essid=%.*s\n", essid.length, essid.essid);
102
		p += sprintf(p, "essid=%s\n", essid.essid);
103
	}
104
	res = mp_query_int(wnd, OID_802_11_ENCRYPTION_STATUS, &encr_status);
102
	res = mp_query_int(wnd, OID_802_11_ENCRYPTION_STATUS, &encr_status);
105
	if (!res) {
103
	if (!res) {
106
		typeof(&wnd->encr_info.keys[0]) tx_key;
104
		typeof(&wnd->encr_info.keys[0]) tx_key;
(-)a/ubuntu/ndiswrapper/wrapndis.c (-1 / +1 lines)
Lines 2028-2034 static wstdcall NTSTATUS NdisAddDevice(struct driver_object *drv_obj, Link Here
2028
	wnd->attributes = 0;
2028
	wnd->attributes = 0;
2029
	wnd->dma_map_count = 0;
2029
	wnd->dma_map_count = 0;
2030
	wnd->dma_map_addr = NULL;
2030
	wnd->dma_map_addr = NULL;
2031
	wnd->nick[0] = 0;
2031
	wnd->nick_len = 0;
2032
	init_timer(&wnd->hangcheck_timer);
2032
	init_timer(&wnd->hangcheck_timer);
2033
	wnd->scan_timestamp = 0;
2033
	wnd->scan_timestamp = 0;
2034
	init_timer(&wnd->iw_stats_timer);
2034
	init_timer(&wnd->iw_stats_timer);

Return to bug 239371