Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: IBSS-RSN support for BCM4313
From: Arend van Spriel @ 2013-07-24 20:57 UTC (permalink / raw)
  To: Jordan McCarthy; +Cc: linux-wireless
In-Reply-To: <51EFC944.40502@opentechinstitute.org>

On 07/24/2013 02:32 PM, Jordan McCarthy wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Linux wireless folk,
> 	I am a developer at a non-profit working on a wireless mesh networking
> platform, and we've just discovered that we have a fleet of netbooks
> with the Broadcom 4313 chipset, one that does not work particularly well
> (and sometimes not at all) in ad-hoc mode.

For certain variants of that chipset the brcmsmac driver does not 
perform well regardless the mode it is in. So could you provide some 
more details on the bcm4313 chipset. Can you provide contents from 
/sys/kernel/debug/brcmsmac/bcma*/hardware (if that is the correct path).

Regards,
Arend


^ permalink raw reply

* Lowest Supported Rate for Unicast Management Frame
From: Chun-Yeow Yeoh @ 2013-07-24 19:36 UTC (permalink / raw)
  To: linux-wireless

Hi, all

Just would like know is there any reason of having the unicast
management frame sent at lowest supported rate for the STA even if we
set the basic rate which could be higher than the lowest supported
rate for the STA.

-----
Chun-Yeow

^ permalink raw reply

* Re: [PATCH 18/21] mwifiex: handle driver initialization error paths
From: John W. Linville @ 2013-07-24 19:02 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar, Avinash Patil,
	Yogesh Powar, Nishant Sarmukadam, Frank Huang
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EA311794C@SC-VEXCH1.marvell.com>

On Wed, Jul 24, 2013 at 11:48:25AM -0700, Bing Zhao wrote:
> Hi John,
> 
> > This one didn't apply on the current wireless-next tree.  Can you
> > fix it up?
> 
> 18/21 and 19/21 depend on this patch:
> 
> commit 232fde062e0a2cc52e8e18a50cda361b4ba88f34
> Author: Daniel Drake <dsd@laptop.org>
> Date:   Sat Jul 13 10:57:10 2013 -0400
> 
>     mwifiex: fix IRQ enable/disable
> 
> which is in wireless.git and wireless-testing.git currently.
> 
> 
> We can apply 18 and 19 later after commit 232fde0 is merged back to wireless-next.git.
> (I will send you a reminder to merge these two patches once commit 232fde0 is in -next tree.)
> 
> Thanks,
> Bing

OK, thanks for checking!

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* RE: [PATCH 18/21] mwifiex: handle driver initialization error paths
From: Bing Zhao @ 2013-07-24 18:48 UTC (permalink / raw)
  To: John W. Linville
  Cc: linux-wireless@vger.kernel.org, Amitkumar Karwar, Avinash Patil,
	Yogesh Powar, Nishant Sarmukadam, Frank Huang
In-Reply-To: <20130724151651.GD2385@tuxdriver.com>

Hi John,

> This one didn't apply on the current wireless-next tree.  Can you
> fix it up?

18/21 and 19/21 depend on this patch:

commit 232fde062e0a2cc52e8e18a50cda361b4ba88f34
Author: Daniel Drake <dsd@laptop.org>
Date:   Sat Jul 13 10:57:10 2013 -0400

    mwifiex: fix IRQ enable/disable

which is in wireless.git and wireless-testing.git currently.


We can apply 18 and 19 later after commit 232fde0 is merged back to wireless-next.git.
(I will send you a reminder to merge these two patches once commit 232fde0 is in -next tree.)

Thanks,
Bing


^ permalink raw reply

* pull request: wireless 2013-07-24
From: John W. Linville @ 2013-07-24 18:04 UTC (permalink / raw)
  To: davem; +Cc: linux-wireless, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 33567 bytes --]

Dave,

This is another batch of fixes intended for the 3.11 stream.  FWIW,
this is the first request with fixes from the mac80211 and iwlwifi
trees as well.

Regarding the mac80211 bits, Johannes says:

"Here I have a fix for RSSI thresholds in mesh, two minstrel fixes from
Felix, an nl80211 fix from Michal and four various fixes I did myself."

As for the iwlwifi bits, Johannes says:

"Here I have a fix for debugfs directory creation (causing a spurious
error message), two scanning fixes from David Spinadel, an LED fix and
two patches related to a BA session problem that eventually caused
firmware crashes from Emmanuel and a small BT fix for older devices as
well as a workaround for a firmware problem with APs with very small
beacon intervals from myself."

Along with those:

Arend van Spriel addresses a lock-up and a NULL pointer dereference
in brcmfmac.

Daniel Drake fixes an unhandled interrupt during device tear down
in mwifiex.

Larry Finger corrects a wil6210 build error.

Oleksij Rempel fixes two ath9k_htc problems related to keeping the
driver and firmware in sync.

Solomon Peachy gives us a cw1200 fix to avoid an oops in monitor mode.

Please let me know if there are problems!

Thanks,

John

---

The following changes since commit f8c0aca9fda7856a8a8d61d523ba3187affbd714:

  fec: Add MODULE_ALIAS (2013-07-23 17:23:16 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem

for you to fetch changes up to 18e1ccb6ca35f995006749d20d9bd6ef40d736fd:

  Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2013-07-24 11:50:38 -0400)

----------------------------------------------------------------

Alexander Bondar (1):
      iwlwifi: mvm: Fix VIF specific debugfs directory creation

Arend van Spriel (2):
      brcmfmac: decrement pending 8021x count upon tx failure
      brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface

Chun-Yeow Yeoh (1):
      nl80211: fix the setting of RSSI threshold value for mesh

Daniel Drake (1):
      mwifiex: fix IRQ enable/disable

David Spinadel (2):
      iwlwifi: mvm: fix bug in scan ssid
      iwlwifi: mvm: remove extra SSID from probe request

Emmanuel Grumbach (3):
      iwlwifi: mvm: unregister leds when registration failed
      iwlwifi: mvm: fix L2P BA ressources leak
      iwlwifi: mvm: track the number of Rx BA sessions

Felix Fietkau (2):
      mac80211/minstrel_ht: fix cck rate sampling
      mac80211/minstrel: fix NULL pointer dereference issue

Johannes Berg (6):
      cfg80211: fix bugs in new SME implementation
      regulatory: add missing rtnl locking
      mac80211: fix ethtool stats for non-station interfaces
      mac80211: fix duplicate retransmission detection
      iwlwifi: dvm: don't send BT_CONFIG on devices w/o Bluetooth
      iwlwifi: mvm: refuse connection to APs with BI < 16

John W. Linville (3):
      Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
      Merge branch 'for-john' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
      Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem

Larry Finger (1):
      ath: wil6210: Fix build error

Michal Kazior (1):
      nl80211: fix mgmt tx status and testmode reporting for netns

Oleksij Rempel (2):
      ath9k_htc: do some initial hardware configuration
      ath9k_htc: reboot firmware if it was loaded

Solomon Peachy (1):
      cw1200: Fix OOPS in monitor mode

 drivers/net/wireless/ath/ath9k/hif_usb.c           |  4 +-
 drivers/net/wireless/ath/ath9k/htc_drv_init.c      |  1 +
 drivers/net/wireless/ath/wil6210/debugfs.c         |  4 +-
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |  2 +-
 drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c |  8 +-
 drivers/net/wireless/cw1200/txrx.c                 |  2 +-
 drivers/net/wireless/iwlwifi/dvm/main.c            |  2 +-
 drivers/net/wireless/iwlwifi/mvm/debugfs.c         |  6 +-
 drivers/net/wireless/iwlwifi/mvm/mac80211.c        | 23 +++++-
 drivers/net/wireless/iwlwifi/mvm/mvm.h             |  1 +
 drivers/net/wireless/iwlwifi/mvm/scan.c            | 10 ++-
 drivers/net/wireless/iwlwifi/mvm/sta.c             | 23 +++++-
 drivers/net/wireless/mwifiex/init.c                | 10 +--
 drivers/net/wireless/mwifiex/main.c                | 13 +++-
 drivers/net/wireless/mwifiex/main.h                |  1 +
 drivers/net/wireless/mwifiex/sdio.c                | 91 ++++++++++------------
 drivers/net/wireless/mwifiex/sdio.h                |  3 -
 net/mac80211/cfg.c                                 |  2 +
 net/mac80211/rc80211_minstrel.c                    |  3 +-
 net/mac80211/rc80211_minstrel_ht.c                 | 10 ++-
 net/mac80211/rx.c                                  | 10 ++-
 net/wireless/nl80211.c                             | 11 ++-
 net/wireless/reg.c                                 |  2 +
 net/wireless/sme.c                                 | 29 ++++++-
 24 files changed, 184 insertions(+), 87 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c
index 2469db5..5205a36 100644
--- a/drivers/net/wireless/ath/ath9k/hif_usb.c
+++ b/drivers/net/wireless/ath/ath9k/hif_usb.c
@@ -1295,7 +1295,9 @@ static void ath9k_hif_usb_disconnect(struct usb_interface *interface)
 
 	usb_set_intfdata(interface, NULL);
 
-	if (!unplugged && (hif_dev->flags & HIF_USB_START))
+	/* If firmware was loaded we should drop it
+	 * go back to first stage bootloader. */
+	if (!unplugged && (hif_dev->flags & HIF_USB_READY))
 		ath9k_hif_usb_reboot(udev);
 
 	kfree(hif_dev);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 71a183f..c3676bf 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -861,6 +861,7 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv,
 	if (error != 0)
 		goto err_rx;
 
+	ath9k_hw_disable(priv->ah);
 #ifdef CONFIG_MAC80211_LEDS
 	/* must be initialized before ieee80211_register_hw */
 	priv->led_cdev.default_trigger = ieee80211_create_tpt_led_trigger(priv->hw,
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index e8308ec..ab63676 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -145,7 +145,7 @@ static void wil_print_ring(struct seq_file *s, const char *prefix,
 				   le16_to_cpu(hdr.type), hdr.flags);
 			if (len <= MAX_MBOXITEM_SIZE) {
 				int n = 0;
-				unsigned char printbuf[16 * 3 + 2];
+				char printbuf[16 * 3 + 2];
 				unsigned char databuf[MAX_MBOXITEM_SIZE];
 				void __iomem *src = wmi_buffer(wil, d.addr) +
 					sizeof(struct wil6210_mbox_hdr);
@@ -416,7 +416,7 @@ static int wil_txdesc_debugfs_show(struct seq_file *s, void *data)
 		seq_printf(s, "  SKB = %p\n", skb);
 
 		if (skb) {
-			unsigned char printbuf[16 * 3 + 2];
+			char printbuf[16 * 3 + 2];
 			int i = 0;
 			int len = le16_to_cpu(d->dma.length);
 			void *p = skb->data;
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 8e89755..8009901 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -242,7 +242,7 @@ void brcmf_txflowblock_if(struct brcmf_if *ifp,
 {
 	unsigned long flags;
 
-	if (!ifp)
+	if (!ifp || !ifp->ndev)
 		return;
 
 	brcmf_dbg(TRACE, "enter: idx=%d stop=0x%X reason=%d state=%d\n",
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index f0d9f7f..29b1f24 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1744,13 +1744,14 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
 	ulong flags;
 	int fifo = BRCMF_FWS_FIFO_BCMC;
 	bool multicast = is_multicast_ether_addr(eh->h_dest);
+	bool pae = eh->h_proto == htons(ETH_P_PAE);
 
 	/* determine the priority */
 	if (!skb->priority)
 		skb->priority = cfg80211_classify8021d(skb);
 
 	drvr->tx_multicast += !!multicast;
-	if (ntohs(eh->h_proto) == ETH_P_PAE)
+	if (pae)
 		atomic_inc(&ifp->pend_8021x_cnt);
 
 	if (!brcmf_fws_fc_active(fws)) {
@@ -1781,6 +1782,11 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
 		brcmf_fws_schedule_deq(fws);
 	} else {
 		brcmf_err("drop skb: no hanger slot\n");
+		if (pae) {
+			atomic_dec(&ifp->pend_8021x_cnt);
+			if (waitqueue_active(&ifp->pend_8021x_wait))
+				wake_up(&ifp->pend_8021x_wait);
+		}
 		brcmu_pkt_buf_free_skb(skb);
 	}
 	brcmf_fws_unlock(drvr, flags);
diff --git a/drivers/net/wireless/cw1200/txrx.c b/drivers/net/wireless/cw1200/txrx.c
index 5862c37..e824d4d 100644
--- a/drivers/net/wireless/cw1200/txrx.c
+++ b/drivers/net/wireless/cw1200/txrx.c
@@ -1165,7 +1165,7 @@ void cw1200_rx_cb(struct cw1200_common *priv,
 		if (cw1200_handle_action_rx(priv, skb))
 			return;
 	} else if (ieee80211_is_beacon(frame->frame_control) &&
-		   !arg->status &&
+		   !arg->status && priv->vif &&
 		   !memcmp(ieee80211_get_SA(frame), priv->vif->bss_conf.bssid,
 			   ETH_ALEN)) {
 		const u8 *tim_ie;
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c
index 3952ddf..1531a4f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/main.c
+++ b/drivers/net/wireless/iwlwifi/dvm/main.c
@@ -758,7 +758,7 @@ int iwl_alive_start(struct iwl_priv *priv)
 					 BT_COEX_PRIO_TBL_EVT_INIT_CALIB2);
 		if (ret)
 			return ret;
-	} else {
+	} else if (priv->lib->bt_params) {
 		/*
 		 * default is 2-wire BT coexexistence support
 		 */
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
index e56ed2a..c24a744 100644
--- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c
@@ -988,7 +988,11 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
 	struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
 	char buf[100];
 
-	if (!dbgfs_dir)
+	/*
+	 * Check if debugfs directory already exist before creating it.
+	 * This may happen when, for example, resetting hw or suspend-resume
+	 */
+	if (!dbgfs_dir || mvmvif->dbgfs_dir)
 		return;
 
 	mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
index e08683b..1eedc42 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
@@ -257,7 +257,11 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
 	if (ret)
 		return ret;
 
-	return ieee80211_register_hw(mvm->hw);
+	ret = ieee80211_register_hw(mvm->hw);
+	if (ret)
+		iwl_mvm_leds_exit(mvm);
+
+	return ret;
 }
 
 static void iwl_mvm_mac_tx(struct ieee80211_hw *hw,
@@ -385,6 +389,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm)
 	ieee80211_wake_queues(mvm->hw);
 
 	mvm->vif_count = 0;
+	mvm->rx_ba_sessions = 0;
 }
 
 static int iwl_mvm_mac_start(struct ieee80211_hw *hw)
@@ -1006,6 +1011,21 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
 	mutex_lock(&mvm->mutex);
 	if (old_state == IEEE80211_STA_NOTEXIST &&
 	    new_state == IEEE80211_STA_NONE) {
+		/*
+		 * Firmware bug - it'll crash if the beacon interval is less
+		 * than 16. We can't avoid connecting at all, so refuse the
+		 * station state change, this will cause mac80211 to abandon
+		 * attempts to connect to this AP, and eventually wpa_s will
+		 * blacklist the AP...
+		 */
+		if (vif->type == NL80211_IFTYPE_STATION &&
+		    vif->bss_conf.beacon_int < 16) {
+			IWL_ERR(mvm,
+				"AP %pM beacon interval is %d, refusing due to firmware bug!\n",
+				sta->addr, vif->bss_conf.beacon_int);
+			ret = -EINVAL;
+			goto out_unlock;
+		}
 		ret = iwl_mvm_add_sta(mvm, vif, sta);
 	} else if (old_state == IEEE80211_STA_NONE &&
 		   new_state == IEEE80211_STA_AUTH) {
@@ -1038,6 +1058,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,
 	} else {
 		ret = -EIO;
 	}
+ out_unlock:
 	mutex_unlock(&mvm->mutex);
 
 	return ret;
diff --git a/drivers/net/wireless/iwlwifi/mvm/mvm.h b/drivers/net/wireless/iwlwifi/mvm/mvm.h
index d40d7db..420e82d 100644
--- a/drivers/net/wireless/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/iwlwifi/mvm/mvm.h
@@ -419,6 +419,7 @@ struct iwl_mvm {
 	struct work_struct sta_drained_wk;
 	unsigned long sta_drained[BITS_TO_LONGS(IWL_MVM_STATION_COUNT)];
 	atomic_t pending_frames[IWL_MVM_STATION_COUNT];
+	u8 rx_ba_sessions;
 
 	/* configured by mac80211 */
 	u32 rts_threshold;
diff --git a/drivers/net/wireless/iwlwifi/mvm/scan.c b/drivers/net/wireless/iwlwifi/mvm/scan.c
index 2157b0f..268f027 100644
--- a/drivers/net/wireless/iwlwifi/mvm/scan.c
+++ b/drivers/net/wireless/iwlwifi/mvm/scan.c
@@ -137,8 +137,8 @@ static void iwl_mvm_scan_fill_ssids(struct iwl_scan_cmd *cmd,
 {
 	int fw_idx, req_idx;
 
-	fw_idx = 0;
-	for (req_idx = req->n_ssids - 1; req_idx > 0; req_idx--) {
+	for (req_idx = req->n_ssids - 1, fw_idx = 0; req_idx > 0;
+	     req_idx--, fw_idx++) {
 		cmd->direct_scan[fw_idx].id = WLAN_EID_SSID;
 		cmd->direct_scan[fw_idx].len = req->ssids[req_idx].ssid_len;
 		memcpy(cmd->direct_scan[fw_idx].ssid,
@@ -153,7 +153,9 @@ static void iwl_mvm_scan_fill_ssids(struct iwl_scan_cmd *cmd,
  * just to notify that this scan is active and not passive.
  * In order to notify the FW of the number of SSIDs we wish to scan (including
  * the zero-length one), we need to set the corresponding bits in chan->type,
- * one for each SSID, and set the active bit (first).
+ * one for each SSID, and set the active bit (first). The first SSID is already
+ * included in the probe template, so we need to set only req->n_ssids - 1 bits
+ * in addition to the first bit.
  */
 static u16 iwl_mvm_get_active_dwell(enum ieee80211_band band, int n_ssids)
 {
@@ -179,7 +181,7 @@ static void iwl_mvm_scan_fill_channels(struct iwl_scan_cmd *cmd,
 	__le32 chan_type_value;
 
 	if (req->n_ssids > 0)
-		chan_type_value = cpu_to_le32(BIT(req->n_ssids + 1) - 1);
+		chan_type_value = cpu_to_le32(BIT(req->n_ssids) - 1);
 	else
 		chan_type_value = SCAN_CHANNEL_TYPE_PASSIVE;
 
diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c
index 62fe520..85d4bbe 100644
--- a/drivers/net/wireless/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/iwlwifi/mvm/sta.c
@@ -608,6 +608,8 @@ int iwl_mvm_rm_bcast_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *bsta)
 	return ret;
 }
 
+#define IWL_MAX_RX_BA_SESSIONS 16
+
 int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 		       int tid, u16 ssn, bool start)
 {
@@ -618,11 +620,20 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 
 	lockdep_assert_held(&mvm->mutex);
 
+	if (start && mvm->rx_ba_sessions >= IWL_MAX_RX_BA_SESSIONS) {
+		IWL_WARN(mvm, "Not enough RX BA SESSIONS\n");
+		return -ENOSPC;
+	}
+
 	cmd.mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color);
 	cmd.sta_id = mvm_sta->sta_id;
 	cmd.add_modify = STA_MODE_MODIFY;
-	cmd.add_immediate_ba_tid = (u8) tid;
-	cmd.add_immediate_ba_ssn = cpu_to_le16(ssn);
+	if (start) {
+		cmd.add_immediate_ba_tid = (u8) tid;
+		cmd.add_immediate_ba_ssn = cpu_to_le16(ssn);
+	} else {
+		cmd.remove_immediate_ba_tid = (u8) tid;
+	}
 	cmd.modify_mask = start ? STA_MODIFY_ADD_BA_TID :
 				  STA_MODIFY_REMOVE_BA_TID;
 
@@ -648,6 +659,14 @@ int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 		break;
 	}
 
+	if (!ret) {
+		if (start)
+			mvm->rx_ba_sessions++;
+		else if (mvm->rx_ba_sessions > 0)
+			/* check that restart flow didn't zero the counter */
+			mvm->rx_ba_sessions--;
+	}
+
 	return ret;
 }
 
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index caaf4bd..2cf8b96 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -693,7 +693,7 @@ int mwifiex_dnld_fw(struct mwifiex_adapter *adapter,
 		if (!ret) {
 			dev_notice(adapter->dev,
 				   "WLAN FW already running! Skip FW dnld\n");
-			goto done;
+			return 0;
 		}
 
 		poll_num = MAX_FIRMWARE_POLL_TRIES;
@@ -719,14 +719,8 @@ int mwifiex_dnld_fw(struct mwifiex_adapter *adapter,
 poll_fw:
 	/* Check if the firmware is downloaded successfully or not */
 	ret = adapter->if_ops.check_fw_status(adapter, poll_num);
-	if (ret) {
+	if (ret)
 		dev_err(adapter->dev, "FW failed to be active in time\n");
-		return -1;
-	}
-done:
-	/* re-enable host interrupt for mwifiex after fw dnld is successful */
-	if (adapter->if_ops.enable_int)
-		adapter->if_ops.enable_int(adapter);
 
 	return ret;
 }
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index e15ab72..1753431 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -427,6 +427,10 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
 				"Cal data request_firmware() failed\n");
 	}
 
+	/* enable host interrupt after fw dnld is successful */
+	if (adapter->if_ops.enable_int)
+		adapter->if_ops.enable_int(adapter);
+
 	adapter->init_wait_q_woken = false;
 	ret = mwifiex_init_fw(adapter);
 	if (ret == -1) {
@@ -478,6 +482,8 @@ err_add_intf:
 	mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev);
 	rtnl_unlock();
 err_init_fw:
+	if (adapter->if_ops.disable_int)
+		adapter->if_ops.disable_int(adapter);
 	pr_debug("info: %s: unregister device\n", __func__);
 	adapter->if_ops.unregister_dev(adapter);
 done:
@@ -855,7 +861,7 @@ mwifiex_add_card(void *card, struct semaphore *sem,
 	INIT_WORK(&adapter->main_work, mwifiex_main_work_queue);
 
 	/* Register the device. Fill up the private data structure with relevant
-	   information from the card and request for the required IRQ. */
+	   information from the card. */
 	if (adapter->if_ops.register_dev(adapter)) {
 		pr_err("%s: failed to register mwifiex device\n", __func__);
 		goto err_registerdev;
@@ -919,6 +925,11 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter, struct semaphore *sem)
 	if (!adapter)
 		goto exit_remove;
 
+	/* We can no longer handle interrupts once we start doing the teardown
+	 * below. */
+	if (adapter->if_ops.disable_int)
+		adapter->if_ops.disable_int(adapter);
+
 	adapter->surprise_removed = true;
 
 	/* Stop data */
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 3da73d3..253e0bd 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -601,6 +601,7 @@ struct mwifiex_if_ops {
 	int (*register_dev) (struct mwifiex_adapter *);
 	void (*unregister_dev) (struct mwifiex_adapter *);
 	int (*enable_int) (struct mwifiex_adapter *);
+	void (*disable_int) (struct mwifiex_adapter *);
 	int (*process_int_status) (struct mwifiex_adapter *);
 	int (*host_to_card) (struct mwifiex_adapter *, u8, struct sk_buff *,
 			     struct mwifiex_tx_param *);
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
index 5ee5ed0..5ef49f2 100644
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
@@ -51,6 +51,7 @@ static struct mwifiex_if_ops sdio_ops;
 static struct semaphore add_remove_card_sem;
 
 static int mwifiex_sdio_resume(struct device *dev);
+static void mwifiex_sdio_interrupt(struct sdio_func *func);
 
 /*
  * SDIO probe.
@@ -296,6 +297,15 @@ static struct sdio_driver mwifiex_sdio = {
 	}
 };
 
+/* Write data into SDIO card register. Caller claims SDIO device. */
+static int
+mwifiex_write_reg_locked(struct sdio_func *func, u32 reg, u8 data)
+{
+	int ret = -1;
+	sdio_writeb(func, data, reg, &ret);
+	return ret;
+}
+
 /*
  * This function writes data into SDIO card register.
  */
@@ -303,10 +313,10 @@ static int
 mwifiex_write_reg(struct mwifiex_adapter *adapter, u32 reg, u8 data)
 {
 	struct sdio_mmc_card *card = adapter->card;
-	int ret = -1;
+	int ret;
 
 	sdio_claim_host(card->func);
-	sdio_writeb(card->func, data, reg, &ret);
+	ret = mwifiex_write_reg_locked(card->func, reg, data);
 	sdio_release_host(card->func);
 
 	return ret;
@@ -685,23 +695,15 @@ mwifiex_sdio_read_fw_status(struct mwifiex_adapter *adapter, u16 *dat)
  * The host interrupt mask is read, the disable bit is reset and
  * written back to the card host interrupt mask register.
  */
-static int mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
+static void mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
 {
-	u8 host_int_mask, host_int_disable = HOST_INT_DISABLE;
-
-	/* Read back the host_int_mask register */
-	if (mwifiex_read_reg(adapter, HOST_INT_MASK_REG, &host_int_mask))
-		return -1;
-
-	/* Update with the mask and write back to the register */
-	host_int_mask &= ~host_int_disable;
-
-	if (mwifiex_write_reg(adapter, HOST_INT_MASK_REG, host_int_mask)) {
-		dev_err(adapter->dev, "disable host interrupt failed\n");
-		return -1;
-	}
+	struct sdio_mmc_card *card = adapter->card;
+	struct sdio_func *func = card->func;
 
-	return 0;
+	sdio_claim_host(func);
+	mwifiex_write_reg_locked(func, HOST_INT_MASK_REG, 0);
+	sdio_release_irq(func);
+	sdio_release_host(func);
 }
 
 /*
@@ -713,14 +715,29 @@ static int mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
 static int mwifiex_sdio_enable_host_int(struct mwifiex_adapter *adapter)
 {
 	struct sdio_mmc_card *card = adapter->card;
+	struct sdio_func *func = card->func;
+	int ret;
+
+	sdio_claim_host(func);
+
+	/* Request the SDIO IRQ */
+	ret = sdio_claim_irq(func, mwifiex_sdio_interrupt);
+	if (ret) {
+		dev_err(adapter->dev, "claim irq failed: ret=%d\n", ret);
+		goto out;
+	}
 
 	/* Simply write the mask to the register */
-	if (mwifiex_write_reg(adapter, HOST_INT_MASK_REG,
-			      card->reg->host_int_enable)) {
+	ret = mwifiex_write_reg_locked(func, HOST_INT_MASK_REG,
+				       card->reg->host_int_enable);
+	if (ret) {
 		dev_err(adapter->dev, "enable host interrupt failed\n");
-		return -1;
+		sdio_release_irq(func);
 	}
-	return 0;
+
+out:
+	sdio_release_host(func);
+	return ret;
 }
 
 /*
@@ -997,9 +1014,6 @@ mwifiex_sdio_interrupt(struct sdio_func *func)
 	}
 	adapter = card->adapter;
 
-	if (adapter->surprise_removed)
-		return;
-
 	if (!adapter->pps_uapsd_mode && adapter->ps_state == PS_STATE_SLEEP)
 		adapter->ps_state = PS_STATE_AWAKE;
 
@@ -1728,9 +1742,7 @@ mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
 	struct sdio_mmc_card *card = adapter->card;
 
 	if (adapter->card) {
-		/* Release the SDIO IRQ */
 		sdio_claim_host(card->func);
-		sdio_release_irq(card->func);
 		sdio_disable_func(card->func);
 		sdio_release_host(card->func);
 		sdio_set_drvdata(card->func, NULL);
@@ -1744,7 +1756,7 @@ mwifiex_unregister_dev(struct mwifiex_adapter *adapter)
  */
 static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
 {
-	int ret = 0;
+	int ret;
 	struct sdio_mmc_card *card = adapter->card;
 	struct sdio_func *func = card->func;
 
@@ -1753,22 +1765,14 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
 
 	sdio_claim_host(func);
 
-	/* Request the SDIO IRQ */
-	ret = sdio_claim_irq(func, mwifiex_sdio_interrupt);
-	if (ret) {
-		pr_err("claim irq failed: ret=%d\n", ret);
-		goto disable_func;
-	}
-
 	/* Set block size */
 	ret = sdio_set_block_size(card->func, MWIFIEX_SDIO_BLOCK_SIZE);
+	sdio_release_host(func);
 	if (ret) {
 		pr_err("cannot set SDIO block size\n");
-		ret = -1;
-		goto release_irq;
+		return ret;
 	}
 
-	sdio_release_host(func);
 	sdio_set_drvdata(func, card);
 
 	adapter->dev = &func->dev;
@@ -1776,15 +1780,6 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
 	strcpy(adapter->fw_name, card->firmware);
 
 	return 0;
-
-release_irq:
-	sdio_release_irq(func);
-disable_func:
-	sdio_disable_func(func);
-	sdio_release_host(func);
-	adapter->card = NULL;
-
-	return -1;
 }
 
 /*
@@ -1813,9 +1808,6 @@ static int mwifiex_init_sdio(struct mwifiex_adapter *adapter)
 	 */
 	mwifiex_read_reg(adapter, HOST_INTSTATUS_REG, &sdio_ireg);
 
-	/* Disable host interrupt mask register for SDIO */
-	mwifiex_sdio_disable_host_int(adapter);
-
 	/* Get SDIO ioport */
 	mwifiex_init_sdio_ioport(adapter);
 
@@ -1957,6 +1949,7 @@ static struct mwifiex_if_ops sdio_ops = {
 	.register_dev = mwifiex_register_dev,
 	.unregister_dev = mwifiex_unregister_dev,
 	.enable_int = mwifiex_sdio_enable_host_int,
+	.disable_int = mwifiex_sdio_disable_host_int,
 	.process_int_status = mwifiex_process_int_status,
 	.host_to_card = mwifiex_sdio_host_to_card,
 	.wakeup = mwifiex_pm_wakeup_card,
diff --git a/drivers/net/wireless/mwifiex/sdio.h b/drivers/net/wireless/mwifiex/sdio.h
index 6d51dfd..532ae0a 100644
--- a/drivers/net/wireless/mwifiex/sdio.h
+++ b/drivers/net/wireless/mwifiex/sdio.h
@@ -92,9 +92,6 @@
 /* Host Control Registers : Download host interrupt mask */
 #define DN_LD_HOST_INT_MASK		(0x2U)
 
-/* Disable Host interrupt mask */
-#define	HOST_INT_DISABLE		0xff
-
 /* Host Control Registers : Host interrupt status */
 #define HOST_INTSTATUS_REG		0x03
 /* Host Control Registers : Upload host interrupt status */
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 8184d12..43dd752 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -666,6 +666,8 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
 			if (sta->sdata->dev != dev)
 				continue;
 
+			sinfo.filled = 0;
+			sta_set_sinfo(sta, &sinfo);
 			i = 0;
 			ADD_STA_STATS(sta);
 		}
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c
index ac7ef54..e6512e2 100644
--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -290,7 +290,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
 	struct minstrel_rate *msr, *mr;
 	unsigned int ndx;
 	bool mrr_capable;
-	bool prev_sample = mi->prev_sample;
+	bool prev_sample;
 	int delta;
 	int sampling_ratio;
 
@@ -314,6 +314,7 @@ minstrel_get_rate(void *priv, struct ieee80211_sta *sta,
 			(mi->sample_count + mi->sample_deferred / 2);
 
 	/* delta < 0: no sampling required */
+	prev_sample = mi->prev_sample;
 	mi->prev_sample = false;
 	if (delta < 0 || (!mrr_capable && prev_sample))
 		return;
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 5b2d301..f5aed96 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -804,10 +804,18 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
 	sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES];
 	info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE;
+	rate->count = 1;
+
+	if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) {
+		int idx = sample_idx % ARRAY_SIZE(mp->cck_rates);
+		rate->idx = mp->cck_rates[idx];
+		rate->flags = 0;
+		return;
+	}
+
 	rate->idx = sample_idx % MCS_GROUP_RATES +
 		    (sample_group->streams - 1) * MCS_GROUP_RATES;
 	rate->flags = IEEE80211_TX_RC_MCS | sample_group->flags;
-	rate->count = 1;
 }
 
 static void
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 23dbcfc..2c5a79b 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -936,8 +936,14 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx)
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
 	struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
 
-	/* Drop duplicate 802.11 retransmissions (IEEE 802.11 Chap. 9.2.9) */
-	if (rx->sta && !is_multicast_ether_addr(hdr->addr1)) {
+	/*
+	 * Drop duplicate 802.11 retransmissions
+	 * (IEEE 802.11-2012: 9.3.2.10 "Duplicate detection and recovery")
+	 */
+	if (rx->skb->len >= 24 && rx->sta &&
+	    !ieee80211_is_ctl(hdr->frame_control) &&
+	    !ieee80211_is_qos_nullfunc(hdr->frame_control) &&
+	    !is_multicast_ether_addr(hdr->addr1)) {
 		if (unlikely(ieee80211_has_retry(hdr->frame_control) &&
 			     rx->sta->last_seq_ctrl[rx->seqno_idx] ==
 			     hdr->seq_ctrl)) {
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 1cc47ac..25d217d 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4770,9 +4770,9 @@ do {									    \
 	FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1,
 				  mask, NL80211_MESHCONF_FORWARDING,
 				  nla_get_u8);
-	FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255,
+	FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, -255, 0,
 				  mask, NL80211_MESHCONF_RSSI_THRESHOLD,
-				  nla_get_u32);
+				  nla_get_s32);
 	FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 0, 16,
 				  mask, NL80211_MESHCONF_HT_OPMODE,
 				  nla_get_u16);
@@ -6613,12 +6613,14 @@ EXPORT_SYMBOL(cfg80211_testmode_alloc_event_skb);
 
 void cfg80211_testmode_event(struct sk_buff *skb, gfp_t gfp)
 {
+	struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
 	void *hdr = ((void **)skb->cb)[1];
 	struct nlattr *data = ((void **)skb->cb)[2];
 
 	nla_nest_end(skb, data);
 	genlmsg_end(skb, hdr);
-	genlmsg_multicast(skb, 0, nl80211_testmode_mcgrp.id, gfp);
+	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), skb, 0,
+				nl80211_testmode_mcgrp.id, gfp);
 }
 EXPORT_SYMBOL(cfg80211_testmode_event);
 #endif
@@ -10064,7 +10066,8 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
 
 	genlmsg_end(msg, hdr);
 
-	genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
+	genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+				nl80211_mlme_mcgrp.id, gfp);
 	return;
 
  nla_put_failure:
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 5a24c98..5a950f3 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -2279,7 +2279,9 @@ void wiphy_regulatory_deregister(struct wiphy *wiphy)
 static void reg_timeout_work(struct work_struct *work)
 {
 	REG_DBG_PRINT("Timeout while waiting for CRDA to reply, restoring regulatory settings\n");
+	rtnl_lock();
 	restore_regulatory_settings(true);
+	rtnl_unlock();
 }
 
 int __init regulatory_init(void)
diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index 1d3cfb1..81c8a10 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -34,8 +34,10 @@ struct cfg80211_conn {
 		CFG80211_CONN_SCAN_AGAIN,
 		CFG80211_CONN_AUTHENTICATE_NEXT,
 		CFG80211_CONN_AUTHENTICATING,
+		CFG80211_CONN_AUTH_FAILED,
 		CFG80211_CONN_ASSOCIATE_NEXT,
 		CFG80211_CONN_ASSOCIATING,
+		CFG80211_CONN_ASSOC_FAILED,
 		CFG80211_CONN_DEAUTH,
 		CFG80211_CONN_CONNECTED,
 	} state;
@@ -164,6 +166,8 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
 					  NULL, 0,
 					  params->key, params->key_len,
 					  params->key_idx, NULL, 0);
+	case CFG80211_CONN_AUTH_FAILED:
+		return -ENOTCONN;
 	case CFG80211_CONN_ASSOCIATE_NEXT:
 		BUG_ON(!rdev->ops->assoc);
 		wdev->conn->state = CFG80211_CONN_ASSOCIATING;
@@ -188,10 +192,17 @@ static int cfg80211_conn_do_work(struct wireless_dev *wdev)
 					     WLAN_REASON_DEAUTH_LEAVING,
 					     false);
 		return err;
+	case CFG80211_CONN_ASSOC_FAILED:
+		cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
+				     NULL, 0,
+				     WLAN_REASON_DEAUTH_LEAVING, false);
+		return -ENOTCONN;
 	case CFG80211_CONN_DEAUTH:
 		cfg80211_mlme_deauth(rdev, wdev->netdev, params->bssid,
 				     NULL, 0,
 				     WLAN_REASON_DEAUTH_LEAVING, false);
+		/* free directly, disconnected event already sent */
+		cfg80211_sme_free(wdev);
 		return 0;
 	default:
 		return 0;
@@ -371,7 +382,7 @@ bool cfg80211_sme_rx_assoc_resp(struct wireless_dev *wdev, u16 status)
 		return true;
 	}
 
-	wdev->conn->state = CFG80211_CONN_DEAUTH;
+	wdev->conn->state = CFG80211_CONN_ASSOC_FAILED;
 	schedule_work(&rdev->conn_work);
 	return false;
 }
@@ -383,7 +394,13 @@ void cfg80211_sme_deauth(struct wireless_dev *wdev)
 
 void cfg80211_sme_auth_timeout(struct wireless_dev *wdev)
 {
-	cfg80211_sme_free(wdev);
+	struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+
+	if (!wdev->conn)
+		return;
+
+	wdev->conn->state = CFG80211_CONN_AUTH_FAILED;
+	schedule_work(&rdev->conn_work);
 }
 
 void cfg80211_sme_disassoc(struct wireless_dev *wdev)
@@ -399,7 +416,13 @@ void cfg80211_sme_disassoc(struct wireless_dev *wdev)
 
 void cfg80211_sme_assoc_timeout(struct wireless_dev *wdev)
 {
-	cfg80211_sme_disassoc(wdev);
+	struct cfg80211_registered_device *rdev = wiphy_to_dev(wdev->wiphy);
+
+	if (!wdev->conn)
+		return;
+
+	wdev->conn->state = CFG80211_CONN_ASSOC_FAILED;
+	schedule_work(&rdev->conn_work);
 }
 
 static int cfg80211_sme_connect(struct wireless_dev *wdev,
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply related

* Re: Fwd: TP-LINK 8200ND
From: Vihang Patel @ 2013-07-24 17:58 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless
In-Reply-To: <51EFF3DD.80000@lwfinger.net>

Thanks Larry,

I have already tried the Ndiswrapper using both the TP-Link provided
Windows XP(64 & 32bit) drivers as well as ones provided by Realtek on
Ubuntu 12.04 and 13.04. Both scenarios freezes the OS. And in scenario
that I save it in conf file for it to load on startup, the OS freezes
on startup. No luck there. Would be interesting to see if anyone else
got it to work using ndiswrapper.

Vihang

On Wed, Jul 24, 2013 at 11:33 PM, Larry Finger
<Larry.Finger@lwfinger.net> wrote:
> On 07/24/2013 08:50 AM, Vihang Patel wrote:
>>
>> Hi,
>>
>> I understand there was a thread on linux drivers for TP-LINK8200ND
>> with rtl8192cu chipset, but it ran cold with no resolution. I was
>> wondering if there if anyone found a resolution on that.
>>
>> I have tried installing the drivers provided by realtek as well on
>> both Ubuntu 12.004 and 13.04. Scorched the internet, and was able to
>> get it to detect the device but it wont connect to any of the Wireless
>> networks.
>>
>> Any help would be helpful.
>
>
> The USB ID has been added to the mainline and stable kernels; however, the
> device does not work for me. The latest vendor driver sent privately to me
> can make a connection; however, the throughput is less than 1 Mbps. I have
> not yet had a chance to investigate as this card is low on my priority list.
>
> I have added the Realtek developer to this reply (Bcc). Perhaps the company
> has made some progress; however, when I last contacted them, they did not
> have an instance of this particular card. It seems that your only viable
> option at this time would probably be the Windows driver with ndiswrapper. I
> have not tested this option.
>
> Larry
>
>

^ permalink raw reply

* Re: interested in py80211?
From: Will Hawkins @ 2013-07-24 15:55 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: Johannes Berg, linux-wireless, Thomas Graf
In-Reply-To: <51E00577.60305@broadcom.com>

Thanks for posting about this effort. I would be very interested in
helping out on development. I will stay up-to-date on things via your
github page. Otherwise, please continue to keep the list updated on your
progress.

Will

On 07/12/2013 09:32 AM, Arend van Spriel wrote:
> On 07/12/13 10:02, Johannes Berg wrote:
>> Yep, I'd totally be interested. Not that I don't have enough things on
>> my plate already ;-)
>>
>> On Wed, 2013-07-03 at 22:57 +0200, Arend van Spriel wrote:
>>> A common say in Linux arena is "when you have an itch, just scratch it".
>>
>> :-)
>>
>>> My itch is that tools like ifconfig and iw are great, but in an
>>> automated test environment it kind of sucks to parse output, which is
>>> confirmed by blurb from iw: "Do NOT screenscrape this tool, we don't
>>> consider its output stable.".
>>
>> Heh, yeah ...
>>
>>> Ever since my first contact with Python I tend to favor it over other
>>> scripting alternatives so I decided to scratch my itch with that and
>>> another old acquaintance called SWIG. With those I went to create
>>> py80211. A first attempt was to have SWIG create a wrapper API directly
>>> exposing the libnl-3 API, but that did not feel comfortable in a
>>> scripting environment. So the level of abstraction is a bit higher. It
>>> is just in a kick-off state (eg. can only send u32 attributes), but I
>>> decided to push it to github anyway.
>>
>> Another approach might be exposing the libnl APIs and then build a
>> higher-level library in python. Have you considered that? That might
>> make it useful to other users of netlink as well, while keeping a 'nice'
>> nl80211 API?
> 
> I am still at that fork in the road and not sure about it. The libnl
> project itself already has libnl stuff exposed in a python lib being the
> core api and route. So I could go and add genl support to that and build
> the high-level python library from there.
> 
> Regards,
> Arend
> 
> -- 
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply

* Re: Fwd: TP-LINK 8200ND
From: Larry Finger @ 2013-07-24 15:33 UTC (permalink / raw)
  To: Vihang Patel; +Cc: linux-wireless
In-Reply-To: <CA+Gu+Ky5rCwCrWJkCKXsPEFodaARdf5DkmES3TN_UNuUqTnYVA@mail.gmail.com>

On 07/24/2013 08:50 AM, Vihang Patel wrote:
> Hi,
>
> I understand there was a thread on linux drivers for TP-LINK8200ND
> with rtl8192cu chipset, but it ran cold with no resolution. I was
> wondering if there if anyone found a resolution on that.
>
> I have tried installing the drivers provided by realtek as well on
> both Ubuntu 12.004 and 13.04. Scorched the internet, and was able to
> get it to detect the device but it wont connect to any of the Wireless
> networks.
>
> Any help would be helpful.

The USB ID has been added to the mainline and stable kernels; however, the 
device does not work for me. The latest vendor driver sent privately to me can 
make a connection; however, the throughput is less than 1 Mbps. I have not yet 
had a chance to investigate as this card is low on my priority list.

I have added the Realtek developer to this reply (Bcc). Perhaps the company has 
made some progress; however, when I last contacted them, they did not have an 
instance of this particular card. It seems that your only viable option at this 
time would probably be the Windows driver with ndiswrapper. I have not tested 
this option.

Larry



^ permalink raw reply

* Re: [PATCH 18/21] mwifiex: handle driver initialization error paths
From: John W. Linville @ 2013-07-24 15:16 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless, Amitkumar Karwar, Avinash Patil,
	Yogesh Ashok Powar, Nishant Sarmukadam, Frank Huang
In-Reply-To: <1374545878-15683-19-git-send-email-bzhao@marvell.com>

This one didn't apply on the current wireless-next tree.  Can you
fix it up?

On Mon, Jul 22, 2013 at 07:17:55PM -0700, Bing Zhao wrote:
> From: Amitkumar Karwar <akarwar@marvell.com>
> 
> mwifiex_fw_dpc() asynchronously takes care of firmware download
> and initialization. Currently the error paths in mwifiex_fw_dpc()
> are not handled. So if wrong firmware is downloaded, required
> cleanup work is not performed. memory is leaked and workqueue
> remains unterminated in this case.
> 
> mwifiex_terminate_workqueue() is moved to avoid forward
> declaration.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
> ---
>  drivers/net/wireless/mwifiex/main.c | 83 ++++++++++++++++++++++++-------------
>  drivers/net/wireless/mwifiex/main.h |  1 +
>  2 files changed, 56 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
> index e64c369..5644c7f 100644
> --- a/drivers/net/wireless/mwifiex/main.c
> +++ b/drivers/net/wireless/mwifiex/main.c
> @@ -390,6 +390,17 @@ static void mwifiex_free_adapter(struct mwifiex_adapter *adapter)
>  }
>  
>  /*
> + * This function cancels all works in the queue and destroys
> + * the main workqueue.
> + */
> +static void mwifiex_terminate_workqueue(struct mwifiex_adapter *adapter)
> +{
> +	flush_workqueue(adapter->workqueue);
> +	destroy_workqueue(adapter->workqueue);
> +	adapter->workqueue = NULL;
> +}
> +
> +/*
>   * This function gets firmware and initializes it.
>   *
>   * The main initialization steps followed are -
> @@ -398,7 +409,7 @@ static void mwifiex_free_adapter(struct mwifiex_adapter *adapter)
>   */
>  static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  {
> -	int ret;
> +	int ret, i;
>  	char fmt[64];
>  	struct mwifiex_private *priv;
>  	struct mwifiex_adapter *adapter = context;
> @@ -407,7 +418,7 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  	if (!firmware) {
>  		dev_err(adapter->dev,
>  			"Failed to get firmware %s\n", adapter->fw_name);
> -		goto done;
> +		goto err_dnld_fw;
>  	}
>  
>  	memset(&fw, 0, sizeof(struct mwifiex_fw_image));
> @@ -420,7 +431,7 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  	else
>  		ret = mwifiex_dnld_fw(adapter, &fw);
>  	if (ret == -1)
> -		goto done;
> +		goto err_dnld_fw;
>  
>  	dev_notice(adapter->dev, "WLAN FW is active\n");
>  
> @@ -432,13 +443,15 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  	}
>  
>  	/* enable host interrupt after fw dnld is successful */
> -	if (adapter->if_ops.enable_int)
> -		adapter->if_ops.enable_int(adapter);
> +	if (adapter->if_ops.enable_int) {
> +		if (adapter->if_ops.enable_int(adapter))
> +			goto err_dnld_fw;
> +	}
>  
>  	adapter->init_wait_q_woken = false;
>  	ret = mwifiex_init_fw(adapter);
>  	if (ret == -1) {
> -		goto done;
> +		goto err_init_fw;
>  	} else if (!ret) {
>  		adapter->hw_status = MWIFIEX_HW_STATUS_READY;
>  		goto done;
> @@ -447,12 +460,12 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  	wait_event_interruptible(adapter->init_wait_q,
>  				 adapter->init_wait_q_woken);
>  	if (adapter->hw_status != MWIFIEX_HW_STATUS_READY)
> -		goto done;
> +		goto err_init_fw;
>  
>  	priv = adapter->priv[MWIFIEX_BSS_ROLE_STA];
>  	if (mwifiex_register_cfg80211(adapter)) {
>  		dev_err(adapter->dev, "cannot register with cfg80211\n");
> -		goto err_init_fw;
> +		goto err_register_cfg80211;
>  	}
>  
>  	rtnl_lock();
> @@ -483,13 +496,39 @@ static void mwifiex_fw_dpc(const struct firmware *firmware, void *context)
>  	goto done;
>  
>  err_add_intf:
> -	mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev);
> +	for (i = 0; i < adapter->priv_num; i++) {
> +		priv = adapter->priv[i];
> +
> +		if (!priv)
> +			continue;
> +
> +		if (priv->wdev && priv->netdev)
> +			mwifiex_del_virtual_intf(adapter->wiphy, priv->wdev);
> +	}
>  	rtnl_unlock();
> +err_register_cfg80211:
> +	wiphy_unregister(adapter->wiphy);
> +	wiphy_free(adapter->wiphy);
>  err_init_fw:
>  	if (adapter->if_ops.disable_int)
>  		adapter->if_ops.disable_int(adapter);
> +err_dnld_fw:
>  	pr_debug("info: %s: unregister device\n", __func__);
> -	adapter->if_ops.unregister_dev(adapter);
> +	if (adapter->if_ops.unregister_dev)
> +		adapter->if_ops.unregister_dev(adapter);
> +
> +	if ((adapter->hw_status == MWIFIEX_HW_STATUS_FW_READY) ||
> +	    (adapter->hw_status == MWIFIEX_HW_STATUS_READY)) {
> +		pr_debug("info: %s: shutdown mwifiex\n", __func__);
> +		adapter->init_wait_q_woken = false;
> +
> +		if (mwifiex_shutdown_drv(adapter) == -EINPROGRESS)
> +			wait_event_interruptible(adapter->init_wait_q,
> +						 adapter->init_wait_q_woken);
> +	}
> +	adapter->surprise_removed = true;
> +	mwifiex_terminate_workqueue(adapter);
> +	mwifiex_free_adapter(adapter);
>  done:
>  	if (adapter->cal_data) {
>  		release_firmware(adapter->cal_data);
> @@ -497,6 +536,7 @@ done:
>  	}
>  	release_firmware(adapter->firmware);
>  	complete(&adapter->fw_load);
> +	up(adapter->card_sem);
>  	return;
>  }
>  
> @@ -807,18 +847,6 @@ static void mwifiex_main_work_queue(struct work_struct *work)
>  }
>  
>  /*
> - * This function cancels all works in the queue and destroys
> - * the main workqueue.
> - */
> -static void
> -mwifiex_terminate_workqueue(struct mwifiex_adapter *adapter)
> -{
> -	flush_workqueue(adapter->workqueue);
> -	destroy_workqueue(adapter->workqueue);
> -	adapter->workqueue = NULL;
> -}
> -
> -/*
>   * This function adds the card.
>   *
>   * This function follows the following major steps to set up the device -
> @@ -846,6 +874,7 @@ mwifiex_add_card(void *card, struct semaphore *sem,
>  	}
>  
>  	adapter->iface_type = iface_type;
> +	adapter->card_sem = sem;
>  
>  	adapter->hw_status = MWIFIEX_HW_STATUS_INITIALIZING;
>  	adapter->surprise_removed = false;
> @@ -876,17 +905,12 @@ mwifiex_add_card(void *card, struct semaphore *sem,
>  		goto err_init_fw;
>  	}
>  
> -	up(sem);
>  	return 0;
>  
>  err_init_fw:
>  	pr_debug("info: %s: unregister device\n", __func__);
>  	if (adapter->if_ops.unregister_dev)
>  		adapter->if_ops.unregister_dev(adapter);
> -err_registerdev:
> -	adapter->surprise_removed = true;
> -	mwifiex_terminate_workqueue(adapter);
> -err_kmalloc:
>  	if ((adapter->hw_status == MWIFIEX_HW_STATUS_FW_READY) ||
>  	    (adapter->hw_status == MWIFIEX_HW_STATUS_READY)) {
>  		pr_debug("info: %s: shutdown mwifiex\n", __func__);
> @@ -896,7 +920,10 @@ err_kmalloc:
>  			wait_event_interruptible(adapter->init_wait_q,
>  						 adapter->init_wait_q_woken);
>  	}
> -
> +err_registerdev:
> +	adapter->surprise_removed = true;
> +	mwifiex_terminate_workqueue(adapter);
> +err_kmalloc:
>  	mwifiex_free_adapter(adapter);
>  
>  err_init_sw:
> diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
> index bb28d3d..9ee3b1b 100644
> --- a/drivers/net/wireless/mwifiex/main.h
> +++ b/drivers/net/wireless/mwifiex/main.h
> @@ -749,6 +749,7 @@ struct mwifiex_adapter {
>  
>  	atomic_t is_tx_received;
>  	atomic_t pending_bridged_pkts;
> +	struct semaphore *card_sem;
>  };
>  
>  int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
> -- 
> 1.8.2.3
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: [PATCH 19/21] mwifiex: code rearrangement in sdio.c
From: John W. Linville @ 2013-07-24 15:17 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-wireless, Amitkumar Karwar, Avinash Patil,
	Yogesh Ashok Powar, Nishant Sarmukadam, Frank Huang
In-Reply-To: <1374545878-15683-20-git-send-email-bzhao@marvell.com>

This one also did not apply on the current wireless-next...

On Mon, Jul 22, 2013 at 07:17:56PM -0700, Bing Zhao wrote:
> From: Amitkumar Karwar <akarwar@marvell.com>
> 
> Some function definitions are moved to appropriate place
> to avoid forward declarations.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> Signed-off-by: Bing Zhao <bzhao@marvell.com>
> ---
>  drivers/net/wireless/mwifiex/sdio.c | 211 ++++++++++++++++++------------------
>  1 file changed, 104 insertions(+), 107 deletions(-)
> 
> diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c
> index c32a735..1eb5efa1 100644
> --- a/drivers/net/wireless/mwifiex/sdio.c
> +++ b/drivers/net/wireless/mwifiex/sdio.c
> @@ -50,9 +50,6 @@ static struct mwifiex_if_ops sdio_ops;
>  
>  static struct semaphore add_remove_card_sem;
>  
> -static int mwifiex_sdio_resume(struct device *dev);
> -static void mwifiex_sdio_interrupt(struct sdio_func *func);
> -
>  /*
>   * SDIO probe.
>   *
> @@ -113,6 +110,51 @@ mwifiex_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id)
>  }
>  
>  /*
> + * SDIO resume.
> + *
> + * Kernel needs to suspend all functions separately. Therefore all
> + * registered functions must have drivers with suspend and resume
> + * methods. Failing that the kernel simply removes the whole card.
> + *
> + * If already not resumed, this function turns on the traffic and
> + * sends a host sleep cancel request to the firmware.
> + */
> +static int mwifiex_sdio_resume(struct device *dev)
> +{
> +	struct sdio_func *func = dev_to_sdio_func(dev);
> +	struct sdio_mmc_card *card;
> +	struct mwifiex_adapter *adapter;
> +	mmc_pm_flag_t pm_flag = 0;
> +
> +	if (func) {
> +		pm_flag = sdio_get_host_pm_caps(func);
> +		card = sdio_get_drvdata(func);
> +		if (!card || !card->adapter) {
> +			pr_err("resume: invalid card or adapter\n");
> +			return 0;
> +		}
> +	} else {
> +		pr_err("resume: sdio_func is not specified\n");
> +		return 0;
> +	}
> +
> +	adapter = card->adapter;
> +
> +	if (!adapter->is_suspended) {
> +		dev_warn(adapter->dev, "device already resumed\n");
> +		return 0;
> +	}
> +
> +	adapter->is_suspended = false;
> +
> +	/* Disable Host Sleep */
> +	mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
> +			  MWIFIEX_ASYNC_CMD);
> +
> +	return 0;
> +}
> +
> +/*
>   * SDIO remove.
>   *
>   * This function removes the interface and frees up the card structure.
> @@ -212,51 +254,6 @@ static int mwifiex_sdio_suspend(struct device *dev)
>  	return ret;
>  }
>  
> -/*
> - * SDIO resume.
> - *
> - * Kernel needs to suspend all functions separately. Therefore all
> - * registered functions must have drivers with suspend and resume
> - * methods. Failing that the kernel simply removes the whole card.
> - *
> - * If already not resumed, this function turns on the traffic and
> - * sends a host sleep cancel request to the firmware.
> - */
> -static int mwifiex_sdio_resume(struct device *dev)
> -{
> -	struct sdio_func *func = dev_to_sdio_func(dev);
> -	struct sdio_mmc_card *card;
> -	struct mwifiex_adapter *adapter;
> -	mmc_pm_flag_t pm_flag = 0;
> -
> -	if (func) {
> -		pm_flag = sdio_get_host_pm_caps(func);
> -		card = sdio_get_drvdata(func);
> -		if (!card || !card->adapter) {
> -			pr_err("resume: invalid card or adapter\n");
> -			return 0;
> -		}
> -	} else {
> -		pr_err("resume: sdio_func is not specified\n");
> -		return 0;
> -	}
> -
> -	adapter = card->adapter;
> -
> -	if (!adapter->is_suspended) {
> -		dev_warn(adapter->dev, "device already resumed\n");
> -		return 0;
> -	}
> -
> -	adapter->is_suspended = false;
> -
> -	/* Disable Host Sleep */
> -	mwifiex_cancel_hs(mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_STA),
> -			  MWIFIEX_ASYNC_CMD);
> -
> -	return 0;
> -}
> -
>  /* Device ID for SD8786 */
>  #define SDIO_DEVICE_ID_MARVELL_8786   (0x9116)
>  /* Device ID for SD8787 */
> @@ -707,6 +704,65 @@ static void mwifiex_sdio_disable_host_int(struct mwifiex_adapter *adapter)
>  }
>  
>  /*
> + * This function reads the interrupt status from card.
> + */
> +static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
> +{
> +	struct sdio_mmc_card *card = adapter->card;
> +	u8 sdio_ireg;
> +	unsigned long flags;
> +
> +	if (mwifiex_read_data_sync(adapter, card->mp_regs,
> +				   card->reg->max_mp_regs,
> +				   REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK, 0)) {
> +		dev_err(adapter->dev, "read mp_regs failed\n");
> +		return;
> +	}
> +
> +	sdio_ireg = card->mp_regs[HOST_INTSTATUS_REG];
> +	if (sdio_ireg) {
> +		/*
> +		 * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS
> +		 * For SDIO new mode CMD port interrupts
> +		 *	DN_LD_CMD_PORT_HOST_INT_STATUS and/or
> +		 *	UP_LD_CMD_PORT_HOST_INT_STATUS
> +		 * Clear the interrupt status register
> +		 */
> +		dev_dbg(adapter->dev, "int: sdio_ireg = %#x\n", sdio_ireg);
> +		spin_lock_irqsave(&adapter->int_lock, flags);
> +		adapter->int_status |= sdio_ireg;
> +		spin_unlock_irqrestore(&adapter->int_lock, flags);
> +	}
> +}
> +
> +/*
> + * SDIO interrupt handler.
> + *
> + * This function reads the interrupt status from firmware and handles
> + * the interrupt in current thread (ksdioirqd) right away.
> + */
> +static void
> +mwifiex_sdio_interrupt(struct sdio_func *func)
> +{
> +	struct mwifiex_adapter *adapter;
> +	struct sdio_mmc_card *card;
> +
> +	card = sdio_get_drvdata(func);
> +	if (!card || !card->adapter) {
> +		pr_debug("int: func=%p card=%p adapter=%p\n",
> +			 func, card, card ? card->adapter : NULL);
> +		return;
> +	}
> +	adapter = card->adapter;
> +
> +	if (!adapter->pps_uapsd_mode && adapter->ps_state == PS_STATE_SLEEP)
> +		adapter->ps_state = PS_STATE_AWAKE;
> +
> +	mwifiex_interrupt_status(adapter);
> +	mwifiex_main_process(adapter);
> +}
> +
> +/*
>   * This function enables the host interrupt.
>   *
>   * The host interrupt enable mask is written to the card
> @@ -963,65 +1019,6 @@ static int mwifiex_check_fw_status(struct mwifiex_adapter *adapter,
>  }
>  
>  /*
> - * This function reads the interrupt status from card.
> - */
> -static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter)
> -{
> -	struct sdio_mmc_card *card = adapter->card;
> -	u8 sdio_ireg;
> -	unsigned long flags;
> -
> -	if (mwifiex_read_data_sync(adapter, card->mp_regs,
> -				   card->reg->max_mp_regs,
> -				   REG_PORT | MWIFIEX_SDIO_BYTE_MODE_MASK, 0)) {
> -		dev_err(adapter->dev, "read mp_regs failed\n");
> -		return;
> -	}
> -
> -	sdio_ireg = card->mp_regs[HOST_INTSTATUS_REG];
> -	if (sdio_ireg) {
> -		/*
> -		 * DN_LD_HOST_INT_STATUS and/or UP_LD_HOST_INT_STATUS
> -		 * For SDIO new mode CMD port interrupts
> -		 *	DN_LD_CMD_PORT_HOST_INT_STATUS and/or
> -		 *	UP_LD_CMD_PORT_HOST_INT_STATUS
> -		 * Clear the interrupt status register
> -		 */
> -		dev_dbg(adapter->dev, "int: sdio_ireg = %#x\n", sdio_ireg);
> -		spin_lock_irqsave(&adapter->int_lock, flags);
> -		adapter->int_status |= sdio_ireg;
> -		spin_unlock_irqrestore(&adapter->int_lock, flags);
> -	}
> -}
> -
> -/*
> - * SDIO interrupt handler.
> - *
> - * This function reads the interrupt status from firmware and handles
> - * the interrupt in current thread (ksdioirqd) right away.
> - */
> -static void
> -mwifiex_sdio_interrupt(struct sdio_func *func)
> -{
> -	struct mwifiex_adapter *adapter;
> -	struct sdio_mmc_card *card;
> -
> -	card = sdio_get_drvdata(func);
> -	if (!card || !card->adapter) {
> -		pr_debug("int: func=%p card=%p adapter=%p\n",
> -			 func, card, card ? card->adapter : NULL);
> -		return;
> -	}
> -	adapter = card->adapter;
> -
> -	if (!adapter->pps_uapsd_mode && adapter->ps_state == PS_STATE_SLEEP)
> -		adapter->ps_state = PS_STATE_AWAKE;
> -
> -	mwifiex_interrupt_status(adapter);
> -	mwifiex_main_process(adapter);
> -}
> -
> -/*
>   * This function decodes a received packet.
>   *
>   * Based on the type, the packet is treated as either a data, or
> -- 
> 1.8.2.3
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: [PATCH] ssb: drop BROKEN from SSB_SFLASH
From: Hauke Mehrtens @ 2013-07-24 15:04 UTC (permalink / raw)
  To: John W. Linville; +Cc: Rafał Miłecki, linux-wireless
In-Reply-To: <20130724145500.GC2385@tuxdriver.com>

On 07/24/2013 04:55 PM, John W. Linville wrote:
> Did Hauke respond to this?
> 
> On Tue, Jun 25, 2013 at 10:13:46AM +0200, Rafał Miłecki wrote:
>> With recent patches ssb can fetch info about serial flash and register
>> it as a platform device. No more reasons to mark it BROKEN.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> Cc: Hauke Mehrtens <hauke@hauke-m.de>
>> ---
>> Hauke: does it look OK for you? Did you give it a try?
>> ---
>>  drivers/ssb/Kconfig                    |    2 +-
>>  drivers/ssb/driver_chipcommon_sflash.c |    8 +++-----
>>  2 files changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
>> index 4f0dd37..775251d 100644
>> --- a/drivers/ssb/Kconfig
>> +++ b/drivers/ssb/Kconfig
>> @@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
>>  
>>  config SSB_SFLASH
>>  	bool "SSB serial flash support"
>> -	depends on SSB_DRIVER_MIPS && BROKEN
>> +	depends on SSB_DRIVER_MIPS
>>  	default y
>>  
>>  # Assumption: We are on embedded, if we compile the MIPS core.
>> diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
>> index e84cf04..50328de 100644
>> --- a/drivers/ssb/driver_chipcommon_sflash.c
>> +++ b/drivers/ssb/driver_chipcommon_sflash.c
>> @@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
>>  	sflash->size = sflash->blocksize * sflash->numblocks;
>>  	sflash->present = true;
>>  
>> -	pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
>> -		e->name, e->blocksize, e->numblocks);
>> +	pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
>> +		e->name, sflash->size / 1024, e->blocksize, e->numblocks);
>>  
>>  	/* Prepare platform device, but don't register it yet. It's too early,
>>  	 * malloc (required by device_private_init) is not available yet. */
>> @@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
>>  					 sflash->size;
>>  	ssb_sflash_dev.dev.platform_data = sflash;
>>  
>> -	pr_err("Serial flash support is not implemented yet!\n");
>> -
>> -	return -ENOTSUPP;
>> +	return 0;
>>  }

Hi,

I do not own a device with a serial flash chip connected to ssb. This
patch looks ok to me, please apply it.

Hauke


^ permalink raw reply

* Re: [PATCH] ssb: drop BROKEN from SSB_SFLASH
From: John W. Linville @ 2013-07-24 14:55 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: linux-wireless, Hauke Mehrtens
In-Reply-To: <1372148026-9750-1-git-send-email-zajec5@gmail.com>

Did Hauke respond to this?

On Tue, Jun 25, 2013 at 10:13:46AM +0200, Rafał Miłecki wrote:
> With recent patches ssb can fetch info about serial flash and register
> it as a platform device. No more reasons to mark it BROKEN.
> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> Cc: Hauke Mehrtens <hauke@hauke-m.de>
> ---
> Hauke: does it look OK for you? Did you give it a try?
> ---
>  drivers/ssb/Kconfig                    |    2 +-
>  drivers/ssb/driver_chipcommon_sflash.c |    8 +++-----
>  2 files changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/ssb/Kconfig b/drivers/ssb/Kconfig
> index 4f0dd37..775251d 100644
> --- a/drivers/ssb/Kconfig
> +++ b/drivers/ssb/Kconfig
> @@ -139,7 +139,7 @@ config SSB_DRIVER_MIPS
>  
>  config SSB_SFLASH
>  	bool "SSB serial flash support"
> -	depends on SSB_DRIVER_MIPS && BROKEN
> +	depends on SSB_DRIVER_MIPS
>  	default y
>  
>  # Assumption: We are on embedded, if we compile the MIPS core.
> diff --git a/drivers/ssb/driver_chipcommon_sflash.c b/drivers/ssb/driver_chipcommon_sflash.c
> index e84cf04..50328de 100644
> --- a/drivers/ssb/driver_chipcommon_sflash.c
> +++ b/drivers/ssb/driver_chipcommon_sflash.c
> @@ -151,8 +151,8 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
>  	sflash->size = sflash->blocksize * sflash->numblocks;
>  	sflash->present = true;
>  
> -	pr_info("Found %s serial flash (blocksize: 0x%X, blocks: %d)\n",
> -		e->name, e->blocksize, e->numblocks);
> +	pr_info("Found %s serial flash (size: %dKiB, blocksize: 0x%X, blocks: %d)\n",
> +		e->name, sflash->size / 1024, e->blocksize, e->numblocks);
>  
>  	/* Prepare platform device, but don't register it yet. It's too early,
>  	 * malloc (required by device_private_init) is not available yet. */
> @@ -160,7 +160,5 @@ int ssb_sflash_init(struct ssb_chipcommon *cc)
>  					 sflash->size;
>  	ssb_sflash_dev.dev.platform_data = sflash;
>  
> -	pr_err("Serial flash support is not implemented yet!\n");
> -
> -	return -ENOTSUPP;
> +	return 0;
>  }
> -- 
> 1.7.10.4
> 
> 

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: IBSS-RSN support for BCM4313
From: Hauke Mehrtens @ 2013-07-24 14:40 UTC (permalink / raw)
  To: Jordan McCarthy; +Cc: linux-wireless
In-Reply-To: <51EFC944.40502@opentechinstitute.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/24/2013 02:32 PM, Jordan McCarthy wrote:
> Hi Linux wireless folk, I am a developer at a non-profit working on
> a wireless mesh networking platform, and we've just discovered that
> we have a fleet of netbooks with the Broadcom 4313 chipset, one
> that does not work particularly well (and sometimes not at all) in
> ad-hoc mode.
> 
> What's more, none of the available drivers seem to support
> IBSS-RSN, which is absolutely essential for the requirements of our
> platform. Accordingly, I wondered if anyone has any experience
> trying to get the BCM4313 to work in an IBSS-RSN configuration, and
> if not, what is needed to get either of the following:
> 
> - brcmsmac to support adhoc mode - b43 to cover the BCM4313

Hi Jordan,

I added basic adhoc mode support to brcmsmac in 3.10 [0].
This did not got much testing by me. If you want to improve this have
a look on how b43 handles adhoc mode and looking into the initial
brcmsmac commit to staging also helps.

Hauke

[0]:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c55b3766054d3db7a9732c6c8a1c81afac2cfaa6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJR7+dOAAoJEIZ0px9YPRMy/XEP/0B7JBgJYZwwbZZOX4reia6F
XGDoJ3FARwmTgsrIyR9ad8bkEjGUnBfXaln/9we1ePRGG+3floLgY7AifX6iaKib
C6wh3ivFLD05l2CkHLUR1As9o0kh09m+ke34gF0JzQ5g7CLAmNtHhoE1NcPXVsfd
VyRI35Gz47hO1w5b66zPmM8rMx1ua1I31gCJ50Cjbk3EEgnrQqtERxpwKrZTd13w
0qDR7gShcAoFYYBvKbf4mScJbuzOkYwOU9cpn6nIbZm48uhgpPHjR1fuuK5UF7dn
ZyDxdap4S4f9lQPPZtC+ne9SWigP6wuYxHZiUTL6jbcZcL14AHzDdQfuIzO+4cjK
+GPomc4BkDnhWg9AcbzquF9tw9YE7h0aKGHknB1DYTkRZnvTrwKjsGdu9TBxwlFz
QHe+pTHOndf+s9/aGqYm/sxq3GOGXHl+OUp8ErOUzLRCvCvy+QyHDBPoeT8BYe6/
k513hqc1eV64ypV/Mns2V1ZbLiLC7huK6pgcrQSeNfvq6JHw8fmMZuhuIVARum1R
iiEnuX7ZbR3L+MgJTE9K7RT5nkrRyj1/IAxd4/hPulBmCHkQnRFM2f+rVOBa5U/k
MsqgaCwEVotlHDy+lXFDQTyhWsizEGW2ebZihP3EI2I3U4qEuLgFg2pNG29ded8w
OrVIlJi8TbUXAbJWpyDC
=M1wB
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: QCA vs community contributions to QCA drivers
From: John W. Linville @ 2013-07-24 14:11 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <CAB=NE6W7udZBy0WR9pT6QBJxXoz6RkFEZccotihPCHNT6Q4jCg@mail.gmail.com>

On Tue, Jul 23, 2013 at 03:09:15PM -0700, Luis R. Rodriguez wrote:
> Here's a google drive spreadsheet anyone can view of QCA vs community
> contributions to QCA device drivers:
> 
> https://docs.google.com/spreadsheet/ccc?key=0AtNdeeyGJEJ7dG45U2xrZldlQm80Nlg5QzEwUmtNUGc
> 
> If you'd like to contribute feel free to drop me a line or contact of
> the other QCA device driver maintainers.

I'm not sure what the expectation is, but those numbers look pretty
good to me...?

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: Wake-On-Wireless and Deauthentication
From: greg.huber @ 2013-07-24 13:56 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless, daniel.wagner, Dan Williams
In-Reply-To: <CAB=NE6UPz=6NuCMvy5FEM9QBg9rhwFTw0mG2YVTX3r3dLG=1cQ@mail.gmail.com>

I moved over to an ARM embedded proto board and was able to get further.
When suspended, the wireless card appears to stay awake and I can see the
WoW magic-packets as well as other traffic to that NIC. First problem is that
this is kernel 3.0.35 which I read does not yet support wake-on-wireless.

The second question that perhaps one of you can answer is whether or not
the external WAKE_EN# interrupt signal (pin 1 on a mPCIe card) is used to
resume the system, or is the PCIe interrupt expected to resume the system.
I scoped the WAKE_EN# signal but do not see any activity. I also looked at
later drivers,  I don't see this signal activated as an interrupt source, but
I'm still looking.

Thank You.

Greg

On 07/18/2013 09:38 PM, Luis R. Rodriguez wrote:
> On Wed, Jul 17, 2013 at 11:11 AM, greg.huber <greg.huber@carestream.com> wrote:
>> I'm trying to get Wake-on-wireless working with an Atheros AR9462.
>> The problem I seem to be having is that there is a Deauth requested
>> when the system is suspended. Does anyone know how to keep the
>> association while suspended?? I'm using kernel 3.9.9.
>>
>> The log after waking (from keyboard)
>>
>> [  320.117062] wlp3s0: deauthenticating from 00:24:01:12:de:7a by local choice
>> (reason=3)
> Typical managers for networking will disassociate you (and therefore
> deauth first) prior to kicking the system to suspend. To test WoW you
> need to run the supplicant manually because as far as I can tell the
> GUI managers don't consider if WoW was enabled or not. In such a case
> that WoW was enabled the GUI managers should not send the
> deauth/disassoc.
>
>   Luis
>


^ permalink raw reply

* Fwd: TP-LINK 8200ND
From: Vihang Patel @ 2013-07-24 13:50 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <CA+Gu+Kx3RNkenmHD4dGP5NxC1zzq9sxwjdRxuj5qLFCg32DLeQ@mail.gmail.com>

Hi,

I understand there was a thread on linux drivers for TP-LINK8200ND
with rtl8192cu chipset, but it ran cold with no resolution. I was
wondering if there if anyone found a resolution on that.

I have tried installing the drivers provided by realtek as well on
both Ubuntu 12.004 and 13.04. Scorched the internet, and was able to
get it to detect the device but it wont connect to any of the Wireless
networks.

Any help would be helpful.

Thanks
Vihang

^ permalink raw reply

* Re: Nexus 4 causes system hang (xhci_hcd)
From: Julian Calaby @ 2013-07-24 13:19 UTC (permalink / raw)
  To: Vincent Thiele; +Cc: linux-wireless, 1203453
In-Reply-To: <CAEZsi7GVZuBXhn-K+O0sjA_fZXjOQwOmVPuYWDS0ofX65cSvoA@mail.gmail.com>

Hi Vincent,

On Wed, Jul 24, 2013 at 11:10 PM, Vincent Thiele
<vincentthiele@gmail.com> wrote:
> Nexus 4 causes system hang (xhci_hcd):
>
> When I connect my Nexus 4 to the USB-Port (Front USB 3.0) the whole
> system hangs. Sometimes it starts working again after a short time.
> But often I need to press the reset button.
> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1203453
>
> Keywords: kernel, usb

So why have you sent this to linux-wireless? Surely you mean to send
it to linux-usb or something.

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/

^ permalink raw reply

* Nexus 4 causes system hang (xhci_hcd)
From: Vincent Thiele @ 2013-07-24 13:10 UTC (permalink / raw)
  To: linux-wireless; +Cc: 1203453

Nexus 4 causes system hang (xhci_hcd):

When I connect my Nexus 4 to the USB-Port (Front USB 3.0) the whole
system hangs. Sometimes it starts working again after a short time.
But often I need to press the reset button.
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1203453

Keywords: kernel, usb

Kernel version (from /proc/version):
Linux version 3.11.0-031100rc2-generic (apw@gomeisa) (gcc version
4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #201307211535 SMP Sun Jul 21
19:36:42 UTC 2013

Output of Oops.. message:
Oops: 0002 [#1] SMP

Environment:
Description: Ubuntu 13.04
Release: 13.04

Software:
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.

Linux Arbeits-PC 3.11.0-031100rc2-generic #201307211535 SMP Sun Jul 21
19:36:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Gnu C                  4.7
Gnu make               3.81
binutils               2.23.2
util-linux             2.20.1
mount                  support
module-init-tools      9
e2fsprogs              1.42.5
pcmciautils            018
PPP                    2.4.5
Linux C Library        2.17
Dynamic linker (ldd)   2.17
Procps                 3.3.3
Net-tools              1.60
Kbd                    1.15.5
Sh-utils               8.20
wireless-tools         30
Modules Loaded         pci_stub vboxpci vboxnetadp vboxnetflt vboxdrv
snd_hda_codec_hdmi hid_generic usbhid hid rfcomm bnep parport_pc
bluetooth ppdev joydev snd_hda_codec_realtek xpad ff_memless
snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc
nls_iso8859_1 snd_seq_midi eeepc_wmi asus_wmi sparse_keymap
snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device nouveau psmouse
snd_timer serio_raw snd mxm_wmi ttm drm_kms_helper drm lpc_ich
i2c_algo_bit wmi video mac_hid soundcore mei_me mei lp parport
usb_storage ahci libahci e1000e ptp pps_core

Processor information (from /proc/cpuinfo):
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
stepping : 7
microcode : 0x28
cpu MHz : 2884.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt
tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts
dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 5618.39
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
stepping : 7
microcode : 0x28
cpu MHz : 2660.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt
tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts
dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 5618.39
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
stepping : 7
microcode : 0x28
cpu MHz : 2912.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt
tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts
dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 5618.39
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i5-2300 CPU @ 2.80GHz
stepping : 7
microcode : 0x28
cpu MHz : 2800.000
cache size : 6144 KB
physical id : 0
siblings : 4
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx
rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology
nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl
vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt
tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts
dtherm tpr_shadow vnmi flexpriority ept vpid
bogomips : 5618.39
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:

Module information (from /proc/modules):
pci_stub 12622 1 - Live 0x0000000000000000
vboxpci 23194 0 - Live 0x0000000000000000 (OF)
vboxnetadp 25670 0 - Live 0x0000000000000000 (OF)
vboxnetflt 23479 0 - Live 0x0000000000000000 (OF)
vboxdrv 320372 3 vboxpci,vboxnetadp,vboxnetflt, Live 0x0000000000000000 (OF)
snd_hda_codec_hdmi 41688 1 - Live 0x0000000000000000
hid_generic 12548 0 - Live 0x0000000000000000
usbhid 53329 0 - Live 0x0000000000000000
hid 105557 2 hid_generic,usbhid, Live 0x0000000000000000
rfcomm 74589 0 - Live 0x0000000000000000
bnep 23966 2 - Live 0x0000000000000000
parport_pc 32866 0 - Live 0x0000000000000000
bluetooth 391564 10 rfcomm,bnep, Live 0x0000000000000000
ppdev 17711 0 - Live 0x0000000000000000
joydev 17613 0 - Live 0x0000000000000000
snd_hda_codec_realtek 56259 1 - Live 0x0000000000000000
xpad 18546 0 - Live 0x0000000000000000
ff_memless 13704 1 xpad, Live 0x0000000000000000
snd_hda_intel 48717 5 - Live 0x0000000000000000
snd_hda_codec 194727 3
snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel, Live
0x0000000000000000
snd_hwdep 13613 1 snd_hda_codec, Live 0x0000000000000000
snd_pcm 107140 3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec, Live
0x0000000000000000
snd_page_alloc 18798 2 snd_hda_intel,snd_pcm, Live 0x0000000000000000
nls_iso8859_1 12713 1 - Live 0x0000000000000000
snd_seq_midi 13324 0 - Live 0x0000000000000000
eeepc_wmi 13151 0 - Live 0x0000000000000000
asus_wmi 24794 1 eeepc_wmi, Live 0x0000000000000000
sparse_keymap 13890 1 asus_wmi, Live 0x0000000000000000
snd_seq_midi_event 14899 1 snd_seq_midi, Live 0x0000000000000000
snd_rawmidi 30416 1 snd_seq_midi, Live 0x0000000000000000
snd_seq 66061 2 snd_seq_midi,snd_seq_midi_event, Live 0x0000000000000000
snd_seq_device 14497 3 snd_seq_midi,snd_rawmidi,snd_seq, Live 0x0000000000000000
nouveau 974829 3 - Live 0x0000000000000000
psmouse 104015 0 - Live 0x0000000000000000
snd_timer 29989 2 snd_pcm,snd_seq, Live 0x0000000000000000
serio_raw 13413 0 - Live 0x0000000000000000
snd 69657 21 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_seq_midi,snd_rawmidi,snd_seq,snd_seq_device,snd_timer,
Live 0x0000000000000000
mxm_wmi 13021 1 nouveau, Live 0x0000000000000000
ttm 84705 1 nouveau, Live 0x0000000000000000
drm_kms_helper 53178 1 nouveau, Live 0x0000000000000000
drm 298236 5 nouveau,ttm,drm_kms_helper, Live 0x0000000000000000
lpc_ich 21163 0 - Live 0x0000000000000000
i2c_algo_bit 13564 1 nouveau, Live 0x0000000000000000
wmi 19256 3 asus_wmi,nouveau,mxm_wmi, Live 0x0000000000000000
video 19685 2 asus_wmi,nouveau, Live 0x0000000000000000
mac_hid 13253 0 - Live 0x0000000000000000
soundcore 12680 1 snd, Live 0x0000000000000000
mei_me 18539 0 - Live 0x0000000000000000
mei 78448 1 mei_me, Live 0x0000000000000000
lp 17799 0 - Live 0x0000000000000000
parport 42466 3 parport_pc,ppdev,lp, Live 0x0000000000000000
usb_storage 66567 4 - Live 0x0000000000000000
ahci 30063 4 - Live 0x0000000000000000
libahci 32088 1 ahci, Live 0x0000000000000000
e1000e 257364 0 - Live 0x0000000000000000
ptp 18627 1 e1000e, Live 0x0000000000000000
pps_core 19027 1 ptp, Live 0x0000000000000000

Loaded driver and hardware information:
cat /proc/ioports
0000-0cf7 : PCI Bus 0000:00
0000-001f : dma1
0020-0021 : pic1
0040-0043 : timer0
0050-0053 : timer1
0060-0060 : keyboard
0062-0062 : EC data
0064-0064 : keyboard
0066-0066 : EC cmd
0070-0077 : rtc0
0080-008f : dma page reg
00a0-00a1 : pic2
00c0-00df : dma2
00f0-00ff : fpu
0200-020f : pnp 00:04
0290-029f : pnp 00:07
0400-0403 : ACPI PM1a_EVT_BLK
0404-0405 : ACPI PM1a_CNT_BLK
0408-040b : ACPI PM_TMR
0410-0415 : ACPI CPU throttle
0420-042f : ACPI GPE0_BLK
0430-0433 : iTCO_wdt
0450-0450 : ACPI PM2_CNT_BLK
0454-0457 : pnp 00:06
0458-047f : pnp 00:04
0460-047f : iTCO_wdt
04d0-04d1 : pnp 00:08
0500-057f : pnp 00:04
0580-059f : 0000:00:1f.3
0680-069f : pnp 00:04
0cf8-0cff : PCI conf1
0d00-ffff : PCI Bus 0000:00
164e-164f : pnp 00:04
2000-2fff : PCI Bus 0000:02
d000-dfff : PCI Bus 0000:05
d000-d00f : 0000:05:00.0
d000-d00f : ahci
d010-d013 : 0000:05:00.0
d010-d013 : ahci
d020-d027 : 0000:05:00.0
d020-d027 : ahci
d030-d033 : 0000:05:00.0
d030-d033 : ahci
d040-d047 : 0000:05:00.0
d040-d047 : ahci
e000-efff : PCI Bus 0000:01
e000-e07f : 0000:01:00.0
f020-f03f : 0000:00:1f.2
f020-f03f : ahci
f040-f05f : 0000:00:19.0
f060-f063 : 0000:00:1f.2
f060-f063 : ahci
f070-f077 : 0000:00:1f.2
f070-f077 : ahci
f080-f083 : 0000:00:1f.2
f080-f083 : ahci
f090-f097 : 0000:00:1f.2
f090-f097 : ahci
ffff-ffff : pnp 00:04
ffff-ffff : pnp 00:04

cat /proc/iomem
00000000-00000fff : reserved
00001000-0009efff : System RAM
0009f000-0009ffff : reserved
000a0000-000bffff : PCI Bus 0000:00
000c0000-000ce7ff : Video ROM
000d4000-000d7fff : PCI Bus 0000:00
000d8000-000dbfff : PCI Bus 0000:00
000dc000-000dffff : PCI Bus 0000:00
000f0000-000fffff : System ROM
00100000-deb8efff : System RAM
0e000000-0e737993 : Kernel code
0e737994-0ed0ec7f : Kernel data
0ee70000-0efe2fff : Kernel bss
deb8f000-df13efff : reserved
df13f000-df383fff : ACPI Non-volatile Storage
df384000-df391fff : ACPI Tables
df392000-df3befff : ACPI Non-volatile Storage
df3bf000-df3c3fff : ACPI Tables
df3c4000-df406fff : ACPI Non-volatile Storage
df407000-df7fffff : System RAM
df800000-dfffffff : RAM buffer
e0000000-feafffff : PCI Bus 0000:00
e0000000-e0000fff : pnp 00:0a
e0100000-e02fffff : PCI Bus 0000:02
e0300000-e04fffff : PCI Bus 0000:02
e0500000-e05fffff : PCI Bus 0000:05
e0500000-e050ffff : 0000:05:00.0
e8000000-f1ffffff : PCI Bus 0000:01
e8000000-efffffff : 0000:01:00.0
f0000000-f1ffffff : 0000:01:00.0
f6000000-f70fffff : PCI Bus 0000:01
f6000000-f6ffffff : 0000:01:00.0
f7000000-f707ffff : 0000:01:00.0
f7080000-f7083fff : 0000:01:00.1
7080000-f7083fff : ICH HD audio
f7100000-f71fffff : PCI Bus 0000:05
f7110000-f71101ff : 0000:05:00.0
f7110000-f71101ff : ahci
f7200000-f72fffff : PCI Bus 0000:04
f7200000-f7207fff : 0000:04:00.0
f7200000-f7207fff : xhci_hcd
f7300000-f73fffff : PCI Bus 0000:03
f7300000-f7307fff : 0000:03:00.0
f7300000-f7307fff : xhci_hcd
f7400000-f741ffff : 0000:00:19.0
f7400000-f741ffff : e1000e
f7420000-f7423fff : 0000:00:1b.0
f7420000-f7423fff : ICH HD audio
f7425000-f74250ff : 0000:00:1f.3
f7426000-f74267ff : 0000:00:1f.2
f7426000-f74267ff : ahci
f7427000-f74273ff : 0000:00:1d.0
f7427000-f74273ff : ehci_hcd
f7428000-f74283ff : 0000:00:1a.0
f7428000-f74283ff : ehci_hcd
f7429000-f7429fff : 0000:00:19.0
f7429000-f7429fff : e1000e
f742c000-f742c00f : 0000:00:16.0
f742c000-f742c00f : mei_me
f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
f8000000-fbffffff : reserved
f8000000-fbffffff : pnp 00:0a
fec00000-fec00fff : reserved
fec00000-fec003ff : IOAPIC 0
fed00000-fed03fff : reserved
fed00000-fed003ff : HPET 0
fed10000-fed17fff : pnp 00:0a
fed18000-fed18fff : pnp 00:0a
fed19000-fed19fff : pnp 00:0a
fed1c000-fed1ffff : reserved
fed1c000-fed1ffff : pnp 00:0a
fed1f410-fed1f414 : iTCO_wdt
fed20000-fed3ffff : pnp 00:0a
fed40000-fed44fff : pnp 00:00
fed45000-fed8ffff : pnp 00:0a
fed90000-fed93fff : pnp 00:0a
fee00000-fee00fff : Local APIC
fee00000-fee00fff : reserved
ff000000-ffffffff : reserved
ff000000-ffffffff : pnp 00:0a
100000000-21effffff : System RAM
21f000000-21fffffff : RAM buffer

PCI information ('lspci -vvv' as root):
sudo lspci -vvv
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor
Family DRAM Controller (rev 09)
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort+ >SERR- <PERR- INTx-
  Latency: 0
  Capabilities: [e0] Vendor Specific Information: Len=0c <?>

00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core
Processor Family PCI Express Root Port (rev 09) (prog-if 00 [Normal
decode])
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
  I/O behind bridge: 0000e000-0000efff
  Memory behind bridge: f6000000-f70fffff
  Prefetchable memory behind bridge: 00000000e8000000-00000000f1ffffff
  Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
  BridgeCtl: Parity- SERR- NoISA- VGA+ MAbort- >Reset- FastB2B-
    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
  Capabilities: [88] Subsystem: ASUSTeK Computer Inc. Device 844d
  Capabilities: [80] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Address: fee0f00c  Data: 4181
  Capabilities: [a0] Express (v2) Root Port (Slot+), MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #2, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0
<256ns, L1 <4us
      ClockPM- Surprise- LLActRep- BwNot+
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive-
BWMgmt+ ABWMgmt-
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
      Slot #1, PowerLimit 75.000W; Interlock- NoCompl+
    SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
      Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
    SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
      Changed: MRL- PresDet- LinkState-
    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
    RootCap: CRSVisible-
    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
    DevCap2: Completion Timeout: Not Supported, TimeoutDis- ARIFwd-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -3.5dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [100 v1] Virtual Channel
    Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
    Arb:  Fixed- WRR32- WRR64- WRR128-
    Ctrl: ArbSelect=Fixed
    Status: InProgress-
    VC0:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed+ WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
      Status: NegoPending- InProgress-
  Capabilities: [140 v1] Root Complex Link
    Desc: PortNumber=02 ComponentID=01 EltType=Config
    Link0:  Desc: TargetPort=00 TargetComponent=01 AssocRCRB-
LinkType=MemMapped LinkValid+
      Addr: 00000000fed19000
  Kernel driver in use: pcieport

00:16.0 Communication controller: Intel Corporation 6 Series/C200
Series Chipset Family MEI Controller #1 (rev 04)
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Interrupt: pin A routed to IRQ 53
  Region 0: Memory at f742c000 (64-bit, non-prefetchable) [size=16]
  Capabilities: [50] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [8c] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Address: 00000000fee0f00c  Data: 41b2
  Kernel driver in use: mei_me

00:19.0 Ethernet controller: Intel Corporation 82579V Gigabit Network
Connection (rev 05)
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Interrupt: pin A routed to IRQ 51
  Region 0: Memory at f7400000 (32-bit, non-prefetchable) [size=128K]
  Region 1: Memory at f7429000 (32-bit, non-prefetchable) [size=4K]
  Region 2: I/O ports at f040 [size=32]
  Capabilities: [c8] Power Management version 2
    Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=1 PME-
  Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Address: 00000000fee0100c  Data: 4123
  Capabilities: [e0] PCI Advanced Features
    AFCap: TP+ FLR+
    AFCtrl: FLR-
    AFStatus: TP-
  Kernel driver in use: e1000e

00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset
Family USB Enhanced Host Controller #2 (rev 05) (prog-if 20 [EHCI])
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Interrupt: pin A routed to IRQ 16
  Region 0: Memory at f7428000 (32-bit, non-prefetchable) [size=1K]
  Capabilities: [50] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [58] Debug port: BAR=1 offset=00a0
  Capabilities: [98] PCI Advanced Features
    AFCap: TP+ FLR+
    AFCtrl: FLR-
    AFStatus: TP-
  Kernel driver in use: ehci-pci

00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset
Family High Definition Audio Controller (rev 05)
  Subsystem: ASUSTeK Computer Inc. Device 84dc
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 54
  Region 0: Memory at f7420000 (64-bit, non-prefetchable) [size=16K]
  Capabilities: [50] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Address: 00000000fee0f00c  Data: 41d2
  Capabilities: [70] Express (v1) Root Complex Integrated Endpoint, MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE- FLReset+
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0
<64ns, L1 <1us
      ClockPM- Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive-
BWMgmt- ABWMgmt-
  Capabilities: [100 v1] Virtual Channel
    Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
    Arb:  Fixed- WRR32- WRR64- WRR128-
    Ctrl: ArbSelect=Fixed
    Status: InProgress-
    VC0:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
      Status: NegoPending- InProgress-
    VC1:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=1 ArbSelect=Fixed TC/VC=22
      Status: NegoPending- InProgress-
  Capabilities: [130 v1] Root Complex Link
    Desc: PortNumber=0f ComponentID=00 EltType=Config
    Link0:  Desc: TargetPort=00 TargetComponent=00 AssocRCRB-
LinkType=MemMapped LinkValid+
      Addr: 00000000fed1c000
  Kernel driver in use: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset
Family PCI Express Root Port 1 (rev b5) (prog-if 00 [Normal decode])
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
  I/O behind bridge: 00002000-00002fff
  Memory behind bridge: e0100000-e02fffff
  Prefetchable memory behind bridge: 00000000e0300000-00000000e04fffff
  Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
  BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
  Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    LnkCap: Port #1, Speed 5GT/s, Width x4, ASPM L0s L1, Latency L0
<1us, L1 <4us
      ClockPM- Surprise- LLActRep+ BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x0, TrErr- Train+ SlotClk+ DLActive-
BWMgmt- ABWMgmt-
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug+ Surprise+
      Slot #0, PowerLimit 0.000W; Interlock- NoCompl+
    SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
      Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
    SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet- Interlock-
      Changed: MRL- PresDet- LinkState-
    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
    RootCap: CRSVisible-
    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
    DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
    LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Address: 00000000  Data: 0000
  Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 844d
  Capabilities: [a0] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Kernel driver in use: pcieport

00:1c.4 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset
Family PCI Express Root Port 5 (rev b5) (prog-if 00 [Normal decode])
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Bus: primary=00, secondary=03, subordinate=03, sec-latency=0
  I/O behind bridge: 0000f000-00000fff
  Memory behind bridge: f7300000-f73fffff
  Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
  Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
  BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
  Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    LnkCap: Port #5, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
<512ns, L1 <4us
      ClockPM- Surprise- LLActRep+ BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt+ ABWMgmt-
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
      Slot #4, PowerLimit 10.000W; Interlock- NoCompl+
    SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
      Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
    SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
      Changed: MRL- PresDet- LinkState-
    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
    RootCap: CRSVisible-
    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
    DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Address: 00000000  Data: 0000
  Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 844d
  Capabilities: [a0] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Kernel driver in use: pcieport

00:1c.5 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset
Family PCI Express Root Port 6 (rev b5) (prog-if 00 [Normal decode])
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Bus: primary=00, secondary=04, subordinate=04, sec-latency=0
  I/O behind bridge: 0000f000-00000fff
  Memory behind bridge: f7200000-f72fffff
  Prefetchable memory behind bridge: 00000000fff00000-00000000000fffff
  Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
  BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
  Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    LnkCap: Port #6, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
<512ns, L1 <4us
      ClockPM- Surprise- LLActRep+ BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt+ ABWMgmt-
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
      Slot #5, PowerLimit 10.000W; Interlock- NoCompl+
    SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
      Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
    SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
      Changed: MRL- PresDet- LinkState-
    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
    RootCap: CRSVisible-
    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
    DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Address: 00000000  Data: 0000
  Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 844d
  Capabilities: [a0] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Kernel driver in use: pcieport

00:1c.6 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset
Family PCI Express Root Port 7 (rev b5) (prog-if 00 [Normal decode])
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Bus: primary=00, secondary=05, subordinate=05, sec-latency=0
  I/O behind bridge: 0000d000-0000dfff
  Memory behind bridge: f7100000-f71fffff
  Prefetchable memory behind bridge: 00000000e0500000-00000000e05fffff
  Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- <SERR- <PERR-
  BridgeCtl: Parity- SERR- NoISA- VGA- MAbort- >Reset- FastB2B-
    PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
  Capabilities: [40] Express (v2) Root Port (Slot+), MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 128 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
    LnkCap: Port #7, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
<512ns, L1 <4us
      ClockPM- Surprise- LLActRep+ BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive+
BWMgmt+ ABWMgmt-
    SltCap: AttnBtn- PwrCtrl- MRL- AttnInd- PwrInd- HotPlug- Surprise-
      Slot #6, PowerLimit 10.000W; Interlock- NoCompl+
    SltCtl: Enable: AttnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq- LinkChg-
      Control: AttnInd Unknown, PwrInd Unknown, Power- Interlock-
    SltSta: Status: AttnBtn- PowerFlt- MRL- CmdCplt- PresDet+ Interlock-
      Changed: MRL- PresDet- LinkState-
    RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna- CRSVisible-
    RootCap: CRSVisible-
    RootSta: PME ReqID 0000, PMEStatus- PMEPending-
    DevCap2: Completion Timeout: Range BC, TimeoutDis+ ARIFwd-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [80] MSI: Enable- Count=1/1 Maskable- 64bit-
    Address: 00000000  Data: 0000
  Capabilities: [90] Subsystem: ASUSTeK Computer Inc. Device 844d
  Capabilities: [a0] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Kernel driver in use: pcieport

00:1d.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset
Family USB Enhanced Host Controller #1 (rev 05) (prog-if 20 [EHCI])
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Interrupt: pin A routed to IRQ 23
  Region 0: Memory at f7427000 (32-bit, non-prefetchable) [size=1K]
  Capabilities: [50] Power Management version 2
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [58] Debug port: BAR=1 offset=00a0
  Capabilities: [98] PCI Advanced Features
    AFCap: TP+ FLR+
    AFCtrl: FLR-
    AFStatus: TP-
  Kernel driver in use: ehci-pci

00:1f.0 ISA bridge: Intel Corporation Z68 Express Chipset Family LPC
Controller (rev 05)
  Subsystem: ASUSTeK Computer Inc. Device 844d
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Capabilities: [e0] Vendor Specific Information: Len=0c <?>
  Kernel driver in use: lpc_ich

00:1f.2 SATA controller: Intel Corporation 6 Series/C200 Series
Chipset Family SATA AHCI Controller (rev 05) (prog-if 01 [AHCI 1.0])
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0
  Interrupt: pin B routed to IRQ 52
  Region 0: I/O ports at f090 [size=8]
  Region 1: I/O ports at f080 [size=4]
  Region 2: I/O ports at f070 [size=8]
  Region 3: I/O ports at f060 [size=4]
  Region 4: I/O ports at f020 [size=32]
  Region 5: Memory at f7426000 (32-bit, non-prefetchable) [size=2K]
  Capabilities: [80] MSI: Enable+ Count=1/1 Maskable- 64bit-
    Address: fee0200c  Data: 41a2
  Capabilities: [70] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [a8] SATA HBA v1.0 BAR4 Offset=00000004
  Capabilities: [b0] PCI Advanced Features
    AFCap: TP+ FLR+
    AFCtrl: FLR-
    AFStatus: TP-
  Kernel driver in use: ahci

00:1f.3 SMBus: Intel Corporation 6 Series/C200 Series Chipset Family
SMBus Controller (rev 05)
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Interrupt: pin C routed to IRQ 11
  Region 0: Memory at f7425000 (64-bit, non-prefetchable) [size=256]
  Region 4: I/O ports at 0580 [size=32]

01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce
GTX 660] (rev a1) (prog-if 00 [VGA controller])
  Subsystem: ASUSTeK Computer Inc. Device 8422
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 16
  Region 0: Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
  Region 1: Memory at e8000000 (64-bit, prefetchable) [size=128M]
  Region 3: Memory at f0000000 (64-bit, prefetchable) [size=32M]
  Region 5: I/O ports at e000 [size=128]
  Expansion ROM at f7000000 [disabled] [size=512K]
  Capabilities: [60] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Address: 0000000000000000  Data: 0000
  Capabilities: [78] Express (v2) Endpoint, MSI 00
    DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
      ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
      MaxPayload 128 bytes, MaxReadReq 512 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Latency L0
<512ns, L1 <4us
      ClockPM+ Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
    DevCap2: Completion Timeout: Range AB, TimeoutDis+
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
    LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [b4] Vendor Specific Information: Len=14 <?>
  Capabilities: [100 v1] Virtual Channel
    Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
    Arb:  Fixed- WRR32- WRR64- WRR128-
    Ctrl: ArbSelect=Fixed
    Status: InProgress-
    VC0:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
      Status: NegoPending- InProgress-
  Capabilities: [128 v1] Power Budgeting <?>
  Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
  Capabilities: [900 v1] #19
  Kernel driver in use: nouveau

01:00.1 Audio device: NVIDIA Corporation Device 0e0b (rev a1)
  Subsystem: ASUSTeK Computer Inc. Device 8422
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin B routed to IRQ 17
  Region 0: Memory at f7080000 (32-bit, non-prefetchable) [size=16K]
  Capabilities: [60] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
    Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Address: 0000000000000000  Data: 0000
  Capabilities: [78] Express (v2) Endpoint, MSI 00
    DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
      ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
      MaxPayload 128 bytes, MaxReadReq 512 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Latency L0
<512ns, L1 <4us
      ClockPM+ Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x16, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
    DevCap2: Completion Timeout: Range AB, TimeoutDis+
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
    LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Kernel driver in use: snd_hda_intel

03:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB
Host Controller (prog-if 30 [XHCI])
  Subsystem: ASUSTeK Computer Inc. Device 8488
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 16
  Region 0: Memory at f7300000 (64-bit, non-prefetchable) [size=32K]
  Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
    Address: 0000000000000000  Data: 0000
  Capabilities: [68] MSI-X: Enable+ Count=8 Masked-
    Vector table: BAR=0 offset=00002000
    PBA: BAR=0 offset=00002080
  Capabilities: [78] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
    DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <64ns, L1 <2us
      ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
      MaxPayload 128 bytes, MaxReadReq 512 bytes
    DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
unlimited, L1 unlimited
      ClockPM- Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
    DevCap2: Completion Timeout: Not Supported, TimeoutDis-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [100 v1] Virtual Channel
    Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
    Arb:  Fixed- WRR32- WRR64- WRR128-
    Ctrl: ArbSelect=Fixed
    Status: InProgress-
    VC0:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
      Status: NegoPending- InProgress-
  Kernel driver in use: xhci_hcd

04:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB
Host Controller (prog-if 30 [XHCI])
  Subsystem: ASUSTeK Computer Inc. Device 8488
  Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx+
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 17
  Region 0: Memory at f7200000 (64-bit, non-prefetchable) [size=32K]
  Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
    Address: 0000000000000000  Data: 0000
  Capabilities: [68] MSI-X: Enable+ Count=8 Masked-
    Vector table: BAR=0 offset=00002000
    PBA: BAR=0 offset=00002080
  Capabilities: [78] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [80] Express (v2) Legacy Endpoint, MSI 00
    DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s <64ns, L1 <2us
      ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
      MaxPayload 128 bytes, MaxReadReq 512 bytes
    DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0
unlimited, L1 unlimited
      ClockPM- Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
    DevCap2: Completion Timeout: Not Supported, TimeoutDis-
    DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
    LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-,
Selectable De-emphasis: -6dB
       Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
       Compliance De-emphasis: -6dB
    LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-,
EqualizationPhase1-
       EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
  Capabilities: [100 v1] Virtual Channel
    Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
    Arb:  Fixed- WRR32- WRR64- WRR128-
    Ctrl: ArbSelect=Fixed
    Status: InProgress-
    VC0:  Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
      Arb:  Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
      Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=01
      Status: NegoPending- InProgress-
  Kernel driver in use: xhci_hcd

05:00.0 SATA controller: JMicron Technology Corp. JMB362 SATA
Controller (rev 10) (prog-if 01 [AHCI 1.0])
  Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard
  Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
  Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
  Latency: 0, Cache Line Size: 64 bytes
  Interrupt: pin A routed to IRQ 18
  Region 0: I/O ports at d040 [size=8]
  Region 1: I/O ports at d030 [size=4]
  Region 2: I/O ports at d020 [size=8]
  Region 3: I/O ports at d010 [size=4]
  Region 4: I/O ports at d000 [size=16]
  Region 5: Memory at f7110000 (32-bit, non-prefetchable) [size=512]
  [virtual] Expansion ROM at e0500000 [disabled] [size=64K]
  Capabilities: [8c] Power Management version 3
    Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
    Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
  Capabilities: [50] Express (v1) Legacy Endpoint, MSI 00
    DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <64ns, L1 <1us
      ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
    DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
      RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
      MaxPayload 128 bytes, MaxReadReq 512 bytes
    DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
    LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0
<1us, L1 <16us
      ClockPM- Surprise- LLActRep- BwNot-
    LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
    LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive-
BWMgmt- ABWMgmt-
  Kernel driver in use: ahci


SCSI information (from /proc/scsi/scsi):
cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: SanDisk SDSSDX12 Rev: R112
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: ATA      Model: WDC WD6400AAKS-0 Rev: 01.0
  Type:   Direct-Access                    ANSI  SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
  Vendor: HL-DT-ST Model: DVDRAM GH22LS50  Rev: TL02
  Type:   CD-ROM                           ANSI  SCSI revision: 05
Host: scsi8 Channel: 00 Id: 00 Lun: 00
  Vendor: WD       Model: 10EAVS External  Rev: 1.05
  Type:   Direct-Access                    ANSI  SCSI revision: 04
Host: scsi9 Channel: 00 Id: 00 Lun: 00
  Vendor: WD       Model: Ext HDD 1021     Rev: 2021
  Type:   Direct-Access                    ANSI  SCSI revision: 04
Host: scsi10 Channel: 00 Id: 00 Lun: 00
  Vendor: WD       Model: Ext HDD 1021     Rev: 2002
  Type:   Direct-Access                    ANSI  SCSI revision: 04
Host: scsi11 Channel: 00 Id: 00 Lun: 00
  Vendor: WD       Model: Ext HDD 1021     Rev: 2021
  Type:   Direct-Access                    ANSI  SCSI revision: 04

Other information:
ls /proc
1     1308  2297  2491  2680  298   3886  6     960            loadavg
10    1314  23    2494  2686  299   39    62    acpi           locks
1043  1315  2307  2496  2688  3     392   65    asound         mdstat
1053  1316  2311  2497  2689  30    40    657   buddyinfo      meminfo
1054  1356  2314  2498  269   300   404   658   bus            misc
1067  1358  2322  25    2690  3011  406   67    cgroups        modules
1070  14    2339  2517  27    306   41    690   cmdline        mounts
1075  1401  2343  2565  2704  307   4122  7     consoles       mtrr
1084  15    2372  257   2710  3072  42    723   cpuinfo        net
11    1596  2377  2570  2712  31    4261  7428  crypto         pagetypeinfo
1103  16    2380  2573  2735  3163  427   7489  devices        partitions
1107  1619  2381  2576  2744  32    428   749   diskstats      sched_debug
1119  1631  2382  2579  2746  33    4280  7512  dma            schedstat
1121  1645  2384  258   2748  34    4300  7646  dri            scsi
1125  1651  2400  2581  2759  35    44    7665  driver         self
1158  17    2403  2587  2761  3554  45    7759  execdomains    slabinfo
1160  1778  2408  259   2782  3555  46    7845  fb             softirqs
1163  1783  2418  26    2789  3556  47    8     filesystems    stat
1166  18    2423  260   2790  36    48    8097  fs             swaps
1173  1839  2427  261   2791  37    49    8099  interrupts     sys
1191  19    2444  2612  2795  3723  5     8105  iomem          sysrq-trigger
1192  2     2451  2614  2796  3724  50    8106  ioports        sysvipc
12    2024  2456  262   2828  3730  5061  8171  irq            timer_list
1252  2033  2457  2625  2834  3735  5303  818   kallsyms       timer_stats
1259  21    2459  2627  2839  3741  546   819   kcore          tty
1270  22    2473  2628  2846  3743  5618  8209  key-users      uptime
1273  2237  2475  2629  2899  3749  5675  86    kmsg           version
1282  2248  2484  2630  29    3752  5718  87    kpagecount     vmallocinfo
13    2293  2487  267   297   3756  5818  88    kpageflags     vmstat
1303  2296  2489  268   2977  38    5848  9     latency_stats  zoneinfo

^ permalink raw reply

* IBSS-RSN support for BCM4313
From: Jordan McCarthy @ 2013-07-24 12:32 UTC (permalink / raw)
  To: linux-wireless

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Linux wireless folk,
	I am a developer at a non-profit working on a wireless mesh networking
platform, and we've just discovered that we have a fleet of netbooks
with the Broadcom 4313 chipset, one that does not work particularly well
(and sometimes not at all) in ad-hoc mode.

What's more, none of the available drivers seem to support IBSS-RSN,
which is absolutely essential for the requirements of our platform.
Accordingly, I wondered if anyone has any experience trying to get the
BCM4313 to work in an IBSS-RSN configuration, and if not, what is needed
to get either of the following:

- - brcmsmac to support adhoc mode
- - b43 to cover the BCM4313

Many thanks,
Jordan

- -- 
Jordan McCarthy
Technical Program Associate | Open Technology Institute | New America
Foundation
My Public Key: 0xC08D8042 | 4A61 3D39 4125 127D 65EA DDC2 BFBD A2E9 C08D
8042
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR78lDAAoJEL+9ounAjYBClsUH/RgqnocuAhxTyHaXR9EHenhA
ZaSvOQCoCcWP5nOvSNSVHF/xmE7GJq+sPWzQs6O9iLI9bYiSE5NlO1V5wfISaQo/
xxdhczKyVZNFmzUgHnN+HCus99l6wOq5g+nHB8hALP9+iJ9gxJ5zyPVzgiOLLlgZ
3VXLRkQTeNNN/htTPrbiYQ6H/FPHXi4WOOxovpsYWSTw2B0BXwAJXDvP5wsBxzza
W0Gqb25Ipu3z2GtcH1qupPX1myARF1ZIN6hksJPcxgY5g/1IkYVI7kqr5B99ANo8
CCMxi/non3sFSPEBsiDlXKIw2toQG8xmjKYyAh+EY1PLQE48f2XAbj/jbwSmyPo=
=9usr
-----END PGP SIGNATURE-----

^ permalink raw reply

* Re: FUSB200 xhci issue
From: Oleksij Rempel @ 2013-07-24 10:37 UTC (permalink / raw)
  To: Christian Lamparter; +Cc: linux-wireless, Sarah Sharp, Seth Forshee, USB list
In-Reply-To: <2119509.Av8Iiax5KF@blech>

Am 23.07.2013 20:26, schrieb Christian Lamparter:
> On Tuesday, July 23, 2013 06:59:46 AM Oleksij Rempel wrote:
>> Am 22.07.2013 23:23, schrieb Christian Lamparter:
>>> On Monday, July 22, 2013 10:47:41 PM Oleksij Rempel wrote:
>>>> Am 22.07.2013 21:54, schrieb Christian Lamparter:
>>>>> Hello!
>>>>>
>>>>> On Monday, July 22, 2013 05:21:54 PM Oleksij Rempel wrote:
>>>>>> i'm one of ath9k_htc devs. Currently i'm working on usb_suspend issue of
>>>>>> this adapters. Looks like ar9271 and ar7010 have FUSB200, and i
>>>>>> accidentally discovered that 9170 have it too. Are there any issue with
>>>>>> usb-suspend + xhci controllers by you? Did you some how specially
>>>>>> handled it?
>>>>>
>>>>> No, I haven't heard any complains about xhci + suspend. In fact,
>>>>> it's working fine with the NEC xhci I have. I also have a AR9271
>>>>> and AR7010, so if you want I could try if they survive a suspend
>>>>> +resume cycle when attached.
>>>>>
>>>>> But, I do have a bug-report from someone else who has/had? problems
>>>>> with carl9170 and xhci. If you want, you can get the details from:
>>>>> "carl9170 A-MPDU transmit problem":
>>>>> <http://comments.gmane.org/gmane.linux.kernel.wireless.general/104597>
>>>>>
>>>>> The likely cause is related to Intel's xhci silicon (Ivy Bridge is
>>>>> affected, but I don't know about Haswell):
>>>>> <http://permalink.gmane.org/gmane.linux.kernel.wireless.general/104602>
>>>>
>>>> Same situation is here - i have problem on Ivy Bridge.
>>> (Note: I don't have any Ivy Bridge system. Just Sandy Bridge
>>> and AMD's new A6-1450 Temash and both xhci work. So I can't
>>> do any proper comparisons like you.)
>>>
>>>> Steps to reproduce:
>>>> - plug adapter. Module and firmware will be loaded
>>>> - make sure usb autosupend is enabled. By default it is not! Use
>>>> powertop or directly sysfs to enable autosuspend for this device
>>>> - rmmod .... and wait some seconds until adapter is suspended and then
>>>> modprobe ath9k_htc
>>
>>>> first packet which is bigger as 64Byte will kill EP4 FIFO. Size register
>>>> will report wrong size.. bigger as FIFO can handle. And only first ~40
>>>> readet bytes will be actually OK.. all the rest of packet will be trashed.
>>>
>>> This is what happens with a WN721 (ar9271):
>>>
>>> [17619.597905] usbcore: deregistering interface driver ath9k_htc
>>> [17619.679549] usb 2-2: ath9k_htc: USB layer deinitialized
>>> [17619.679602] ath9k_htc: Driver unloaded
>>> <suspend>
>>>
>>> <resume>
>>> [17667.543024] usb 2-2: reset high-speed USB device number 3 using xhci_hcd <----
>>> [17667.572168] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa77600
>>> [17667.572174] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa77640
>>> [17667.572177] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa77680
>>> [17667.572180] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa776c0
>>> [17667.572183] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa77700
>>> [17667.572185] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88031aa77740
>>> [17667.573826] usb 2-2: ath9k_htc: Firmware htc_9271.fw requested
>>> [17667.573873] usbcore: registered new interface driver ath9k_htc
>>> [17668.038200] usb 2-2: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
>>> [17668.273249] ath9k_htc 2-2:1.0: ath9k_htc: HTC initialized with 33 credits
>>>
>>> The driver loads, but there's no "wlanX" interface, no phyX interface
>>> and the driver can't be unloaded due to "Error: Module ath9k_htc is in use".
>>
>> So, it is exactly this bug.
>> After firmware was loaded ath9k trying to set some registers. Since
>> command buffer is trashed it will write some nonsense to registers and
>> some times in wrong to wrong addresses. I have some patches to do crc
>> check of commands, to easy detect corrupted ones.
>>
>> You reproduced it on NEC xhci? Is it possible to reproduce it in
>> carl9170?
>
> Ok: That's dmesg of your scenario:
>
> [  809.995966] usbcore: deregistering interface driver carl9170
> <suspend>
>
> <resume>
> [  826.365596] usb 2-2: reset high-speed USB device number 2 using xhci_hcd
> [  826.431154] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88045af2b900
> [  826.431159] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88045af2b940
> [  826.431162] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88045af2b980
> [  826.431164] xhci_hcd 0000:19:00.0: xHCI xhci_drop_endpoint called with disabled ep ffff88045af2b9c0
> [  826.432257] usbcore: registered new interface driver carl9170
> [  826.433717] usb 2-2: driver   API: 1.9.8 2013-03-23 [1-1]
> ...
> [  826.816110] usb 2-2: Atheros AR9170 is registered as 'phy3'
>
> carl9170 is able to recover and the stick is working after autosuspend cycle.

Thank you for your tests. USB configuration and handlers look similar on 
this two firmwares. May be problem is not in FUSB200 and it is clock 
related issue so carl9170 do not need reset. - I don't know :(

Can you please test this branch:
https://github.com/olerem/open-ath9k-htc-firmware/commits/next
There is a workaround to reset adapter, right after this bug is 
detected. It is really dirty hack, but currently i do not know how to 
fix this bug on xhci or on ath9k-htc side.

-- 
Regards,
Oleksij

^ permalink raw reply

* [PATCH] ath10k: detect the number of spatial streams supported by hw
From: Michal Kazior @ 2013-07-24 10:36 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Michal Kazior

Until now ath10k assumed 3 spatial streams.
However some devices support only 2 spatial
streams.

This patch improves performance on devices that
don't support 3 spatial streams.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
 drivers/net/wireless/ath/ath10k/core.h |    1 +
 drivers/net/wireless/ath/ath10k/mac.c  |   19 +++++++++----------
 drivers/net/wireless/ath/ath10k/wmi.c  |   12 ++++++++++--
 3 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 9f21ecb..ff42bb7 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -285,6 +285,7 @@ struct ath10k {
 	u32 hw_max_tx_power;
 	u32 ht_cap_info;
 	u32 vht_cap_info;
+	u32 num_rf_chains;
 
 	struct targetdef *targetdef;
 	struct hostdef *hostdef;
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index d0a7761..330ba93 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3093,19 +3093,18 @@ static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar)
 {
 	struct ieee80211_sta_vht_cap vht_cap = {0};
 	u16 mcs_map;
+	int i;
 
 	vht_cap.vht_supported = 1;
 	vht_cap.cap = ar->vht_cap_info;
 
-	/* FIXME: check dynamically how many streams board supports */
-	mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
-		IEEE80211_VHT_MCS_SUPPORT_0_9 << 2 |
-		IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 |
-		IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
-		IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
-		IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
-		IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
-		IEEE80211_VHT_MCS_NOT_SUPPORTED << 14;
+	mcs_map = 0;
+	for (i = 0; i < 8; i++) {
+		if (i < ar->num_rf_chains)
+			mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i*2);
+		else
+			mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i*2);
+	}
 
 	vht_cap.vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
 	vht_cap.vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
@@ -3168,7 +3167,7 @@ static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar)
 	if (ar->vht_cap_info & WMI_VHT_CAP_MAX_MPDU_LEN_MASK)
 		ht_cap.cap |= IEEE80211_HT_CAP_MAX_AMSDU;
 
-	for (i = 0; i < WMI_MAX_SPATIAL_STREAM; i++)
+	for (i = 0; i < ar->num_rf_chains; i++)
 		ht_cap.mcs.rx_mask[i] = 0xFF;
 
 	ht_cap.mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 5e42460..1cbcb2e 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -868,6 +868,13 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
 		(__le32_to_cpu(ev->sw_version_1) & 0xffff0000) >> 16;
 	ar->fw_version_build = (__le32_to_cpu(ev->sw_version_1) & 0x0000ffff);
 	ar->phy_capability = __le32_to_cpu(ev->phy_capability);
+	ar->num_rf_chains = __le32_to_cpu(ev->num_rf_chains);
+
+	if (ar->num_rf_chains > WMI_MAX_SPATIAL_STREAM) {
+		ath10k_warn("hardware advertises support for more spatial streams than it should (%d > %d)\n",
+			    ar->num_rf_chains, WMI_MAX_SPATIAL_STREAM);
+		ar->num_rf_chains = WMI_MAX_SPATIAL_STREAM;
+	}
 
 	ar->ath_common.regulatory.current_rd =
 		__le32_to_cpu(ev->hal_reg_capabilities.eeprom_rd);
@@ -892,7 +899,7 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
 	}
 
 	ath10k_dbg(ATH10K_DBG_WMI,
-		   "wmi event service ready sw_ver 0x%08x sw_ver1 0x%08x abi_ver %u phy_cap 0x%08x ht_cap 0x%08x vht_cap 0x%08x vht_supp_msc 0x%08x sys_cap_info 0x%08x mem_reqs %u\n",
+		   "wmi event service ready sw_ver 0x%08x sw_ver1 0x%08x abi_ver %u phy_cap 0x%08x ht_cap 0x%08x vht_cap 0x%08x vht_supp_msc 0x%08x sys_cap_info 0x%08x mem_reqs %u num_rf_chains %u\n",
 		   __le32_to_cpu(ev->sw_version),
 		   __le32_to_cpu(ev->sw_version_1),
 		   __le32_to_cpu(ev->abi_version),
@@ -901,7 +908,8 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
 		   __le32_to_cpu(ev->vht_cap_info),
 		   __le32_to_cpu(ev->vht_supp_mcs),
 		   __le32_to_cpu(ev->sys_cap_info),
-		   __le32_to_cpu(ev->num_mem_reqs));
+		   __le32_to_cpu(ev->num_mem_reqs),
+		   __le32_to_cpu(ev->num_rf_chains));
 
 	complete(&ar->wmi.service_ready);
 }
-- 
1.7.9.5


^ permalink raw reply related

* Re: hung task while plugging in cfg80211
From: Stanislaw Gruszka @ 2013-07-24  9:59 UTC (permalink / raw)
  To: Jeff Layton
  Cc: linux-wireless, linville, netdev, Thomas Graf, Stephen Hemminger,
	rjones, Marcel Holtmann
In-Reply-To: <20130712074911.01b5945a@corrin.poochiereds.net>

On Fri, Jul 12, 2013 at 07:49:11AM -0400, Jeff Layton wrote:
> I updated the kernel on my rawhide KVM guest, and noticed that the
> ethernet interface wasn't coming up at all. While poking around, I saw
> this stack trace pop up:
> 
> Jul 12 07:29:25 rawhide kernel: [  241.156196] INFO: task modprobe:501 blocked for more than 120 seconds.
> Jul 12 07:29:25 rawhide kernel: [  241.157222] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> Jul 12 07:29:25 rawhide kernel: [  241.158379] modprobe        D ffff880118c526e0  4584   501    500 0x00000080
> Jul 12 07:29:25 rawhide kernel: [  241.159458]  ffff8800d10c3ba8 0000000000000046 00000000001d5300 ffff8800d10c3fd8
> Jul 12 07:29:25 rawhide kernel: [  241.160644]  ffff8800d10c3fd8 00000000001d5300 ffff8800d2ae4dc0 ffff8800d2ae4dc0
> Jul 12 07:29:25 rawhide kernel: [  241.161875]  ffffffff81d0bfa0 ffffffff81d0bfa8 ffffffff00000000 ffffffff81d0bff0
> Jul 12 07:29:25 rawhide kernel: [  241.163096] Call Trace:
> Jul 12 07:29:25 rawhide kernel: [  241.163460]  [<ffffffff817377e9>] schedule+0x29/0x70
> Jul 12 07:29:25 rawhide kernel: [  241.164235]  [<ffffffff817392ad>] rwsem_down_write_failed+0xed/0x1a0
> Jul 12 07:29:25 rawhide kernel: [  241.165489]  [<ffffffff810bb600>] ? update_cpu_load_active+0xb0/0xb0
> Jul 12 07:29:25 rawhide kernel: [  241.166267]  [<ffffffff8137d503>] call_rwsem_down_write_failed+0x13/0x20
> Jul 12 07:29:25 rawhide kernel: [  241.166760]  [<ffffffff81736aad>] ? down_write+0x9d/0xb2
> Jul 12 07:29:25 rawhide kernel: [  241.167189]  [<ffffffff8162d975>] ? genl_lock_all+0x15/0x30
> Jul 12 07:29:25 rawhide kernel: [  241.167603]  [<ffffffff8162d975>] genl_lock_all+0x15/0x30

I reproduced that on qemu-kvm with rawhide LiveCD. Below more
information gathered using sysrq:

(qemu) [ 2458.110724] SysRq : Show Locks Held
[ 2458.111347] 
[ 2458.111347] Showing all locks held in the system:
[ 2458.111347] 1 lock held by NetworkManager/582:
[ 2458.111347]  #0:  (cb_lock){++++++}, at: [<ffffffff8162bc79>] genl_rcv+0x19/0x40
[ 2458.111347] 1 lock held by modprobe/603:
[ 2458.111347]  #0:  (cb_lock){++++++}, at: [<ffffffff8162baa5>] genl_lock_all+0x15/0x30
[ 2458.111347] 
[ 2458.111347] =============================================
[ 2458.111347] 

(qemu) sendkey alt-sysrq-w
(qemu) [ 2461.579457] SysRq : Show Blocked State
[ 2461.580103]   task                        PC stack   pid father
[ 2461.580103] NetworkManager  D ffff880034b84500  4040   582      1 0x00000080
[ 2461.580103]  ffff8800197ff720 0000000000000046 00000000001d5340 ffff8800197fffd8
[ 2461.580103]  ffff8800197fffd8 00000000001d5340 ffff880019631700 7fffffffffffffff
[ 2461.580103]  ffff8800197ff880 ffff8800197ff878 ffff880019631700 ffff880019631700
[ 2461.580103] Call Trace:
[ 2461.580103]  [<ffffffff817355f9>] schedule+0x29/0x70
[ 2461.580103]  [<ffffffff81731ad1>] schedule_timeout+0x1c1/0x360
[ 2461.580103]  [<ffffffff810e69eb>] ? mark_held_locks+0xbb/0x140
[ 2461.580103]  [<ffffffff817377ac>] ? _raw_spin_unlock_irq+0x2c/0x50
[ 2461.580103]  [<ffffffff810e6b6d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
[ 2461.580103]  [<ffffffff81736398>] wait_for_completion_killable+0xe8/0x170
[ 2461.580103]  [<ffffffff810b7fa0>] ? wake_up_state+0x20/0x20
[ 2461.580103]  [<ffffffff81095825>] call_usermodehelper_exec+0x1a5/0x210
[ 2461.580103]  [<ffffffff817362ed>] ? wait_for_completion_killable+0x3d/0x170
[ 2461.580103]  [<ffffffff81095cc3>] __request_module+0x1b3/0x370
[ 2461.580103]  [<ffffffff810e6b6d>] ? trace_hardirqs_on_caller+0xfd/0x1c0
[ 2461.580103]  [<ffffffff8162c5c9>] ctrl_getfamily+0x159/0x190
[ 2461.580103]  [<ffffffff8162d8a4>] genl_family_rcv_msg+0x1f4/0x2e0
[ 2461.580103]  [<ffffffff8162d990>] ? genl_family_rcv_msg+0x2e0/0x2e0
[ 2461.580103]  [<ffffffff8162da1e>] genl_rcv_msg+0x8e/0xd0
[ 2461.580103]  [<ffffffff8162b729>] netlink_rcv_skb+0xa9/0xc0
[ 2461.580103]  [<ffffffff8162bc88>] genl_rcv+0x28/0x40
[ 2461.580103]  [<ffffffff8162ad6d>] netlink_unicast+0xdd/0x190
[ 2461.580103]  [<ffffffff8162b149>] netlink_sendmsg+0x329/0x750
[ 2461.580103]  [<ffffffff815db849>] sock_sendmsg+0x99/0xd0
[ 2461.580103]  [<ffffffff810bb58f>] ? local_clock+0x5f/0x70
[ 2461.580103]  [<ffffffff810e96e8>] ? lock_release_non_nested+0x308/0x350
[ 2461.580103]  [<ffffffff815dbc6e>] ___sys_sendmsg+0x39e/0x3b0
[ 2461.580103]  [<ffffffff810565af>] ? kvm_clock_read+0x2f/0x50
[ 2461.580103]  [<ffffffff810218b9>] ? sched_clock+0x9/0x10
[ 2461.580103]  [<ffffffff810bb2bd>] ? sched_clock_local+0x1d/0x80
[ 2461.580103]  [<ffffffff810bb448>] ? sched_clock_cpu+0xa8/0x100
[ 2461.580103]  [<ffffffff810e33ad>] ? trace_hardirqs_off+0xd/0x10
[ 2461.580103]  [<ffffffff810bb58f>] ? local_clock+0x5f/0x70
[ 2461.580103]  [<ffffffff810e3f7f>] ? lock_release_holdtime.part.28+0xf/0x1a0
[ 2461.580103]  [<ffffffff8120fec9>] ? fget_light+0xf9/0x510
[ 2461.580103]  [<ffffffff8120fe0c>] ? fget_light+0x3c/0x510
[ 2461.580103]  [<ffffffff815dd1d2>] __sys_sendmsg+0x42/0x80
[ 2461.580103]  [<ffffffff815dd222>] SyS_sendmsg+0x12/0x20
[ 2461.580103]  [<ffffffff81741ad9>] system_call_fastpath+0x16/0x1b
[ 2461.580103] modprobe        D ffff88000f2c8000  4632   603    602 0x00000080
[ 2461.580103]  ffff88000f04fba8 0000000000000046 00000000001d5340 ffff88000f04ffd8
[ 2461.580103]  ffff88000f04ffd8 00000000001d5340 ffff8800377d4500 ffff8800377d4500
[ 2461.580103]  ffffffff81d0b260 ffffffff81d0b268 ffffffff00000000 ffffffff81d0b2b0
[ 2461.580103] Call Trace:
[ 2461.580103]  [<ffffffff817355f9>] schedule+0x29/0x70
[ 2461.580103]  [<ffffffff81736d4d>] rwsem_down_write_failed+0xed/0x1a0
[ 2461.580103]  [<ffffffff810bb200>] ? update_cpu_load_active+0x10/0xb0
[ 2461.580103]  [<ffffffff8137b473>] call_rwsem_down_write_failed+0x13/0x20
[ 2461.580103]  [<ffffffff8173492d>] ? down_write+0x9d/0xb2
[ 2461.580103]  [<ffffffff8162baa5>] ? genl_lock_all+0x15/0x30
[ 2461.580103]  [<ffffffff8162baa5>] genl_lock_all+0x15/0x30
[ 2461.580103]  [<ffffffff8162cbb3>] genl_register_family+0x53/0x1f0
[ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
[ 2461.580103]  [<ffffffff8162d650>] genl_register_family_with_ops+0x20/0x80
[ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
[ 2461.580103]  [<ffffffffa017fe84>] nl80211_init+0x24/0xf0 [cfg80211]
[ 2461.580103]  [<ffffffffa01dc000>] ? 0xffffffffa01dbfff
[ 2461.580103]  [<ffffffffa01dc043>] cfg80211_init+0x43/0xdb [cfg80211]
[ 2461.580103]  [<ffffffff810020fa>] do_one_initcall+0xfa/0x1b0
[ 2461.580103]  [<ffffffff8105cb93>] ? set_memory_nx+0x43/0x50
[ 2461.580103]  [<ffffffff810f75af>] load_module+0x1c6f/0x27f0
[ 2461.580103]  [<ffffffff810f2c90>] ? store_uevent+0x40/0x40
[ 2461.580103]  [<ffffffff810f82c6>] SyS_finit_module+0x86/0xb0
[ 2461.580103]  [<ffffffff81741ad9>] system_call_fastpath+0x16/0x1b
[ 2461.580103] Sched Debug Version: v0.10, 3.11.0-0.rc1.git4.1.fc20.x86_64 #1

So call user space to load cfg80211 module (alias
net-pf-16-proto-16-family-nl80211) from ctrl_getfamily() with read taken
cb_lock semaphore. That deadlock in modprobe process in
genl_register_family() when try to down_write cb_lock.

This is consequence of commit:

commit fb4e156886ce6e8309e912d8b370d192330d19d3
Author: Marcel Holtmann <marcel@holtmann.org>
Date:   Sun Apr 28 16:22:06 2013 -0700

    nl80211: Add generic netlink module alias for cfg80211/nl80211

I prepared a possible fix for that (patch below), but I'm not sure if it
do right thing, it can cause other oddity, please test (with
CONFIG_LOCKDEP compiled). I think I would prefer rather remove
autoloading genetlink modules from kernel or use just one lock
in instead of two cb_lock & genl_mutex .

Stanislaw

diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index 2fd6dbe..1076fe1 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -877,8 +877,10 @@ static int ctrl_getfamily(struct sk_buff *skb, struct genl_info *info)
 #ifdef CONFIG_MODULES
 		if (res == NULL) {
 			genl_unlock();
+			up_read(&cb_lock);
 			request_module("net-pf-%d-proto-%d-family-%s",
 				       PF_NETLINK, NETLINK_GENERIC, name);
+			down_read(&cb_lock);
 			genl_lock();
 			res = genl_family_find_byname(name);
 		}

^ permalink raw reply related

* Re: [PATCH] mac80211: use oneshot blink API for LED triggers
From: Fabio Baltieri @ 2013-07-24  8:53 UTC (permalink / raw)
  To: Johannes Berg; +Cc: John W. Linville, linux-wireless, netdev, linux-kernel
In-Reply-To: <1374653665.8180.0.camel@jlt4.sipsolutions.net>

On Wed, Jul 24, 2013 at 10:14:25AM +0200, Johannes Berg wrote:
> On Wed, 2013-07-24 at 02:09 +0200, Fabio Baltieri wrote:
> > Changes mac80211 LED trigger code to use the generic
> > led_trigger_blink_oneshot() API for transmit and receive activity
> > indication.
> > 
> > This gives a better feedback to the user, as with the new API each
> > activity event results in a visible blink, while a constant traffic
> > results in a continuous blink at constant rate.
> 
> This seems a little pointless since our throughput-based trigger can do
> very similar (but somewhat better) behaviour? Maybe that should just be
> the default instead, with some sane default setup values?

Ok but that requires driver specific support and it's only implemented
on a subset of currently available drivers.

This at least makes the basic tx/rx indication capability a better.

> (Regardless of that, you also have indentation problems in your patch)

Ok, I guess you are referring to the this:

+       led_trigger_blink_oneshot(local->tx_led,                                
+                       &led_delay, &led_delay, 0);                             

So, are you definitely rejecting this patch or should I fix indentation
and send a v2?

Thanks,
Fabio

-- 
Fabio Baltieri

^ permalink raw reply

* [PATCH 5/5] ath9k: Add PCI IDs that support WLAN/BT RX diversity
From: Sujith Manoharan @ 2013-07-24  8:21 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1374654090-24408-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/pci.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index c585c9b..ad48702 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -40,29 +40,29 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 			 0x0032,
 			 PCI_VENDOR_ID_AZWAVE,
 			 0x2086),
-	  .driver_data = ATH9K_PCI_CUS198 },
+	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
 			 0x0032,
 			 PCI_VENDOR_ID_AZWAVE,
 			 0x1237),
-	  .driver_data = ATH9K_PCI_CUS198 },
+	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
 			 0x0032,
 			 PCI_VENDOR_ID_AZWAVE,
 			 0x2126),
-	  .driver_data = ATH9K_PCI_CUS198 },
+	  .driver_data = ATH9K_PCI_CUS198 | ATH9K_PCI_BT_ANT_DIV },
 
 	/* PCI-E CUS230 */
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
 			 0x0032,
 			 PCI_VENDOR_ID_AZWAVE,
 			 0x2152),
-	  .driver_data = ATH9K_PCI_CUS230 },
+	  .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV },
 	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
 			 0x0032,
 			 PCI_VENDOR_ID_FOXCONN,
 			 0xE075),
-	  .driver_data = ATH9K_PCI_CUS230 },
+	  .driver_data = ATH9K_PCI_CUS230 | ATH9K_PCI_BT_ANT_DIV },
 
 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
@@ -138,7 +138,11 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 
 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
 	{ PCI_VDEVICE(ATHEROS, 0x0037) }, /* PCI-E  AR1111/AR9485 */
-	{ PCI_VDEVICE(ATHEROS, 0x0036) }, /* PCI-E  AR9565 */
+
+	/* PCI-E AR9565 */
+	{ PCI_VDEVICE(ATHEROS, 0x0036),
+	  .driver_data = ATH9K_PCI_BT_ANT_DIV },
+
 	{ 0 }
 };
 
-- 
1.8.3.3


^ permalink raw reply related

* [PATCH 2/5] ath9k: Print LNA combining mode during init
From: Sujith Manoharan @ 2013-07-24  8:21 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless
In-Reply-To: <1374654090-24408-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/hw.c | 24 +++++++++---------------
 1 file changed, 9 insertions(+), 15 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index d55d97c..8bd602c 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2559,34 +2559,28 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
 	if (AR_SREV_9287_11_OR_LATER(ah) || AR_SREV_9271(ah))
 		pCap->hw_caps |= ATH9K_HW_CAP_SGI_20;
 
-	if (AR_SREV_9285(ah))
+	if (AR_SREV_9285(ah)) {
 		if (ah->eep_ops->get_eeprom(ah, EEP_MODAL_VER) >= 3) {
 			ant_div_ctl1 =
 				ah->eep_ops->get_eeprom(ah, EEP_ANT_DIV_CTL1);
-			if ((ant_div_ctl1 & 0x1) && ((ant_div_ctl1 >> 3) & 0x1))
+			if ((ant_div_ctl1 & 0x1) && ((ant_div_ctl1 >> 3) & 0x1)) {
 				pCap->hw_caps |= ATH9K_HW_CAP_ANT_DIV_COMB;
+				ath_info(common, "Enable LNA combining\n");
+			}
 		}
+	}
+
 	if (AR_SREV_9300_20_OR_LATER(ah)) {
 		if (ah->eep_ops->get_eeprom(ah, EEP_CHAIN_MASK_REDUCE))
 			pCap->hw_caps |= ATH9K_HW_CAP_APM;
 	}
 
-
 	if (AR_SREV_9330(ah) || AR_SREV_9485(ah) || AR_SREV_9565(ah)) {
 		ant_div_ctl1 = ah->eep_ops->get_eeprom(ah, EEP_ANT_DIV_CTL1);
-		/*
-		 * enable the diversity-combining algorithm only when
-		 * both enable_lna_div and enable_fast_div are set
-		 *		Table for Diversity
-		 * ant_div_alt_lnaconf		bit 0-1
-		 * ant_div_main_lnaconf		bit 2-3
-		 * ant_div_alt_gaintb		bit 4
-		 * ant_div_main_gaintb		bit 5
-		 * enable_ant_div_lnadiv	bit 6
-		 * enable_ant_fast_div		bit 7
-		 */
-		if ((ant_div_ctl1 >> 0x6) == 0x3)
+		if ((ant_div_ctl1 >> 0x6) == 0x3) {
 			pCap->hw_caps |= ATH9K_HW_CAP_ANT_DIV_COMB;
+			ath_info(common, "Enable LNA combining\n");
+		}
 	}
 
 	if (ath9k_hw_dfs_tested(ah))
-- 
1.8.3.3


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox