]> err.no Git - linux-2.6/blobdiff - net/mac80211/mesh.h
the scheduled ieee80211 softmac removal
[linux-2.6] / net / mac80211 / mesh.h
index d565b3fb9e6a68dd2d09f8544f23d5b532b4dd38..742003d3a84112b91640b76f255ccb88d303ea44 100644 (file)
@@ -30,7 +30,6 @@
  * @MESH_PATH_FIXED: the mesh path has been manually set and should not be
  *     modified
  * @MESH_PATH_RESOLVED: the mesh path can has been resolved
- * @MESH_PATH_DELETE: the mesh path is scheduled to be deleted
  *
  * MESH_PATH_RESOLVED and MESH_PATH_DELETE are used by the mesh path timer to
  * decide when to stop or cancel the mesh path discovery.
@@ -41,7 +40,6 @@ enum mesh_path_flags {
        MESH_PATH_DSN_VALID =   BIT(2),
        MESH_PATH_FIXED =       BIT(3),
        MESH_PATH_RESOLVED =    BIT(4),
-       MESH_PATH_DELETE =      BIT(5),
 };
 
 /**
@@ -65,9 +63,10 @@ enum mesh_path_flags {
  * @state_lock: mesh pat state lock
  *
  *
- * The combination of dst and dev is unique in the mesh path table. A reference
- * to the next_hop sta will be kept and in case this sta is removed, the
- * mesh_path structure must be also removed or substitued in a rcu safe way
+ * The combination of dst and dev is unique in the mesh path table. Since the
+ * next_hop STA is only protected by RCU as well, deleting the STA must also
+ * remove/substitute the mesh_path structure and wait until that is no longer
+ * reachable before destroying the STA completely.
  */
 struct mesh_path {
        u8 dst[ETH_ALEN];
@@ -230,8 +229,7 @@ void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct net_device *dev,
                bool add);
 bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie,
                              struct net_device *dev);
-void mesh_accept_plinks_update(struct net_device *dev);
-struct sta_info *mesh_plink_add(u8 *hw_addr, u64 rates, struct net_device *dev);
+void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata);
 void mesh_plink_broken(struct sta_info *sta);
 void mesh_plink_deactivate(struct sta_info *sta);
 int mesh_plink_open(struct sta_info *sta);
@@ -270,7 +268,7 @@ static inline int mesh_plink_free_count(struct ieee80211_sub_if_data *sdata)
 
 static inline bool mesh_plink_availables(struct ieee80211_sub_if_data *sdata)
 {
-       return (min(mesh_plink_free_count(sdata),
+       return (min_t(long, mesh_plink_free_count(sdata),
                   MESH_MAX_PLINKS - sdata->local->num_sta)) > 0;
 }