The in-tree mwifiex_pcie driver works out of the box (4.12).
[ 6.443748] mwifiex_pcie: try set_consistent_dma_mask(32)
[ 6.443832] mwifiex_pcie: PCI memory map Virt0: ffff000009700000 PCI memory map Virt2: ffff000009900000
[ 6.443984] mwifiex: rx work enabled, cpus 2
...
[ 7.864608] mwifiex_pcie 0000:00:00.0: info: FW download over, size 803884 bytes
[ 8.618814] mwifiex_pcie 0000:00:00.0: WLAN FW is active
[ 8.689914] mwifiex_pcie 0000:00:00.0: CMD_RESP: cmd 0x242 error, result=0x2
[ 8.689932] mwifiex_pcie 0000:00:00.0: mwifiex_process_cmdresp: cmd 0x242 failed during initialization
[ 8.720109] mwifiex_pcie 0000:00:00.0: info: MWIFIEX VERSION: mwifiex 1.0 (15.68.7.p53)
[ 8.720120] mwifiex_pcie 0000:00:00.0: driver_version = mwifiex 1.0 (15.68.7.p53)