Bug 90022 - net/iwi-firmware behavior out of sync with latest driver
Summary: net/iwi-firmware behavior out of sync with latest driver
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florent Thoumie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-06 12:50 UTC by Thomas Hurst
Modified: 2005-12-12 17:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hurst 2005-12-06 12:50:02 UTC
	iwi(4) has recently changed its behavior with regard to firmware loading,
	now doing so automatically when it's placed in /boot/firmware.

	The iwi-firmware port however places firmware unconditionally in
	/usr/local/share/iwi-firmware.  It should be made aware of /boot/firmware
	so reinstalling the port resolves the firmware open errors that
	result from upgrading.

Fix: 

Install contents of /usr/local/share/iwi-firmware/ to /boot/firmware
	depending on OS version, presumably also conditionally installing the
	rc script now the driver can load firmware on its own.

	Documenting /boot/firmware in the iwi manpage or so would also help :)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2005-12-06 12:51:15 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flz

Over to maintainer
Comment 2 Florent Thoumie 2005-12-11 14:43:37 UTC
	Can you try the following patch ?

	http://people.freebsd.org/~flz/local/ipw.diff

-- 
Florent Thoumie
flz@FreeBSD.org
FreeBSD committer
Comment 3 Florent Thoumie freebsd_committer freebsd_triage 2005-12-11 18:31:13 UTC
State Changed
From-To: open->closed

I've committed a fix, should be ok now.  Thanks for your reminder.
Comment 4 Thomas Hurst 2005-12-12 06:39:01 UTC
* Florent Thoumie (flz@FreeBSD.org) wrote:

> I've committed a fix, should be ok now.  Thanks for your reminder.

Thanks, not quite perfect though; I needed to pass -DWITHOUT_CONTROL
just to get to the OPTIONS menu, then I had to de-select it again there.
Probably best to swap the logic so it only does IGNORE if WITH_CONTROL
is defined explicitly, or downgrade it to a warning, ala:

--- ipw-firmware/Makefile.orig  Mon Dec 12 06:34:45 2005
+++ ipw-firmware/Makefile       Mon Dec 12 06:35:12 2005
@@ -67,7 +67,7 @@

 .if ${OSVERSION} > ${MIN7OSVERSION}
 SUB_LIST+=     DONT_NEED_CONTROL="@comment "
-. if !defined(WITHOUT_CONTROL)
+. if defined(WITH_CONTROL)
 IGNORE=                is configured with ${DRIVERNAME}control(8) which you don't need
 . end

Also I've heard of a patch that makes iwicontrol work with the new
iwi changes, so maybe it's best to just humor the user if they want it.

-- 
Thomas 'Freaky' Hurst
    http://hur.st/
Comment 5 Florent Thoumie freebsd_committer freebsd_triage 2005-12-12 16:00:31 UTC
Le Lundi 12 décembre 2005 à 06:39 +0000, Thomas Hurst a écrit :
> * Florent Thoumie (flz@FreeBSD.org) wrote:
> 
> > I've committed a fix, should be ok now.  Thanks for your reminder.
> 
> Thanks, not quite perfect though; I needed to pass -DWITHOUT_CONTROL
> just to get to the OPTIONS menu, then I had to de-select it again there.


	That's the point, make config does it for you.

> Probably best to swap the logic so it only does IGNORE if WITH_CONTROL
> is defined explicitly, or downgrade it to a warning, ala:


	Nope, that's how OPTIONS work. If default is "on", check for 
	WITHOUT_${foo}.

> --- ipw-firmware/Makefile.orig  Mon Dec 12 06:34:45 2005
> +++ ipw-firmware/Makefile       Mon Dec 12 06:35:12 2005
> @@ -67,7 +67,7 @@
> 
>  .if ${OSVERSION} > ${MIN7OSVERSION}
>  SUB_LIST+=     DONT_NEED_CONTROL="@comment "
> -. if !defined(WITHOUT_CONTROL)
> +. if defined(WITH_CONTROL)
>  IGNORE=                is configured with ${DRIVERNAME}control(8) which you don't need
>  . end


	IGNORE is fine, I'll keep it that way.

	I'll probably default CONTROL to off later, once latest changes 
	have been MFC'ed and some months have passed.

> Also I've heard of a patch that makes iwicontrol work with the new
> iwi changes, so maybe it's best to just humor the user if they want it.


	What's the point ? iwicontrol was just a workaround to put the 
	firmware in cache, now the driver does it automatically.

-- 
Florent Thoumie
flz@FreeBSD.org
FreeBSD committer
Comment 6 Florent Thoumie freebsd_committer freebsd_triage 2005-12-12 16:00:31 UTC
Le Lundi 12 décembre 2005 à 06:39 +0000, Thomas Hurst a écrit :
> * Florent Thoumie (flz@FreeBSD.org) wrote:
> 
> > I've committed a fix, should be ok now.  Thanks for your reminder.
> 
> Thanks, not quite perfect though; I needed to pass -DWITHOUT_CONTROL
> just to get to the OPTIONS menu, then I had to de-select it again there.


	That's the point, make config does it for you.

> Probably best to swap the logic so it only does IGNORE if WITH_CONTROL
> is defined explicitly, or downgrade it to a warning, ala:


	Nope, that's how OPTIONS work. If default is "on", check for 
	WITHOUT_${foo}.

> --- ipw-firmware/Makefile.orig  Mon Dec 12 06:34:45 2005
> +++ ipw-firmware/Makefile       Mon Dec 12 06:35:12 2005
> @@ -67,7 +67,7 @@
> 
>  .if ${OSVERSION} > ${MIN7OSVERSION}
>  SUB_LIST+=     DONT_NEED_CONTROL="@comment "
> -. if !defined(WITHOUT_CONTROL)
> +. if defined(WITH_CONTROL)
>  IGNORE=                is configured with ${DRIVERNAME}control(8) which you don't need
>  . end


	IGNORE is fine, I'll keep it that way.

	I'll probably default CONTROL to off later, once latest changes 
	have been MFC'ed and some months have passed.

> Also I've heard of a patch that makes iwicontrol work with the new
> iwi changes, so maybe it's best to just humor the user if they want it.


	What's the point ? iwicontrol was just a workaround to put the 
	firmware in cache, now the driver does it automatically.

-- 
Florent Thoumie
flz@FreeBSD.org
FreeBSD committer
Comment 7 Thomas Hurst 2005-12-12 17:39:43 UTC
* Florent Thoumie (flz@FreeBSD.org) wrote:

> Le Lundi 12 décembre 2005 à 06:39 +0000, Thomas Hurst a écrit :
> > * Florent Thoumie (flz@FreeBSD.org) wrote:
> > 
> > > I've committed a fix, should be ok now.  Thanks for your reminder.
> > 
> > Thanks, not quite perfect though; I needed to pass -DWITHOUT_CONTROL
> > just to get to the OPTIONS menu, then I had to de-select it again there.
> 
> 	That's the point, make config does it for you.


Right, but this means that a "portupgrade iwi-firmware", or just a plain
make results in the IGNORE; you need to explicitly disable it or call
config, even if there's no previously saved configuration, which isn't
behavior I've encountered in a port before, and which doesn't seem
especially intuitive, this being -CURRENT aside ;)

> > Also I've heard of a patch that makes iwicontrol work with the new
> > iwi changes, so maybe it's best to just humor the user if they want it.
> 
> 	What's the point ? iwicontrol was just a workaround to put the 
> 	firmware in cache, now the driver does it automatically.


iwicontrol also shows a bunch of stats about the device; number of
frames sent at the various supported speeds, number of retransmits,
failures etc.  Are these reproduced elsewhere too?

-- 
Thomas 'Freaky' Hurst
    http://hur.st/