Skip to content

Commit 9825826

Browse files
masapgregkh
authored andcommitted
mac80211: Remove invalid flag operations in mesh TSF synchronization
[ Upstream commit 76f43b4c0a9337af22827d78de4f2b8fd5328489 ] mesh_sync_offset_adjust_tbtt() implements Extensible synchronization framework ([1] 13.13.2 Extensible synchronization framework). It shall not operate the flag "TBTT Adjusting subfield" ([1] 8.4.2.100.8 Mesh Capability), since it is used only for MBCA ([1] 13.13.4 Mesh beacon collision avoidance, see 13.13.4.4.3 TBTT scanning and adjustment procedures for detail). So this patch remove the flag operations. [1] IEEE Std 802.11 2012 Signed-off-by: Masashi Honma <masashi.honma@gmail.com> [remove adjusting_tbtt entirely, since it's now unused] Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f0d8fb7 commit 9825826

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

net/mac80211/ieee80211_i.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,6 @@ struct ieee80211_if_mesh {
682682
const struct ieee80211_mesh_sync_ops *sync_ops;
683683
s64 sync_offset_clockdrift_max;
684684
spinlock_t sync_offset_lock;
685-
bool adjusting_tbtt;
686685
/* mesh power save */
687686
enum nl80211_mesh_power_mode nonpeer_pm;
688687
int ps_peers_light_sleep;

net/mac80211/mesh.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,6 @@ int mesh_add_meshconf_ie(struct ieee80211_sub_if_data *sdata,
295295
/* Mesh PS mode. See IEEE802.11-2012 8.4.2.100.8 */
296296
*pos |= ifmsh->ps_peers_deep_sleep ?
297297
IEEE80211_MESHCONF_CAPAB_POWER_SAVE_LEVEL : 0x00;
298-
*pos++ |= ifmsh->adjusting_tbtt ?
299-
IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING : 0x00;
300298
*pos++ = 0x00;
301299

302300
return 0;
@@ -866,7 +864,6 @@ int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
866864
ifmsh->mesh_cc_id = 0; /* Disabled */
867865
/* register sync ops from extensible synchronization framework */
868866
ifmsh->sync_ops = ieee80211_mesh_sync_ops_get(ifmsh->mesh_sp_id);
869-
ifmsh->adjusting_tbtt = false;
870867
ifmsh->sync_offset_clockdrift_max = 0;
871868
set_bit(MESH_WORK_HOUSEKEEPING, &ifmsh->wrkq_flags);
872869
ieee80211_mesh_root_setup(ifmsh);

net/mac80211/mesh_sync.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ static void mesh_sync_offset_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
119119
*/
120120

121121
if (elems->mesh_config && mesh_peer_tbtt_adjusting(elems)) {
122-
clear_sta_flag(sta, WLAN_STA_TOFFSET_KNOWN);
123122
msync_dbg(sdata, "STA %pM : is adjusting TBTT\n",
124123
sta->sta.addr);
125124
goto no_sync;
@@ -168,11 +167,9 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata,
168167
struct beacon_data *beacon)
169168
{
170169
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
171-
u8 cap;
172170

173171
WARN_ON(ifmsh->mesh_sp_id != IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET);
174172
WARN_ON(!rcu_read_lock_held());
175-
cap = beacon->meshconf->meshconf_cap;
176173

177174
spin_lock_bh(&ifmsh->sync_offset_lock);
178175

@@ -186,21 +183,13 @@ static void mesh_sync_offset_adjust_tbtt(struct ieee80211_sub_if_data *sdata,
186183
"TBTT : kicking off TBTT adjustment with clockdrift_max=%lld\n",
187184
ifmsh->sync_offset_clockdrift_max);
188185
set_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags);
189-
190-
ifmsh->adjusting_tbtt = true;
191186
} else {
192187
msync_dbg(sdata,
193188
"TBTT : max clockdrift=%lld; too small to adjust\n",
194189
(long long)ifmsh->sync_offset_clockdrift_max);
195190
ifmsh->sync_offset_clockdrift_max = 0;
196-
197-
ifmsh->adjusting_tbtt = false;
198191
}
199192
spin_unlock_bh(&ifmsh->sync_offset_lock);
200-
201-
beacon->meshconf->meshconf_cap = ifmsh->adjusting_tbtt ?
202-
IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING | cap :
203-
~IEEE80211_MESHCONF_CAPAB_TBTT_ADJUSTING & cap;
204193
}
205194

206195
static const struct sync_method sync_methods[] = {

0 commit comments

Comments
 (0)