zd                705 drivers/isdn/hardware/mISDN/mISDNisar.c 					u8 zd = 0;
zd                707 drivers/isdn/hardware/mISDN/mISDNisar.c 						  ISAR_HIS_SDATA, 0x01, 1, &zd);
zd                123 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = urb->context;
zd                133 drivers/net/wireless/zydas/zd1201.c 			dev_warn(&zd->usb->dev, "%s: urb failed: %d\n", 
zd                134 drivers/net/wireless/zydas/zd1201.c 			    zd->dev->name, urb->status);
zd                151 drivers/net/wireless/zydas/zd1201.c static int zd1201_docmd(struct zd1201 *zd, int cmd, int parm0,
zd                173 drivers/net/wireless/zydas/zd1201.c 	usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2),
zd                174 drivers/net/wireless/zydas/zd1201.c 			  command, 16, zd1201_usbfree, zd);
zd                187 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = urb->context;
zd                188 drivers/net/wireless/zydas/zd1201.c 	netif_wake_queue(zd->dev);
zd                194 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = urb->context;
zd                200 drivers/net/wireless/zydas/zd1201.c 	if (!zd)
zd                211 drivers/net/wireless/zydas/zd1201.c 			dev_warn(&zd->usb->dev, "%s: rx urb failed: %d\n",
zd                212 drivers/net/wireless/zydas/zd1201.c 			    zd->dev->name, urb->status);
zd                222 drivers/net/wireless/zydas/zd1201.c 		memcpy(zd->rxdata, data, urb->actual_length);
zd                223 drivers/net/wireless/zydas/zd1201.c 		zd->rxlen = urb->actual_length;
zd                224 drivers/net/wireless/zydas/zd1201.c 		zd->rxdatas = 1;
zd                225 drivers/net/wireless/zydas/zd1201.c 		wake_up(&zd->rxdataq);
zd                239 drivers/net/wireless/zydas/zd1201.c 					netif_carrier_on(zd->dev);
zd                242 drivers/net/wireless/zydas/zd1201.c 					netif_carrier_off(zd->dev);
zd                245 drivers/net/wireless/zydas/zd1201.c 					netif_carrier_off(zd->dev);
zd                248 drivers/net/wireless/zydas/zd1201.c 					netif_carrier_on(zd->dev);
zd                251 drivers/net/wireless/zydas/zd1201.c 					netif_carrier_off(zd->dev);
zd                275 drivers/net/wireless/zydas/zd1201.c 			wireless_send_event(zd->dev, event, &wrqu, NULL);
zd                288 drivers/net/wireless/zydas/zd1201.c 			wireless_send_event(zd->dev, IWEVEXPIRED, &wrqu, NULL);
zd                292 drivers/net/wireless/zydas/zd1201.c 		zd->rxlen = 0;
zd                296 drivers/net/wireless/zydas/zd1201.c 			if (copylen+zd->rxlen > sizeof(zd->rxdata))
zd                298 drivers/net/wireless/zydas/zd1201.c 			memcpy(zd->rxdata+zd->rxlen, data+i+4, copylen);
zd                299 drivers/net/wireless/zydas/zd1201.c 			zd->rxlen += copylen;
zd                303 drivers/net/wireless/zydas/zd1201.c 			zd->rxdatas = 1;
zd                304 drivers/net/wireless/zydas/zd1201.c 			wake_up(&zd->rxdataq);
zd                319 drivers/net/wireless/zydas/zd1201.c 		if (zd->monitor) {
zd                332 drivers/net/wireless/zydas/zd1201.c 			skb->protocol = eth_type_trans(skb, zd->dev);
zd                333 drivers/net/wireless/zydas/zd1201.c 			zd->dev->stats.rx_packets++;
zd                334 drivers/net/wireless/zydas/zd1201.c 			zd->dev->stats.rx_bytes += skb->len;
zd                361 drivers/net/wireless/zydas/zd1201.c 				hlist_add_head(&frag->fnode, &zd->fraglist);
zd                364 drivers/net/wireless/zydas/zd1201.c 			hlist_for_each_entry(frag, &zd->fraglist, fnode)
zd                388 drivers/net/wireless/zydas/zd1201.c 		skb->protocol = eth_type_trans(skb, zd->dev);
zd                389 drivers/net/wireless/zydas/zd1201.c 		zd->dev->stats.rx_packets++;
zd                390 drivers/net/wireless/zydas/zd1201.c 		zd->dev->stats.rx_bytes += skb->len;
zd                397 drivers/net/wireless/zydas/zd1201.c 	urb->dev = zd->usb;
zd                403 drivers/net/wireless/zydas/zd1201.c 		zd->rxlen = 0;
zd                404 drivers/net/wireless/zydas/zd1201.c 		zd->rxdatas = 1;
zd                405 drivers/net/wireless/zydas/zd1201.c 		wake_up(&zd->rxdataq);
zd                410 drivers/net/wireless/zydas/zd1201.c static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata,
zd                420 drivers/net/wireless/zydas/zd1201.c 	zd->rxdatas = 0;
zd                421 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_ACCESS, rid, 0, 0);
zd                425 drivers/net/wireless/zydas/zd1201.c 	wait_event_interruptible(zd->rxdataq, zd->rxdatas);
zd                426 drivers/net/wireless/zydas/zd1201.c 	if (!zd->rxlen)
zd                429 drivers/net/wireless/zydas/zd1201.c 	code = le16_to_cpu(*(__le16*)(&zd->rxdata[4]));
zd                430 drivers/net/wireless/zydas/zd1201.c 	rid_fid = le16_to_cpu(*(__le16*)(&zd->rxdata[6]));
zd                431 drivers/net/wireless/zydas/zd1201.c 	length = le16_to_cpu(*(__le16*)(&zd->rxdata[8]));
zd                432 drivers/net/wireless/zydas/zd1201.c 	if (length > zd->rxlen)
zd                433 drivers/net/wireless/zydas/zd1201.c 		length = zd->rxlen-6;
zd                441 drivers/net/wireless/zydas/zd1201.c 		dev_dbg(&zd->usb->dev, "riddatalen mismatches, expected=%u, (packet=%u) length=%u, rid=0x%04X, rid_fid=0x%04X\n",
zd                442 drivers/net/wireless/zydas/zd1201.c 		    riddatalen, zd->rxlen, length, rid, rid_fid);
zd                446 drivers/net/wireless/zydas/zd1201.c 	zd->rxdatas = 0;
zd                448 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_SETRXRID, rid, 0, length);
zd                453 drivers/net/wireless/zydas/zd1201.c 	wait_event_interruptible(zd->rxdataq, zd->rxdatas);
zd                454 drivers/net/wireless/zydas/zd1201.c 	if (!zd->rxlen)
zd                457 drivers/net/wireless/zydas/zd1201.c 	if (zd->rxdata[zd->rxlen - 1] != ZD1201_PACKET_RESOURCE) {
zd                458 drivers/net/wireless/zydas/zd1201.c 		dev_dbg(&zd->usb->dev, "Packet type mismatch: 0x%x not 0x3\n",
zd                459 drivers/net/wireless/zydas/zd1201.c 		    zd->rxdata[zd->rxlen-1]);
zd                464 drivers/net/wireless/zydas/zd1201.c 	pdata = zd->rxdata;
zd                465 drivers/net/wireless/zydas/zd1201.c 	length = zd->rxlen;
zd                473 drivers/net/wireless/zydas/zd1201.c 			dev_dbg(&zd->usb->dev, "Rx Resource packet type error: %02X\n",
zd                510 drivers/net/wireless/zydas/zd1201.c static int zd1201_setconfig(struct zd1201 *zd, int rid, void *buf, int len, int wait)
zd                521 drivers/net/wireless/zydas/zd1201.c 	zd->rxdatas = 0;
zd                522 drivers/net/wireless/zydas/zd1201.c 	zd->rxlen = 0;
zd                551 drivers/net/wireless/zydas/zd1201.c 		usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb,
zd                552 drivers/net/wireless/zydas/zd1201.c 		    zd->endp_out2), request, 16, zd1201_usbfree, zd);
zd                572 drivers/net/wireless/zydas/zd1201.c 	usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out2),
zd                573 drivers/net/wireless/zydas/zd1201.c 	     request, 16, zd1201_usbfree, zd);
zd                579 drivers/net/wireless/zydas/zd1201.c 		wait_event_interruptible(zd->rxdataq, zd->rxdatas);
zd                580 drivers/net/wireless/zydas/zd1201.c 		if (!zd->rxlen || le16_to_cpu(*(__le16*)&zd->rxdata[6]) != rid) {
zd                581 drivers/net/wireless/zydas/zd1201.c 			dev_dbg(&zd->usb->dev, "wrong or no RID received\n");
zd                592 drivers/net/wireless/zydas/zd1201.c static inline int zd1201_getconfig16(struct zd1201 *zd, int rid, short *val)
zd                597 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig(zd, rid, &zdval, sizeof(__le16));
zd                604 drivers/net/wireless/zydas/zd1201.c static inline int zd1201_setconfig16(struct zd1201 *zd, int rid, short val)
zd                607 drivers/net/wireless/zydas/zd1201.c 	return (zd1201_setconfig(zd, rid, &zdval, sizeof(__le16), 1));
zd                610 drivers/net/wireless/zydas/zd1201.c static int zd1201_drvr_start(struct zd1201 *zd)
zd                621 drivers/net/wireless/zydas/zd1201.c 	usb_fill_bulk_urb(zd->rx_urb, zd->usb, 
zd                622 drivers/net/wireless/zydas/zd1201.c 	    usb_rcvbulkpipe(zd->usb, zd->endp_in), buffer, ZD1201_RXSIZE,
zd                623 drivers/net/wireless/zydas/zd1201.c 	    zd1201_usbrx, zd);
zd                625 drivers/net/wireless/zydas/zd1201.c 	err = usb_submit_urb(zd->rx_urb, GFP_KERNEL);
zd                629 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0);
zd                633 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig(zd, ZD1201_RID_CNFMAXTXBUFFERNUMBER, &zdmax,
zd                640 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_docmd(zd, ZD1201_CMDCODE_ALLOC, 1514, 0, 0);
zd                648 drivers/net/wireless/zydas/zd1201.c 	usb_kill_urb(zd->rx_urb);
zd                660 drivers/net/wireless/zydas/zd1201.c static int zd1201_enable(struct zd1201 *zd)
zd                664 drivers/net/wireless/zydas/zd1201.c 	if (zd->mac_enabled)
zd                667 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_ENABLE, 0, 0, 0);
zd                669 drivers/net/wireless/zydas/zd1201.c 		zd->mac_enabled = 1;
zd                671 drivers/net/wireless/zydas/zd1201.c 	if (zd->monitor)
zd                672 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 1);
zd                677 drivers/net/wireless/zydas/zd1201.c static int zd1201_disable(struct zd1201 *zd)
zd                681 drivers/net/wireless/zydas/zd1201.c 	if (!zd->mac_enabled)
zd                683 drivers/net/wireless/zydas/zd1201.c 	if (zd->monitor) {
zd                684 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 0);
zd                689 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_DISABLE, 0, 0, 0);
zd                691 drivers/net/wireless/zydas/zd1201.c 		zd->mac_enabled = 0;
zd                695 drivers/net/wireless/zydas/zd1201.c static int zd1201_mac_reset(struct zd1201 *zd)
zd                697 drivers/net/wireless/zydas/zd1201.c 	if (!zd->mac_enabled)
zd                699 drivers/net/wireless/zydas/zd1201.c 	zd1201_disable(zd);
zd                700 drivers/net/wireless/zydas/zd1201.c 	return zd1201_enable(zd);
zd                703 drivers/net/wireless/zydas/zd1201.c static int zd1201_join(struct zd1201 *zd, char *essid, int essidlen)
zd                708 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_disable(zd);
zd                714 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFAUTHENTICATION, val);
zd                720 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap) {	/* Normal station */
zd                721 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID, buf,
zd                726 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNSSID, buf,
zd                732 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNMACADDR, 
zd                733 drivers/net/wireless/zydas/zd1201.c 	    zd->dev->dev_addr, zd->dev->addr_len, 1);
zd                737 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_enable(zd);
zd                747 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                750 drivers/net/wireless/zydas/zd1201.c 	if (!zd->mac_enabled)
zd                751 drivers/net/wireless/zydas/zd1201.c 		zd1201_join(zd, zd->essid, zd->essidlen);
zd                786 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                787 drivers/net/wireless/zydas/zd1201.c 	unsigned char *txbuf = zd->txdata;
zd                789 drivers/net/wireless/zydas/zd1201.c 	struct urb *urb = zd->tx_urb;
zd                791 drivers/net/wireless/zydas/zd1201.c 	if (!zd->mac_enabled || zd->monitor) {
zd                817 drivers/net/wireless/zydas/zd1201.c 	usb_fill_bulk_urb(urb, zd->usb, usb_sndbulkpipe(zd->usb, zd->endp_out),
zd                818 drivers/net/wireless/zydas/zd1201.c 	    txbuf, txbuflen, zd1201_usbtx, zd);
zd                820 drivers/net/wireless/zydas/zd1201.c 	err = usb_submit_urb(zd->tx_urb, GFP_ATOMIC);
zd                835 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                837 drivers/net/wireless/zydas/zd1201.c 	if (!zd)
zd                839 drivers/net/wireless/zydas/zd1201.c 	dev_warn(&zd->usb->dev, "%s: TX timeout, shooting down urb\n",
zd                841 drivers/net/wireless/zydas/zd1201.c 	usb_unlink_urb(zd->tx_urb);
zd                850 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                853 drivers/net/wireless/zydas/zd1201.c 	if (!zd)
zd                856 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig(zd, ZD1201_RID_CNFOWNMACADDR, 
zd                862 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd                867 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                869 drivers/net/wireless/zydas/zd1201.c 	return &zd->iwstats;
zd                874 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                885 drivers/net/wireless/zydas/zd1201.c 	zd1201_setconfig(zd, ZD1201_RID_CNFGROUPADDRESS, reqbuf,
zd                892 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                894 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd                907 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                916 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, channel);
zd                920 drivers/net/wireless/zydas/zd1201.c 	zd1201_mac_reset(zd);
zd                928 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                932 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFOWNCHANNEL, &channel);
zd                944 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd                949 drivers/net/wireless/zydas/zd1201.c 	if (zd->ap) {
zd                955 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_PROMISCUOUSMODE, 0);
zd                958 drivers/net/wireless/zydas/zd1201.c 	zd->dev->type = ARPHRD_ETHER;
zd                962 drivers/net/wireless/zydas/zd1201.c 			zd->dev->type = ARPHRD_IEEE80211;
zd                967 drivers/net/wireless/zydas/zd1201.c 			zd1201_join(zd, "\0-*#\0", 5);
zd                983 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFPORTTYPE, porttype);
zd                986 drivers/net/wireless/zydas/zd1201.c 	if (zd->monitor && !monitor) {
zd                987 drivers/net/wireless/zydas/zd1201.c 			zd1201_disable(zd);
zd                988 drivers/net/wireless/zydas/zd1201.c 			*(__le16 *)buffer = cpu_to_le16(zd->essidlen);
zd                989 drivers/net/wireless/zydas/zd1201.c 			memcpy(buffer+2, zd->essid, zd->essidlen);
zd                990 drivers/net/wireless/zydas/zd1201.c 			err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID,
zd                995 drivers/net/wireless/zydas/zd1201.c 	zd->monitor = monitor;
zd                999 drivers/net/wireless/zydas/zd1201.c 	zd1201_mac_reset(zd);
zd               1007 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1011 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFPORTTYPE, &porttype);
zd               1031 drivers/net/wireless/zydas/zd1201.c 			dev_dbg(&zd->usb->dev, "Unknown porttype: %d\n",
zd               1035 drivers/net/wireless/zydas/zd1201.c 	if (zd->monitor)
zd               1083 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1086 drivers/net/wireless/zydas/zd1201.c 	if (!zd1201_getconfig(zd, ZD1201_RID_COMMSQUALITY, buffer, 6)) {
zd               1093 drivers/net/wireless/zydas/zd1201.c 		zd->iwstats.qual.level = le16_to_cpu(((__le16 *)buffer)[1]);
zd               1095 drivers/net/wireless/zydas/zd1201.c 		zd->iwstats.qual.updated = 2;
zd               1098 drivers/net/wireless/zydas/zd1201.c 	return zd1201_getconfig(zd, ZD1201_RID_CURRENTBSSID, ap_addr->sa_data, 6);
zd               1111 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1118 drivers/net/wireless/zydas/zd1201.c 	if (zd->ap)
zd               1122 drivers/net/wireless/zydas/zd1201.c 	enabled_save = zd->mac_enabled;
zd               1123 drivers/net/wireless/zydas/zd1201.c 	zd1201_enable(zd);
zd               1125 drivers/net/wireless/zydas/zd1201.c 	zd->rxdatas = 0;
zd               1126 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_docmd(zd, ZD1201_CMDCODE_INQUIRE, 
zd               1131 drivers/net/wireless/zydas/zd1201.c 	wait_event_interruptible(zd->rxdataq, zd->rxdatas);
zd               1132 drivers/net/wireless/zydas/zd1201.c 	if (!zd->rxlen)
zd               1135 drivers/net/wireless/zydas/zd1201.c 	if (le16_to_cpu(*(__le16*)&zd->rxdata[2]) != ZD1201_INQ_SCANRESULTS)
zd               1138 drivers/net/wireless/zydas/zd1201.c 	for(i=8; i<zd->rxlen; i+=62) {
zd               1141 drivers/net/wireless/zydas/zd1201.c 		memcpy(iwe.u.ap_addr.sa_data, zd->rxdata+i+6, 6);
zd               1146 drivers/net/wireless/zydas/zd1201.c 		iwe.u.data.length = zd->rxdata[i+16];
zd               1149 drivers/net/wireless/zydas/zd1201.c 					   &iwe, zd->rxdata+i+18);
zd               1152 drivers/net/wireless/zydas/zd1201.c 		if (zd->rxdata[i+14]&0x01)
zd               1160 drivers/net/wireless/zydas/zd1201.c 		iwe.u.freq.m = zd->rxdata[i+0];
zd               1168 drivers/net/wireless/zydas/zd1201.c 		for (j=0; j<10; j++) if (zd->rxdata[i+50+j]) {
zd               1169 drivers/net/wireless/zydas/zd1201.c 			iwe.u.bitrate.value = (zd->rxdata[i+50+j]&0x7f)*500000;
zd               1176 drivers/net/wireless/zydas/zd1201.c 		if (zd->rxdata[i+14]&0x10)
zd               1183 drivers/net/wireless/zydas/zd1201.c 		iwe.u.qual.qual = zd->rxdata[i+4];
zd               1184 drivers/net/wireless/zydas/zd1201.c 		iwe.u.qual.noise= zd->rxdata[i+2]/10-100;
zd               1185 drivers/net/wireless/zydas/zd1201.c 		iwe.u.qual.level = (256+zd->rxdata[i+4]*100)/255-100;
zd               1192 drivers/net/wireless/zydas/zd1201.c 		zd1201_disable(zd);
zd               1203 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1209 drivers/net/wireless/zydas/zd1201.c 	zd->essidlen = data->length;
zd               1210 drivers/net/wireless/zydas/zd1201.c 	memset(zd->essid, 0, IW_ESSID_MAX_SIZE+1);
zd               1211 drivers/net/wireless/zydas/zd1201.c 	memcpy(zd->essid, essid, data->length);
zd               1212 drivers/net/wireless/zydas/zd1201.c 	return zd1201_join(zd, zd->essid, zd->essidlen);
zd               1218 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1220 drivers/net/wireless/zydas/zd1201.c 	memcpy(essid, zd->essid, zd->essidlen);
zd               1222 drivers/net/wireless/zydas/zd1201.c 	data->length = zd->essidlen;
zd               1239 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1262 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL, rate);
zd               1266 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd               1272 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1276 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CURRENTTXRATE, &rate);
zd               1305 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1316 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFRTSTHRESHOLD, val);
zd               1319 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd               1325 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1329 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFRTSTHRESHOLD, &rtst);
zd               1342 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1354 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFFRAGTHRESHOLD, val);
zd               1357 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd               1363 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1367 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFFRAGTHRESHOLD, &fragt);
zd               1392 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1401 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_getconfig16(zd,ZD1201_RID_CNFDEFAULTKEYID,&i);
zd               1405 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_setconfig16(zd, ZD1201_RID_CNFDEFAULTKEYID, i);
zd               1414 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig(zd, rid, key, erq->length, 1);
zd               1417 drivers/net/wireless/zydas/zd1201.c 	zd->encode_keylen[i] = erq->length;
zd               1418 drivers/net/wireless/zydas/zd1201.c 	memcpy(zd->encode_keys[i], key, erq->length);
zd               1423 drivers/net/wireless/zydas/zd1201.c 		zd->encode_enabled = 1;
zd               1425 drivers/net/wireless/zydas/zd1201.c 		zd->encode_enabled = 0;
zd               1428 drivers/net/wireless/zydas/zd1201.c 		zd->encode_restricted = 1;
zd               1430 drivers/net/wireless/zydas/zd1201.c 		zd->encode_restricted = 0;
zd               1431 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFWEBFLAGS, i);
zd               1435 drivers/net/wireless/zydas/zd1201.c 	if (zd->encode_enabled)
zd               1439 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFAUTHENTICATION, i);
zd               1443 drivers/net/wireless/zydas/zd1201.c 	return zd1201_mac_reset(zd);
zd               1449 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1453 drivers/net/wireless/zydas/zd1201.c 	if (zd->encode_enabled)
zd               1457 drivers/net/wireless/zydas/zd1201.c 	if (zd->encode_restricted)
zd               1464 drivers/net/wireless/zydas/zd1201.c 		err = zd1201_getconfig16(zd, ZD1201_RID_CNFDEFAULTKEYID, &i);
zd               1473 drivers/net/wireless/zydas/zd1201.c 	erq->length = zd->encode_keylen[i];
zd               1474 drivers/net/wireless/zydas/zd1201.c 	memcpy(key, zd->encode_keys[i], erq->length);
zd               1482 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1490 drivers/net/wireless/zydas/zd1201.c 			err = zd1201_setconfig16(zd, 
zd               1497 drivers/net/wireless/zydas/zd1201.c 			err = zd1201_getconfig16(zd, 
zd               1506 drivers/net/wireless/zydas/zd1201.c 			err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMEPS,
zd               1515 drivers/net/wireless/zydas/zd1201.c 	return zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
zd               1521 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1525 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFPMENABLED, &enabled);
zd               1528 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFPMEPS, &level);
zd               1531 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFMAXSLEEPDURATION, &duration);
zd               1608 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1610 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap)
zd               1613 drivers/net/wireless/zydas/zd1201.c 	return zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
zd               1619 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1623 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap)
zd               1626 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFHOSTAUTH, &hostauth);
zd               1638 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1641 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap)
zd               1648 drivers/net/wireless/zydas/zd1201.c 	return zd1201_setconfig(zd, ZD1201_RID_AUTHENTICATESTA, buffer, 10, 1);
zd               1654 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1657 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap)
zd               1660 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, rrq->value);
zd               1669 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = netdev_priv(dev);
zd               1673 drivers/net/wireless/zydas/zd1201.c 	if (!zd->ap)
zd               1676 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig16(zd, ZD1201_RID_CNFMAXASSOCSTATIONS, &maxassoc);
zd               1730 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd;
zd               1739 drivers/net/wireless/zydas/zd1201.c 	dev = alloc_etherdev(sizeof(*zd));
zd               1742 drivers/net/wireless/zydas/zd1201.c 	zd = netdev_priv(dev);
zd               1743 drivers/net/wireless/zydas/zd1201.c 	zd->dev = dev;
zd               1745 drivers/net/wireless/zydas/zd1201.c 	zd->ap = ap;
zd               1746 drivers/net/wireless/zydas/zd1201.c 	zd->usb = usb;
zd               1747 drivers/net/wireless/zydas/zd1201.c 	zd->removed = 0;
zd               1748 drivers/net/wireless/zydas/zd1201.c 	init_waitqueue_head(&zd->rxdataq);
zd               1749 drivers/net/wireless/zydas/zd1201.c 	INIT_HLIST_HEAD(&zd->fraglist);
zd               1751 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_fw_upload(usb, zd->ap);
zd               1757 drivers/net/wireless/zydas/zd1201.c 	zd->endp_in = 1;
zd               1758 drivers/net/wireless/zydas/zd1201.c 	zd->endp_out = 1;
zd               1759 drivers/net/wireless/zydas/zd1201.c 	zd->endp_out2 = 2;
zd               1760 drivers/net/wireless/zydas/zd1201.c 	zd->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
zd               1761 drivers/net/wireless/zydas/zd1201.c 	zd->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
zd               1762 drivers/net/wireless/zydas/zd1201.c 	if (!zd->rx_urb || !zd->tx_urb) {
zd               1768 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_drvr_start(zd);
zd               1772 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFMAXDATALEN, 2312);
zd               1776 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_TXRATECNTL,
zd               1786 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_getconfig(zd, ZD1201_RID_CNFOWNMACADDR, 
zd               1793 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig(zd, ZD1201_RID_CNFDESIREDSSID, buf,
zd               1798 drivers/net/wireless/zydas/zd1201.c 	if (zd->ap)
zd               1802 drivers/net/wireless/zydas/zd1201.c 	err = zd1201_setconfig16(zd, ZD1201_RID_CNFPORTTYPE, porttype);
zd               1814 drivers/net/wireless/zydas/zd1201.c 	usb_set_intfdata(interface, zd);
zd               1815 drivers/net/wireless/zydas/zd1201.c 	zd1201_enable(zd);	/* zd1201 likes to startup enabled, */
zd               1816 drivers/net/wireless/zydas/zd1201.c 	zd1201_disable(zd);	/* interfering with all the wifis in range */
zd               1821 drivers/net/wireless/zydas/zd1201.c 	zd1201_docmd(zd, ZD1201_CMDCODE_INIT, 0, 0, 0);
zd               1823 drivers/net/wireless/zydas/zd1201.c 	usb_free_urb(zd->tx_urb);
zd               1824 drivers/net/wireless/zydas/zd1201.c 	usb_free_urb(zd->rx_urb);
zd               1831 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = usb_get_intfdata(interface);
zd               1835 drivers/net/wireless/zydas/zd1201.c 	if (!zd)
zd               1839 drivers/net/wireless/zydas/zd1201.c 	hlist_for_each_entry_safe(frag, node2, &zd->fraglist, fnode) {
zd               1845 drivers/net/wireless/zydas/zd1201.c 	if (zd->tx_urb) {
zd               1846 drivers/net/wireless/zydas/zd1201.c 		usb_kill_urb(zd->tx_urb);
zd               1847 drivers/net/wireless/zydas/zd1201.c 		usb_free_urb(zd->tx_urb);
zd               1849 drivers/net/wireless/zydas/zd1201.c 	if (zd->rx_urb) {
zd               1850 drivers/net/wireless/zydas/zd1201.c 		usb_kill_urb(zd->rx_urb);
zd               1851 drivers/net/wireless/zydas/zd1201.c 		usb_free_urb(zd->rx_urb);
zd               1854 drivers/net/wireless/zydas/zd1201.c 	if (zd->dev) {
zd               1855 drivers/net/wireless/zydas/zd1201.c 		unregister_netdev(zd->dev);
zd               1856 drivers/net/wireless/zydas/zd1201.c 		free_netdev(zd->dev);
zd               1865 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = usb_get_intfdata(interface);
zd               1867 drivers/net/wireless/zydas/zd1201.c 	netif_device_detach(zd->dev);
zd               1869 drivers/net/wireless/zydas/zd1201.c 	zd->was_enabled = zd->mac_enabled;
zd               1871 drivers/net/wireless/zydas/zd1201.c 	if (zd->was_enabled)
zd               1872 drivers/net/wireless/zydas/zd1201.c 		return zd1201_disable(zd);
zd               1879 drivers/net/wireless/zydas/zd1201.c 	struct zd1201 *zd = usb_get_intfdata(interface);
zd               1881 drivers/net/wireless/zydas/zd1201.c 	if (!zd || !zd->dev)
zd               1884 drivers/net/wireless/zydas/zd1201.c 	netif_device_attach(zd->dev);
zd               1886 drivers/net/wireless/zydas/zd1201.c 	if (zd->was_enabled)
zd               1887 drivers/net/wireless/zydas/zd1201.c 		return zd1201_enable(zd);