Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | mesh_path |
struct | mesh_table |
struct | rmc_entry |
struct | mesh_rmc |
Macros | |
#define | RMC_BUCKETS 256 |
#define | RMC_QUEUE_MAX_LEN 4 |
#define | RMC_TIMEOUT (3 * HZ) |
#define | IEEE80211_MESH_PEER_INACTIVITY_LIMIT (1800 * HZ) |
#define | IEEE80211_MESH_HOUSEKEEPING_INTERVAL (60 * HZ) |
#define | MESH_DEFAULT_BEACON_INTERVAL 1000 /* in 1024 us units */ |
#define | MESH_PATH_EXPIRE (600 * HZ) |
#define | MESH_MAX_PLINKS 256 |
#define | MESH_MAX_MPATHS 1024 |
#define | MESH_FRAME_QUEUE_LEN 10 |
#define | mesh_allocated 0 |
Enumerations | |
enum | mesh_config_capab_flags { MESHCONF_CAPAB_ACCEPT_PLINKS = BIT(0), MESHCONF_CAPAB_FORWARDING = BIT(3), MESHCONF_CAPAB_TBTT_ADJUSTING = BIT(5) } |
enum | mesh_path_flags { MESH_PATH_ACTIVE = BIT(0), MESH_PATH_RESOLVING = BIT(1), MESH_PATH_SN_VALID = BIT(2), MESH_PATH_FIXED = BIT(3), MESH_PATH_RESOLVED = BIT(4), MESH_PATH_REQ_QUEUED = BIT(5) } |
enum | mesh_deferred_task_flags { MESH_WORK_HOUSEKEEPING, MESH_WORK_GROW_MPATH_TABLE, MESH_WORK_GROW_MPP_TABLE, MESH_WORK_ROOT, MESH_WORK_DRIFT_ADJUST } |
Variables | |
int | mesh_paths_generation |
enum mesh_config_capab_flags - mesh config IE capability flags
: STA is willing to establish additional mesh peerings with other mesh STAs : the STA forwards MSDUs : TBTT adjustment procedure is ongoing
enum mesh_deferred_task_flags - mac80211 mesh deferred tasks
: run the periodic mesh housekeeping tasks : the mesh path table is full and needs to grow. : the mesh portals table is full and needs to grow : the mesh root station needs to send a frame : time to compensate for clock drift relative to other mesh nodes
enum mesh_path_flags |
enum mesh_path_flags - mac80211 mesh path flags
: the mesh path can be used for forwarding : the discovery process is running for this mesh path : the mesh path contains a valid destination sequence number : the mesh path has been manually set and should not be modified : the mesh path can has been resolved : there is an unsent path request for this destination already queued up, waiting for the discovery process to start.
MESH_PATH_RESOLVED is used by the mesh path timer to decide when to stop or cancel the mesh path discovery.
int ieee80211_fill_mesh_addresses | ( | struct ieee80211_hdr * | hdr, |
__le16 * | fc, | ||
const u8 * | meshda, | ||
const u8 * | meshsa | ||
) |
ieee80211_fill_mesh_addresses - fill addresses of a locally originated mesh frame : 802.11 frame header : frame control field : destination address in the mesh : source address address in the mesh. Same as TA, as frame is locally originated.
Return the length of the 802.11 (does not include a mesh control header)
void ieee80211_mesh_init_sdata | ( | struct ieee80211_sub_if_data * | sdata | ) |
void ieee80211_mesh_root_setup | ( | struct ieee80211_if_mesh * | ifmsh | ) |
|
read |
Definition at line 296 of file mesh_sync.c.
int ieee80211_new_mesh_header | ( | struct ieee80211s_hdr * | meshhdr, |
struct ieee80211_sub_if_data * | sdata, | ||
char * | addr4or5, | ||
char * | addr6 | ||
) |
ieee80211_new_mesh_header - create a new mesh header : uninitialized mesh header : mesh interface to be used : 1st address in the ae header, which may correspond to address 4 (if addr6 is NULL) or address 5 (if addr6 is present). It may be NULL. : 2nd address in the ae header, which corresponds to addr6 of the mesh frame
Return the header length.
void ieee80211_start_mesh | ( | struct ieee80211_sub_if_data * | sdata | ) |
void ieee80211_stop_mesh | ( | struct ieee80211_sub_if_data * | sdata | ) |
void ieee80211s_update_metric | ( | struct ieee80211_local * | local, |
struct sta_info * | sta, | ||
struct sk_buff * | skb | ||
) |
Definition at line 298 of file mesh_hwmp.c.
u32 mesh_accept_plinks_update | ( | struct ieee80211_sub_if_data * | sdata | ) |
bool mesh_action_is_path_sel | ( | struct ieee80211_mgmt * | mgmt | ) |
int mesh_add_ds_params_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_ht_cap_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_ht_oper_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_meshconf_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_meshid_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_rsn_ie | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_add_vendor_ies | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
int mesh_gate_num | ( | struct ieee80211_sub_if_data * | sdata | ) |
mesh_gate_num - number of gates known to this interface : subif data
Definition at line 482 of file mesh_pathtbl.c.
void mesh_ids_set_default | ( | struct ieee80211_if_mesh * | mesh | ) |
bool mesh_matches_local | ( | struct ieee80211_sub_if_data * | sdata, |
struct ieee802_11_elems * | ie | ||
) |
mesh_matches_local - check if the config of a mesh point matches ours
: local mesh subif : information elements of a management frame from the mesh peer
This function checks if the mesh configuration of a mesh point matches the local mesh configuration, i.e. if both nodes belong to the same mesh network.
void mesh_mgmt_ies_add | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
Definition at line 590 of file mesh_pathtbl.c.
Definition at line 611 of file mesh_pathtbl.c.
void mesh_neighbour_update | ( | struct ieee80211_sub_if_data * | sdata, |
u8 * | hw_addr, | ||
struct ieee802_11_elems * | ie | ||
) |
Definition at line 406 of file mesh_plink.c.
int mesh_nexthop_lookup | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_nexthop_lookup - put the appropriate next hop on a mesh frame. Calling this function is considered "using" the associated mpath, so preempt a path refresh if this mpath expires soon.
: 802.11 frame to be sent : network subif the frame will be sent through
Returns: 0 if the next hop was found. Nonzero otherwise.
Definition at line 1121 of file mesh_hwmp.c.
int mesh_nexthop_resolve | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_nexthop_resolve - lookup next hop; conditionally start path discovery
: 802.11 frame to be sent : network subif the frame will be sent through
Lookup next hop for given skb and start path discovery if no forwarding information is found.
Returns: 0 if the next hop was found and -ENOENT if the frame was queued. skb is freeed here if no mpath could be allocated.
Definition at line 1067 of file mesh_hwmp.c.
int mesh_path_add | ( | u8 * | dst, |
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_path_add_gate - add the given mpath to a mesh gate to our path table : gate path to add to table
Definition at line 409 of file mesh_pathtbl.c.
mesh_path_assign_nexthop - update mesh path next hop
: mesh path to update : next hop to assign
Locking: mpath->state_lock must be held when calling this function
Definition at line 202 of file mesh_pathtbl.c.
int mesh_path_del | ( | u8 * | addr, |
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_path_del - delete a mesh path from the table
: dst address (ETH_ALEN length) : local subif
Returns: 0 if successful
Definition at line 857 of file mesh_pathtbl.c.
void mesh_path_discard_frame | ( | struct sk_buff * | skb, |
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_path_discard_frame - discard a frame whose path could not be resolved
: frame to discard : network subif the frame was to be sent through
Locking: the function must me called within a rcu_read_lock region
Definition at line 966 of file mesh_pathtbl.c.
int mesh_path_error_tx | ( | u8 | ttl, |
u8 * | target, | ||
__le32 | target_sn, | ||
__le16 | target_rcode, | ||
const u8 * | ra, | ||
struct ieee80211_sub_if_data * | sdata | ||
) |
mesh_send_path error - Sends a PERR mesh management frame
: broken destination : SN of the broken destination : reason code for this PERR : node this frame is addressed to
Note: This function may be called with driver locks taken that the driver also acquires in the TX path. To avoid a deadlock we don't transmit the frame directly but add it to the pending queue instead.
Definition at line 233 of file mesh_hwmp.c.
void mesh_path_expire | ( | struct ieee80211_sub_if_data * | sdata | ) |
Definition at line 1089 of file mesh_pathtbl.c.
mesh_path_fix_nexthop - force a specific next hop for a mesh path
: the mesh path to modify : the next hop to force
Locking: this function must be called holding mpath->state_lock
Definition at line 996 of file mesh_pathtbl.c.
mesh_path_flush_by_nexthop - Deletes mesh paths if their next hop matches
: mesh peer to match
RCU notes: this function is called when a mesh plink transitions from PLINK_ESTAB to any other state, since PLINK_ESTAB state is the only one that allows path creation. This will happen before the sta can be freed (because sta_info_destroy() calls this) so any reader in a rcu read block will be protected against the plink disappearing.
Definition at line 785 of file mesh_pathtbl.c.
mesh_path_flush_pending - free the pending queue of a mesh path
: mesh path whose queue has to be freed
Locking: the function must me called within a rcu_read_lock region
Definition at line 980 of file mesh_pathtbl.c.
|
read |
mesh_path_lookup - look up a path in the mesh path table : hardware address (ETH_ALEN length) of destination : local subif
Returns: pointer to the mesh path structure, or NULL if not found
Locking: must be called within a read rcu section.
Definition at line 361 of file mesh_pathtbl.c.
|
read |
mesh_path_lookup_by_idx - look up a path in the mesh path table by its index : index : local subif, or NULL for all entries
Returns: pointer to the mesh path structure, or NULL if not found.
Locking: must be called within a read rcu section.
Definition at line 381 of file mesh_pathtbl.c.
void mesh_path_quiesce | ( | struct ieee80211_sub_if_data * | sdata | ) |
void mesh_path_restart | ( | struct ieee80211_sub_if_data * | sdata | ) |
mesh_path_send_to_gates - sends pending frames to all known mesh gates
: mesh path whose queue will be emptied
If there is only one gate, the frames are transferred from the failed mpath queue to that gate's queue. If there are more than one gates, the frames are copied from each gate to the next. After frames are copied, the mpath queues are emptied onto the transmission queue.
Definition at line 915 of file mesh_pathtbl.c.
void mesh_path_start_discovery | ( | struct ieee80211_sub_if_data * | sdata | ) |
mesh_path_start_discovery - launch a path discovery from the PREQ queue
: local mesh subif
Definition at line 973 of file mesh_hwmp.c.
Definition at line 1156 of file mesh_hwmp.c.
mesh_path_tx_pending - sends pending frames in a mesh path queue
: mesh path to activate
Locking: the state_lock of the mpath structure must NOT be held when calling this function.
Definition at line 898 of file mesh_pathtbl.c.
void mesh_path_tx_root_frame | ( | struct ieee80211_sub_if_data * | sdata | ) |
Definition at line 1190 of file mesh_hwmp.c.
Definition at line 1042 of file mesh_pathtbl.c.
Definition at line 1111 of file mesh_pathtbl.c.
bool mesh_peer_accepts_plinks | ( | struct ieee802_11_elems * | ie | ) |
Definition at line 556 of file mesh_plink.c.
mesh_plink_broken - deactivates paths and sends perr when a link breaks
: broken peer link
This function must be called from the rate control algorithm if enough delivery errors suggest that a peer link is no longer usable.
Definition at line 718 of file mesh_pathtbl.c.
mesh_plink_deactivate - deactivate mesh peer link
: mesh peer link to deactivate
All mesh paths with this peer as next hop will be flushed
Definition at line 198 of file mesh_plink.c.
Definition at line 529 of file mesh_plink.c.
int mesh_rmc_check | ( | u8 * | sa, |
struct ieee80211s_hdr * | mesh_hdr, | ||
struct ieee80211_sub_if_data * | sdata | ||
) |
void mesh_rmc_free | ( | struct ieee80211_sub_if_data * | sdata | ) |
int mesh_rmc_init | ( | struct ieee80211_sub_if_data * | sdata | ) |
void mesh_rx_path_sel_frame | ( | struct ieee80211_sub_if_data * | sdata, |
struct ieee80211_mgmt * | mgmt, | ||
size_t | len | ||
) |
Definition at line 851 of file mesh_hwmp.c.
void mesh_rx_plink_frame | ( | struct ieee80211_sub_if_data * | sdata, |
struct ieee80211_mgmt * | mgmt, | ||
size_t | len, | ||
struct ieee80211_rx_status * | rx_status | ||
) |
Definition at line 570 of file mesh_plink.c.
int mpp_path_add | ( | u8 * | dst, |
u8 * | mpp, | ||
struct ieee80211_sub_if_data * | sdata | ||
) |
Definition at line 631 of file mesh_pathtbl.c.
|
read |
Definition at line 366 of file mesh_pathtbl.c.
int mesh_paths_generation |
Definition at line 43 of file mesh_pathtbl.c.