Bug 25577

Summary: [PATCH] ifconfig support for wireless network cards
Product: Base System Reporter: brooks <brooks>
Component: confAssignee: Poul-Henning Kamp <phk>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description brooks 2001-03-07 01:50:01 UTC
Currently, each wireless networking driver has it's own control program
despite the fact that most people want to set exactly the same settings
regardless of which card they have.  It has been repeatidly suggested
that this configuration should be done via ifconfig.  This patch
implements the required functionality in ifconfig and add support to the
wi and an drivers.  It also provides partial, untested support for the
awi driver.

Fix: The current version of the patch is included below.  Needed updates will
be posted on the web at:

http://www.one-eyed-alien.net/~brooks/FreeBSD/ifconfig.diff

The patch contained in ifconfig.diff makes the following changes:

sbin/ifconfig/Makefile
	- Compile in support for IEEE 802.11 devices by default.
sbin/ifconfig/ifconfig.8
	- Document new IEEE 802.11 ifconfig commands.
sbin/ifconfig/ifconfig.c
	- Add new IEEE 802.11 commands.
	- Add support for IEEE 802.11 status printing.
src/sbin/ifconfig/ifconfig.h
	- Declare new support functions (defined in ifieee80211.c).
src/sbin/ifconfig/ifmedia.c
	- Add support for new if_media types for IEEE 802.11
	- Fix a long standing bug which caused media specific mediaopts
	  to not be printed.
sbin/ifconfig/ifieee80211.c *NEW*
	- Define new command and status functions for IEEE 802.11
	  devices.
sys/dev/an/if_aironet_ieee.h
	- Make some more defines visible to the kernel so they can be
	  used for the IEEE 802.11 ioctls.
sys/dev/an/if_an.c
	- Add if_media support.
	- Change default mode to infrastructure.
	- Add support for IEEE 802.11 ioctls.
sys/dev/an/if_an_isa.c
	- Small change for if_media support.
sys/dev/an/if_an_pccard.c
	- Small change for if_media support.
sys/dev/an/if_an_pci.c
	- Small change for if_media support.
sys/dev/an/if_anreg.h
	- Add if_media struct to softc.
sys/dev/awi/awi.c
	- Add untested support for IEEE 802.11 ioctls.
sys/dev/wi/if_wavelan_ieee.h
	- Make some more defines visible to the kernel so they can be
	  used for the IEEE 802.11 ioctls.
sys/dev/wi/if_wi.c
	- Add if_media support.
	- Change default mode to infrastructure.
	- Add support for IEEE 802.11 ioctls.
sys/net/if_ieee80211.h
	- Add definitions for new ioctls.
sys/net/if_media.c
	- Add support for IEEE 802.11 media types.
sys/net/if_media.h
	- Add IEEE 802.11 media types.
share/man/man4/Makefile
	- Link in new ieee80211.4 man page.
share/man/man4/ieee80211.4 *NEW*
	- Document the new IEEE 802.11 ioctls in net/if_ieee80211.h.
Comment 1 brooks 2001-03-07 02:19:29 UTC
DAMN!  Don't use the patch submitted with this PR on multi-user systems!
I realized just after I sent it that there was no suser check on
modifying the an setting.  Use the patch on my webpage instead:

http://www.one-eyed-alien.net/~brooks/FreeBSD/ifconfig.diff

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
Comment 2 oppermann 2001-03-20 14:03:25 UTC
I'm working on merging and cleaning up the wi() and an() drivers. I'll
integrate this as well.

-- 
Andre
Comment 3 brooks 2001-03-20 18:03:27 UTC
On Tue, Mar 20, 2001 at 03:03:25PM +0100, Andre Oppermann wrote:
> I'm working on merging and cleaning up the wi() and an() drivers. I'll
> integrate this as well.


You're merging the drivers?  Is that actually a reasionable thing to do?
The Cisco cards have a very different programming interface and a
substantialy larger feature set.  I know the have the same hardware and
the very bottem but they have entierly unrelated firmware.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
Comment 4 oppermann 2001-03-21 22:11:53 UTC
Brooks Davis wrote:
> 
> On Tue, Mar 20, 2001 at 03:03:25PM +0100, Andre Oppermann wrote:
> > I'm working on merging and cleaning up the wi() and an() drivers. I'll
> > integrate this as well.
> 
> You're merging the drivers?  Is that actually a reasionable thing to do?
> The Cisco cards have a very different programming interface and a
> substantialy larger feature set.  I know the have the same hardware and
> the very bottem but they have entierly unrelated firmware.

At least the drivers are very similiar and share a lot of the same
base functions.

The question is more of a policy sort. Is it better to have two
similiar drivers or one driver with more conditional code?

-- 
Andre
Comment 5 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-03-28 19:10:55 UTC
Responsible Changed
From-To: freebsd-bugs->phk

I'll adopt this one.  It's a good move to get away from ${foo}control 
to the extent we can.
Comment 6 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-05-26 10:28:50 UTC
State Changed
From-To: open->closed

Committed, thanks!