Skip to content

Commit

Permalink
[iwm] Add support for iwm 3168 cards
Browse files Browse the repository at this point in the history
```
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
  • Loading branch information
grimreaper committed Mar 28, 2018
1 parent fcb4b01 commit 5237c88
Show file tree
Hide file tree
Showing 9 changed files with 22,887 additions and 1 deletion.
3 changes: 3 additions & 0 deletions share/man/man4/iwm.4
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ You also need to select a firmware for your device.
Choose one from:
.Bd -ragged -offset indent
.Cd "device iwm3160fw"
.Cd "device iwm3168fw"
.Cd "device iwm7260fw"
.Cd "device iwm7265fw"
.Cd "device iwm8000Cfw"
Expand All @@ -65,6 +66,7 @@ module at boot time, place the following lines in
.Bd -literal -offset indent
if_iwm_load="YES"
iwm3160fw_load="YES"
iwm3168fw_load="YES"
iwm7260fw_load="YES"
iwm7265fw_load="YES"
iwm8000Cfw_load="YES"
Expand All @@ -78,6 +80,7 @@ driver provides support for:
.Bl -tag -width Ds -offset indent -compact
.It Intel Dual Band Wireless AC 3160
.It Intel Dual Band Wireless AC 3165
.It Intel Dual Band Wireless AC 3168
.It Intel Dual Band Wireless AC 7260
.It Intel Dual Band Wireless AC 7265
.It Intel Dual Band Wireless AC 8260
Expand Down
4 changes: 3 additions & 1 deletion share/man/man4/iwmfw.4
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ If you want to pick only the firmware image for your network adapter choose one
of the following:
.Bd -ragged -offset indent
.Cd "device iwm3160fw"
.Cd "device iwm3168fw"
.Cd "device iwm7260fw"
.Cd "device iwm7265fw"
.Cd "device iwm8000Cfw"
Expand All @@ -54,6 +55,7 @@ module at boot time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
iwm3160fw_load="YES"
iwm3168fw_load="YES"
iwm7260fw_load="YES"
iwm7265fw_load="YES"
iwm7265Dfw_load="YES"
Expand All @@ -62,7 +64,7 @@ iwm8265fw_load="YES"
.Ed
.Sh DESCRIPTION
This module provides access to firmware sets for the
Intel Dual Band Wireless WiFi 3160, 3165, 7260, 7265, 8000, and 8260 series of
Intel Dual Band Wireless WiFi 3160, 3165, 3168, 7260, 7265, 8000, and 8260 series of
IEEE 802.11n/11ac adapters.
It may be
statically linked into the kernel, or loaded as a module.
Expand Down
14 changes: 14 additions & 0 deletions sys/conf/files
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,20 @@ iwm3160.fw optional iwm3160fw | iwmfw \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "iwm3160.fw"
iwm3168fw.c optional iwm3168fw | iwmfw \
compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw -miwm3168fw -c${.TARGET}" \
no-implicit-rule before-depend local \
clean "iwm3168fw.c"
iwm3168fw.fwo optional iwm3168fw | iwmfw \
dependency "iwm3168.fw" \
compile-with "${NORMAL_FWO}" \
no-implicit-rule \
clean "iwm3168fw.fwo"
iwm3168.fw optional iwm3168fw | iwmfw \
dependency "$S/contrib/dev/iwm/iwm-3168-22.fw.uu" \
compile-with "${NORMAL_FW}" \
no-obj no-implicit-rule \
clean "iwm3168.fw"
iwm7260fw.c optional iwm7260fw | iwmfw \
compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \
no-implicit-rule before-depend local \
Expand Down
22,849 changes: 22,849 additions & 0 deletions sys/contrib/dev/iwm/iwm-3168-22.fw.uu

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions sys/dev/iwm/if_iwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5684,6 +5684,7 @@ iwm_intr(void *arg)
#define PCI_PRODUCT_INTEL_WL_3160_2 0x08b4
#define PCI_PRODUCT_INTEL_WL_3165_1 0x3165
#define PCI_PRODUCT_INTEL_WL_3165_2 0x3166
#define PCI_PRODUCT_INTEL_WL_3168_1 0x24fb
#define PCI_PRODUCT_INTEL_WL_7260_1 0x08b1
#define PCI_PRODUCT_INTEL_WL_7260_2 0x08b2
#define PCI_PRODUCT_INTEL_WL_7265_1 0x095a
Expand All @@ -5700,6 +5701,7 @@ static const struct iwm_devices {
{ PCI_PRODUCT_INTEL_WL_3160_2, &iwm3160_cfg },
{ PCI_PRODUCT_INTEL_WL_3165_1, &iwm3165_cfg },
{ PCI_PRODUCT_INTEL_WL_3165_2, &iwm3165_cfg },
{ PCI_PRODUCT_INTEL_WL_3168_1, &iwm3168_cfg },
{ PCI_PRODUCT_INTEL_WL_7260_1, &iwm7260_cfg },
{ PCI_PRODUCT_INTEL_WL_7260_2, &iwm7260_cfg },
{ PCI_PRODUCT_INTEL_WL_7265_1, &iwm7265_cfg },
Expand Down
8 changes: 8 additions & 0 deletions sys/dev/iwm/if_iwm_7000.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ __FBSDID("$FreeBSD$");

#define IWM7260_FW "iwm7260fw"
#define IWM3160_FW "iwm3160fw"
#define IWM3168_FW "iwm3168fw"
#define IWM7265_FW "iwm7265fw"
#define IWM7265D_FW "iwm7265Dfw"

Expand Down Expand Up @@ -113,6 +114,13 @@ const struct iwm_cfg iwm3165_cfg = {
.host_interrupt_operation_mode = 0,
};

const struct iwm_cfg iwm3168_cfg = {
.name = "Intel(R) Dual Band Wireless AC 3168",
.fw_name = IWM3168_FW,
IWM_DEVICE_7000_COMMON,
.host_interrupt_operation_mode = 0,
};

const struct iwm_cfg iwm7265_cfg = {
.name = "Intel(R) Dual Band Wireless AC 7265",
.fw_name = IWM7265_FW,
Expand Down
1 change: 1 addition & 0 deletions sys/dev/iwm/if_iwm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ struct iwm_cfg {
extern const struct iwm_cfg iwm7260_cfg;
extern const struct iwm_cfg iwm3160_cfg;
extern const struct iwm_cfg iwm3165_cfg;
extern const struct iwm_cfg iwm3168_cfg;
extern const struct iwm_cfg iwm7265_cfg;
extern const struct iwm_cfg iwm7265d_cfg;
extern const struct iwm_cfg iwm8260_cfg;
Expand Down
1 change: 1 addition & 0 deletions sys/modules/iwmfw/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# $FreeBSD$

SUBDIR= iwm3160fw \
iwm3168fw \
iwm7260fw \
iwm7265fw \
iwm7265Dfw \
Expand Down
6 changes: 6 additions & 0 deletions sys/modules/iwmfw/iwm3168fw/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# $FreeBSD$

KMOD= iwm3168fw
IMG= iwm-3168-22

.include <bsd.kmod.mk>

1 comment on commit 5237c88

@kezkankrayon
Copy link

@kezkankrayon kezkankrayon commented on 5237c88 Sep 8, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if more work is required for iwm3168fw?

I'm having trouble with inconsistent behaviour (See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230750).

Please sign in to comment.