Commit 4b19fcc3 authored by Dan Williams's avatar Dan Williams Committed by John W. Linville

[PATCH] libertas: Purge non-mesh ioctls

Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3ce40232
This diff is collapsed.
This diff is collapsed.
......@@ -96,20 +96,6 @@ int libertas_send_deauth(wlan_private * priv)
return ret;
}
int libertas_do_adhocstop_ioctl(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
if (adapter->mode == IW_MODE_ADHOC &&
adapter->connect_status == libertas_connected)
ret = libertas_stop_adhoc_network(priv);
else
ret = -ENOTSUPP;
return ret;
}
/**
* @brief Associate to a specific BSS discovered in a scan
*
......@@ -261,127 +247,6 @@ int libertas_send_deauthentication(wlan_private * priv)
0, cmd_option_waitforrsp, 0, NULL);
}
/**
* @brief Set Idle Off
*
* @param priv A pointer to wlan_private structure
* @return 0 --success, otherwise fail
*/
int libertas_idle_off(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
const u8 zeromac[] = { 0, 0, 0, 0, 0, 0 };
int i;
ENTER();
if (adapter->connect_status == libertas_disconnected) {
if (adapter->mode == IW_MODE_INFRA) {
if (memcmp(adapter->previousbssid, zeromac,
sizeof(zeromac)) != 0) {
lbs_pr_debug(1, "Previous SSID = %s\n",
adapter->previousssid.ssid);
lbs_pr_debug(1, "Previous BSSID = "
"%02x:%02x:%02x:%02x:%02x:%02x:\n",
adapter->previousbssid[0],
adapter->previousbssid[1],
adapter->previousbssid[2],
adapter->previousbssid[3],
adapter->previousbssid[4],
adapter->previousbssid[5]);
i = libertas_find_SSID_in_list(adapter,
&adapter->previousssid,
adapter->previousbssid,
adapter->mode);
if (i < 0) {
libertas_send_specific_BSSID_scan(priv,
adapter->
previousbssid,
1);
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid,
adapter->
previousbssid,
adapter->mode);
}
if (i < 0) {
/* If the BSSID could not be found, try just the SSID */
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid, NULL,
adapter->mode);
}
if (i < 0) {
libertas_send_specific_SSID_scan(priv,
&adapter->
previousssid,
1);
i = libertas_find_SSID_in_list(adapter,
&adapter->
previousssid, NULL,
adapter->mode);
}
if (i >= 0) {
ret =
wlan_associate(priv,
&adapter->
scantable[i]);
}
}
} else if (adapter->mode == IW_MODE_ADHOC) {
ret = libertas_prepare_and_send_command(priv,
cmd_802_11_ad_hoc_start,
0,
cmd_option_waitforrsp,
0, &adapter->previousssid);
}
}
/* else it is connected */
lbs_pr_debug(1, "\nwlanidle is off");
LEAVE();
return ret;
}
/**
* @brief Set Idle On
*
* @param priv A pointer to wlan_private structure
* @return 0 --success, otherwise fail
*/
int libertas_idle_on(wlan_private * priv)
{
wlan_adapter *adapter = priv->adapter;
int ret = 0;
if (adapter->connect_status == libertas_connected) {
if (adapter->mode == IW_MODE_INFRA) {
lbs_pr_debug(1, "Previous SSID = %s\n",
adapter->previousssid.ssid);
memmove(&adapter->previousssid,
&adapter->curbssparams.ssid,
sizeof(struct WLAN_802_11_SSID));
libertas_send_deauth(priv);
} else if (adapter->mode == IW_MODE_ADHOC) {
ret = libertas_stop_adhoc_network(priv);
}
}
lbs_pr_debug(1, "\nwlanidle is on");
return ret;
}
/**
* @brief This function prepares command of authenticate.
*
......
......@@ -37,10 +37,6 @@ extern int libertas_ret_80211_disassociate(wlan_private * priv,
extern int libertas_ret_80211_associate(wlan_private * priv,
struct cmd_ds_command *resp);
extern int libertas_idle_on(wlan_private * priv);
extern int libertas_idle_off(wlan_private * priv);
extern int libertas_do_adhocstop_ioctl(wlan_private * priv);
extern int libertas_reassociation_thread(void *data);
struct WLAN_802_11_SSID;
......
......@@ -986,136 +986,17 @@ static const struct iw_priv_args wlan_private_args[] = {
/*
* { cmd, set_args, get_args, name }
*/
{
WLANSCAN_TYPE,
IW_PRIV_TYPE_CHAR | 8,
IW_PRIV_TYPE_CHAR | 8,
"scantype"},
{
WLAN_SETINT_GETINT,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
""},
{
WLANNF,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getNF"},
{
WLANRSSI,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getRSSI"},
{
WLANENABLE11D,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"enable11d"},
{
WLANADHOCGRATE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"adhocgrate"},
{
WLAN_SUBCMD_SET_PRESCAN,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"prescan"},
{
WLAN_SETONEINT_GETONEINT,
IW_PRIV_TYPE_INT | 1,
IW_PRIV_TYPE_INT | 1,
""},
{
WLAN_BEACON_INTERVAL,
IW_PRIV_TYPE_INT | 1,
IW_PRIV_TYPE_INT | 1,
"bcninterval"},
{
WLAN_LISTENINTRVL,
IW_PRIV_TYPE_INT | 1,
IW_PRIV_TYPE_INT | 1,
"lolisteninter"},
{
WLAN_TXCONTROL,
IW_PRIV_TYPE_INT | 1,
IW_PRIV_TYPE_INT | 1,
"txcontrol"},
{
WLAN_NULLPKTINTERVAL,
IW_PRIV_TYPE_INT | 1,
IW_PRIV_TYPE_INT | 1,
"psnullinterval"},
/* Using iwpriv sub-command feature */
{
WLAN_SETONEINT_GETNONE, /* IOCTL: 24 */
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
""},
{
WLAN_SUBCMD_SETRXANTENNA,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setrxant"},
{
WLAN_SUBCMD_SETTXANTENNA,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"settxant"},
{
WLANSETENCRYPTIONMODE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"encryptionmode",
},
{
WLANSETREGION,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setregioncode"},
{
WLAN_SET_LISTEN_INTERVAL,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setlisteninter"},
{
WLAN_SET_MULTIPLE_DTIM,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setmultipledtim"},
{
WLAN_SET_ATIM_WINDOW,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"atimwindow"},
{
WLANSETBCNAVG,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setbcnavg"},
{
WLANSETDATAAVG,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"setdataavg"},
{
WLAN_SET_LINKMODE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"linkmode"},
{
WLAN_SET_RADIOMODE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"radiomode"},
{
WLAN_SET_DEBUGMODE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
IW_PRIV_TYPE_NONE,
"debugmode"},
{
WLAN_SUBCMD_MESH_SET_TTL,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
......@@ -1131,41 +1012,6 @@ static const struct iw_priv_args wlan_private_args[] = {
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getregioncode"},
{
WLAN_GET_LISTEN_INTERVAL,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getlisteninter"},
{
WLAN_GET_MULTIPLE_DTIM,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getmultipledtim"},
{
WLAN_GET_TX_RATE,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"gettxrate"},
{
WLANGETBCNAVG,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getbcnavg"},
{
WLAN_GET_LINKMODE,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_linkmode"},
{
WLAN_GET_RADIOMODE,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_radiomode"},
{
WLAN_GET_DEBUGMODE,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_debugmode"},
{
WLAN_SUBCMD_FWT_CLEANUP,
IW_PRIV_TYPE_NONE,
......@@ -1181,61 +1027,11 @@ static const struct iw_priv_args wlan_private_args[] = {
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"mesh_get_ttl"},
{
WLAN_SETNONE_GETTWELVE_CHAR,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | 12,
""},
{
WLAN_SUBCMD_GETRXANTENNA,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | 12,
"getrxant"},
{
WLAN_SUBCMD_GETTXANTENNA,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | 12,
"gettxant"},
{
WLAN_GET_TSF,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | 12,
"gettsf"},
{
WLAN_SETNONE_GETNONE,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
""},
{
WLANDEAUTH,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"deauth"},
{
WLANADHOCSTOP,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"adhocstop"},
{
WLANRADIOON,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"radioon"},
{
WLANRADIOOFF,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"radiooff"},
{
WLANWLANIDLEON,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"wlanidle-on"},
{
WLANWLANIDLEOFF,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_NONE,
"wlanidle-off"},
{
WLAN_SUBCMD_FWT_RESET,
IW_PRIV_TYPE_NONE,
......@@ -1298,86 +1094,16 @@ static const struct iw_priv_args wlan_private_args[] = {
IW_PRIV_TYPE_CHAR | 128,
IW_PRIV_TYPE_CHAR | 128,
"fwt_list_route"},
{
WLANSCAN_MODE,
IW_PRIV_TYPE_CHAR | 128,
IW_PRIV_TYPE_CHAR | 128,
"scanmode"},
{
WLAN_GET_ADHOC_STATUS,
IW_PRIV_TYPE_CHAR | 128,
IW_PRIV_TYPE_CHAR | 128,
"getadhocstatus"},
{
WLAN_SETNONE_GETWORDCHAR,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | 128,
""},
{
WLANGETLOG,
IW_PRIV_TYPE_NONE,
IW_PRIV_TYPE_CHAR | GETLOG_BUFSIZE,
"getlog"},
{
WLAN_SET_GET_SIXTEEN_INT,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
""},
{
WLAN_TPCCFG,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"tpccfg"},
{
WLAN_POWERCFG,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"powercfg"},
{
WLAN_AUTO_FREQ_SET,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"setafc"},
{
WLAN_AUTO_FREQ_GET,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"getafc"},
{
WLAN_SCANPROBES,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"scanprobes"},
{
WLAN_LED_GPIO_CTRL,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"ledgpio"},
{
WLAN_ADAPT_RATESET,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"rateadapt"},
{
WLAN_INACTIVITY_TIMEOUT,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"inactivityto"},
{
WLANSNR,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"getSNR"},
{
WLAN_GET_RATE,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"getrate"},
{
WLAN_GET_RXINFO,
IW_PRIV_TYPE_INT | 16,
IW_PRIV_TYPE_INT | 16,
"getrxinfo"},
};
static struct iw_statistics *wlan_get_wireless_stats(struct net_device *dev)
......
......@@ -10,88 +10,22 @@
/** PRIVATE CMD ID */
#define WLANIOCTL SIOCIWFIRSTPRIV
#define WLANSETWPAIE (WLANIOCTL + 0)
#define WLAN_SETINT_GETINT (WLANIOCTL + 7)
#define WLANNF 1
#define WLANRSSI 2
#define WLANENABLE11D 5
#define WLANADHOCGRATE 6
#define WLAN_SUBCMD_SET_PRESCAN 11
#define WLAN_SETNONE_GETNONE (WLANIOCTL + 8)
#define WLANDEAUTH 1
#define WLANRADIOON 2
#define WLANRADIOOFF 3
#define WLANREMOVEADHOCAES 4
#define WLANADHOCSTOP 5
#define WLANCIPHERTEST 6
#define WLANCRYPTOTEST 7
#define WLANWLANIDLEON 10
#define WLANWLANIDLEOFF 11
#define WLAN_SUBCMD_BT_RESET 13
#define WLAN_SUBCMD_FWT_RESET 14
#define WLANGETLOG (WLANIOCTL + 9)
#define GETLOG_BUFSIZE 300
#define WLANSCAN_TYPE (WLANIOCTL + 11)
#define WLAN_SETNONE_GETONEINT (WLANIOCTL + 15)
#define WLANGETREGION 1
#define WLAN_GET_LISTEN_INTERVAL 2
#define WLAN_GET_MULTIPLE_DTIM 3
#define WLAN_GET_TX_RATE 4
#define WLANGETBCNAVG 5
#define WLAN_GET_LINKMODE 6
#define WLAN_GET_RADIOMODE 7
#define WLAN_GET_DEBUGMODE 8
#define WLAN_SUBCMD_FWT_CLEANUP 15
#define WLAN_SUBCMD_FWT_TIME 16
#define WLAN_SUBCMD_MESH_GET_TTL 17
#define WLANREGCFRDWR (WLANIOCTL + 18)
#define WLAN_SETNONE_GETTWELVE_CHAR (WLANIOCTL + 19)
#define WLAN_SUBCMD_GETRXANTENNA 1
#define WLAN_SUBCMD_GETTXANTENNA 2
#define WLAN_GET_TSF 3
#define WLAN_SETNONE_GETWORDCHAR (WLANIOCTL + 21)
#define WLANGETADHOCAES 1
#define WLAN_SETONEINT_GETONEINT (WLANIOCTL + 23)
#define WLAN_BEACON_INTERVAL 1
#define WLAN_LISTENINTRVL 4
#define WLAN_TXCONTROL 6
#define WLAN_NULLPKTINTERVAL 7
#define WLAN_SETONEINT_GETNONE (WLANIOCTL + 24)
#define WLAN_SUBCMD_SETRXANTENNA 1
#define WLAN_SUBCMD_SETTXANTENNA 2
#define WLANSETAUTHALG 5
#define WLANSET8021XAUTHALG 6
#define WLANSETENCRYPTIONMODE 7
#define WLANSETREGION 8
#define WLAN_SET_LISTEN_INTERVAL 9
#define WLAN_SET_MULTIPLE_DTIM 10
#define WLAN_SET_ATIM_WINDOW 11
#define WLANSETBCNAVG 13
#define WLANSETDATAAVG 14
#define WLAN_SET_LINKMODE 15
#define WLAN_SET_RADIOMODE 16
#define WLAN_SET_DEBUGMODE 17
#define WLAN_SUBCMD_MESH_SET_TTL 18
#define WLAN_SET128CHAR_GET128CHAR (WLANIOCTL + 25)
#define WLANSCAN_MODE 6
#define WLAN_GET_ADHOC_STATUS 9
#define WLAN_SUBCMD_BT_ADD 18
#define WLAN_SUBCMD_BT_DEL 19
#define WLAN_SUBCMD_BT_LIST 20
......@@ -103,27 +37,8 @@
#define WLAN_SUBCMD_FWT_LIST_ROUTE 26
#define WLAN_SET_GET_SIXTEEN_INT (WLANIOCTL + 29)
#define WLAN_TPCCFG 1
#define WLAN_POWERCFG 2
#define WLAN_AUTO_FREQ_SET 3
#define WLAN_AUTO_FREQ_GET 4
#define WLAN_LED_GPIO_CTRL 5
#define WLAN_SCANPROBES 6
#define WLAN_ADAPT_RATESET 8
#define WLAN_INACTIVITY_TIMEOUT 9
#define WLANSNR 10
#define WLAN_GET_RATE 11
#define WLAN_GET_RXINFO 12
#define WLANCMD52RDWR (WLANIOCTL + 30)
#define WLANCMD53RDWR (WLANIOCTL + 31)
#define CMD53BUFLEN 32
#define REG_MAC 0x19
#define REG_BBP 0x1a
#define REG_RF 0x1b
#define REG_EEPROM 0x59
#define WLAN_LINKMODE_802_3 0
#define WLAN_LINKMODE_802_11 2
#define WLAN_RADIOMODE_NONE 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment