diff options
author | Luciano Coelho <luciano.coelho@intel.com> | 2013-11-11 13:34:54 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-11-25 14:51:58 -0500 |
commit | 33787fc4bea0347d78a211d1f38289b73d9ec1a6 (patch) | |
tree | a1d5decf608084bafc92038af1811ed8eb4b927b /net/mac80211/mlme.c | |
parent | f63f8421d468575ae7bb62cfcf0398613c746975 (diff) |
mac80211: move csa_chandef to sdata
There is no reason why we should have only one channel switch
announcement at a time for a single phy. When support for channel
switch with multiple contexts and multiple vifs per context is
implemented, we will need the chandef data for each vif. Move the
csa_chandef structure to sdata to prepare for this.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
[Fixed compilation with mesh]
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f8dca58b7e52..2bb3a8631b17 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -886,8 +886,7 @@ static void ieee80211_chswitch_work(struct work_struct *work) | |||
886 | if (!ifmgd->associated) | 886 | if (!ifmgd->associated) |
887 | goto out; | 887 | goto out; |
888 | 888 | ||
889 | ret = ieee80211_vif_change_channel(sdata, &local->csa_chandef, | 889 | ret = ieee80211_vif_change_channel(sdata, &changed); |
890 | &changed); | ||
891 | if (ret) { | 890 | if (ret) { |
892 | sdata_info(sdata, | 891 | sdata_info(sdata, |
893 | "vif channel switch failed, disconnecting\n"); | 892 | "vif channel switch failed, disconnecting\n"); |
@@ -897,7 +896,7 @@ static void ieee80211_chswitch_work(struct work_struct *work) | |||
897 | } | 896 | } |
898 | 897 | ||
899 | if (!local->use_chanctx) { | 898 | if (!local->use_chanctx) { |
900 | local->_oper_chandef = local->csa_chandef; | 899 | local->_oper_chandef = sdata->csa_chandef; |
901 | /* Call "hw_config" only if doing sw channel switch. | 900 | /* Call "hw_config" only if doing sw channel switch. |
902 | * Otherwise update the channel directly | 901 | * Otherwise update the channel directly |
903 | */ | 902 | */ |
@@ -908,7 +907,7 @@ static void ieee80211_chswitch_work(struct work_struct *work) | |||
908 | } | 907 | } |
909 | 908 | ||
910 | /* XXX: shouldn't really modify cfg80211-owned data! */ | 909 | /* XXX: shouldn't really modify cfg80211-owned data! */ |
911 | ifmgd->associated->channel = local->csa_chandef.chan; | 910 | ifmgd->associated->channel = sdata->csa_chandef.chan; |
912 | 911 | ||
913 | /* XXX: wait for a beacon first? */ | 912 | /* XXX: wait for a beacon first? */ |
914 | ieee80211_wake_queues_by_reason(&local->hw, | 913 | ieee80211_wake_queues_by_reason(&local->hw, |
@@ -1035,7 +1034,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
1035 | } | 1034 | } |
1036 | mutex_unlock(&local->chanctx_mtx); | 1035 | mutex_unlock(&local->chanctx_mtx); |
1037 | 1036 | ||
1038 | local->csa_chandef = csa_ie.chandef; | 1037 | sdata->csa_chandef = csa_ie.chandef; |
1039 | 1038 | ||
1040 | if (csa_ie.mode) | 1039 | if (csa_ie.mode) |
1041 | ieee80211_stop_queues_by_reason(&local->hw, | 1040 | ieee80211_stop_queues_by_reason(&local->hw, |