On Sun, Mar 22, 2015 at 06:27:19PM +0100, Mattieu Baptiste wrote:
> On Sun, Mar 22, 2015 at 2:06 PM, Jonathan Gray <[email protected]> wrote:
> > On Sun, Mar 22, 2015 at 06:49:33AM -0400, Ted Unangst wrote:
> >> Jonathan Gray wrote:
> >> > On Sun, Mar 22, 2015 at 09:16:08AM +0100, Stefan Sperling wrote:
> >> > >
> >> > > If the firmare image is not present at boot, no interface is created.
> >> > > After installing the firmware with fw_update (which succeeds because
> >> > > it looks for "iwm" in dmesg not ifconfig) there is no way to recover
> >> > > the interface without a reboot because 'ifconfig iwm0' doesn't work.
> >>
> >> > If the mac address and the supported 802.11 modes depend on
> >> > having the firmware loaded, is it really worth adding a
> >> > interface that allows invalid parameters to be set?
> >>
> >> Maybe? See above. If I don't have firmware when I boot, but install
> >> firmware
> >> later, the interface should still be useable. Putting the interface into a
> >> "must reboot" state should be considered a bug.
> >>
> >
> > I'd be surprised if the 802.11 reattach doesn't cause problems...
> >
> > Anyway here is the minimal version
>
> Hi,
> Unfortunately, neither of the two patchs works for me.
> Errors are the same.
> Is there something I can do to help debugging this?
Updated diff that makes 11a scanning conditional.
diff --git sys/dev/pci/if_iwm.c sys/dev/pci/if_iwm.c
index 6072e6a..4815e06 100644
--- sys/dev/pci/if_iwm.c
+++ sys/dev/pci/if_iwm.c
@@ -5470,9 +5470,10 @@ iwm_endscan_cb(void *arg)
int done;
DPRINTF(("scan ended\n"));
- if (sc->sc_scanband == IEEE80211_CHAN_2GHZ) {
+ if (sc->sc_scanband == IEEE80211_CHAN_2GHZ &&
+ sc->sc_nvm.sku_cap_band_52GHz_enable) {
int error;
done = 0;
if ((error = iwm_mvm_scan_request(sc,
IEEE80211_CHAN_5GHZ, ic->ic_des_esslen != 0,
@@ -6409,8 +6410,13 @@ iwm_preinit(struct iwm_softc *sc)
IWM_UCODE_MINOR(sc->sc_fwver),
IWM_UCODE_API(sc->sc_fwver),
ether_sprintf(sc->sc_nvm.hw_addr));
+ /* not all hardware can do 5GHz band */
+ if (!sc->sc_nvm.sku_cap_band_52GHz_enable)
+ memset(&ic->ic_sup_rates[IEEE80211_MODE_11A], 0,
+ sizeof(ic->ic_sup_rates[IEEE80211_MODE_11A]));
+
/* Reattach net80211 so MAC address and channel map are picked up. */
ieee80211_ifdetach(ifp);
ieee80211_ifattach(ifp);