qcacld-3.0: Add provision to configure Association disallowed functionality

As part of MBO[MultiBand Operations], association disallowed functionality
is added.i.e. if driver receives probe response/beacon with MBO IE
with association disallowed subattribute present, STA stops connection
attempt with the particular BSS.

This code change addresses the following:
1) Adds provision to ignore/disable association disallowed functionality in
host driver. Apply this change to enable STA to act as testbed for AP
association disallowed test case.

2) Limit the assoc disallowed functionality in host driver only for connect
cases, i.e. limit this only when driver tries to join BSS
[MLM_WT_JOIN_BEACON_STATE] since similar functionality is in supplicant to
take care of scan results case and checks for the assoc disallowed
subattribute presence in probe responses.

Change-Id: I66c6f7f31ebdaad32d01ab8882935861ddb54f51
CRs-Fixed: 1067826
This commit is contained in:
Selvaraj, Sridhar
2016-09-28 12:57:32 +05:30
committed by qcabuildsw
parent 999799766d
commit ac4fcf34be
8 changed files with 76 additions and 35 deletions

View File

@@ -4140,6 +4140,26 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy,
} }
} }
if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED]) {
uint8_t ignore_assoc_disallowed;
ignore_assoc_disallowed
= nla_get_u8(tb[
QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED]);
hdd_info("Set ignore_assoc_disallowed value - %d",
ignore_assoc_disallowed);
if ((ignore_assoc_disallowed <
QCA_IGNORE_ASSOC_DISALLOWED_DISABLE) ||
(ignore_assoc_disallowed >
QCA_IGNORE_ASSOC_DISALLOWED_ENABLE))
return -EPERM;
sme_update_session_param(hdd_ctx->hHal,
adapter->sessionId,
SIR_PARAM_IGNORE_ASSOC_DISALLOWED,
ignore_assoc_disallowed);
}
return ret_val; return ret_val;
} }

View File

@@ -2311,6 +2311,20 @@ enum qca_access_policy {
QCA_ACCESS_POLICY_DENY_UNLESS_LISTED, QCA_ACCESS_POLICY_DENY_UNLESS_LISTED,
}; };
/**
* enum qca_ignore_assoc_disallowed - Ignore assoc disallowed values
*
* The valid values for the ignore assoc disallowed
*
* @QCA_IGNORE_ASSOC_DISALLOWED_DISABLE: Disable ignore assoc disallowed
* @QCA_IGNORE_ASSOC_DISALLOWED_ENABLE: Enable ignore assoc disallowed
*
*/
enum qca_ignore_assoc_disallowed {
QCA_IGNORE_ASSOC_DISALLOWED_DISABLE,
QCA_IGNORE_ASSOC_DISALLOWED_ENABLE
};
/** /**
* enum qca_wlan_vendor_config: wifi config attr * enum qca_wlan_vendor_config: wifi config attr
* *
@@ -2342,6 +2356,8 @@ enum qca_access_policy {
* parameters * parameters
* @QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER: Unsigned 8bit length attribute to update * @QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER: Unsigned 8bit length attribute to update
* power save config to turn off/on qpower * power save config to turn off/on qpower
* @QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED: Ignore Assoc Disallowed
* [MBO]
* @QCA_WLAN_VENDOR_ATTR_CONFIG_LAST: last config * @QCA_WLAN_VENDOR_ATTR_CONFIG_LAST: last config
* @QCA_WLAN_VENDOR_ATTR_CONFIG_MAX: max config * @QCA_WLAN_VENDOR_ATTR_CONFIG_MAX: max config
*/ */
@@ -2396,6 +2412,7 @@ enum qca_wlan_vendor_config {
QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX, QCA_WLAN_VENDOR_ATTR_CONFIG_IFINDEX,
/* Unsigned 8-bit, for setting qpower dynamically */ /* Unsigned 8-bit, for setting qpower dynamically */
QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER = 25, QCA_WLAN_VENDOR_ATTR_CONFIG_QPOWER = 25,
QCA_WLAN_VENDOR_ATTR_CONFIG_IGNORE_ASSOC_DISALLOWED = 26,
/* keep last */ /* keep last */
QCA_WLAN_VENDOR_ATTR_CONFIG_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_LAST,
QCA_WLAN_VENDOR_ATTR_CONFIG_MAX = QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =

View File

@@ -2506,9 +2506,11 @@ typedef struct sSirUpdateAPWPSIEsReq {
/* /*
* enum sir_update_session_param_type - session param type * enum sir_update_session_param_type - session param type
* @SIR_PARAM_SSID_HIDDEN: ssidHidden parameter * @SIR_PARAM_SSID_HIDDEN: ssidHidden parameter
* @SIR_PARAM_IGNORE_ASSOC_DISALLOWED: ignore_assoc_disallowed parameter
*/ */
enum sir_update_session_param_type { enum sir_update_session_param_type {
SIR_PARAM_SSID_HIDDEN, SIR_PARAM_SSID_HIDDEN,
SIR_PARAM_IGNORE_ASSOC_DISALLOWED,
}; };
/* /*

View File

@@ -484,6 +484,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
uint8_t beacon_tx_rate; uint8_t beacon_tx_rate;
uint8_t *access_policy_vendor_ie; uint8_t *access_policy_vendor_ie;
uint8_t access_policy; uint8_t access_policy;
bool ignore_assoc_disallowed;
} tPESession, *tpPESession; } tPESession, *tpPESession;
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------

View File

@@ -3191,6 +3191,31 @@ lim_check_and_announce_join_success(tpAniSirGlobal mac_ctx,
session_entry->defaultAuthFailureTimeout = 0; session_entry->defaultAuthFailureTimeout = 0;
} }
/*
* Check if MBO Association disallowed subattr is present and post
* failure status to LIM if present
*/
if (!session_entry->ignore_assoc_disallowed &&
beacon_probe_rsp->assoc_disallowed) {
lim_log(mac_ctx, LOGW,
FL("Connection fails due to assoc disallowed reason(%d):%pM PESessionID %d"),
beacon_probe_rsp->assoc_disallowed_reason,
session_entry->bssId,
session_entry->peSessionId);
mlm_join_cnf.resultCode = eSIR_SME_ASSOC_REFUSED;
mlm_join_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
mlm_join_cnf.sessionId = session_entry->peSessionId;
if (session_entry->pLimMlmJoinReq) {
qdf_mem_free(session_entry->pLimMlmJoinReq);
session_entry->pLimMlmJoinReq = NULL;
}
lim_post_sme_message(mac_ctx, LIM_MLM_JOIN_CNF,
(uint32_t *) &mlm_join_cnf);
return;
}
/* Update Beacon Interval at CFG database */ /* Update Beacon Interval at CFG database */
if (beacon_probe_rsp->HTCaps.present) if (beacon_probe_rsp->HTCaps.present)

View File

@@ -106,15 +106,6 @@ lim_process_beacon_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_pkt_info,
return; return;
} }
if (bcn_ptr->assoc_disallowed) {
lim_log(mac_ctx, LOG1,
FL("Association disallowed in AP "MAC_ADDRESS_STR " Reason code %d"),
MAC_ADDR_ARRAY(mac_hdr->sa),
bcn_ptr->assoc_disallowed_reason);
qdf_mem_free(bcn_ptr);
return;
}
/* /*
* during scanning, when any session is active, and * during scanning, when any session is active, and
* beacon/Pr belongs to one of the session, fill up the * beacon/Pr belongs to one of the session, fill up the

View File

@@ -171,15 +171,6 @@ lim_process_probe_rsp_frame(tpAniSirGlobal mac_ctx, uint8_t *rx_Packet_info,
return; return;
} }
if (probe_rsp->assoc_disallowed) {
lim_log(mac_ctx, LOG1,
FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"),
MAC_ADDR_ARRAY(header->bssId),
probe_rsp->assoc_disallowed_reason);
qdf_mem_free(probe_rsp);
return;
}
lim_check_and_add_bss_description(mac_ctx, probe_rsp, lim_check_and_add_bss_description(mac_ctx, probe_rsp,
rx_Packet_info, false, true); rx_Packet_info, false, true);
/* To Support BT-AMP */ /* To Support BT-AMP */
@@ -404,15 +395,6 @@ lim_process_probe_rsp_frame_no_session(tpAniSirGlobal mac_ctx,
return; return;
} }
if (probe_rsp->assoc_disallowed) {
lim_log(mac_ctx, LOG1,
FL("Association disallowed by AP "MAC_ADDRESS_STR " Reason code %d"),
MAC_ADDR_ARRAY(header->bssId),
probe_rsp->assoc_disallowed_reason);
qdf_mem_free(probe_rsp);
return;
}
lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache")); lim_log(mac_ctx, LOG2, FL("Save this probe rsp in LFR cache"));
lim_check_and_add_bss_description(mac_ctx, probe_rsp, lim_check_and_add_bss_description(mac_ctx, probe_rsp,
rx_packet_info, false, true); rx_packet_info, false, true);

View File

@@ -4256,6 +4256,9 @@ static void __lim_process_sme_session_update(tpAniSirGlobal mac_ctx,
case SIR_PARAM_SSID_HIDDEN: case SIR_PARAM_SSID_HIDDEN:
lim_handle_update_ssid_hidden(mac_ctx, session, msg->param_val); lim_handle_update_ssid_hidden(mac_ctx, session, msg->param_val);
break; break;
case SIR_PARAM_IGNORE_ASSOC_DISALLOWED:
session->ignore_assoc_disallowed = msg->param_val;
break;
default: default:
lim_log(mac_ctx, LOGE, FL("Unknown session param")); lim_log(mac_ctx, LOGE, FL("Unknown session param"));
break; break;