On Wed, Aug 7, 2013 at 11:23 PM, Chris Cappuccio <[email protected]> wrote: > Sylvestre Gallon [[email protected]] wrote: >> Hi tech@ >> >> Here is a diff to allow the iwn driver to work with the intel Wifi Link >> 130. It works for me(tm) without problems and solve this bug report : >> >> Index: sys/dev/pci/if_iwn.c >> =================================================================== >> RCS file: /cvs/src/sys/dev/pci/if_iwn.c,v >> retrieving revision 1.121 >> diff -u -p -u -p -r1.121 if_iwn.c >> --- sys/dev/pci/if_iwn.c 7 Aug 2013 01:06:35 -0000 1.121 >> +++ sys/dev/pci/if_iwn.c 7 Aug 2013 09:25:43 -0000 >> @@ -90,6 +90,8 @@ static const struct pci_matchid iwn_devi >> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_1030_2 }, >> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_100_1 }, >> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_100_2 }, >> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_130_1 }, >> + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_130_2 }, >> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_6235_1 }, >> { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_WL_6235_2 }, >> }; > > This part makes sense > >> @@ -639,12 +641,8 @@ iwn5000_attach(struct iwn_softc *sc, pci >> break; >> case IWN_HW_REV_TYPE_6005: >> sc->limits = &iwn6000_sensitivity_limits; >> - if (pid == PCI_PRODUCT_INTEL_WL_1030_1 || >> - pid == PCI_PRODUCT_INTEL_WL_1030_2 || >> - pid == PCI_PRODUCT_INTEL_WL_6030_1 || >> - pid == PCI_PRODUCT_INTEL_WL_6030_2 || >> - pid == PCI_PRODUCT_INTEL_WL_6235_1 || >> - pid == PCI_PRODUCT_INTEL_WL_6235_2) { >> + if (pid != PCI_PRODUCT_INTEL_WL_6005_1 && >> + pid != PCI_PRODUCT_INTEL_WL_6005_2) { >> sc->fwname = "iwn-6030"; >> sc->sc_flags |= IWN_FLAG_ADV_BT_COEX; >> } else > > This does not. You are adjusting PCI_PRODUCT_INTEL_crap that has > nothing to do with WL_130 which is the only hardware you are testing > with, no?
I have just take example on the freebsd driver : http://svnweb.freebsd.org/base/head/sys/dev/iwn/if_iwn.c?revision=253937&view=markup and also check on linux : http://lxr.linux.no/#linux+v3.10.5/drivers/net/wireless/iwlwifi/iwl-6000.c#L169 http://lxr.linux.no/#linux+v3.10.5/drivers/net/wireless/iwlwifi/pcie/drv.c#L151 If I understand it well only the PCI_PRODUCT_INTEL_WL_6005_{1|2} products of IWN_HW_REV_TYPE_6005 hw revision needs the "iwn-6005" firmware. The others one (like the WL_130) needs the "iwn-6030" firmware. I changed the condition because I was thinking it was more elegant than adding : pid == PCI_PRODUCT_INTEL_WL_130_1 || pid == PCI_PRODUCT_INTEL_WL_130_2 || Cheers, -- Sylvestre Gallon
