aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEyal Shapira <eyal@wizery.com>2012-09-12 18:25:16 +0300
committerEyal Shapira <eyal@wizery.com>2012-09-12 22:20:05 +0300
commit7eaeff42d560dcdccc13f6ad077de3b4592b06d7 (patch)
tree23ebacf27b5952b1ebf26618f3ea5eda8b1fdf49
parent78fd69af0ff5be1977ee3ed9171afc450a30816b (diff)
downloadexternal_wpa_supplicant_8_ti-7eaeff42d560dcdccc13f6ad077de3b4592b06d7.zip
external_wpa_supplicant_8_ti-7eaeff42d560dcdccc13f6ad077de3b4592b06d7.tar.gz
external_wpa_supplicant_8_ti-7eaeff42d560dcdccc13f6ad077de3b4592b06d7.tar.bz2
nl80211: Remove driver specific commands not used in JB (JB)
The following driver specific commands aren't used in JB and were replaced by other APIs: POWERMODE,GETPOWER,LINKSPEED,RSSI,RSSI-APPROX Remove code handling these commands. Signed-off-by: Eyal Shapira <eyal@wizery.com>
-rw-r--r--src/drivers/driver_nl80211.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 432b583..6b223c3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -9404,65 +9404,6 @@ static void wpa_driver_send_hang_msg(struct wpa_driver_nl80211_data *drv)
}
}
-
-#define WPA_PS_ENABLED 0
-#define WPA_PS_DISABLED 1
-
-static int wpa_driver_set_power_save(void *priv, int state)
-{
- return nl80211_set_power_save(priv, state == WPA_PS_ENABLED);
-}
-
-
-static int get_power_mode_handler(struct nl_msg *msg, void *arg)
-{
- struct nlattr *tb[NL80211_ATTR_MAX + 1];
- struct genlmsghdr *gnlh = nlmsg_data(nlmsg_hdr(msg));
- int *state = arg;
-
- nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
- genlmsg_attrlen(gnlh, 0), NULL);
-
- if (!tb[NL80211_ATTR_PS_STATE])
- return NL_SKIP;
-
- if (state) {
- int s = (int) nla_get_u32(tb[NL80211_ATTR_PS_STATE]);
- wpa_printf(MSG_DEBUG, "nl80211: Get power mode = %d", s);
- *state = (s == NL80211_PS_ENABLED) ?
- WPA_PS_ENABLED : WPA_PS_DISABLED;
- }
-
- return NL_SKIP;
-}
-
-
-static int wpa_driver_get_power_save(void *priv, int *state)
-{
- struct i802_bss *bss = priv;
- struct wpa_driver_nl80211_data *drv = bss->drv;
- struct nl_msg *msg;
- int ret = -1;
- enum nl80211_ps_state ps_state;
-
- msg = nlmsg_alloc();
- if (!msg)
- return -1;
-
- nl80211_cmd(drv, msg, 0, NL80211_CMD_GET_POWER_SAVE);
-
- NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, bss->ifindex);
-
- ret = send_and_recv_msgs(drv, msg, get_power_mode_handler, state);
- msg = NULL;
- if (ret < 0)
- wpa_printf(MSG_ERROR, "nl80211: Get power mode fail: %d", ret);
-nla_put_failure:
- nlmsg_free(msg);
- return ret;
-}
-
-
static int android_priv_cmd(struct i802_bss *bss, const char *cmd)
{
struct wpa_driver_nl80211_data *drv = bss->drv;
@@ -9600,19 +9541,6 @@ static int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf,
MAC2STR(macaddr));
} else if (os_strcasecmp(cmd, "RELOAD") == 0) {
wpa_msg(drv->ctx, MSG_INFO, WPA_EVENT_DRIVER_STATE "HANGED");
- } else if (os_strncasecmp(cmd, "POWERMODE ", 10) == 0) {
- int state = atoi(cmd + 10);
- ret = wpa_driver_set_power_save(priv, state);
- if (ret < 0)
- wpa_driver_send_hang_msg(drv);
- else
- drv_errors = 0;
- } else if (os_strncasecmp(cmd, "GETPOWER", 8) == 0) {
- int state = -1;
- ret = wpa_driver_get_power_save(priv, &state);
- if (!ret && (state != -1))
- ret = os_snprintf(buf, buf_len, "POWERMODE = %d\n",
- state);
} else if( os_strncasecmp(cmd, "RXFILTER-ADD ", 13) == 0 ) {
int i = nl80211_parse_wowlan_trigger_nr(cmd + 13);
if(i < 0)
@@ -9627,33 +9555,6 @@ static int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf,
return nl80211_set_wowlan_triggers(bss, 1);
} else if (os_strcasecmp(cmd, "RXFILTER-STOP") == 0) {
return nl80211_set_wowlan_triggers(bss, 0);
- } else if( os_strcasecmp(cmd, "LINKSPEED") == 0 ) {
- struct wpa_signal_info sig;
- int linkspeed;
-
- if (!drv->associated)
- return -1;
-
- ret = nl80211_get_link_signal(drv, &sig);
- if (ret == 0) {
- linkspeed = sig.current_txrate / 1000;
- ret = os_snprintf(buf, buf_len, "LinkSpeed %d\n",
- linkspeed);
- }
- } else if (os_strcasecmp(cmd, "RSSI") == 0 ||
- os_strcasecmp(cmd, "RSSI-APPROX") == 0) {
- struct wpa_signal_info sig;
- int rssi;
-
- if (!drv->associated)
- return -1;
-
- ret = nl80211_get_link_signal(drv, &sig);
- if (ret == 0) {
- rssi = sig.current_signal;
- ret = os_snprintf(buf, buf_len, "%s rssi %d\n",
- drv->ssid, rssi);
- }
} else {
wpa_printf(MSG_ERROR, "Unsupported command: %s", cmd);
ret = -1;