File tree 3 files changed +15
-7
lines changed
3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -1090,8 +1090,6 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
1090
1090
kfree (sdata -> u .ap .next_beacon );
1091
1091
sdata -> u .ap .next_beacon = NULL ;
1092
1092
1093
- cancel_work_sync (& sdata -> u .ap .request_smps_work );
1094
-
1095
1093
/* turn off carrier for this interface and dependent VLANs */
1096
1094
list_for_each_entry (vlan , & sdata -> u .ap .vlans , u .vlan .list )
1097
1095
netif_carrier_off (vlan -> dev );
@@ -1103,6 +1101,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
1103
1101
kfree_rcu (old_beacon , rcu_head );
1104
1102
if (old_probe_resp )
1105
1103
kfree_rcu (old_probe_resp , rcu_head );
1104
+ sdata -> u .ap .driver_smps_mode = IEEE80211_SMPS_OFF ;
1106
1105
1107
1106
__sta_info_flush (sdata , true);
1108
1107
ieee80211_free_keys (sdata , true);
Original file line number Diff line number Diff line change @@ -466,7 +466,9 @@ void ieee80211_request_smps_ap_work(struct work_struct *work)
466
466
u .ap .request_smps_work );
467
467
468
468
sdata_lock (sdata );
469
- __ieee80211_request_smps_ap (sdata , sdata -> u .ap .driver_smps_mode );
469
+ if (sdata_dereference (sdata -> u .ap .beacon , sdata ))
470
+ __ieee80211_request_smps_ap (sdata ,
471
+ sdata -> u .ap .driver_smps_mode );
470
472
sdata_unlock (sdata );
471
473
}
472
474
Original file line number Diff line number Diff line change @@ -770,12 +770,19 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
770
770
771
771
ieee80211_roc_purge (local , sdata );
772
772
773
- if (sdata -> vif .type == NL80211_IFTYPE_STATION )
773
+ switch (sdata -> vif .type ) {
774
+ case NL80211_IFTYPE_STATION :
774
775
ieee80211_mgd_stop (sdata );
775
-
776
- if ( sdata -> vif . type == NL80211_IFTYPE_ADHOC )
776
+ break ;
777
+ case NL80211_IFTYPE_ADHOC :
777
778
ieee80211_ibss_stop (sdata );
778
-
779
+ break ;
780
+ case NL80211_IFTYPE_AP :
781
+ cancel_work_sync (& sdata -> u .ap .request_smps_work );
782
+ break ;
783
+ default :
784
+ break ;
785
+ }
779
786
780
787
/*
781
788
* Remove all stations associated with this interface.
You can’t perform that action at this time.
0 commit comments