summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorambrisko <ambrisko@FreeBSD.org>2001-12-31 22:01:44 +0000
committerambrisko <ambrisko@FreeBSD.org>2001-12-31 22:01:44 +0000
commit508de04e82ba1f0e7980cac1a0be35273fa34c8a (patch)
tree26932daacce7480f16007714fc886d711f073176 /sbin/ifconfig
parent85fc04400d2760738010ae522bfd792cf6c17b1d (diff)
downloadFreeBSD-src-508de04e82ba1f0e7980cac1a0be35273fa34c8a.zip
FreeBSD-src-508de04e82ba1f0e7980cac1a0be35273fa34c8a.tar.gz
Fix bugs in the structure for rx_frame by making gap length one byte and
a packed array so sizeof work. This broke RFMON mode and passing up 802.11 packets. The Linux emulation code was derived from the open source Linux driver to maintain compatibility. LEAP support is added, hints from Richard Johnson. I've verified this locally with PC350v42510.img firmware. More bug fixing from Marco to fix long passwords. Change DELAYs in flash part of driver to FLASH_DELAY which uses tsleep so it doesn't look like your system died during a flash update. Install header files in /usr/include/dev/an Cleanup some ifmedia bugs add "Home" key mode to ifmedia and ancontrol. This way you can manage 2 keys a little easier. Map the home mode into key 5. Enhance ifconfig to dump the various configured SSIDs. I use a bunch of different ones and roam between them. Use the syntax similar to the WEP keys to deal with setting difference SSIDs. Bump up up the Card capabilities RID since they added 2 bytes to it in the latest firmware. Thankfully we changed it from a terminal failure so the card still worked but the driver whined. Some cleanup patches from Marco Molteni. Submitted by: Richard Johnson <raj@cisco.com> Marco Molteni <molter@tin.it> and myself Various checks: David Wolfskill <david@catwhisker.org> Reviewed by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Approved by: Brooks Davis <brooks@freebsd.org> Warner Losh <imp@freebsd.org> Obtained from: Linux emulation API's from Aironet driver.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifieee80211.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifieee80211.c b/sbin/ifconfig/ifieee80211.c
index ac8c871..33b2d83 100644
--- a/sbin/ifconfig/ifieee80211.c
+++ b/sbin/ifconfig/ifieee80211.c
@@ -99,6 +99,11 @@ set80211ssid(const char *val, int d, int s, const struct afswtch *rafp)
u_int8_t data[33];
ssid = 0;
+ len = sizeof(val);
+ if (len > 2 && isdigit(val[0]) && val[1] == ':') {
+ ssid = atoi(val)-1;
+ val += 2;
+ }
bzero(data, sizeof(data));
len = sizeof(data);
@@ -296,6 +301,18 @@ ieee80211_status (s, info)
}
printf("\tssid ");
print_string(data, ireq.i_len);
+ num = 0;
+ ireq.i_type = IEEE80211_IOC_NUMSSIDS;
+ if (ioctl(s, SIOCG80211, &ireq) >= 0) {
+ num = ireq.i_val;
+ }
+ ireq.i_type = IEEE80211_IOC_SSID;
+ for (ireq.i_val = 0; ireq.i_val < num; ireq.i_val++) {
+ if (ioctl(s, SIOCG80211, &ireq) >= 0 && ireq.i_len > 0) {
+ printf(" %d:", ireq.i_val + 1);
+ print_string(data, ireq.i_len);
+ }
+ }
printf("\n");
ireq.i_type = IEEE80211_IOC_STATIONNAME;
OpenPOWER on IntegriCloud