qcacmn: t2lm draft 3.0 changes
Changes to incorporate link mapping size in t2lm control field of t2lm ie per draft 3.0 CRs-Fixed: 3431897 Change-Id: I61834258e6348b6483a86eb9e9217e3d5997c2c9
This commit is contained in:

committed by
Madan Koyyalamudi

parent
1e6fe4c3a2
commit
40931af2b3
@@ -2661,8 +2661,8 @@ struct wlan_ie_tid_to_link_mapping {
|
|||||||
* - Mapping switch time (0 or 2 octet)
|
* - Mapping switch time (0 or 2 octet)
|
||||||
* - Expected duration (0 or 3 octet)
|
* - Expected duration (0 or 3 octet)
|
||||||
* - Link mapping presence indicator (0 or 1 octet)
|
* - Link mapping presence indicator (0 or 1 octet)
|
||||||
* - Link mapping of TID 0(optional) to TID 7(optional). Each field has 0 or 2
|
* - Link mapping of TID 0(optional) to TID 7(optional). Each field has 0 or 1
|
||||||
* octets.
|
* or 2 octets.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Definitions related TID-to-link mapping control*/
|
/* Definitions related TID-to-link mapping control*/
|
||||||
@@ -2678,6 +2678,9 @@ struct wlan_ie_tid_to_link_mapping {
|
|||||||
/* Expected duration present bit */
|
/* Expected duration present bit */
|
||||||
#define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_IDX 4
|
#define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_IDX 4
|
||||||
#define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS 1
|
#define WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS 1
|
||||||
|
/* Link Mapping size bit */
|
||||||
|
#define WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_IDX 5
|
||||||
|
#define WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_BITS 1
|
||||||
/* Bits 5-7 are reserved */
|
/* Bits 5-7 are reserved */
|
||||||
/* Link mapping presence indicator */
|
/* Link mapping presence indicator */
|
||||||
#define WLAN_T2LM_CONTROL_LINK_MAPPING_PRESENCE_INDICATOR_IDX 8
|
#define WLAN_T2LM_CONTROL_LINK_MAPPING_PRESENCE_INDICATOR_IDX 8
|
||||||
|
@@ -169,6 +169,9 @@ struct wlan_preferred_links {
|
|||||||
* @ieee_link_map_tid: Indicates ieee link id mapping of all the TIDS
|
* @ieee_link_map_tid: Indicates ieee link id mapping of all the TIDS
|
||||||
* @hw_link_map_tid: Indicates hw link id mapping of all the TIDS
|
* @hw_link_map_tid: Indicates hw link id mapping of all the TIDS
|
||||||
* @timer_started: flag to check if T2LM timer is started for this T2LM IE
|
* @timer_started: flag to check if T2LM timer is started for this T2LM IE
|
||||||
|
* @link_mapping_size: value 1 indicates the length of Link Mapping Of TIDn
|
||||||
|
* field is 1 octet, value 0 indicates the length of the
|
||||||
|
* Link Mapping of TIDn field is 2 octets
|
||||||
*/
|
*/
|
||||||
struct wlan_t2lm_info {
|
struct wlan_t2lm_info {
|
||||||
enum wlan_t2lm_direction direction;
|
enum wlan_t2lm_direction direction;
|
||||||
@@ -180,6 +183,7 @@ struct wlan_t2lm_info {
|
|||||||
uint16_t ieee_link_map_tid[T2LM_MAX_NUM_TIDS];
|
uint16_t ieee_link_map_tid[T2LM_MAX_NUM_TIDS];
|
||||||
uint16_t hw_link_map_tid[T2LM_MAX_NUM_TIDS];
|
uint16_t hw_link_map_tid[T2LM_MAX_NUM_TIDS];
|
||||||
bool timer_started;
|
bool timer_started;
|
||||||
|
bool link_mapping_size;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -664,6 +664,7 @@ static inline void mlo_t2lm_ctx_init(struct wlan_mlo_dev_context *ml_dev,
|
|||||||
|
|
||||||
t2lm->direction = WLAN_T2LM_BIDI_DIRECTION;
|
t2lm->direction = WLAN_T2LM_BIDI_DIRECTION;
|
||||||
t2lm->default_link_mapping = 1;
|
t2lm->default_link_mapping = 1;
|
||||||
|
t2lm->link_mapping_size = 0;
|
||||||
|
|
||||||
wlan_mlo_t2lm_timer_init(vdev);
|
wlan_mlo_t2lm_timer_init(vdev);
|
||||||
}
|
}
|
||||||
|
@@ -72,10 +72,16 @@ QDF_STATUS wlan_mlo_parse_t2lm_info(uint8_t *ie,
|
|||||||
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_IDX,
|
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_IDX,
|
||||||
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS);
|
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS);
|
||||||
|
|
||||||
t2lm_debug("direction:%d default_link_mapping:%d mapping_switch_time_present:%d expected_duration_present:%d",
|
t2lm->link_mapping_size =
|
||||||
|
QDF_GET_BITS(t2lm_control,
|
||||||
|
WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_IDX,
|
||||||
|
WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_BITS);
|
||||||
|
|
||||||
|
t2lm_debug("direction:%d default_link_mapping:%d mapping_switch_time_present:%d expected_duration_present:%d link_mapping_size:%d",
|
||||||
t2lm->direction, t2lm->default_link_mapping,
|
t2lm->direction, t2lm->default_link_mapping,
|
||||||
t2lm->mapping_switch_time_present,
|
t2lm->mapping_switch_time_present,
|
||||||
t2lm->expected_duration_present);
|
t2lm->expected_duration_present,
|
||||||
|
t2lm->link_mapping_size);
|
||||||
|
|
||||||
if (t2lm->default_link_mapping) {
|
if (t2lm->default_link_mapping) {
|
||||||
ie_ptr = t2lm_control_field + sizeof(uint8_t);
|
ie_ptr = t2lm_control_field + sizeof(uint8_t);
|
||||||
@@ -112,13 +118,18 @@ QDF_STATUS wlan_mlo_parse_t2lm_info(uint8_t *ie,
|
|||||||
if (!(link_mapping_presence_ind & BIT(tid_num)))
|
if (!(link_mapping_presence_ind & BIT(tid_num)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!t2lm->link_mapping_size) {
|
||||||
t2lm->ieee_link_map_tid[tid_num] =
|
t2lm->ieee_link_map_tid[tid_num] =
|
||||||
qdf_le16_to_cpu(*(uint16_t *)link_mapping_of_tids);
|
qdf_le16_to_cpu(*(uint16_t *)link_mapping_of_tids);
|
||||||
|
link_mapping_of_tids += sizeof(uint16_t);
|
||||||
|
} else {
|
||||||
|
t2lm->ieee_link_map_tid[tid_num] =
|
||||||
|
*(uint8_t *)link_mapping_of_tids;
|
||||||
|
link_mapping_of_tids += sizeof(uint8_t);
|
||||||
|
}
|
||||||
|
|
||||||
t2lm_rl_debug("link mapping of TID%d is %x", tid_num,
|
t2lm_rl_debug("link mapping of TID%d is %x", tid_num,
|
||||||
t2lm->ieee_link_map_tid[tid_num]);
|
t2lm->ieee_link_map_tid[tid_num]);
|
||||||
|
|
||||||
link_mapping_of_tids += sizeof(uint16_t);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
@@ -266,6 +277,11 @@ uint8_t *wlan_mlo_add_t2lm_info_ie(uint8_t *frm, struct wlan_t2lm_info *t2lm,
|
|||||||
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS,
|
WLAN_T2LM_CONTROL_EXPECTED_DURATION_PRESENT_BITS,
|
||||||
t2lm->expected_duration_present);
|
t2lm->expected_duration_present);
|
||||||
|
|
||||||
|
QDF_SET_BITS(t2lm_control,
|
||||||
|
WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_IDX,
|
||||||
|
WLAN_T2LM_CONTROL_LINK_MAPPING_SIZE_BITS,
|
||||||
|
t2lm->link_mapping_size);
|
||||||
|
|
||||||
if (t2lm->default_link_mapping) {
|
if (t2lm->default_link_mapping) {
|
||||||
/* Link mapping of TIDs are not present when default mapping is
|
/* Link mapping of TIDs are not present when default mapping is
|
||||||
* set. Hence, the size of TID-To-Link mapping control is one
|
* set. Hence, the size of TID-To-Link mapping control is one
|
||||||
@@ -331,16 +347,31 @@ uint8_t *wlan_mlo_add_t2lm_info_ie(uint8_t *frm, struct wlan_t2lm_info *t2lm,
|
|||||||
if (!t2lm->ieee_link_map_tid[tid_num])
|
if (!t2lm->ieee_link_map_tid[tid_num])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (!t2lm->link_mapping_size) {
|
||||||
*(uint16_t *)link_mapping_of_tids =
|
*(uint16_t *)link_mapping_of_tids =
|
||||||
htole16(t2lm->ieee_link_map_tid[tid_num]);
|
htole16(t2lm->ieee_link_map_tid[tid_num]);
|
||||||
t2lm_rl_debug("link mapping of TID%d is %x", tid_num,
|
t2lm_rl_debug("link mapping of TID%d is %x",
|
||||||
|
tid_num,
|
||||||
htole16(t2lm->ieee_link_map_tid[tid_num]));
|
htole16(t2lm->ieee_link_map_tid[tid_num]));
|
||||||
link_mapping_of_tids += sizeof(uint16_t);
|
link_mapping_of_tids += sizeof(uint16_t);
|
||||||
|
} else {
|
||||||
|
*(uint8_t *)link_mapping_of_tids =
|
||||||
|
t2lm->ieee_link_map_tid[tid_num];
|
||||||
|
t2lm_rl_debug("link mapping of TID%d is %x",
|
||||||
|
tid_num,
|
||||||
|
t2lm->ieee_link_map_tid[tid_num]);
|
||||||
|
link_mapping_of_tids += sizeof(uint8_t);
|
||||||
|
}
|
||||||
num_tids++;
|
num_tids++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!t2lm->link_mapping_size) {
|
||||||
frm += num_tids * sizeof(uint16_t);
|
frm += num_tids * sizeof(uint16_t);
|
||||||
t2lm_ie->elem_len += (num_tids * sizeof(uint16_t));
|
t2lm_ie->elem_len += (num_tids * sizeof(uint16_t));
|
||||||
|
} else {
|
||||||
|
frm += num_tids * sizeof(uint8_t);
|
||||||
|
t2lm_ie->elem_len += (num_tids * sizeof(uint8_t));
|
||||||
|
}
|
||||||
|
|
||||||
return frm;
|
return frm;
|
||||||
}
|
}
|
||||||
@@ -644,6 +675,7 @@ static void wlan_mlo_t2lm_handle_expected_duration_expiry(
|
|||||||
t2lm_ctx->established_t2lm.t2lm.direction = WLAN_T2LM_BIDI_DIRECTION;
|
t2lm_ctx->established_t2lm.t2lm.direction = WLAN_T2LM_BIDI_DIRECTION;
|
||||||
t2lm_ctx->established_t2lm.t2lm.default_link_mapping = 1;
|
t2lm_ctx->established_t2lm.t2lm.default_link_mapping = 1;
|
||||||
t2lm_ctx->established_t2lm.disabled_link_bitmap = 0;
|
t2lm_ctx->established_t2lm.disabled_link_bitmap = 0;
|
||||||
|
t2lm_ctx->established_t2lm.t2lm.link_mapping_size = 0;
|
||||||
t2lm_debug("Set established mapping to default mapping");
|
t2lm_debug("Set established mapping to default mapping");
|
||||||
|
|
||||||
/* Notify the registered caller about the link update*/
|
/* Notify the registered caller about the link update*/
|
||||||
|
Reference in New Issue
Block a user