Commit bfe34ebb authored by David S. Miller's avatar David S. Miller
Browse files
parents 3d7ddd54 6b4f645a
Loading
Loading
Loading
Loading
+29 −21
Original line number Diff line number Diff line
@@ -64,6 +64,32 @@ void rndis_status(struct usbnet *dev, struct urb *urb)
}
EXPORT_SYMBOL_GPL(rndis_status);

/*
 * RNDIS indicate messages.
 */
static void rndis_msg_indicate(struct usbnet *dev, struct rndis_indicate *msg,
				int buflen)
{
	struct cdc_state *info = (void *)&dev->data;
	struct device *udev = &info->control->dev;

	if (dev->driver_info->indication) {
		dev->driver_info->indication(dev, msg, buflen);
	} else {
		switch (msg->status) {
		case RNDIS_STATUS_MEDIA_CONNECT:
			dev_info(udev, "rndis media connect\n");
			break;
		case RNDIS_STATUS_MEDIA_DISCONNECT:
			dev_info(udev, "rndis media disconnect\n");
			break;
		default:
			dev_info(udev, "rndis indication: 0x%08x\n",
					le32_to_cpu(msg->status));
		}
	}
}

/*
 * RPC done RNDIS-style.  Caller guarantees:
 * - message is properly byteswapped
@@ -143,27 +169,9 @@ int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen)
					request_id, xid);
				/* then likely retry */
			} else switch (buf->msg_type) {
			case RNDIS_MSG_INDICATE: {	/* fault/event */
				struct rndis_indicate *msg = (void *)buf;
				int state = 0;
			case RNDIS_MSG_INDICATE:	/* fault/event */
				rndis_msg_indicate(dev, (void *)buf, buflen);

				switch (msg->status) {
				case RNDIS_STATUS_MEDIA_CONNECT:
					state = 1;
				case RNDIS_STATUS_MEDIA_DISCONNECT:
					dev_info(&info->control->dev,
						"rndis media %sconnect\n",
						!state?"dis":"");
					if (dev->driver_info->link_change)
						dev->driver_info->link_change(
							dev, state);
					break;
				default:
					dev_info(&info->control->dev,
						"rndis indication: 0x%08x\n",
						le32_to_cpu(msg->status));
				}
				}
				break;
			case RNDIS_MSG_KEEPALIVE: {	/* ping */
				struct rndis_keepalive_c *msg = (void *)buf;
+18 −14
Original line number Diff line number Diff line
@@ -601,21 +601,25 @@ int usbnet_stop (struct net_device *net)
				info->description);
	}

	// ensure there are no more active urbs
	if (!(info->flags & FLAG_AVOID_UNLINK_URBS)) {
		/* ensure there are no more active urbs */
		add_wait_queue(&unlink_wakeup, &wait);
		dev->wait = &unlink_wakeup;
	temp = unlink_urbs (dev, &dev->txq) + unlink_urbs (dev, &dev->rxq);
		temp = unlink_urbs(dev, &dev->txq) +
			unlink_urbs(dev, &dev->rxq);

	// maybe wait for deletions to finish.
		/* maybe wait for deletions to finish. */
		while (!skb_queue_empty(&dev->rxq)
				&& !skb_queue_empty(&dev->txq)
				&& !skb_queue_empty(&dev->done)) {
			msleep(UNLINK_TIMEOUT_MS);
			if (netif_msg_ifdown(dev))
			devdbg (dev, "waited for %d urb completions", temp);
				devdbg(dev, "waited for %d urb completions",
					temp);
		}
		dev->wait = NULL;
		remove_wait_queue(&unlink_wakeup, &wait);
	}

	usb_kill_urb(dev->interrupt);

+2 −2
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
menu "Wireless LAN"
	depends on !S390

config WLAN_PRE80211
menuconfig WLAN_PRE80211
	bool "Wireless LAN (pre-802.11)"
	depends on NETDEVICES
	---help---
@@ -101,7 +101,7 @@ config PCMCIA_NETWAVE
	  called netwave_cs.  If unsure, say N.


config WLAN_80211
menuconfig WLAN_80211
	bool "Wireless LAN (IEEE 802.11)"
	depends on NETDEVICES
	---help---
+9 −9
Original line number Diff line number Diff line
@@ -1773,6 +1773,9 @@ static void at76_mac80211_stop(struct ieee80211_hw *hw)

	at76_dbg(DBG_MAC80211, "%s()", __func__);

	cancel_delayed_work(&priv->dwork_hw_scan);
	cancel_work_sync(&priv->work_set_promisc);

	mutex_lock(&priv->mtx);

	if (!priv->device_unplugged) {
@@ -1872,7 +1875,7 @@ static void at76_dwork_hw_scan(struct work_struct *work)
	/* FIXME: add maximum time for scan to complete */

	if (ret != CMD_STATUS_COMPLETE) {
		queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan,
		ieee80211_queue_delayed_work(priv->hw, &priv->dwork_hw_scan,
					     SCAN_POLL_INTERVAL);
		mutex_unlock(&priv->mtx);
		return;
@@ -1934,7 +1937,7 @@ static int at76_hw_scan(struct ieee80211_hw *hw,
		goto exit;
	}

	queue_delayed_work(priv->hw->workqueue, &priv->dwork_hw_scan,
	ieee80211_queue_delayed_work(priv->hw, &priv->dwork_hw_scan,
				     SCAN_POLL_INTERVAL);

exit:
@@ -2024,7 +2027,7 @@ static void at76_configure_filter(struct ieee80211_hw *hw,
	} else
		return;

	queue_work(hw->workqueue, &priv->work_set_promisc);
	ieee80211_queue_work(hw, &priv->work_set_promisc);
}

static int at76_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
@@ -2295,11 +2298,8 @@ static void at76_delete_device(struct at76_priv *priv)

	tasklet_kill(&priv->rx_tasklet);

	if (priv->mac80211_registered) {
		cancel_delayed_work(&priv->dwork_hw_scan);
		flush_workqueue(priv->hw->workqueue);
	if (priv->mac80211_registered)
		ieee80211_unregister_hw(priv->hw);
	}

	if (priv->tx_urb) {
		usb_kill_urb(priv->tx_urb);
+18 −3
Original line number Diff line number Diff line
config ATH_COMMON
menuconfig ATH_COMMON
	tristate "Atheros Wireless Cards"
	depends on WLAN_80211
	depends on ATH5K || ATH9K || AR9170_USB
	depends on CFG80211
	---help---
	  This will enable the support for the Atheros wireless drivers.
	  ath5k, ath9k and ar9170 drivers share some common code, this option
	  enables the common ath.ko module which currently shares just common
	  regulatory EEPROM helpers but will likely be extended later to share
	  more between modules.

	  For more information and documentation on this module you can visit:

	  http://wireless.kernel.org/en/users/Drivers/ath

	  For information on all Atheros wireless drivers visit:

	  http://wireless.kernel.org/en/users/Drivers/Atheros

if ATH_COMMON
source "drivers/net/wireless/ath/ath5k/Kconfig"
source "drivers/net/wireless/ath/ath9k/Kconfig"
source "drivers/net/wireless/ath/ar9170/Kconfig"
endif
Loading