mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Fix a beacon template update dead loop
When sap is started, a dead loop for beacon template updating
can happen due to the following conditions:
1) before vdev start happens for sap, he_ops will be retrieved
from the ie buffer imposed by upper layer, and bss color
initial setup will also be retrieved here and then updated
to session->he_op;
2) and it happens at least in some cases, that session->he_op.
bss_col_disabled will be set to true, but due to there is
actually no bss color changing really happening here, no
new color will be setup here;
3) later when sap is running and starts to do beaconing, it
will start to check if session->he_op.bss_col_disabled is
setup to true, and if yes, new beacon template will be
issued to fw;
4) later on, fw finishes the beacon template setup and sends
a notification to driver in beacon tx success event, and
driver will go back to steps 3) to check
session->he_op.bss_col_disabled again;
If no real bss color change happens here, step 3) and 4) will
loop forever.
Fix the above dead loop by introducing check of
session->he_bss_color_change.new_color before driver code starts
to inspect the bss color change countdown value and updating
beacon template to fw.
Change-Id: I4a32ce9f547e988087c769ad8fab2973582ce6e4
CRs-Fixed: 2764896
This commit is contained in:
parent
7e11aadd9d
commit
2f61669efc
1 changed files with 19 additions and 18 deletions
|
|
@ -2067,30 +2067,31 @@ lim_handle_bss_color_change_ie(struct mac_context *mac_ctx,
|
|||
|
||||
/* handle bss color change IE */
|
||||
if (LIM_IS_AP_ROLE(session) &&
|
||||
session->he_op.bss_col_disabled) {
|
||||
session->he_op.bss_col_disabled &&
|
||||
session->he_bss_color_change.new_color) {
|
||||
pe_debug("countdown: %d, new_color: %d",
|
||||
session->he_bss_color_change.countdown,
|
||||
session->he_bss_color_change.new_color);
|
||||
if (session->he_bss_color_change.countdown > 0) {
|
||||
session->he_bss_color_change.countdown--;
|
||||
} else {
|
||||
session->bss_color_changing = 0;
|
||||
qdf_mem_zero(&beacon_params, sizeof(beacon_params));
|
||||
if (session->he_bss_color_change.new_color != 0) {
|
||||
session->he_op.bss_col_disabled = 0;
|
||||
session->he_op.bss_color =
|
||||
session->he_bss_color_change.new_color;
|
||||
beacon_params.paramChangeBitmap |=
|
||||
PARAM_BSS_COLOR_CHANGED;
|
||||
beacon_params.bss_color_disabled = 0;
|
||||
beacon_params.bss_color =
|
||||
session->he_op.bss_color;
|
||||
lim_send_beacon_params(mac_ctx,
|
||||
&beacon_params,
|
||||
session);
|
||||
lim_send_obss_color_collision_cfg(mac_ctx,
|
||||
session,
|
||||
OBSS_COLOR_COLLISION_DETECTION);
|
||||
}
|
||||
session->he_op.bss_col_disabled = 0;
|
||||
session->he_op.bss_color =
|
||||
session->he_bss_color_change.new_color;
|
||||
session->he_bss_color_change.new_color = 0;
|
||||
beacon_params.paramChangeBitmap |=
|
||||
PARAM_BSS_COLOR_CHANGED;
|
||||
beacon_params.bss_color_disabled = 0;
|
||||
beacon_params.bss_color = session->he_op.bss_color;
|
||||
lim_send_beacon_params(mac_ctx,
|
||||
&beacon_params,
|
||||
session);
|
||||
lim_send_obss_color_collision_cfg(
|
||||
mac_ctx, session,
|
||||
OBSS_COLOR_COLLISION_DETECTION);
|
||||
}
|
||||
|
||||
lim_send_bss_color_change_ie_update(mac_ctx, session);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue