summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormercadie2009-11-23 13:13:01 +0000
committermercadie2009-11-23 13:13:01 +0000
commit947e3f752e530ad875e03be084e104f669976eea (patch)
treec77c486671f3142d03f66f3df23b0812efeb3a8a
parent03713c97969c8652c3508d995733646c15bbd1cd (diff)
cesar/cp/{beacon,sta/mgr}: store new info for each new avln
Add the fields 'hm' and 'avln_num_slots' in cp_net_t structure. Change hm type in cp_beacon_variant_fields_t to mac_coexistence_mode_t. In cp_beacon_get_and_process_beacon store in the context of the avln: - hm (hybrid mode), - avln_num_slots (number of beacon slots in the AVLN), - avln_slot_id (beacon slot id used by this avln), - avln_slot_usage (beacon slot usage in this avln). Please enter the commit message for your changes. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@6447 017c9cb6-072f-447c-8318-d5b54f68fe89
-rw-r--r--cesar/cp/beacon/inc/unpack.h2
-rw-r--r--cesar/cp/beacon/src/beacon.c7
-rw-r--r--cesar/cp/sta/mgr/inc/net.h8
3 files changed, 16 insertions, 1 deletions
diff --git a/cesar/cp/beacon/inc/unpack.h b/cesar/cp/beacon/inc/unpack.h
index d125c855d4..920a829a78 100644
--- a/cesar/cp/beacon/inc/unpack.h
+++ b/cesar/cp/beacon/inc/unpack.h
@@ -31,7 +31,7 @@ struct cp_beacon_variant_fields_t
/** nid msb. */
uint nid_msb;
/** hybrid mode. */
- u8 hm;
+ mac_coexistence_mode_t hm;
/** stei. */
u8 stei;
/** Beacon type. */
diff --git a/cesar/cp/beacon/src/beacon.c b/cesar/cp/beacon/src/beacon.c
index ac80e9c390..889bdfb80b 100644
--- a/cesar/cp/beacon/src/beacon.c
+++ b/cesar/cp/beacon/src/beacon.c
@@ -990,6 +990,13 @@ cp_beacon_get_and_process_beacon (cp_t *ctx)
sta = cp_beacon_update_sta_peer (ctx, &unpack, net);
// Store the access mode of the station.
cp_net_set_access (ctx, net, beacon->payload->fc.access);
+ // Store the hybrid mode of the avln.
+ net->hm = unpack.variant_fields.hm;
+ // Store the number of beacon slots
+ net->avln_num_slots = unpack.variant_fields.num_slots;
+ // Store slot id and slot usage
+ cp_net_set_slot_id_and_usage (ctx, net,unpack.variant_fields.slot_id,
+ unpack.variant_fields.slot_usage);
if ((!ctx->beacon.hoip.hoipcd)
&& (cp_sta_own_data_get_cco_status (ctx)))
diff --git a/cesar/cp/sta/mgr/inc/net.h b/cesar/cp/sta/mgr/inc/net.h
index 5439efd320..0019fb7730 100644
--- a/cesar/cp/sta/mgr/inc/net.h
+++ b/cesar/cp/sta/mgr/inc/net.h
@@ -49,6 +49,9 @@ struct cp_net_t
/** AVLN slot id. */
u8 avln_slot_id;
+ /** Number of beacon slots in the AVLN. */
+ u8 avln_num_slots;
+
/**
* Slot usage mask read in the AVLN central beacon.
*/
@@ -79,6 +82,11 @@ struct cp_net_t
* Number of associated stations in the net.
*/
uint num_associated_stas;
+
+ /**
+ * Hybrid mode of the avln.
+ */
+ mac_coexistence_mode_t hm;
};
BEGIN_DECLS