Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131961
b: refs/heads/master
c: ab65f64
h: refs/heads/master
i:
  131959: e19e6f9
v: v3
  • Loading branch information
Kiran Divekar authored and John W. Linville committed Feb 26, 2009
1 parent 4ea32f2 commit 91113c3
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 89 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7958a45310519811134a5b911d863201786978ab
refs/heads/master: ab65f649d38d910f48843a275f3f0596cdbf28bf
13 changes: 4 additions & 9 deletions trunk/drivers/net/b44.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,14 +1264,8 @@ static void b44_clear_stats(struct b44 *bp)
static void b44_chip_reset(struct b44 *bp, int reset_kind)
{
struct ssb_device *sdev = bp->sdev;
bool was_enabled;

was_enabled = ssb_device_is_enabled(bp->sdev);

ssb_device_enable(bp->sdev, 0);
ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev);

if (was_enabled) {
if (ssb_device_is_enabled(bp->sdev)) {
bw32(bp, B44_RCV_LAZY, 0);
bw32(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE);
b44_wait_bit(bp, B44_ENET_CTRL, ENET_CTRL_DISABLE, 200, 1);
Expand All @@ -1283,8 +1277,10 @@ static void b44_chip_reset(struct b44 *bp, int reset_kind)
}
bw32(bp, B44_DMARX_CTRL, 0);
bp->rx_prod = bp->rx_cons = 0;
}
} else
ssb_pcicore_dev_irqvecs_enable(&sdev->bus->pcicore, sdev);

ssb_device_enable(bp->sdev, 0);
b44_clear_stats(bp);

/*
Expand Down Expand Up @@ -2240,7 +2236,6 @@ static void __devexit b44_remove_one(struct ssb_device *sdev)
struct net_device *dev = ssb_get_drvdata(sdev);

unregister_netdev(dev);
ssb_device_disable(sdev, 0);
ssb_bus_may_powerdown(sdev->bus);
free_netdev(dev);
ssb_pcihost_set_power_state(sdev, PCI_D3hot);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
spin_lock_irqsave(&priv->txlock, flags);

/* check if there is space to queue this packet */
if ((nr_frags+1) > priv->num_txbdfree) {
if (nr_frags > priv->num_txbdfree) {
/* no space, stop the queue */
netif_stop_queue(dev);
dev->stats.tx_fifo_errors++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/hp-plus.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ init_module(void)
if (this_dev != 0) break; /* only autoprobe 1st one */
printk(KERN_NOTICE "hp-plus.c: Presently autoprobing (not recommended) for a single card.\n");
}
dev = alloc_eip_netdev();
dev = alloc_ei_netdev();
if (!dev)
break;
dev->irq = irq[this_dev];
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/net/wireless/libertas/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ static const char * mesh_stat_strings[]= {
static void lbs_ethtool_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

snprintf(info->fw_version, 32, "%u.%u.%u.p%u",
priv->fwrelease >> 24 & 0xff,
Expand All @@ -47,7 +47,7 @@ static int lbs_ethtool_get_eeprom_len(struct net_device *dev)
static int lbs_ethtool_get_eeprom(struct net_device *dev,
struct ethtool_eeprom *eeprom, u8 * bytes)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
struct cmd_ds_802_11_eeprom_access cmd;
int ret;

Expand Down Expand Up @@ -76,7 +76,7 @@ static int lbs_ethtool_get_eeprom(struct net_device *dev,
static void lbs_ethtool_get_stats(struct net_device *dev,
struct ethtool_stats *stats, uint64_t *data)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
struct cmd_ds_mesh_access mesh_access;
int ret;

Expand Down Expand Up @@ -113,7 +113,7 @@ static void lbs_ethtool_get_stats(struct net_device *dev,

static int lbs_ethtool_get_sset_count(struct net_device *dev, int sset)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

if (sset == ETH_SS_STATS && dev == priv->mesh_dev)
return MESH_STATS_NUM;
Expand Down Expand Up @@ -143,7 +143,7 @@ static void lbs_ethtool_get_strings(struct net_device *dev,
static void lbs_ethtool_get_wol(struct net_device *dev,
struct ethtool_wolinfo *wol)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

if (priv->wol_criteria == 0xffffffff) {
/* Interface driver didn't configure wake */
Expand All @@ -166,7 +166,7 @@ static void lbs_ethtool_get_wol(struct net_device *dev,
static int lbs_ethtool_set_wol(struct net_device *dev,
struct ethtool_wolinfo *wol)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
uint32_t criteria = 0;

if (priv->wol_criteria == 0xffffffff && wol->wolopts)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static int if_usb_reset_device(struct if_usb_card *cardp);
static ssize_t if_usb_firmware_set(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct if_usb_card *cardp = priv->card;
char fwname[FIRMWARE_NAME_MAX];
int ret;
Expand All @@ -86,7 +86,7 @@ static DEVICE_ATTR(lbs_flash_fw, 0200, NULL, if_usb_firmware_set);
static ssize_t if_usb_boot2_set(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct if_usb_card *cardp = priv->card;
char fwname[FIRMWARE_NAME_MAX];
int ret;
Expand Down
31 changes: 16 additions & 15 deletions trunk/drivers/net/wireless/libertas/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ u8 lbs_data_rate_to_fw_index(u32 rate)
static ssize_t lbs_anycast_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_access mesh_access;
int ret;

Expand All @@ -241,7 +241,7 @@ static ssize_t lbs_anycast_get(struct device *dev,
static ssize_t lbs_anycast_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_access mesh_access;
uint32_t datum;
int ret;
Expand All @@ -263,7 +263,7 @@ static ssize_t lbs_anycast_set(struct device *dev,
static ssize_t lbs_prb_rsp_limit_get(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_access mesh_access;
int ret;
u32 retry_limit;
Expand All @@ -286,7 +286,7 @@ static ssize_t lbs_prb_rsp_limit_get(struct device *dev,
static ssize_t lbs_prb_rsp_limit_set(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_access mesh_access;
int ret;
unsigned long retry_limit;
Expand Down Expand Up @@ -321,7 +321,7 @@ static void lbs_remove_mesh(struct lbs_private *priv);
static ssize_t lbs_rtap_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
return snprintf(buf, 5, "0x%X\n", priv->monitormode);
}

Expand All @@ -332,7 +332,7 @@ static ssize_t lbs_rtap_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
int monitor_mode;
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;

sscanf(buf, "%x", &monitor_mode);
if (monitor_mode) {
Expand Down Expand Up @@ -383,7 +383,7 @@ static DEVICE_ATTR(lbs_rtap, 0644, lbs_rtap_get, lbs_rtap_set );
static ssize_t lbs_mesh_get(struct device *dev,
struct device_attribute *attr, char * buf)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
return snprintf(buf, 5, "0x%X\n", !!priv->mesh_dev);
}

Expand All @@ -393,7 +393,7 @@ static ssize_t lbs_mesh_get(struct device *dev,
static ssize_t lbs_mesh_set(struct device *dev,
struct device_attribute *attr, const char * buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
int enable;
int ret, action = CMD_ACT_MESH_CONFIG_STOP;

Expand Down Expand Up @@ -452,7 +452,7 @@ static struct attribute_group lbs_mesh_attr_group = {
*/
static int lbs_dev_open(struct net_device *dev)
{
struct lbs_private *priv = netdev_priv(dev) ;
struct lbs_private *priv = dev->ml_priv;
int ret = 0;

lbs_deb_enter(LBS_DEB_NET);
Expand Down Expand Up @@ -521,7 +521,7 @@ static int lbs_mesh_stop(struct net_device *dev)
*/
static int lbs_eth_stop(struct net_device *dev)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

lbs_deb_enter(LBS_DEB_NET);

Expand All @@ -538,7 +538,7 @@ static int lbs_eth_stop(struct net_device *dev)

static void lbs_tx_timeout(struct net_device *dev)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

lbs_deb_enter(LBS_DEB_TX);

Expand Down Expand Up @@ -590,7 +590,7 @@ EXPORT_SYMBOL_GPL(lbs_host_to_card_done);
*/
static struct net_device_stats *lbs_get_stats(struct net_device *dev)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

lbs_deb_enter(LBS_DEB_NET);
return &priv->stats;
Expand All @@ -599,7 +599,7 @@ static struct net_device_stats *lbs_get_stats(struct net_device *dev)
static int lbs_set_mac_address(struct net_device *dev, void *addr)
{
int ret = 0;
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
struct sockaddr *phwaddr = addr;
struct cmd_ds_802_11_mac_address cmd;

Expand Down Expand Up @@ -732,7 +732,7 @@ static void lbs_set_mcast_worker(struct work_struct *work)

static void lbs_set_multicast_list(struct net_device *dev)
{
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;

schedule_work(&priv->mcast_work);
}
Expand All @@ -748,7 +748,7 @@ static void lbs_set_multicast_list(struct net_device *dev)
static int lbs_thread(void *data)
{
struct net_device *dev = data;
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
wait_queue_t wait;

lbs_deb_enter(LBS_DEB_THREAD);
Expand Down Expand Up @@ -1184,6 +1184,7 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
goto done;
}
priv = netdev_priv(dev);
dev->ml_priv = priv;

if (lbs_init_adapter(priv)) {
lbs_pr_err("failed to initialize adapter structure.\n");
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/net/wireless/libertas/persistcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
static int mesh_get_default_parameters(struct device *dev,
struct mrvl_mesh_defaults *defs)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_config cmd;
int ret;

Expand Down Expand Up @@ -57,7 +57,7 @@ static ssize_t bootflag_get(struct device *dev,
static ssize_t bootflag_set(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_config cmd;
uint32_t datum;
int ret;
Expand Down Expand Up @@ -100,7 +100,7 @@ static ssize_t boottime_get(struct device *dev,
static ssize_t boottime_set(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_config cmd;
uint32_t datum;
int ret;
Expand Down Expand Up @@ -152,7 +152,7 @@ static ssize_t channel_get(struct device *dev,
static ssize_t channel_set(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
struct cmd_ds_mesh_config cmd;
uint32_t datum;
int ret;
Expand Down Expand Up @@ -210,7 +210,7 @@ static ssize_t mesh_id_set(struct device *dev, struct device_attribute *attr,
struct cmd_ds_mesh_config cmd;
struct mrvl_mesh_defaults defs;
struct mrvl_meshie *ie;
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
int len;
int ret;

Expand Down Expand Up @@ -269,7 +269,7 @@ static ssize_t protocol_id_set(struct device *dev,
struct cmd_ds_mesh_config cmd;
struct mrvl_mesh_defaults defs;
struct mrvl_meshie *ie;
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
uint32_t datum;
int ret;

Expand Down Expand Up @@ -323,7 +323,7 @@ static ssize_t metric_id_set(struct device *dev, struct device_attribute *attr,
struct cmd_ds_mesh_config cmd;
struct mrvl_mesh_defaults defs;
struct mrvl_meshie *ie;
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
uint32_t datum;
int ret;

Expand Down Expand Up @@ -377,7 +377,7 @@ static ssize_t capability_set(struct device *dev, struct device_attribute *attr,
struct cmd_ds_mesh_config cmd;
struct mrvl_mesh_defaults defs;
struct mrvl_meshie *ie;
struct lbs_private *priv = netdev_priv(to_net_dev(dev));
struct lbs_private *priv = to_net_dev(dev)->ml_priv;
uint32_t datum;
int ret;

Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/wireless/libertas/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ int lbs_set_scan(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
DECLARE_SSID_BUF(ssid);
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
int ret = 0;

lbs_deb_enter(LBS_DEB_WEXT);
Expand Down Expand Up @@ -1008,7 +1008,7 @@ int lbs_get_scan(struct net_device *dev, struct iw_request_info *info,
struct iw_point *dwrq, char *extra)
{
#define SCAN_ITEM_SIZE 128
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
int err = 0;
char *ev = extra;
char *stop = ev + dwrq->length;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/libertas/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static u32 convert_radiotap_rate_to_mv(u8 rate)
int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
unsigned long flags;
struct lbs_private *priv = netdev_priv(dev);
struct lbs_private *priv = dev->ml_priv;
struct txpd *txpd;
char *p802x_hdr;
uint16_t pkt_len;
Expand Down
Loading

0 comments on commit 91113c3

Please sign in to comment.