Bug 224886 - Need support for Intel 3168 wireless + Bluetooth
Summary: Need support for Intel 3168 wireless + Bluetooth
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: wireless (show other bugs)
Version: 11.1-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Eitan Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-04 06:46 UTC by Bart Smaalders
Modified: 2018-05-06 04:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bart Smaalders 2018-01-04 06:46:33 UTC
This component appears in some laptops and X399 Taichi Threadripper motherboard.  Would be nice to have support.  From dmesg:

ubt0: <vendor 0x8087 product 0x0aa7, class 224/1, rev 2.00/0.01, addr 2> on usbus0
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2018-03-27 05:13:58 UTC
I have one of these devices. When left unchecked it generated interrupts at a rate of 1998/s. Powering it down brought this to zero.

At a minimum we should do something to configure the device such that it no longer generates bogus interrupts.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2018-03-28 06:08:08 UTC
Here is what I learned so far:
1) There are four options for firmware for the Intel 3168
a) -22 old
b) -22 new (these are the same version number, but different contents)
c) -27
d) -29

Each of these have different problems. 
a) Gets the furthest, but is the oldest, and thus makes it hard to compare to other implementations (notably, the BSD licensed linux driver).

2) The current driver thinks that the "hardware switch" is disabled, even though there does not appear to be a hardware switch. Disabling the check for this bit allows the firmware to get further and even see a few networks, but the firmware eventually panics

3) We're setting the "rfkill" bit explicitly, expecting the firmware to clear it. It isn't

4) The Linux driver had some code changes in addition to just adding the PCI device IDs & firmware. It seems the 3168 differs from both the 7000 series and the 8000 series.

5) The Linux driver supports several more devices than we do, and its BSD licensed. It has a different layout and different constant names, making it quite difficult to compare the logic.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-03-28 06:09:43 UTC
6) Some variant of https://reviews.freebsd.org/D14865 should be comitted, likely without the manpage changes. This at least makes it farther than before giving someone (me?) a base to work with to make more progress.
Comment 4 commit-hook freebsd_committer freebsd_triage 2018-03-28 07:59:28 UTC
A commit references this bug:

Author: eadler
Date: Wed Mar 28 07:59:16 UTC 2018
New revision: 331665
URL: https://svnweb.freebsd.org/changeset/base/331665

Log:
  [iwm] Add support for iwm 3168 cards

  ```
  iwm0@pci0:5:0:0:        class=0x028000 card=0x21108086 chip=0x24fb8086
  rev=0x10 hdr=0x00
  vendor     = 'Intel Corporation'
  device     = 'Dual Band Wireless-AC 3168NGW [Stone Peak]'
  class      = network
  [94829] iwm0: <Intel(R) Dual Band Wireless AC 3168> mem
  0xef700000-0xef701fff at device 0.0 on pci5
  [94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address
  28:c6:3f:15:43:c5
  ```

  MFC After:	2 weeks
  Reviewed by:	ivadasz (over IRC)
  PR:		224886
  Differential Revision:	https://reviews.freebsd.org/D14865

Changes:
  head/share/man/man4/iwm.4
  head/share/man/man4/iwmfw.4
  head/sys/conf/files
  head/sys/contrib/dev/iwm/iwm-3168-22.fw.uu
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_7000.c
  head/sys/dev/iwm/if_iwm_config.h
  head/sys/modules/iwmfw/Makefile
  head/sys/modules/iwmfw/iwm3168fw/
  head/sys/modules/iwmfw/iwm3168fw/Makefile