[MAC80211]: remove unused ioctls (1)
[profile/ivi/kernel-adaptation-intel-automotive.git] / net / mac80211 / ieee80211_ioctl.c
index e7904db..946aeb5 100644 (file)
@@ -287,16 +287,6 @@ static int ieee80211_ioctl_siwgenie(struct net_device *dev,
        return -EOPNOTSUPP;
 }
 
-static int ieee80211_ioctl_set_radio_enabled(struct net_device *dev,
-                                            int val)
-{
-       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
-       struct ieee80211_conf *conf = &local->hw.conf;
-
-       conf->radio_enabled = val;
-       return ieee80211_hw_config(wdev_priv(dev->ieee80211_ptr));
-}
-
 static int ieee80211_ioctl_giwname(struct net_device *dev,
                                   struct iw_request_info *info,
                                   char *name, char *extra)
@@ -798,6 +788,20 @@ static int ieee80211_ioctl_giwrate(struct net_device *dev,
        return 0;
 }
 
+static int ieee80211_ioctl_giwtxpower(struct net_device *dev,
+                                  struct iw_request_info *info,
+                                  union iwreq_data *data, char *extra)
+{
+       struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
+
+       data->txpower.fixed = 1;
+       data->txpower.disabled = !(local->hw.conf.radio_enabled);
+       data->txpower.value = local->hw.conf.power_level;
+       data->txpower.flags = IW_TXPOW_DBM;
+
+       return 0;
+}
+
 static int ieee80211_ioctl_siwrts(struct net_device *dev,
                                  struct iw_request_info *info,
                                  struct iw_param *rts, char *extra)
@@ -1054,25 +1058,23 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev,
                break;
 
        case PRISM2_PARAM_CTS_PROTECT_ERP_FRAMES:
-               if (sdata->type != IEEE80211_IF_TYPE_AP)
+               if (sdata->type == IEEE80211_IF_TYPE_AP) {
+                       sdata->use_protection = !!value;
+                       ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PROTECTION);
+               } else {
                        ret = -ENOENT;
-               else
-                       sdata->use_protection = value;
+               }
                break;
 
        case PRISM2_PARAM_PREAMBLE:
-               local->short_preamble = value;
-               break;
-
-       case PRISM2_PARAM_STAT_TIME:
-               if (!local->stat_time && value) {
-                       local->stat_timer.expires = jiffies + HZ * value / 100;
-                       add_timer(&local->stat_timer);
-               } else if (local->stat_time && !value) {
-                       del_timer_sync(&local->stat_timer);
+               if (sdata->type != IEEE80211_IF_TYPE_AP) {
+                       sdata->short_preamble = !!value;
+                       ieee80211_erp_info_change_notify(dev, IEEE80211_ERP_CHANGE_PREAMBLE);
+               } else {
+                       ret = -ENOENT;
                }
-               local->stat_time = value;
                break;
+
        case PRISM2_PARAM_SHORT_SLOT_TIME:
                if (value)
                        local->hw.conf.flags |= IEEE80211_CONF_SHORT_SLOT_TIME;
@@ -1086,16 +1088,6 @@ static int ieee80211_ioctl_prism2_param(struct net_device *dev,
                local->next_mode = value;
                break;
 
-       case PRISM2_PARAM_RADIO_ENABLED:
-               ret = ieee80211_ioctl_set_radio_enabled(dev, value);
-               break;
-
-       case PRISM2_PARAM_ANTENNA_MODE:
-               local->hw.conf.antenna_mode = value;
-               if (ieee80211_hw_config(local))
-                       ret = -EINVAL;
-               break;
-
        case PRISM2_PARAM_STA_ANTENNA_SEL:
                local->sta_antenna_sel = value;
                break;
@@ -1184,12 +1176,9 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev,
                break;
 
        case PRISM2_PARAM_PREAMBLE:
-               *param = local->short_preamble;
+               *param = sdata->short_preamble;
                break;
 
-       case PRISM2_PARAM_STAT_TIME:
-               *param = local->stat_time;
-               break;
        case PRISM2_PARAM_SHORT_SLOT_TIME:
                *param = !!(local->hw.conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME);
                break;
@@ -1198,10 +1187,6 @@ static int ieee80211_ioctl_get_prism2_param(struct net_device *dev,
                *param = local->next_mode;
                break;
 
-       case PRISM2_PARAM_ANTENNA_MODE:
-               *param = local->hw.conf.antenna_mode;
-               break;
-
        case PRISM2_PARAM_STA_ANTENNA_SEL:
                *param = local->sta_antenna_sel;
                break;
@@ -1580,7 +1565,7 @@ static const iw_handler ieee80211_handler[] =
        (iw_handler) ieee80211_ioctl_siwfrag,           /* SIOCSIWFRAG */
        (iw_handler) ieee80211_ioctl_giwfrag,           /* SIOCGIWFRAG */
        (iw_handler) NULL,                              /* SIOCSIWTXPOW */
-       (iw_handler) NULL,                              /* SIOCGIWTXPOW */
+       (iw_handler) ieee80211_ioctl_giwtxpower,        /* SIOCGIWTXPOW */
        (iw_handler) ieee80211_ioctl_siwretry,          /* SIOCSIWRETRY */
        (iw_handler) ieee80211_ioctl_giwretry,          /* SIOCGIWRETRY */
        (iw_handler) ieee80211_ioctl_siwencode,         /* SIOCSIWENCODE */