wifi: mac80211: Remove AP SMPS leftovers
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Sun, 19 Jun 2022 11:38:03 +0000 (14:38 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 15 Jul 2022 09:43:13 +0000 (11:43 +0200)
AP SMPS was removed and not needed anymore. Remove the leftovers.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/sta_info.c
net/mac80211/sta_info.h
net/mac80211/status.c

index 84b6ae3..484ae63 100644 (file)
@@ -1921,7 +1921,6 @@ void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
 int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
                               enum ieee80211_smps_mode smps, const u8 *da,
                               const u8 *bssid);
-void ieee80211_request_smps_ap_work(struct work_struct *work);
 void ieee80211_request_smps_mgd_work(struct work_struct *work);
 bool ieee80211_smps_is_restrictive(enum ieee80211_smps_mode smps_mode_old,
                                   enum ieee80211_smps_mode smps_mode_new);
index c9852f7..d738534 100644 (file)
@@ -616,36 +616,6 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
        }
 
        sta->sta.smps_mode = IEEE80211_SMPS_OFF;
-       if (sdata->vif.type == NL80211_IFTYPE_AP ||
-           sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
-               struct ieee80211_supported_band *sband;
-               u8 smps;
-
-               sband = ieee80211_get_sband(sdata);
-               if (!sband)
-                       goto free_txq;
-
-               smps = (sband->ht_cap.cap & IEEE80211_HT_CAP_SM_PS) >>
-                       IEEE80211_HT_CAP_SM_PS_SHIFT;
-               /*
-                * Assume that hostapd advertises our caps in the beacon and
-                * this is the known_smps_mode for a station that just assciated
-                */
-               switch (smps) {
-               case WLAN_HT_SMPS_CONTROL_DISABLED:
-                       sta->known_smps_mode = IEEE80211_SMPS_OFF;
-                       break;
-               case WLAN_HT_SMPS_CONTROL_STATIC:
-                       sta->known_smps_mode = IEEE80211_SMPS_STATIC;
-                       break;
-               case WLAN_HT_SMPS_CONTROL_DYNAMIC:
-                       sta->known_smps_mode = IEEE80211_SMPS_DYNAMIC;
-                       break;
-               default:
-                       WARN_ON(1);
-               }
-       }
-
        sta->sta.max_rc_amsdu_len = IEEE80211_MAX_MPDU_LEN_HT_BA;
 
        sta->cparams.ce_threshold = CODEL_DISABLED_THRESHOLD;
index 70ee55e..a1724e3 100644 (file)
@@ -615,8 +615,6 @@ struct link_sta_info {
  * @rcu_head: RCU head used for freeing this station struct
  * @cur_max_bandwidth: maximum bandwidth to use for TX to the station,
  *     taken from HT/VHT capabilities or VHT operating mode notification
- * @known_smps_mode: the smps_mode the client thinks we are in. Relevant for
- *     AP only.
  * @cparams: CoDel parameters for this station.
  * @reserved_tid: reserved TID (if any, otherwise IEEE80211_TID_UNRESERVED)
  * @fast_tx: TX fastpath information
@@ -699,8 +697,6 @@ struct sta_info {
        struct dentry *debugfs_dir;
 #endif
 
-       enum ieee80211_smps_mode known_smps_mode;
-
        struct codel_params cparams;
 
        u8 reserved_tid;
index 9bd4d33..fad457f 100644 (file)
@@ -225,9 +225,6 @@ static void ieee80211_frame_acked(struct sta_info *sta, struct sk_buff *skb)
                         */
                        sdata->deflink.smps_mode = smps_mode;
                        ieee80211_queue_work(&local->hw, &sdata->recalc_smps);
-               } else if (sdata->vif.type == NL80211_IFTYPE_AP ||
-                          sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
-                       sta->known_smps_mode = smps_mode;
                }
        }
 }