diff options
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 93682925331b..b02738038af8 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -1617,22 +1617,24 @@ static void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx, mutex_unlock(&pHddCtx->tdls_lock); hdd_notice("already in mode %d", (int)tdls_mode); + switch (tdls_mode) { + /* TDLS is already enabled hence clear source mask, return */ + case eTDLS_SUPPORT_ENABLED: + case eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: + case eTDLS_SUPPORT_EXTERNAL_CONTROL: + clear_bit((unsigned long)source, + &pHddCtx->tdls_source_bitmap); + hdd_notice("clear source mask:%d", source); + return; /* TDLS is already disabled hence set source mask, return */ - if (eTDLS_SUPPORT_DISABLED == tdls_mode) { + case eTDLS_SUPPORT_DISABLED: set_bit((unsigned long)source, &pHddCtx->tdls_source_bitmap); hdd_notice("set source mask:%d", source); return; - } - - /* TDLS is already enabled hence clear source mask, return */ - if (eTDLS_SUPPORT_ENABLED == tdls_mode) { - clear_bit((unsigned long)source, - &pHddCtx->tdls_source_bitmap); - hdd_notice("clear source mask:%d", source); + default: return; } - return; } status = hdd_get_front_adapter(pHddCtx, &pAdapterNode); |
