[tcp] Enable AF_INET6 transport for tcp connections
[gpxe.git] / src / hci / commands / iwmgmt_cmd.c
blob006c9f1df6e231bbb4acfa52d61b3d9274d5937a
1 /*
2 * Copyright (C) 2009 Joshua Oreman <oremanj@rwcr.net>.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of the
7 * License, or any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 FILE_LICENCE ( GPL2_OR_LATER );
21 #include <gpxe/netdevice.h>
22 #include <gpxe/net80211.h>
23 #include <gpxe/command.h>
24 #include <usr/iwmgmt.h>
25 #include <hci/ifmgmt_cmd.h>
27 /* "iwstat" command */
29 static int iwstat_payload ( struct net_device *netdev ) {
30 struct net80211_device *dev = net80211_get ( netdev );
32 if ( dev )
33 iwstat ( dev );
35 return 0;
38 static int iwstat_exec ( int argc, char **argv ) {
39 return ifcommon_exec ( argc, argv,
40 iwstat_payload, "Display wireless status of" );
43 /* "iwlist" command */
45 static int iwlist_payload ( struct net_device *netdev ) {
46 struct net80211_device *dev = net80211_get ( netdev );
48 if ( dev )
49 return iwlist ( dev );
51 return 0;
54 static int iwlist_exec ( int argc, char **argv ) {
55 return ifcommon_exec ( argc, argv, iwlist_payload,
56 "List wireless networks available via" );
59 /** Wireless interface management commands */
60 struct command iwmgmt_commands[] __command = {
62 .name = "iwstat",
63 .exec = iwstat_exec,
66 .name = "iwlist",
67 .exec = iwlist_exec,