[PATCH] usb wifi: zd1201 cleanups
Cleanup coding style and other small stuff in zd1201. No real code changes. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
f6882a0688
commit
2a80634031
@@ -33,7 +33,7 @@ static struct usb_device_id zd1201_table[] = {
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ap = 0; /* Are we an AP or a normal station? */
|
static int ap; /* Are we an AP or a normal station? */
|
||||||
|
|
||||||
#define ZD1201_VERSION "0.15"
|
#define ZD1201_VERSION "0.15"
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ static int zd1201_fw_upload(struct usb_device *dev, int apfw)
|
|||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&dev->dev, "Failed to load %s firmware file!\n", fwfile);
|
dev_err(&dev->dev, "Failed to load %s firmware file!\n", fwfile);
|
||||||
dev_err(&dev->dev, "Make sure the hotplug firmware loader is installed.\n");
|
dev_err(&dev->dev, "Make sure the hotplug firmware loader is installed.\n");
|
||||||
dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info\n");
|
dev_err(&dev->dev, "Goto http://linux-lc100020.sourceforge.net for more info.\n");
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,7 +376,6 @@ static void zd1201_usbrx(struct urb *urb, struct pt_regs *regs)
|
|||||||
goto resubmit;
|
goto resubmit;
|
||||||
hlist_del_init(&frag->fnode);
|
hlist_del_init(&frag->fnode);
|
||||||
kfree(frag);
|
kfree(frag);
|
||||||
/* Fallthrough */
|
|
||||||
} else {
|
} else {
|
||||||
if (datalen<14)
|
if (datalen<14)
|
||||||
goto resubmit;
|
goto resubmit;
|
||||||
@@ -490,8 +489,7 @@ static int zd1201_getconfig(struct zd1201 *zd, int rid, void *riddata,
|
|||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
pdata += 8;
|
pdata += 8;
|
||||||
actual_length -= 8;
|
actual_length -= 8;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
pdata += 4;
|
pdata += 4;
|
||||||
actual_length -= 4;
|
actual_length -= 4;
|
||||||
}
|
}
|
||||||
@@ -764,7 +762,6 @@ static int zd1201_net_open(struct net_device *dev)
|
|||||||
static int zd1201_net_stop(struct net_device *dev)
|
static int zd1201_net_stop(struct net_device *dev)
|
||||||
{
|
{
|
||||||
netif_stop_queue(dev);
|
netif_stop_queue(dev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -915,7 +912,6 @@ static int zd1201_get_name(struct net_device *dev,
|
|||||||
struct iw_request_info *info, char *name, char *extra)
|
struct iw_request_info *info, char *name, char *extra)
|
||||||
{
|
{
|
||||||
strcpy(name, "IEEE 802.11b");
|
strcpy(name, "IEEE 802.11b");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1017,7 +1013,6 @@ static int zd1201_set_mode(struct net_device *dev,
|
|||||||
/* If monitor mode is set we don't actually turn it on here since it
|
/* If monitor mode is set we don't actually turn it on here since it
|
||||||
* is done during mac reset anyway (see zd1201_mac_enable).
|
* is done during mac reset anyway (see zd1201_mac_enable).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
zd1201_mac_reset(zd);
|
zd1201_mac_reset(zd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1529,11 +1524,7 @@ static int zd1201_set_power(struct net_device *dev,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
err = zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
|
return zd1201_setconfig16(zd, ZD1201_RID_CNFPMENABLED, enabled);
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int zd1201_get_power(struct net_device *dev,
|
static int zd1201_get_power(struct net_device *dev,
|
||||||
@@ -1627,15 +1618,11 @@ static int zd1201_set_hostauth(struct net_device *dev,
|
|||||||
struct iw_request_info *info, struct iw_param *rrq, char *extra)
|
struct iw_request_info *info, struct iw_param *rrq, char *extra)
|
||||||
{
|
{
|
||||||
struct zd1201 *zd = (struct zd1201 *)dev->priv;
|
struct zd1201 *zd = (struct zd1201 *)dev->priv;
|
||||||
int err;
|
|
||||||
|
|
||||||
if (!zd->ap)
|
if (!zd->ap)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
err = zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
|
return zd1201_setconfig16(zd, ZD1201_RID_CNFHOSTAUTH, rrq->value);
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int zd1201_get_hostauth(struct net_device *dev,
|
static int zd1201_get_hostauth(struct net_device *dev,
|
||||||
@@ -1744,7 +1731,7 @@ static int zd1201_probe(struct usb_interface *interface,
|
|||||||
{
|
{
|
||||||
struct zd1201 *zd;
|
struct zd1201 *zd;
|
||||||
struct usb_device *usb;
|
struct usb_device *usb;
|
||||||
int i, err;
|
int err;
|
||||||
short porttype;
|
short porttype;
|
||||||
char buf[IW_ESSID_MAX_SIZE+2];
|
char buf[IW_ESSID_MAX_SIZE+2];
|
||||||
|
|
||||||
@@ -1773,9 +1760,7 @@ static int zd1201_probe(struct usb_interface *interface,
|
|||||||
if (!zd->rx_urb || !zd->tx_urb)
|
if (!zd->rx_urb || !zd->tx_urb)
|
||||||
goto err_zd;
|
goto err_zd;
|
||||||
|
|
||||||
for(i = 0; i<100; i++)
|
mdelay(100);
|
||||||
udelay(1000);
|
|
||||||
|
|
||||||
err = zd1201_drvr_start(zd);
|
err = zd1201_drvr_start(zd);
|
||||||
if (err)
|
if (err)
|
||||||
goto err_zd;
|
goto err_zd;
|
||||||
|
Reference in New Issue
Block a user