aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mesh_hwmp.c
diff options
context:
space:
mode:
authorThomas Pedersen <thomas@cozybit.com>2011-11-24 20:15:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-11-28 14:44:06 -0500
commitdca7e9430cb3e492437a5ce891b8b3e315c147ca (patch)
treea7503e86e20e649074bbaccd5272d61a51425e2e /net/mac80211/mesh_hwmp.c
parentd3c1597b8d1ba0447ce858c7c385eabcf69f2c8f (diff)
{nl,cfg,mac}80211: implement dot11MeshHWMPperrMinInterval
As per 802.11mb 13.9.11.3 Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r--net/mac80211/mesh_hwmp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index 208ba35661f9..fe93386d6aa9 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -241,11 +241,15 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
241{ 241{
242 struct ieee80211_local *local = sdata->local; 242 struct ieee80211_local *local = sdata->local;
243 struct sk_buff *skb; 243 struct sk_buff *skb;
244 struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
244 struct ieee80211_mgmt *mgmt; 245 struct ieee80211_mgmt *mgmt;
245 u8 *pos, ie_len; 246 u8 *pos, ie_len;
246 int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.mesh_action) + 247 int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.mesh_action) +
247 sizeof(mgmt->u.action.u.mesh_action); 248 sizeof(mgmt->u.action.u.mesh_action);
248 249
250 if (time_before(jiffies, ifmsh->next_perr))
251 return -EAGAIN;
252
249 skb = dev_alloc_skb(local->hw.extra_tx_headroom + 253 skb = dev_alloc_skb(local->hw.extra_tx_headroom +
250 hdr_len + 254 hdr_len +
251 2 + 15 /* PERR IE */); 255 2 + 15 /* PERR IE */);
@@ -290,6 +294,8 @@ int mesh_path_error_tx(u8 ttl, u8 *target, __le32 target_sn,
290 294
291 /* see note in function header */ 295 /* see note in function header */
292 prepare_frame_for_deferred_tx(sdata, skb); 296 prepare_frame_for_deferred_tx(sdata, skb);
297 ifmsh->next_perr = TU_TO_EXP_TIME(
298 ifmsh->mshcfg.dot11MeshHWMPperrMinInterval);
293 ieee80211_add_pending_skb(local, skb); 299 ieee80211_add_pending_skb(local, skb);
294 return 0; 300 return 0;
295} 301}