Bug 181132 - [iwn] stream calculation is wrong for the Intel 4965
Summary: [iwn] stream calculation is wrong for the Intel 4965
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-wireless (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-08 06:50 UTC by Adrian Chadd
Modified: 2019-01-20 03:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Chadd freebsd_committer freebsd_triage 2013-08-08 06:50:00 UTC
When the 4965 probes (and bootverbose is set), it sees 2 transmit radios and 3 receive radios. So it assumes that the hardware is a 2T3R device. Which is actually incorrect - even though it has three receive radios, it's still a two-stream receive device.

Fix: 

Until Intel 3x3 devices are supported, we should limit the TX/RX stream counts to 2.
How-To-Repeat: * Bootverbose!
* Probe/attach an Intel 4965
* See what's going on!
Comment 1 Adrian Chadd freebsd_committer freebsd_triage 2013-08-08 06:51:05 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-wireless

Changing to owner
Comment 2 dfilter service freebsd_committer freebsd_triage 2013-08-08 06:52:54 UTC
Author: adrian
Date: Thu Aug  8 05:52:41 2013
New Revision: 254085
URL: http://svnweb.freebsd.org/changeset/base/254085

Log:
  Cap the number of streams supported to two for now.
  
  I haven't yet reviewed the Intel driver(s) in more depth to see if
  there are 1x1 NICs that report they support 2 transmit/receive chains..
  if so then we'll have to update this.
  
  Tested:
  
  * Intel 4965, which is a 2x2 device with 3 RX and 2 TX chains.
  
  PR:		kern/181132

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Thu Aug  8 05:41:55 2013	(r254084)
+++ head/sys/dev/iwn/if_iwn.c	Thu Aug  8 05:52:41 2013	(r254085)
@@ -638,6 +638,20 @@ iwn_attach(device_t dev)
 	if (sc->sc_flags & IWN_FLAG_HAS_11N) {
 		ic->ic_rxstream = sc->nrxchains;
 		ic->ic_txstream = sc->ntxchains;
+
+		/*
+		 * The NICs we currently support cap out at 2x2 support
+		 * separate from the chains being used.
+		 *
+		 * This is a total hack to work around that until some
+		 * per-device method is implemented to return the
+		 * actual stream support.
+		 */
+		if (ic->ic_rxstream > 2)
+			ic->ic_rxstream = 2;
+		if (ic->ic_txstream > 2)
+			ic->ic_txstream = 2;
+
 		ic->ic_htcaps =
 			  IEEE80211_HTCAP_SMPS_OFF	/* SMPS mode disabled */
 			| IEEE80211_HTCAP_SHORTGI20	/* short GI in 20MHz */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:46:13 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.
Comment 4 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-20 03:54:50 UTC
There was a commit referencing this bug, but it's still not closed and has been inactive for some time. Closing as fixed. Please re-open it if the issue hasn't been completely resolved.