qcacld-3.0: Replace tSirMacReasonCodes with enum wlan_reason_code

Replace all enums of tSirMacReasonCodes with common
enum wlan_reason_code.

Change-Id: Ida950a08ac4ceea2911344a8d919b2d93ac7d1fe
CRs-Fixed: 2781197
This commit is contained in:
gaurank kathpalia 2020-09-21 11:55:57 +05:30 • committed by snandini
commit b81c0ae7d2
37 changed files with 191 additions and 339 deletions

View file

@ -52,7 +52,7 @@ struct wlan_mlme_psoc_ext_obj {
* originated from driver
* @peer_discon_ies: Disconnect IEs received in deauth/disassoc frames
* from peer
* @discon_reason: Disconnect reason as per enum eSirMacReasonCodes
* @discon_reason: Disconnect reason as per enum wlan_reason_code
* @from_ap: True if the disconnection is initiated from AP
*/
struct wlan_disconnect_info {

View file

@ -448,7 +448,7 @@ void hdd_abort_ongoing_sta_connection(struct hdd_context *hdd_ctx)
sta_adapter->vdev_id);
status = wlan_hdd_disconnect(sta_adapter,
eCSR_DISCONNECT_REASON_DEAUTH,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("wlan_hdd_disconnect failed, status: %d",
status);
@ -1925,8 +1925,7 @@ static QDF_STATUS hdd_dis_connect_handler(struct hdd_adapter *adapter,
*/
if (roam_info && eCSR_ROAM_LOSTLINK == roam_status) {
reason = roam_info->reasonCode;
if (reason ==
eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON)
if (reason == REASON_STA_LEAVING)
pr_info("wlan: disconnected due to poor signal, rssi is %d dB\n",
roam_info->rxRssi);
}
@ -3028,7 +3027,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
mac_handle,
adapter->vdev_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
}
return QDF_STATUS_E_FAILURE;
}
@ -3090,7 +3089,7 @@ hdd_association_completion_handler(struct hdd_adapter *adapter,
mac_handle,
adapter->vdev_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
}
qdf_mem_free(reqRsnIe);
qdf_mem_free(rsp_rsn_ie);

View file

@ -99,8 +99,7 @@ wlan_hdd_btc_chain_mode_handler(struct wlan_objmgr_vdev *vdev)
switch (adapter->device_mode) {
case QDF_STA_MODE:
case QDF_P2P_CLIENT_MODE:
wlan_hdd_disconnect(adapter, 0,
eSIR_MAC_PREV_AUTH_NOT_VALID_REASON);
wlan_hdd_disconnect(adapter, 0, REASON_PREV_AUTH_NOT_VALID);
break;
case QDF_SAP_MODE:
case QDF_P2P_GO_MODE:

View file

@ -19986,7 +19986,7 @@ static void wlan_hdd_cfg80211_clear_privacy(struct hdd_adapter *adapter)
static int wlan_hdd_wait_for_disconnect(mac_handle_t mac_handle,
struct hdd_adapter *adapter,
uint16_t reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
eConnectionState prev_conn_state;
struct hdd_station_ctx *sta_ctx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
@ -20108,7 +20108,7 @@ static void wlan_hdd_wait_for_roaming(mac_handle_t mac_handle,
}
int wlan_hdd_try_disconnect(struct hdd_adapter *adapter,
enum eSirMacReasonCodes reason)
enum wlan_reason_code reason)
{
mac_handle_t mac_handle;
@ -20419,8 +20419,7 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy,
return status;
/* Try disconnecting if already in connected state */
status = wlan_hdd_try_disconnect(adapter,
eSIR_MAC_UNSPEC_FAILURE_REASON);
status = wlan_hdd_try_disconnect(adapter, REASON_UNSPEC_FAILURE);
if (0 > status) {
hdd_err("Failed to disconnect the existing connection");
return -EALREADY;
@ -20581,7 +20580,7 @@ hdd_qca_reason_to_str(enum qca_disconnect_reason_codes reason)
/**
* wlan_hdd_sir_mac_to_qca_reason() - Convert to qca internal disconnect reason
* @internal_reason: Mac reason code of type @enum eSirMacReasonCodes
* @internal_reason: Mac reason code of type @enum wlan_reason_code
*
* Check if it is internal reason code and convert it to the
* enum qca_disconnect_reason_codes.
@ -20589,60 +20588,60 @@ hdd_qca_reason_to_str(enum qca_disconnect_reason_codes reason)
* Return: Reason code of type enum qca_disconnect_reason_codes
*/
static enum qca_disconnect_reason_codes
wlan_hdd_sir_mac_to_qca_reason(enum eSirMacReasonCodes internal_reason)
wlan_hdd_sir_mac_to_qca_reason(enum wlan_reason_code internal_reason)
{
enum qca_disconnect_reason_codes reason =
QCA_DISCONNECT_REASON_UNSPECIFIED;
switch (internal_reason) {
case eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE:
case REASON_HOST_TRIGGERED_ROAM_FAILURE:
reason = QCA_DISCONNECT_REASON_INTERNAL_ROAM_FAILURE;
break;
case eSIR_MAC_FW_TRIGGERED_ROAM_FAILURE:
case REASON_FW_TRIGGERED_ROAM_FAILURE:
reason = QCA_DISCONNECT_REASON_EXTERNAL_ROAM_FAILURE;
break;
case eSIR_MAC_GATEWAY_REACHABILITY_FAILURE:
case REASON_GATEWAY_REACHABILITY_FAILURE:
reason =
QCA_DISCONNECT_REASON_GATEWAY_REACHABILITY_FAILURE;
break;
case eSIR_MAC_UNSUPPORTED_CHANNEL_CSA:
case REASON_UNSUPPORTED_CHANNEL_CSA:
reason = QCA_DISCONNECT_REASON_UNSUPPORTED_CHANNEL_CSA;
break;
case eSIR_MAC_OPER_CHANNEL_DISABLED_INDOOR:
case REASON_OPER_CHANNEL_DISABLED_INDOOR:
reason =
QCA_DISCONNECT_REASON_OPER_CHANNEL_DISABLED_INDOOR;
break;
case eSIR_MAC_OPER_CHANNEL_USER_DISABLED:
case REASON_OPER_CHANNEL_USER_DISABLED:
reason =
QCA_DISCONNECT_REASON_OPER_CHANNEL_USER_DISABLED;
break;
case eSIR_MAC_DEVICE_RECOVERY:
case REASON_DEVICE_RECOVERY:
reason = QCA_DISCONNECT_REASON_DEVICE_RECOVERY;
break;
case eSIR_MAC_KEY_TIMEOUT:
case REASON_KEY_TIMEOUT:
reason = QCA_DISCONNECT_REASON_KEY_TIMEOUT;
break;
case eSIR_MAC_OPER_CHANNEL_BAND_CHANGE:
case REASON_OPER_CHANNEL_BAND_CHANGE:
reason = QCA_DISCONNECT_REASON_OPER_CHANNEL_BAND_CHANGE;
break;
case eSIR_MAC_IFACE_DOWN:
case REASON_IFACE_DOWN:
reason = QCA_DISCONNECT_REASON_IFACE_DOWN;
break;
case eSIR_MAC_PEER_XRETRY_FAIL:
case REASON_PEER_XRETRY_FAIL:
reason = QCA_DISCONNECT_REASON_PEER_XRETRY_FAIL;
break;
case eSIR_MAC_PEER_INACTIVITY:
case REASON_PEER_INACTIVITY:
reason = QCA_DISCONNECT_REASON_PEER_INACTIVITY;
break;
case eSIR_MAC_SA_QUERY_TIMEOUT:
case REASON_SA_QUERY_TIMEOUT:
reason = QCA_DISCONNECT_REASON_SA_QUERY_TIMEOUT;
break;
case eSIR_MAC_CHANNEL_SWITCH_FAILED:
case REASON_CHANNEL_SWITCH_FAILED:
reason = QCA_DISCONNECT_REASON_CHANNEL_SWITCH_FAILURE;
break;
case eSIR_MAC_BEACON_MISSED:
case REASON_BEACON_MISSED:
reason = QCA_DISCONNECT_REASON_BEACON_MISS_FAILURE;
break;
case eSIR_MAC_USER_TRIGGERED_ROAM_FAILURE:
case REASON_USER_TRIGGERED_ROAM_FAILURE:
reason = QCA_DISCONNECT_REASON_USER_TRIGGERED;
break;
default:
@ -20657,7 +20656,7 @@ wlan_hdd_sir_mac_to_qca_reason(enum eSirMacReasonCodes internal_reason)
/**
* wlan_hdd_get_ieee80211_disconnect_reason() - Get ieee80211 disconnect reason
* @adapter: pointer to adapter structure
* @reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* Reason codes that are greater than eSIR_MAC_REASON_PROP_START are internal
* reason codes. Convert them to qca reason code format and cache in adapter
@ -20668,7 +20667,7 @@ wlan_hdd_sir_mac_to_qca_reason(enum eSirMacReasonCodes internal_reason)
*/
static enum ieee80211_reasoncode
wlan_hdd_get_cfg80211_disconnect_reason(struct hdd_adapter *adapter,
enum eSirMacReasonCodes reason)
enum wlan_reason_code reason)
{
enum ieee80211_reasoncode ieee80211_reason = WLAN_REASON_UNSPECIFIED;
@ -20676,14 +20675,14 @@ wlan_hdd_get_cfg80211_disconnect_reason(struct hdd_adapter *adapter,
* Convert and cache internal reason code in adapter. This can be
* sent to userspace with a vendor event.
*/
if (reason >= eSIR_MAC_REASON_PROP_START) {
if (reason >= REASON_PROP_START) {
adapter->last_disconnect_reason =
wlan_hdd_sir_mac_to_qca_reason(reason);
/*
* Applications expect reason code as 0 for beacon miss failure
* due to backward compatibility. So send ieee80211_reason as 0.
*/
if (reason == eSIR_MAC_BEACON_MISSED)
if (reason == REASON_BEACON_MISSED)
ieee80211_reason = 0;
} else {
ieee80211_reason = (enum ieee80211_reasoncode)reason;
@ -20699,7 +20698,7 @@ wlan_hdd_get_cfg80211_disconnect_reason(struct hdd_adapter *adapter,
void
wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter,
bool locally_generated,
enum eSirMacReasonCodes reason,
enum wlan_reason_code reason,
uint8_t *disconnect_ies,
uint16_t disconnect_ies_len)
{
@ -20721,7 +20720,7 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter,
void
wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter,
bool locally_generated,
enum eSirMacReasonCodes reason,
enum wlan_reason_code reason,
uint8_t *disconnect_ies,
uint16_t disconnect_ies_len)
{
@ -20741,7 +20740,7 @@ wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter,
#endif
int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
int ret;
mac_handle_t mac_handle;
@ -21348,7 +21347,7 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
param)))
goto fn_end;
} else {
if (param->reason_code == eSIR_MAC_1X_AUTH_FAILURE_REASON)
if (param->reason_code == REASON_1X_AUTH_FAILURE)
hdd_softap_check_wait_for_tx_eap_pkt(
adapter, (struct qdf_mac_addr *)mac);
@ -21462,7 +21461,7 @@ int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
const uint8_t *mac)
{
uint16_t reason = eSIR_MAC_DEAUTH_LEAVING_BSS_REASON;
uint16_t reason = REASON_DEAUTH_NETWORK_LEAVING;
uint8_t subtype = SIR_MAC_MGMT_DEAUTH >> 4;
return _wlan_hdd_cfg80211_del_station(wiphy, dev, mac, reason, subtype);
@ -21471,7 +21470,7 @@ int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy, struct net_device *dev,
uint8_t *mac)
{
uint16_t reason = eSIR_MAC_DEAUTH_LEAVING_BSS_REASON;
uint16_t reason = REASON_DEAUTH_NETWORK_LEAVING;
uint8_t subtype = SIR_MAC_MGMT_DEAUTH >> 4;
return _wlan_hdd_cfg80211_del_station(wiphy, dev, mac, reason, subtype);

View file

@ -585,7 +585,7 @@ int wlan_hdd_cfg80211_update_band(struct hdd_context *hdd_ctx,
* @adapter: Pointer to adapter
* @locally_generated: True if the disconnection is internally generated.
* False if the disconnection is received from peer.
* @reason: Disconnect reason as per @enum eSirMacReasonCodes
* @reason: Disconnect reason as per @enum wlan_reason_code
* @disconnect_ies: IEs received in Deauth/Disassoc from peer
* @disconnect_ies_len: Length of @disconnect_ies
*
@ -597,7 +597,7 @@ int wlan_hdd_cfg80211_update_band(struct hdd_context *hdd_ctx,
void
wlan_hdd_cfg80211_indicate_disconnect(struct hdd_adapter *adapter,
bool locally_generated,
enum eSirMacReasonCodes reason,
enum wlan_reason_code reason,
uint8_t *disconnect_ies,
uint16_t disconnect_ies_len);
@ -677,27 +677,27 @@ uint8_t hdd_get_sap_operating_band(struct hdd_context *hdd_ctx);
/**
* wlan_hdd_try_disconnect() - try disconnnect from previous connection
* @adapter: Pointer to adapter
* @reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* This function is used to disconnect from previous connection
*
* Return: 0 for success, non-zero for failure
*/
int wlan_hdd_try_disconnect(struct hdd_adapter *adapter,
enum eSirMacReasonCodes reason);
enum wlan_reason_code reason);
/**
* wlan_hdd_disconnect() - hdd disconnect api
* @adapter: Pointer to adapter
* @reason: CSR disconnect reason code as per @enum eCsrRoamDisconnectReason
* @mac_reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @mac_reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* This function is used to issue a disconnect request to SME
*
* Return: 0 for success, non-zero for failure
*/
int wlan_hdd_disconnect(struct hdd_adapter *adapter, u16 reason,
tSirMacReasonCodes mac_reason);
enum wlan_reason_code mac_reason);
/**
* wlan_hdd_get_adjacent_chan(): Gets next/previous channel

View file

@ -770,7 +770,7 @@ static void hdd_clear_sta(struct hdd_adapter *adapter,
return;
wlansap_populate_del_sta_params(sta_info->sta_mac.bytes,
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON,
REASON_DEAUTH_NETWORK_LEAVING,
SIR_MAC_MGMT_DISASSOC,
&del_sta_params);
@ -4769,7 +4769,7 @@ static int wlan_hdd_setup_driver_overrides(struct hdd_adapter *ap_adapter)
void
hdd_check_and_disconnect_sta_on_invalid_channel(struct hdd_context *hdd_ctx,
tSirMacReasonCodes reason)
enum wlan_reason_code reason)
{
struct hdd_adapter *sta_adapter;
uint32_t sta_chan_freq;
@ -5218,7 +5218,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (policy_mgr_is_force_scc(hdd_ctx->psoc))
hdd_check_and_disconnect_sta_on_invalid_channel(
hdd_ctx,
eSIR_MAC_OPER_CHANNEL_DISABLED_INDOOR);
REASON_OPER_CHANNEL_DISABLED_INDOOR);
}
beacon = adapter->session.ap.beacon;

View file

@ -267,7 +267,7 @@ int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx);
* hdd_check_and_disconnect_sta_on_invalid_channel() - Disconnect STA if it is
* on invalid channel
* @hdd_ctx: pointer to hdd context
* @reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* STA should be disconnected before starting the SAP if it is on indoor
* channel.
@ -276,7 +276,7 @@ int wlan_hdd_disable_channels(struct hdd_context *hdd_ctx);
*/
void
hdd_check_and_disconnect_sta_on_invalid_channel(struct hdd_context *hdd_ctx,
tSirMacReasonCodes reason);
enum wlan_reason_code reason);
/**
* hdd_convert_dot11mode_from_phymode() - get dot11 mode from phymode

View file

@ -1824,7 +1824,7 @@ static __iw_softap_disassoc_sta(struct net_device *dev,
hdd_debug("data " QDF_MAC_ADDR_FMT,
QDF_MAC_ADDR_REF(peer_macaddr));
wlansap_populate_del_sta_params(peer_macaddr,
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON,
REASON_DEAUTH_NETWORK_LEAVING,
SIR_MAC_MGMT_DISASSOC,
&del_sta_params);
hdd_softap_sta_disassoc(adapter, &del_sta_params);

View file

@ -6339,7 +6339,7 @@ static bool check_disable_channels(struct hdd_context *hdd_ctx,
* disconnect_sta_and_stop_sap() - Disconnect STA and stop SAP
*
* @hdd_ctx: Pointer to hdd context
* @reason: Disconnect reason code as per @enum eSirMacReasonCodes
* @reason: Disconnect reason code as per @enum wlan_reason_code
*
* Disable channels provided by user and disconnect STA if it is
* connected to any AP, stop SAP and send deauthentication request
@ -6348,7 +6348,7 @@ static bool check_disable_channels(struct hdd_context *hdd_ctx,
* Return: None
*/
static void disconnect_sta_and_stop_sap(struct hdd_context *hdd_ctx,
enum eSirMacReasonCodes reason)
enum wlan_reason_code reason)
{
struct hdd_adapter *adapter, *next = NULL;
QDF_STATUS status;
@ -6555,7 +6555,7 @@ mem_alloc_failed:
if (ret)
return ret;
disconnect_sta_and_stop_sap(hdd_ctx,
eSIR_MAC_OPER_CHANNEL_BAND_CHANGE);
REASON_OPER_CHANNEL_BAND_CHANGE);
}
hdd_exit();

View file

@ -6974,7 +6974,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
struct sap_config *sap_config;
mac_handle_t mac_handle;
struct wlan_objmgr_vdev *vdev;
enum eSirMacReasonCodes reason = eSIR_MAC_IFACE_DOWN;
enum wlan_reason_code reason = REASON_IFACE_DOWN;
hdd_enter();
@ -7017,7 +7017,7 @@ QDF_STATUS hdd_stop_adapter(struct hdd_context *hdd_ctx,
roam_profile = hdd_roam_profile(adapter);
if (cds_is_driver_recovering())
reason = eSIR_MAC_DEVICE_RECOVERY;
reason = REASON_DEVICE_RECOVERY;
/* For NDI do not use roam_profile */
if (adapter->device_mode == QDF_NDI_MODE) {
@ -8277,7 +8277,7 @@ QDF_STATUS hdd_start_all_adapters(struct hdd_context *hdd_ctx)
/* indicate disconnected event to nl80211 */
wlan_hdd_cfg80211_indicate_disconnect(
adapter, true,
eSIR_MAC_DEVICE_RECOVERY,
REASON_DEVICE_RECOVERY,
NULL, 0);
} else if (eConnectionState_Connecting == conn_state) {
/*

View file

@ -281,7 +281,7 @@ hdd_handle_nud_fail_non_sta(struct hdd_adapter *adapter)
adapter->vdev_id);
/* Issue Disconnect */
status = wlan_hdd_disconnect(adapter, eCSR_DISCONNECT_REASON_DEAUTH,
eSIR_MAC_GATEWAY_REACHABILITY_FAILURE);
REASON_GATEWAY_REACHABILITY_FAILURE);
if (0 != status) {
hdd_err("wlan_hdd_disconnect failed, status: %d",
status);

View file

@ -1427,7 +1427,7 @@ static void hdd_country_change_update_sta(struct hdd_context *hdd_ctx)
hdd_ctx->mac_handle,
adapter->vdev_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
roam_profile->phyMode = csr_phy_mode;
}
break;

View file

@ -433,85 +433,6 @@ enum mac_status_code {
#endif
};
/**
* Reason Code (present in Deauthentication/Disassociation
* Management frames) enum
*/
typedef enum eSirMacReasonCodes {
eSIR_MAC_UNSPEC_FAILURE_REASON = 1, /* Unspecified reason */
eSIR_MAC_PREV_AUTH_NOT_VALID_REASON = 2, /* Previous authentication no longer valid */
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON = 3, /* Deauthenticated because sending station is leaving (or has left) IBSS or ESS */
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON = 4, /* Disassociated due to inactivity */
eSIR_MAC_DISASSOC_DUE_TO_DISABILITY_REASON = 5, /* Disassociated because AP is unable to handle all currently associated stations */
eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON = 6, /* Class 2 frame received from nonauthenticated station */
eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON = 7, /* Class 3 frame received from nonassociated station */
eSIR_MAC_DISASSOC_LEAVING_BSS_REASON = 8, /* Disassociated because sending station is leaving (or has left) BSS */
eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON = 9, /* Station requesting (re)association is not authenticated with responding station */
eSIR_MAC_PWR_CAPABILITY_BAD_REASON = 10, /* Disassociated because the information in the Power Capability element is unacceptable */
eSIR_MAC_SPRTD_CHANNELS_BAD_REASON = 11, /* Disassociated because the information in the Supported Channels element is unacceptable */
eSIR_MAC_BSS_TRANSITION_DISASSOC = 12,
eSIR_MAC_INVALID_IE_REASON = 13, /* Invalid information element, i.e., an information element defined in this standard for */
/* which the content does not meet the specifications in Clause 7 */
eSIR_MAC_MIC_FAILURE_REASON = 14, /* Message integrity code (MIC) failure */
eSIR_MAC_4WAY_HANDSHAKE_TIMEOUT_REASON = 15, /* 4-Way Handshake timeout */
eSIR_MAC_GR_KEY_UPDATE_TIMEOUT_REASON = 16, /* Group Key Handshake timeout */
eSIR_MAC_RSN_IE_MISMATCH_REASON = 17, /* Information element in 4-Way Handshake different from (Re)Association Request/Probe */
/* Response/Beacon frame */
eSIR_MAC_INVALID_MC_CIPHER_REASON = 18, /* Invalid group cipher */
eSIR_MAC_INVALID_UC_CIPHER_REASON = 19, /* Invalid pairwise cipher */
eSIR_MAC_INVALID_AKMP_REASON = 20, /* Invalid AKMP */
eSIR_MAC_UNSUPPORTED_RSN_IE_VER_REASON = 21, /* Unsupported RSN information element version */
eSIR_MAC_INVALID_RSN_CAPABILITIES_REASON = 22, /* Invalid RSN information element capabilities */
eSIR_MAC_1X_AUTH_FAILURE_REASON = 23, /* IEEE 802.1X authentication failed */
eSIR_MAC_CIPHER_SUITE_REJECTED_REASON = 24, /* Cipher suite rejected because of the security policy */
#ifdef FEATURE_WLAN_TDLS
eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE = 25, /* TDLS direct link teardown due to TDLS peer STA unreachable via the TDLS direct link */
eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON = 26, /* TDLS direct link teardown for unspecified reason */
#endif
/* reserved 27 - 30 */
#ifdef WLAN_FEATURE_11W
eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION = 31, /* Robust management frames policy violation */
#endif
eSIR_MAC_QOS_UNSPECIFIED_REASON = 32, /* Disassociated for unspecified, QoS-related reason */
eSIR_MAC_QAP_NO_BANDWIDTH_REASON = 33, /* Disassociated because QoS AP lacks sufficient bandwidth for this QoS STA */
eSIR_MAC_XS_UNACKED_FRAMES_REASON = 34, /* Disassociated because excessive number of frames need to be acknowledged, but are not */
/* acknowledged due to AP transmissions and/or poor channel conditions */
eSIR_MAC_BAD_TXOP_USE_REASON = 35, /* Disassociated because STA is transmitting outside the limits of its TXOPs */
eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON = 36, /* Requested from peer STA as the STA is leaving the BSS (or resetting) */
eSIR_MAC_PEER_REJECT_MECHANISIM_REASON = 37, /* Requested from peer STA as it does not want to use the mechanism */
eSIR_MAC_MECHANISM_NOT_SETUP_REASON = 38, /* Requested from peer STA as the STA received frames using the mechanism for which a */
/* setup is required */
eSIR_MAC_PEER_TIMEDOUT_REASON = 39, /* Requested from peer STA due to timeout */
eSIR_MAC_CIPHER_NOT_SUPPORTED_REASON = 45, /* Peer STA does not support the requested cipher suite */
eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON = 46, /* FT reason */
eSIR_MAC_POOR_RSSI_CONDITIONS = 71, /* Disassociated due to poor RSSI conditions */
/* reserved 47 - 65535. */
/*
* Internal reason codes: Add any internal reason code just after
* eSIR_MAC_REASON_PROP_START and decrease the value of
* eSIR_MAC_REASON_PROP_START accordingly.
*/
eSIR_MAC_REASON_PROP_START = 65519,
eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE = 65519,
eSIR_MAC_FW_TRIGGERED_ROAM_FAILURE = 65520,
eSIR_MAC_GATEWAY_REACHABILITY_FAILURE = 65521,
eSIR_MAC_UNSUPPORTED_CHANNEL_CSA = 65522,
eSIR_MAC_OPER_CHANNEL_DISABLED_INDOOR = 65523,
eSIR_MAC_OPER_CHANNEL_USER_DISABLED = 65524,
eSIR_MAC_DEVICE_RECOVERY = 65525,
eSIR_MAC_KEY_TIMEOUT = 65526,
eSIR_MAC_OPER_CHANNEL_BAND_CHANGE = 65527,
eSIR_MAC_IFACE_DOWN = 65528,
eSIR_MAC_PEER_XRETRY_FAIL = 65529,
eSIR_MAC_PEER_INACTIVITY = 65530,
eSIR_MAC_SA_QUERY_TIMEOUT = 65531,
eSIR_MAC_CHANNEL_SWITCH_FAILED = 65532,
eSIR_MAC_BEACON_MISSED = 65533,
eSIR_MAC_USER_TRIGGERED_ROAM_FAILURE = 65534,
} tSirMacReasonCodes;
/* / Frame control field format (2 bytes) */
typedef struct sSirMacFrameCtl {

View file

@ -250,7 +250,7 @@ struct lim_sta_context {
enum ani_akm_type akm_type; /* akm in rsn/wpa ie */
uint16_t listenInterval;
tSirMacCapabilityInfo capabilityInfo;
tSirMacReasonCodes disassocReason;
enum wlan_reason_code disassocReason;
tSirResultCodes resultCode;

View file

@ -93,7 +93,7 @@ static void lim_delete_sta_util(struct mac_context *mac_ctx, tpDeleteStaContext
return;
} else {
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
REASON_DISASSOC_DUE_TO_INACTIVITY,
stads->staAddr, session_entry, false);
lim_trigger_sta_deletion(mac_ctx, stads, session_entry);
}
@ -107,8 +107,7 @@ static void lim_delete_sta_util(struct mac_context *mac_ctx, tpDeleteStaContext
* eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE
*/
lim_send_sme_tdls_del_sta_ind(mac_ctx, stads,
session_entry,
eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE);
session_entry, REASON_TDLS_PEER_UNREACHABLE);
} else {
#endif
/* TearDownLink with AP */
@ -138,7 +137,7 @@ static void lim_delete_sta_util(struct mac_context *mac_ctx, tpDeleteStaContext
}
stads->mlmStaContext.disassocReason =
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
REASON_DISASSOC_DUE_TO_INACTIVITY;
stads->mlmStaContext.cleanupTrigger =
eLIM_LINK_MONITORING_DEAUTH;
@ -183,7 +182,7 @@ void lim_delete_sta_context(struct mac_context *mac_ctx,
tpDeleteStaContext msg = (tpDeleteStaContext) lim_msg->bodyptr;
struct pe_session *session_entry;
tpDphHashNode sta_ds;
enum eSirMacReasonCodes reason_code;
enum wlan_reason_code reason_code;
struct reject_ap_info ap_info;
if (!msg) {
@ -225,16 +224,16 @@ void lim_delete_sta_context(struct mac_context *mac_ctx,
return;
}
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
REASON_DISASSOC_DUE_TO_INACTIVITY,
msg->addr2, session_entry, false);
if (msg->reasonCode ==
HAL_DEL_STA_REASON_CODE_SA_QUERY_TIMEOUT)
reason_code = eSIR_MAC_SA_QUERY_TIMEOUT;
reason_code = REASON_SA_QUERY_TIMEOUT;
else if (msg->reasonCode ==
HAL_DEL_STA_REASON_CODE_XRETRY)
reason_code = eSIR_MAC_PEER_XRETRY_FAIL;
reason_code = REASON_PEER_XRETRY_FAIL;
else
reason_code = eSIR_MAC_PEER_INACTIVITY;
reason_code = REASON_PEER_INACTIVITY;
lim_tear_down_link_with_ap(mac_ctx,
session_entry->peSessionId,
reason_code,
@ -257,7 +256,7 @@ void lim_delete_sta_context(struct mac_context *mac_ctx,
pe_err("Deleting Unknown station");
lim_print_mac_addr(mac_ctx, msg->addr2, LOGE);
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON,
REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA,
msg->addr2, session_entry, false);
break;
@ -271,10 +270,10 @@ void lim_delete_sta_context(struct mac_context *mac_ctx,
return;
}
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_BSS_TRANSITION_DISASSOC,
REASON_DISASSOC_BSS_TRANSITION ,
session_entry->bssId, session_entry, false);
lim_tear_down_link_with_ap(mac_ctx, session_entry->peSessionId,
eSIR_MAC_BSS_TRANSITION_DISASSOC,
REASON_DISASSOC_BSS_TRANSITION ,
eLIM_LINK_MONITORING_DEAUTH);
break;
@ -321,12 +320,12 @@ lim_trigger_sta_deletion(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
sta_ds->sta_deletion_in_progress = true;
sta_ds->mlmStaContext.disassocReason =
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
REASON_DISASSOC_DUE_TO_INACTIVITY;
sta_ds->mlmStaContext.cleanupTrigger = eLIM_LINK_MONITORING_DISASSOC;
qdf_mem_copy(&mlm_disassoc_ind.peerMacAddr, sta_ds->staAddr,
sizeof(tSirMacAddr));
mlm_disassoc_ind.reasonCode =
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
REASON_DISASSOC_DUE_TO_INACTIVITY;
mlm_disassoc_ind.disassocTrigger = eLIM_LINK_MONITORING_DISASSOC;
/* Update PE session Id */
@ -344,7 +343,7 @@ lim_trigger_sta_deletion(struct mac_context *mac_ctx, tpDphHashNode sta_ds,
void
lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
tSirMacReasonCodes reasonCode,
enum wlan_reason_code reasonCode,
enum eLimDisassocTrigger trigger)
{
tpDphHashNode sta = NULL;
@ -379,7 +378,7 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
tLimMlmDeauthInd mlmDeauthInd;
if ((sta->mlmStaContext.disassocReason ==
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON) ||
REASON_DEAUTH_NETWORK_LEAVING) ||
(sta->mlmStaContext.cleanupTrigger ==
eLIM_HOST_DEAUTH)) {
pe_err("Host already issued deauth, do nothing");
@ -404,7 +403,7 @@ lim_tear_down_link_with_ap(struct mac_context *mac, uint8_t sessionId,
* connection, if we connect to same AP after HB failure.
*/
if (mac->mlme_cfg->sta.deauth_before_connection &&
eSIR_MAC_BEACON_MISSED == reasonCode) {
reasonCode == REASON_BEACON_MISSED) {
int apCount = mac->lim.gLimHeartBeatApMacIndex;
if (mac->lim.gLimHeartBeatApMacIndex)
@ -532,7 +531,7 @@ void lim_handle_heart_beat_failure(struct mac_context *mac_ctx,
*/
lim_tear_down_link_with_ap(mac_ctx,
session->peSessionId,
eSIR_MAC_BEACON_MISSED,
REASON_BEACON_MISSED,
eLIM_LINK_MONITORING_DEAUTH);
}
} else {
@ -562,8 +561,7 @@ void lim_rx_invalid_peer_process(struct mac_context *mac_ctx,
struct ol_rx_inv_peer_params *msg =
(struct ol_rx_inv_peer_params *)lim_msg->bodyptr;
struct pe_session *session_entry;
uint16_t reason_code =
eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON;
uint16_t reason_code = REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA;
if (!msg) {
pe_err("Invalid body pointer in message");

View file

@ -182,7 +182,7 @@ static QDF_STATUS lim_check_sta_in_pe_entries(struct mac_context *mac_ctx,
QDF_MAC_ADDR_REF(
session->self_mac_addr));
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
(uint8_t *) hdr->sa, session, false);
/*
* Cleanup Rx path posts eWNI_SME_DISASSOC_RSP
@ -192,7 +192,7 @@ static QDF_STATUS lim_check_sta_in_pe_entries(struct mac_context *mac_ctx,
sta_ds->mlmStaContext.cleanupTrigger =
eLIM_DUPLICATE_ENTRY;
sta_ds->mlmStaContext.disassocReason =
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON;
REASON_DISASSOC_DUE_TO_INACTIVITY;
lim_send_sme_disassoc_ind(mac_ctx, sta_ds,
session);
*dup_entry = true;
@ -1171,7 +1171,7 @@ static bool lim_process_assoc_req_no_sta_ctx(struct mac_context *mac_ctx,
* reason code.
*/
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON,
REASON_STA_NOT_AUTHENTICATED,
hdr->sa, session, false);
pe_warn("rcvd %s req, sessionid: %d, without pre-auth ctx"
@ -1389,8 +1389,7 @@ static bool lim_chk_wmm(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
QDF_STATUS_SUCCESS) {
pe_warn("AdmitControl: TSPEC rejected");
lim_send_assoc_rsp_mgmt_frame(
mac_ctx,
eSIR_MAC_QAP_NO_BANDWIDTH_REASON,
mac_ctx, REASON_NO_BANDWIDTH,
1, hdr->sa, sub_type, 0, session,
false);
#ifdef WLAN_DEBUG
@ -1402,7 +1401,7 @@ static bool lim_chk_wmm(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
!= QDF_STATUS_SUCCESS) {
pe_warn("AdmitControl: Sta rejected");
lim_send_assoc_rsp_mgmt_frame(
mac_ctx, eSIR_MAC_QAP_NO_BANDWIDTH_REASON, 1,
mac_ctx, REASON_NO_BANDWIDTH, 1,
hdr->sa, sub_type, 0, session, false);
#ifdef WLAN_DEBUG
mac_ctx->lim.gLimNumAssocReqDropACRejectSta++;

View file

@ -881,7 +881,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
assoc_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
/* Send advisory Disassociation frame to AP */
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
hdr->sa, session_entry, false);
goto assocReject;
}
@ -897,7 +897,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
assoc_cnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
/* Send advisory Disassociation frame to AP */
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
hdr->sa, session_entry, false);
goto assocReject;
}
@ -954,7 +954,7 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
/* Send advisory Disassociation frame to AP */
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON, hdr->sa,
REASON_UNSPEC_FAILURE, hdr->sa,
session_entry, false);
goto assocReject;
}

View file

@ -541,7 +541,7 @@ static void lim_process_auth_frame_type1(struct mac_context *mac_ctx,
"(associd: %d) sta mac" QDF_MAC_ADDR_FMT,
associd, QDF_MAC_ADDR_REF(mac_hdr->sa));
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
(uint8_t *) mac_hdr->sa,
pe_session, false);
lim_trigger_sta_deletion(mac_ctx, sta_ds_ptr,
@ -605,7 +605,7 @@ static void lim_process_auth_frame_type1(struct mac_context *mac_ctx,
QDF_MAC_ADDR_FMT, associd,
QDF_MAC_ADDR_REF(sta_ds_ptr->staAddr));
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
(uint8_t *)auth_node->peerMacAddr,
pe_session, false);
lim_trigger_sta_deletion(mac_ctx, sta_ds_ptr,
@ -943,7 +943,7 @@ static void lim_process_auth_frame_type2(struct mac_context *mac_ctx,
pe_session);
lim_restore_from_auth_state(mac_ctx,
eSIR_SME_INVALID_WEP_DEFAULT_KEY,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
pe_session);
return;
}

View file

@ -168,8 +168,8 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
if (LIM_IS_AP_ROLE(pe_session)) {
switch (reasonCode) {
case eSIR_MAC_UNSPEC_FAILURE_REASON:
case eSIR_MAC_DEAUTH_LEAVING_BSS_REASON:
case REASON_UNSPEC_FAILURE:
case REASON_DEAUTH_NETWORK_LEAVING:
/* Valid reasonCode in received Deauthentication frame */
break;
@ -184,12 +184,12 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
}
} else if (LIM_IS_STA_ROLE(pe_session)) {
switch (reasonCode) {
case eSIR_MAC_UNSPEC_FAILURE_REASON:
case eSIR_MAC_PREV_AUTH_NOT_VALID_REASON:
case eSIR_MAC_DEAUTH_LEAVING_BSS_REASON:
case eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON:
case eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON:
case eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON:
case REASON_UNSPEC_FAILURE:
case REASON_PREV_AUTH_NOT_VALID:
case REASON_DEAUTH_NETWORK_LEAVING:
case REASON_CLASS2_FRAME_FROM_NON_AUTH_STA:
case REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA:
case REASON_STA_NOT_AUTHENTICATED:
/* Valid reasonCode in received Deauth frame */
break;
@ -308,9 +308,9 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
frame_rssi);
if (mac->mlme_cfg->gen.fatal_event_trigger &&
(reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON &&
reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON &&
reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) {
(reasonCode != REASON_UNSPEC_FAILURE &&
reasonCode != REASON_DEAUTH_NETWORK_LEAVING &&
reasonCode != REASON_DISASSOC_NETWORK_LEAVING)) {
cds_flush_logs(WLAN_LOG_TYPE_FATAL,
WLAN_LOG_INDICATOR_HOST_DRIVER,
WLAN_LOG_REASON_DISCONNECT,
@ -513,7 +513,7 @@ void lim_perform_deauth(struct mac_context *mac_ctx, struct pe_session *pe_sessi
sta_ds->mlmStaContext.mlmState);
return;
}
sta_ds->mlmStaContext.disassocReason = (tSirMacReasonCodes) rc;
sta_ds->mlmStaContext.disassocReason = rc;
sta_ds->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DEAUTH;
sta_ds->sta_deletion_in_progress = true;

View file

@ -223,14 +223,14 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
if (LIM_IS_AP_ROLE(pe_session)) {
switch (reasonCode) {
case eSIR_MAC_UNSPEC_FAILURE_REASON:
case eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON:
case eSIR_MAC_DISASSOC_LEAVING_BSS_REASON:
case eSIR_MAC_MIC_FAILURE_REASON:
case eSIR_MAC_4WAY_HANDSHAKE_TIMEOUT_REASON:
case eSIR_MAC_GR_KEY_UPDATE_TIMEOUT_REASON:
case eSIR_MAC_RSN_IE_MISMATCH_REASON:
case eSIR_MAC_1X_AUTH_FAILURE_REASON:
case REASON_UNSPEC_FAILURE:
case REASON_DISASSOC_DUE_TO_INACTIVITY:
case REASON_DISASSOC_NETWORK_LEAVING:
case REASON_MIC_FAILURE:
case REASON_4WAY_HANDSHAKE_TIMEOUT :
case REASON_GROUP_KEY_UPDATE_TIMEOUT:
case REASON_IN_4WAY_DIFFERS:
case REASON_1X_AUTH_FAILURE:
/* Valid reasonCode in received Disassociation frame */
break;
@ -246,9 +246,9 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
(pe_session->limSmeState != eLIM_SME_WT_ASSOC_STATE) &&
(pe_session->limSmeState != eLIM_SME_WT_REASSOC_STATE))) {
switch (reasonCode) {
case eSIR_MAC_DEAUTH_LEAVING_BSS_REASON:
case eSIR_MAC_DISASSOC_LEAVING_BSS_REASON:
case eSIR_MAC_POOR_RSSI_CONDITIONS:
case REASON_DEAUTH_NETWORK_LEAVING:
case REASON_DISASSOC_NETWORK_LEAVING:
case REASON_POOR_RSSI_CONDITIONS:
/* Valid reasonCode in received Disassociation frame */
/* as long as we're not about to channel switch */
if (pe_session->gLimChannelSwitch.state !=
@ -302,7 +302,7 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
} /* if (sta->mlmStaContext.mlmState != eLIM_MLM_LINK_ESTABLISHED_STATE) */
if (reasonCode == eSIR_MAC_POOR_RSSI_CONDITIONS) {
if (reasonCode == REASON_POOR_RSSI_CONDITIONS) {
struct sir_rssi_disallow_lst ap_info = {{0}};
ap_info.retry_delay = 0;
@ -322,9 +322,9 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo,
pe_session, pHdr->sa);
if (mac->mlme_cfg->gen.fatal_event_trigger &&
(reasonCode != eSIR_MAC_UNSPEC_FAILURE_REASON &&
reasonCode != eSIR_MAC_DEAUTH_LEAVING_BSS_REASON &&
reasonCode != eSIR_MAC_DISASSOC_LEAVING_BSS_REASON)) {
(reasonCode != REASON_UNSPEC_FAILURE &&
reasonCode != REASON_DEAUTH_NETWORK_LEAVING &&
reasonCode != REASON_DISASSOC_NETWORK_LEAVING)) {
cds_flush_logs(WLAN_LOG_TYPE_FATAL,
WLAN_LOG_INDICATOR_HOST_DRIVER,
WLAN_LOG_REASON_DISCONNECT,
@ -374,7 +374,7 @@ void lim_perform_disassoc(struct mac_context *mac_ctx, int32_t frame_rssi,
return;
}
sta_ds->mlmStaContext.cleanupTrigger = eLIM_PEER_ENTITY_DISASSOC;
sta_ds->mlmStaContext.disassocReason = (tSirMacReasonCodes) rc;
sta_ds->mlmStaContext.disassocReason = rc;
/* Issue Disassoc Indication to SME. */
qdf_mem_copy((uint8_t *) &mlmDisassocInd.peerMacAddr,

View file

@ -182,7 +182,7 @@ static void lim_handle_sme_reaasoc_result(struct mac_context *mac,
&pe_session->dph.dphHashTable);
if (sta) {
sta->mlmStaContext.disassocReason =
eSIR_MAC_UNSPEC_FAILURE_REASON;
REASON_UNSPEC_FAILURE;
sta->mlmStaContext.cleanupTrigger =
eLIM_JOIN_FAILURE;
sta->mlmStaContext.resultCode = resultCode;

View file

@ -84,7 +84,7 @@ static void lim_process_sae_auth_timeout(struct mac_context *mac_ctx)
if (session->opmode == QDF_STA_MODE)
lim_restore_from_auth_state(mac_ctx,
eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
eSIR_MAC_UNSPEC_FAILURE_REASON, session);
REASON_UNSPEC_FAILURE, session);
break;
default:
/* SAE authentication is timed out in unexpected state */
@ -1026,8 +1026,7 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx,
goto end;
}
stads->mlmStaContext.disassocReason = (tSirMacReasonCodes)
mlm_disassocreq->reasonCode;
stads->mlmStaContext.disassocReason = mlm_disassocreq->reasonCode;
stads->mlmStaContext.cleanupTrigger = mlm_disassocreq->disassocTrigger;
/*
@ -1040,7 +1039,7 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx,
/* Send Disassociate frame to peer entity */
if (send_disassoc_frame && (mlm_disassocreq->reasonCode !=
eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON)) {
REASON_AUTHORIZED_ACCESS_LIMIT_REACHED)) {
if (mac_ctx->lim.limDisassocDeauthCnfReq.pMlmDisassocReq) {
pe_err("pMlmDisassocReq is not NULL, freeing");
qdf_mem_free(mac_ctx->lim.limDisassocDeauthCnfReq.
@ -1414,7 +1413,7 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx,
goto end;
} else if (sta_ds) {
/* sta_ds->mlmStaContext.rxPurgeReq = 1; */
sta_ds->mlmStaContext.disassocReason = (tSirMacReasonCodes)
sta_ds->mlmStaContext.disassocReason =
mlm_deauth_req->reasonCode;
sta_ds->mlmStaContext.cleanupTrigger =
mlm_deauth_req->deauthTrigger;
@ -1438,7 +1437,7 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx,
continue;
sta_ds->mlmStaContext.disassocReason =
(tSirMacReasonCodes)mlm_deauth_req->reasonCode;
mlm_deauth_req->reasonCode;
sta_ds->mlmStaContext.cleanupTrigger =
mlm_deauth_req->deauthTrigger;
sta_ds->mlmStaContext.mlmState =
@ -1781,7 +1780,7 @@ void lim_process_auth_failure_timeout(struct mac_context *mac_ctx)
lim_restore_from_auth_state(mac_ctx,
eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
eSIR_MAC_UNSPEC_FAILURE_REASON, session);
REASON_UNSPEC_FAILURE, session);
break;
default:
/*
@ -1910,7 +1909,7 @@ void lim_process_assoc_failure_timeout(struct mac_context *mac_ctx,
session->curr_op_freq,
QDF_MAC_ADDR_REF(session->bssId));
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_UNSPEC_FAILURE_REASON,
REASON_UNSPEC_FAILURE,
session->bssId, session, false);
}
if ((LIM_IS_AP_ROLE(session)) ||

View file

@ -1272,7 +1272,7 @@ QDF_STATUS lim_sta_handle_connect_fail(join_params *param)
&session->dph.dphHashTable);
if (sta_ds) {
sta_ds->mlmStaContext.disassocReason =
eSIR_MAC_UNSPEC_FAILURE_REASON;
REASON_UNSPEC_FAILURE;
sta_ds->mlmStaContext.cleanupTrigger =
eLIM_JOIN_FAILURE;
sta_ds->mlmStaContext.resultCode = param->result_code;
@ -2697,7 +2697,7 @@ static void lim_process_switch_channel_join_req(
QDF_MAC_ADDR_REF(
session_entry->pLimMlmJoinReq->bssDescription.bssId));
lim_send_deauth_mgmt_frame(mac_ctx, eSIR_MAC_UNSPEC_FAILURE_REASON,
lim_send_deauth_mgmt_frame(mac_ctx, REASON_UNSPEC_FAILURE,
session_entry->pLimMlmJoinReq->bssDescription.bssId,
session_entry, false);

View file

@ -2467,7 +2467,7 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx,
/* Deauthentication is triggered by Link Monitoring */
pe_debug("** Lost link with AP **");
deauth_trigger = eLIM_LINK_MONITORING_DEAUTH;
reason_code = eSIR_MAC_UNSPEC_FAILURE_REASON;
reason_code = REASON_UNSPEC_FAILURE;
} else {
deauth_trigger = eLIM_HOST_DEAUTH;
reason_code = sme_deauth_req.reasonCode;
@ -2526,7 +2526,7 @@ static void __lim_counter_measures(struct mac_context *mac, struct pe_session *p
tSirMacAddr mac_addr = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
if (LIM_IS_AP_ROLE(pe_session))
lim_send_disassoc_mgmt_frame(mac, eSIR_MAC_MIC_FAILURE_REASON,
lim_send_disassoc_mgmt_frame(mac, REASON_MIC_FAILURE,
mac_addr, pe_session, false);
};
@ -2557,7 +2557,7 @@ void lim_delete_all_peers(struct pe_session *session)
__lim_counter_measures(mac_ctx, session);
else
lim_send_disassoc_mgmt_frame(mac_ctx,
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON,
REASON_DEAUTH_NETWORK_LEAVING,
bc_addr, session, false);
}

View file

@ -1416,7 +1416,7 @@ QDF_STATUS lim_send_tdls_teardown_frame(struct mac_context *mac,
&pe_session->dph.dphHashTable);
if (sta_ds)
qos_mode = sta_ds->qosMode;
tdls_link_type = (reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE)
tdls_link_type = (reason == REASON_TDLS_PEER_UNREACHABLE)
? TDLS_LINK_AP : TDLS_LINK_DIRECT;
nBytes = nPayload + (((IS_QOS_ENABLED(pe_session) &&
(tdls_link_type == TDLS_LINK_AP)) ||
@ -1464,7 +1464,7 @@ QDF_STATUS lim_send_tdls_teardown_frame(struct mac_context *mac,
pe_debug("Reason of TDLS Teardown: %d", reason);
header_offset = lim_prepare_tdls_frame_header(mac, pFrame,
LINK_IDEN_ADDR_OFFSET(teardown),
(reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE) ?
(reason == REASON_TDLS_PEER_UNREACHABLE) ?
TDLS_LINK_AP : TDLS_LINK_DIRECT,
(responder == true) ? TDLS_RESPONDER : TDLS_INITIATOR,
(ac == WIFI_AC_VI) ? TID_AC_VI : TID_AC_BK,
@ -1512,7 +1512,7 @@ QDF_STATUS lim_send_tdls_teardown_frame(struct mac_context *mac,
pe_debug("[TDLS] action: %d (%s) -%s-> OTA peer="QDF_MAC_ADDR_FMT,
TDLS_TEARDOWN,
lim_trace_tdls_action_string(TDLS_TEARDOWN),
((reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE) ? "AP" :
((reason == REASON_TDLS_PEER_UNREACHABLE) ? "AP" :
"DIRECT"),
QDF_MAC_ADDR_REF(peer_mac.bytes));
@ -1526,7 +1526,7 @@ QDF_STATUS lim_send_tdls_teardown_frame(struct mac_context *mac,
TID_AC_VI,
pFrame,
smeSessionId,
(reason == eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE)
(reason == REASON_TDLS_PEER_UNREACHABLE)
? true : false);
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
@ -3043,7 +3043,7 @@ static void lim_check_aid_and_delete_peer(struct mac_context *p_mac,
if (!lim_is_roam_synch_in_progress(p_mac->psoc,
session_entry)) {
lim_send_deauth_mgmt_frame(p_mac,
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON,
REASON_DEAUTH_NETWORK_LEAVING,
stads->staAddr, session_entry, false);
}
/* Delete TDLS peer */

View file

@ -3135,7 +3135,7 @@ QDF_STATUS lim_send_disassoc_cnf(struct mac_context *mac_ctx)
}
if (LIM_IS_STA_ROLE(pe_session) &&
(disassoc_req->reasonCode !=
eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON)) {
REASON_AUTHORIZED_ACCESS_LIMIT_REACHED)) {
pe_debug("FT Preauth Session (%pK %d) Clean up",
pe_session, pe_session->peSessionId);

View file

@ -888,8 +888,7 @@ lim_send_sme_deauth_ind(struct mac_context *mac, tpDphHashNode sta,
QDF_MAC_ADDR_SIZE);
pSirSmeDeauthInd->reasonCode = sta->mlmStaContext.disassocReason;
if (eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON ==
sta->mlmStaContext.disassocReason)
if (sta->mlmStaContext.disassocReason == REASON_STA_LEAVING)
pSirSmeDeauthInd->rssi = sta->del_sta_ctx_rssi;
if (LIM_IS_STA_ROLE(pe_session))
@ -1105,7 +1104,7 @@ void lim_send_sme_deauth_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr,
reasonCode, QDF_MAC_ADDR_REF(peerMacAddr));
pSirSmeDeauthInd->messageType = eWNI_SME_DEAUTH_IND;
pSirSmeDeauthInd->length = sizeof(*pSirSmeDeauthInd);
pSirSmeDeauthInd->reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
pSirSmeDeauthInd->reasonCode = REASON_UNSPEC_FAILURE;
pSirSmeDeauthInd->vdev_id = smesessionId;
pSirSmeDeauthInd->status_code = reasonCode;
qdf_mem_copy(pSirSmeDeauthInd->bssid.bytes, pe_session->bssId,

View file

@ -820,7 +820,7 @@ void lim_handle_heart_beat_failure(struct mac_context *, struct pe_session *);
* lim_tear_down_link_with_ap() - Tear down link with AP
* @mac: mac context
* @session_id: PE session id
* @reason_code: Disconnect reason code as per emun eSirMacReasonCodes
* @reason_code: Disconnect reason code as per emun wlan_reason_code
* @trigger: Disconnect trigger as per enum eLimDisassocTrigger
*
* Function that triggers link tear down with AP upon HB failure
@ -829,7 +829,7 @@ void lim_handle_heart_beat_failure(struct mac_context *, struct pe_session *);
*/
void lim_tear_down_link_with_ap(struct mac_context *mac,
uint8_t session_id,
tSirMacReasonCodes reason_code,
enum wlan_reason_code reason_code,
enum eLimDisassocTrigger trigger);
/* / Function that defers the messages received */

View file

@ -90,64 +90,6 @@ void lim_delete_dialogue_token_list(struct mac_context *mac)
mac->lim.pDialogueTokenTail = NULL;
}
char *lim_dot11_reason_str(uint16_t reasonCode)
{
switch (reasonCode) {
case 0:
return " ";
CASE_RETURN_STRING(eSIR_MAC_UNSPEC_FAILURE_REASON);
CASE_RETURN_STRING(eSIR_MAC_PREV_AUTH_NOT_VALID_REASON);
CASE_RETURN_STRING(eSIR_MAC_DEAUTH_LEAVING_BSS_REASON);
CASE_RETURN_STRING(eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON);
CASE_RETURN_STRING(eSIR_MAC_DISASSOC_DUE_TO_DISABILITY_REASON);
CASE_RETURN_STRING
(eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON);
CASE_RETURN_STRING
(eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON);
CASE_RETURN_STRING(eSIR_MAC_DISASSOC_LEAVING_BSS_REASON);
CASE_RETURN_STRING(eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON);
CASE_RETURN_STRING(eSIR_MAC_PWR_CAPABILITY_BAD_REASON);
CASE_RETURN_STRING(eSIR_MAC_SPRTD_CHANNELS_BAD_REASON);
CASE_RETURN_STRING(eSIR_MAC_INVALID_IE_REASON);
CASE_RETURN_STRING(eSIR_MAC_MIC_FAILURE_REASON);
CASE_RETURN_STRING(eSIR_MAC_4WAY_HANDSHAKE_TIMEOUT_REASON);
CASE_RETURN_STRING(eSIR_MAC_GR_KEY_UPDATE_TIMEOUT_REASON);
CASE_RETURN_STRING(eSIR_MAC_RSN_IE_MISMATCH_REASON);
CASE_RETURN_STRING(eSIR_MAC_INVALID_MC_CIPHER_REASON);
CASE_RETURN_STRING(eSIR_MAC_INVALID_UC_CIPHER_REASON);
CASE_RETURN_STRING(eSIR_MAC_INVALID_AKMP_REASON);
CASE_RETURN_STRING(eSIR_MAC_UNSUPPORTED_RSN_IE_VER_REASON);
CASE_RETURN_STRING(eSIR_MAC_INVALID_RSN_CAPABILITIES_REASON);
CASE_RETURN_STRING(eSIR_MAC_1X_AUTH_FAILURE_REASON);
CASE_RETURN_STRING(eSIR_MAC_CIPHER_SUITE_REJECTED_REASON);
#ifdef FEATURE_WLAN_TDLS
CASE_RETURN_STRING(eSIR_MAC_TDLS_TEARDOWN_PEER_UNREACHABLE);
CASE_RETURN_STRING(eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
#endif
/* Reserved 27 - 30 */
#ifdef WLAN_FEATURE_11W
CASE_RETURN_STRING
(eSIR_MAC_ROBUST_MGMT_FRAMES_POLICY_VIOLATION);
#endif
CASE_RETURN_STRING(eSIR_MAC_QOS_UNSPECIFIED_REASON);
CASE_RETURN_STRING(eSIR_MAC_QAP_NO_BANDWIDTH_REASON);
CASE_RETURN_STRING(eSIR_MAC_XS_UNACKED_FRAMES_REASON);
CASE_RETURN_STRING(eSIR_MAC_BAD_TXOP_USE_REASON);
CASE_RETURN_STRING(eSIR_MAC_PEER_STA_REQ_LEAVING_BSS_REASON);
CASE_RETURN_STRING(eSIR_MAC_PEER_REJECT_MECHANISIM_REASON);
CASE_RETURN_STRING(eSIR_MAC_MECHANISM_NOT_SETUP_REASON);
CASE_RETURN_STRING(eSIR_MAC_PEER_TIMEDOUT_REASON);
CASE_RETURN_STRING(eSIR_MAC_CIPHER_NOT_SUPPORTED_REASON);
CASE_RETURN_STRING(eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON);
/* Reserved 47 - 65535 */
default:
return "Unknown";
}
}
char *lim_mlm_state_str(tLimMlmStates state)
{
switch (state) {
@ -1872,7 +1814,7 @@ static void __lim_process_channel_switch_timeout(struct pe_session *pe_session)
(pe_session->limSmeState != eLIM_SME_WT_DEAUTH_STATE)) {
pe_err("Invalid channel! Disconnect");
lim_tear_down_link_with_ap(mac, pe_session->peSessionId,
eSIR_MAC_UNSUPPORTED_CHANNEL_CSA,
REASON_UNSUPPORTED_CHANNEL_CSA,
eLIM_LINK_MONITORING_DISASSOC);
return;
}
@ -4571,7 +4513,7 @@ void lim_handle_heart_beat_failure_timeout(struct mac_context *mac_ctx)
(psession_entry->currentBssBeaconCnt == 0))) {
pe_nofl_info("HB fail vdev %d",psession_entry->vdev_id);
lim_send_deauth_mgmt_frame(mac_ctx,
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
REASON_DISASSOC_DUE_TO_INACTIVITY,
psession_entry->bssId, psession_entry, false);
/*
@ -4580,7 +4522,7 @@ void lim_handle_heart_beat_failure_timeout(struct mac_context *mac_ctx)
*/
lim_tear_down_link_with_ap(mac_ctx,
psession_entry->peSessionId,
eSIR_MAC_BEACON_MISSED,
REASON_BEACON_MISSED,
eLIM_LINK_MONITORING_DISASSOC);
mac_ctx->lim.gLimProbeFailureAfterHBfailedCnt++;
} else {
@ -4911,7 +4853,7 @@ void lim_pmf_sa_query_timer_handler(void *pMacGlobal, uint32_t param)
pe_err("SA Query timed out,Deleting STA");
lim_print_mac_addr(mac, pSta->staAddr, LOGE);
lim_send_disassoc_mgmt_frame(mac,
eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON,
REASON_DISASSOC_DUE_TO_INACTIVITY,
pSta->staAddr, pe_session, false);
lim_trigger_sta_deletion(mac, pSta, pe_session);
pSta->pmfSaQueryState = DPH_SA_QUERY_TIMED_OUT;

View file

@ -137,7 +137,6 @@ bool lim_is_valid_frame(last_processed_msg *last_processed_frm,
void lim_update_last_processed_frame(last_processed_msg *last_processed_frm,
uint8_t *pRxPacketInfo);
char *lim_dot11_reason_str(uint16_t reasonCode);
char *lim_mlm_state_str(tLimMlmStates state);
char *lim_sme_state_str(tLimSmeStates state);
char *lim_msg_str(uint32_t msgType);

View file

@ -2358,7 +2358,7 @@ void wlansap_populate_del_sta_params(const uint8_t *mac,
QDF_MAC_ADDR_SIZE);
if (reason_code == 0)
params->reason_code = eSIR_MAC_DEAUTH_LEAVING_BSS_REASON;
params->reason_code = REASON_DEAUTH_NETWORK_LEAVING;
else
params->reason_code = reason_code;

View file

@ -285,8 +285,8 @@ struct roam_cmd {
bool fStopWds;
tSirMacAddr peerMac;
tSirMacReasonCodes reason;
tSirMacReasonCodes disconnect_reason;
enum wlan_reason_code reason;
enum wlan_reason_code disconnect_reason;
};
struct setkey_cmd {
@ -617,7 +617,7 @@ struct csr_roam_session {
bool nss_forced_1x1;
bool disable_hi_rssi;
bool dhcp_done;
tSirMacReasonCodes disconnect_reason;
enum wlan_reason_code disconnect_reason;
uint8_t uapsd_mask;
struct scan_cmd_info scan_info;
qdf_mc_timer_t roaming_offload_timer;

View file

@ -574,13 +574,13 @@ QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
* @mac_handle: Opaque handle to the global MAC context
* @session: SME session identifier
* @reason: Reason to disconnect
* @mac_reason: Reason to disconnect as per enum eSirMacReasonCodes
* @mac_reason: Reason to disconnect as per enum wlan_reason_code
*
* Return: QDF Status success or failure
*/
QDF_STATUS sme_roam_disconnect(mac_handle_t mac_handle, uint8_t session,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason);
enum wlan_reason_code mac_reason);
void sme_dhcp_done_ind(mac_handle_t mac_handle, uint8_t session_id);
QDF_STATUS sme_roam_stop_bss(mac_handle_t mac_handle, uint8_t sessionId);

View file

@ -72,7 +72,7 @@
static QDF_STATUS init_sme_cmd_list(struct mac_context *mac);
static void sme_disconnect_connected_sessions(struct mac_context *mac,
enum eSirMacReasonCodes reason);
enum wlan_reason_code reason);
static QDF_STATUS sme_handle_generic_change_country_code(struct mac_context *mac,
void *msg_buf);
@ -3020,7 +3020,7 @@ QDF_STATUS sme_roam_reassoc(mac_handle_t mac_handle, uint8_t sessionId,
QDF_STATUS sme_roam_disconnect(mac_handle_t mac_handle, uint8_t session_id,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
@ -5448,7 +5448,7 @@ QDF_STATUS sme_update_channel_list(mac_handle_t mac_handle)
csr_apply_channel_power_info_wrapper(mac_ctx);
csr_scan_filter_results(mac_ctx);
sme_disconnect_connected_sessions(mac_ctx,
eSIR_MAC_OPER_CHANNEL_USER_DISABLED);
REASON_OPER_CHANNEL_USER_DISABLED);
sme_release_global_lock(&mac_ctx->sme);
}
@ -5481,7 +5481,7 @@ static bool sme_search_in_base_ch_freq_lst(
* sme_disconnect_connected_sessions() - Disconnect STA and P2P client session
* if channel is not supported
* @mac_ctx: mac global context
* @reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* If new country code does not support the channel on which STA/P2P client
* is connetced, it sends the disconnect to the AP/P2P GO
@ -5489,7 +5489,7 @@ static bool sme_search_in_base_ch_freq_lst(
* Return: void
*/
static void sme_disconnect_connected_sessions(struct mac_context *mac_ctx,
enum eSirMacReasonCodes reason)
enum wlan_reason_code reason)
{
uint8_t session_id, found = false;
uint32_t chan_freq;

View file

@ -531,16 +531,16 @@ csr_roam_issue_disassociate(struct mac_context *mac, uint32_t sessionId,
}
if (fMICFailure) {
reasonCode = eSIR_MAC_MIC_FAILURE_REASON;
reasonCode = REASON_MIC_FAILURE;
} else if (NewSubstate == eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF) {
reasonCode = eSIR_MAC_DISASSOC_DUE_TO_FTHANDOFF_REASON;
reasonCode = REASON_AUTHORIZED_ACCESS_LIMIT_REACHED;
} else if (eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT == NewSubstate) {
reasonCode = eSIR_MAC_DISASSOC_LEAVING_BSS_REASON;
reasonCode = REASON_DISASSOC_NETWORK_LEAVING;
NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_FORCED;
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
"set to reason code eSIR_MAC_DISASSOC_LEAVING_BSS_REASON and set back NewSubstate");
} else {
reasonCode = eSIR_MAC_UNSPEC_FAILURE_REASON;
reasonCode = REASON_UNSPEC_FAILURE;
}
p_nbr_roam_info = &mac->roam.neighborRoamInfo[sessionId];
@ -3906,8 +3906,7 @@ QDF_STATUS csr_roam_issue_disassociate_sta_cmd(struct mac_context *mac,
qdf_mem_copy(pCommand->u.roamCmd.peerMac,
p_del_sta_params->peerMacAddr.bytes,
sizeof(pCommand->u.roamCmd.peerMac));
pCommand->u.roamCmd.reason =
(tSirMacReasonCodes)p_del_sta_params->reason_code;
pCommand->u.roamCmd.reason = p_del_sta_params->reason_code;
csr_roam_issue_disconnect_stats(
mac, sessionId,
@ -3953,8 +3952,7 @@ QDF_STATUS csr_roam_issue_deauth_sta_cmd(struct mac_context *mac,
qdf_mem_copy(pCommand->u.roamCmd.peerMac,
pDelStaParams->peerMacAddr.bytes,
sizeof(tSirMacAddr));
pCommand->u.roamCmd.reason =
(tSirMacReasonCodes)pDelStaParams->reason_code;
pCommand->u.roamCmd.reason = pDelStaParams->reason_code;
csr_roam_issue_disconnect_stats(mac, sessionId,
pDelStaParams->peerMacAddr);
@ -3990,7 +3988,7 @@ QDF_STATUS csr_roam_issue_deauth(struct mac_context *mac, uint32_t sessionId,
status =
csr_send_mb_deauth_req_msg(mac, sessionId, bssId.bytes,
eSIR_MAC_DEAUTH_LEAVING_BSS_REASON);
REASON_DEAUTH_NETWORK_LEAVING);
if (QDF_IS_STATUS_SUCCESS(status))
csr_roam_link_down(mac, sessionId);
else {
@ -8434,7 +8432,7 @@ QDF_STATUS csr_roam_connect(struct mac_context *mac, uint32_t sessionId,
&pProfile->SSIDs))
csr_roam_issue_disassociate_cmd(mac, sessionId,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
/*
* If roamSession.connectState is disconnecting that mean
* disconnect was received with scan for ssid in progress
@ -8691,8 +8689,8 @@ QDF_STATUS csr_roam_process_disassoc_deauth(struct mac_context *mac,
NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_HANDOFF;
} else
if ((eCsrForcedDisassoc == pCommand->u.roamCmd.roamReason)
&& (eSIR_MAC_DISASSOC_LEAVING_BSS_REASON ==
pCommand->u.roamCmd.reason)) {
&& (pCommand->u.roamCmd.reason ==
REASON_DISASSOC_NETWORK_LEAVING)) {
NewSubstate = eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT;
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
"set to substate eCSR_ROAM_SUBSTATE_DISASSOC_STA_HAS_LEFT");
@ -8755,7 +8753,7 @@ QDF_STATUS csr_roam_process_disassoc_deauth(struct mac_context *mac,
QDF_STATUS csr_roam_issue_disassociate_cmd(struct mac_context *mac,
uint32_t sessionId,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
QDF_STATUS status = QDF_STATUS_SUCCESS;
tSmeCmd *pCommand;
@ -8799,7 +8797,7 @@ QDF_STATUS csr_roam_issue_disassociate_cmd(struct mac_context *mac,
case eCSR_DISCONNECT_REASON_STA_HAS_LEFT:
pCommand->u.roamCmd.roamReason = eCsrForcedDisassoc;
pCommand->u.roamCmd.reason =
eSIR_MAC_DISASSOC_LEAVING_BSS_REASON;
REASON_DISASSOC_NETWORK_LEAVING;
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_DEBUG,
"SME convert to internal reason code eCsrStaHasLeft");
break;
@ -8847,7 +8845,7 @@ QDF_STATUS csr_roam_issue_stop_bss_cmd(struct mac_context *mac, uint32_t session
QDF_STATUS csr_roam_disconnect_internal(struct mac_context *mac, uint32_t sessionId,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
QDF_STATUS status = QDF_STATUS_E_FAILURE;
struct csr_roam_session *pSession = CSR_GET_SESSION(mac, sessionId);
@ -8891,7 +8889,7 @@ csr_disable_roaming_offload(struct mac_context *mac_ctx, uint32_t session_id)
QDF_STATUS csr_roam_disconnect(struct mac_context *mac_ctx, uint32_t session_id,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason)
enum wlan_reason_code mac_reason)
{
struct csr_roam_session *session = CSR_GET_SESSION(mac_ctx, session_id);
@ -9752,7 +9750,7 @@ static void csr_roam_roaming_state_reassoc_rsp_processor(struct mac_context *mac
return;
mlme_set_discon_reason_n_from_ap(mac->psoc,
pSmeJoinRsp->vdev_id, false,
eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE);
REASON_HOST_TRIGGERED_ROAM_FAILURE);
csr_roam_call_callback(mac,
pSmeJoinRsp->vdev_id,
roam_info, roam_id,
@ -10127,7 +10125,7 @@ void csr_handle_disassoc_ho(struct mac_context *mac, uint32_t session_id)
POST_ROAM_FAILURE:
mlme_set_discon_reason_n_from_ap(mac->psoc, session_id, false,
eSIR_MAC_HOST_TRIGGERED_ROAM_FAILURE);
REASON_HOST_TRIGGERED_ROAM_FAILURE);
csr_post_roam_failure(mac, session_id, roam_info, NULL);
qdf_mem_free(roam_info);
}
@ -11922,20 +11920,20 @@ csr_roam_chk_lnk_deauth_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
session, SCAN_ENTRY_CON_STATE_NONE);
/* Update the disconnect stats */
switch (pDeauthInd->reasonCode) {
case eSIR_MAC_DISASSOC_DUE_TO_INACTIVITY_REASON:
case REASON_DISASSOC_DUE_TO_INACTIVITY:
session->disconnect_stats.disconnection_cnt++;
session->disconnect_stats.peer_kickout++;
break;
case eSIR_MAC_UNSPEC_FAILURE_REASON:
case eSIR_MAC_PREV_AUTH_NOT_VALID_REASON:
case eSIR_MAC_DEAUTH_LEAVING_BSS_REASON:
case eSIR_MAC_CLASS2_FRAME_FROM_NON_AUTH_STA_REASON:
case eSIR_MAC_CLASS3_FRAME_FROM_NON_ASSOC_STA_REASON:
case eSIR_MAC_STA_NOT_PRE_AUTHENTICATED_REASON:
case REASON_UNSPEC_FAILURE:
case REASON_PREV_AUTH_NOT_VALID:
case REASON_DEAUTH_NETWORK_LEAVING:
case REASON_CLASS2_FRAME_FROM_NON_AUTH_STA:
case REASON_CLASS3_FRAME_FROM_NON_ASSOC_STA:
case REASON_STA_NOT_AUTHENTICATED:
session->disconnect_stats.disconnection_cnt++;
session->disconnect_stats.deauth_by_peer++;
break;
case eSIR_MAC_BEACON_MISSED:
case REASON_BEACON_MISSED:
session->disconnect_stats.disconnection_cnt++;
session->disconnect_stats.bmiss++;
break;
@ -11989,7 +11987,7 @@ csr_roam_chk_lnk_swt_ch_ind(struct mac_context *mac_ctx, tSirSmeRsp *msg_ptr)
sme_err("Channel switch failed");
csr_roam_disconnect_internal(mac_ctx, sessionId,
eCSR_DISCONNECT_REASON_DEAUTH,
eSIR_MAC_CHANNEL_SWITCH_FAILED);
REASON_CHANNEL_SWITCH_FAILED);
return;
}
session->connectedProfile.op_freq = pSwitchChnInd->freq;
@ -12251,7 +12249,7 @@ csr_roam_chk_lnk_wm_status_change_ntf(struct mac_context *mac_ctx,
sme_warn("Calling csr_roam_disconnect_internal");
csr_roam_disconnect_internal(mac_ctx, sessionId,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_UNSPEC_FAILURE_REASON);
REASON_UNSPEC_FAILURE);
} else {
sme_warn("Skipping the new scan as CSR is in state: %s and sub-state: %s",
mac_trace_getcsr_roam_state(
@ -12431,8 +12429,8 @@ bool csr_roam_complete_roaming(struct mac_context *mac, uint32_t sessionId,
* detinguish it. For missed beacon, LIM set reason to
* be eSIR_BEACON_MISSED
*/
if (eSIR_MAC_BEACON_MISSED ==
pSession->roamingStatusCode) {
if (pSession->roamingStatusCode ==
REASON_BEACON_MISSED) {
roamResult = eCSR_ROAM_RESULT_LOSTLINK;
} else if (eCsrLostlinkRoamingDisassoc ==
pSession->roamingReason) {
@ -12660,7 +12658,7 @@ void csr_roam_wait_for_key_time_out_handler(void *pv)
if (QDF_IS_STATUS_SUCCESS(status)) {
csr_roam_disconnect(mac, vdev_id,
eCSR_DISCONNECT_REASON_UNSPECIFIED,
eSIR_MAC_KEY_TIMEOUT);
REASON_KEY_TIMEOUT);
}
} else {
sme_err("session not found");
@ -15877,7 +15875,7 @@ QDF_STATUS csr_send_mb_disassoc_req_msg(struct mac_context *mac,
}
pMsg->reasonCode = reasonCode;
pMsg->process_ho_fail = (pSession->disconnect_reason ==
eSIR_MAC_FW_TRIGGERED_ROAM_FAILURE) ? true : false;
REASON_FW_TRIGGERED_ROAM_FAILURE) ? true : false;
/* Update the disconnect stats */
pSession->disconnect_stats.disconnection_cnt++;
@ -22098,7 +22096,7 @@ void csr_process_ho_fail_ind(struct mac_context *mac_ctx, void *msg_buf)
eCSR_REASON_ROAM_HO_FAIL);
csr_roam_disconnect(mac_ctx, sessionId,
eCSR_DISCONNECT_REASON_ROAM_HO_FAIL,
eSIR_MAC_FW_TRIGGERED_ROAM_FAILURE);
REASON_FW_TRIGGERED_ROAM_FAILURE);
if (mac_ctx->mlme_cfg->gen.fatal_event_trigger)
cds_flush_logs(WLAN_LOG_TYPE_FATAL,
WLAN_LOG_INDICATOR_HOST_DRIVER,
@ -23105,7 +23103,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
mac_ctx->nud_fail_behaviour == DISCONNECT_AFTER_ROAM_FAIL)
csr_roam_disconnect(mac_ctx, session_id,
eCSR_DISCONNECT_REASON_DEAUTH,
eSIR_MAC_USER_TRIGGERED_ROAM_FAILURE);
REASON_USER_TRIGGERED_ROAM_FAILURE);
vdev_roam_params->roam_invoke_in_progress = false;
goto end;
@ -23123,7 +23121,7 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx,
roam_synch_data->chan_freq)) {
csr_roam_disconnect(mac_ctx, session_id,
eCSR_DISCONNECT_REASON_DEAUTH,
eSIR_MAC_OPER_CHANNEL_BAND_CHANGE);
REASON_OPER_CHANNEL_BAND_CHANGE);
sme_debug("Roaming Failed for disabled channel or band");
vdev_roam_params->roam_invoke_in_progress = false;
goto end;

View file

@ -572,7 +572,7 @@ void csr_neighbor_roam_request_handoff(struct mac_context *mac_ctx,
mac_ctx,
session_id,
eCSR_DISCONNECT_REASON_HANDOFF,
eSIR_MAC_UNSPEC_FAILURE_REASON))) {
REASON_UNSPEC_FAILURE))) {
sme_warn("csr_roamHandoffRequested: fail to issue disassoc");
qdf_mem_free(roam_info);
return;

View file

@ -249,10 +249,10 @@ eRoamCmdStatus csr_get_roam_complete_status(struct mac_context *mac,
QDF_STATUS csr_roam_issue_disassociate_cmd(struct mac_context *mac,
uint32_t sessionId,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason);
enum wlan_reason_code mac_reason);
QDF_STATUS csr_roam_disconnect_internal(struct mac_context *mac, uint32_t sessionId,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason);
enum wlan_reason_code mac_reason);
/* pCommand may be NULL */
void csr_roam_remove_duplicate_command(struct mac_context *mac, uint32_t sessionId,
tSmeCmd *pCommand,
@ -819,13 +819,13 @@ QDF_STATUS csr_apply_channel_and_power_list(struct mac_context *mac);
* @mac: pointer to mac context
* @session_id: Session ID
* @reason: CSR disconnect reason code as per @enum eCsrRoamDisconnectReason
* @mac_reason: Mac Disconnect reason code as per @enum eSirMacReasonCodes
* @mac_reason: Mac Disconnect reason code as per @enum wlan_reason_code
*
* Return QDF_STATUS
*/
QDF_STATUS csr_roam_disconnect(struct mac_context *mac, uint32_t session_id,
eCsrRoamDisconnectReason reason,
tSirMacReasonCodes mac_reason);
enum wlan_reason_code mac_reason);
/* This function is used to stop a BSS. It is similar of csr_roamIssueDisconnect
* but this function doesn't have any logic other than blindly trying to stop