Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 508c71b0 authored by Razziell's avatar Razziell
Browse files

prima: Update tag 'LA.UM.6.6.r1-11300-89xx.0'

"LA.UM.6.6.r1-11300-89xx.0":
wlan: Correct the ini value to enable default sap interface
prima: Restrict the split scan to SAP
wlan: Fix memory leaks in RSO and RoamScanTrigger requests
wlan: Register action frames for all interfaces
prima: Driver not able to configure the VHT-SAP
wlan: Check SAP_OFFLOADS capability before SAP open
wlan: Accept cfg80211_set_spoofed_mac_oui only in STA mode
qcacld-3.0: Avoid buffer overflow when process SA query action frame
wlan: Update set disable channel list command implementation
wlan: Fix bss ref leak in wlan_hdd_cfg80211_update_bss_list
wlan: Fix possible OOB in lim_chk_n_process_wpa_rsn_ie
wlan: Send sta auth status as per updated vendor attr
prima: Honour diassoc frame in add sta rsp state
wlan: Delete hash entry only on add sta failure
wlan: Send appropriate country code in regulatory hint
wlan: Disable WMM inactivity timer on Del Tspec
wlan: Validate bss session before issuing command to FW
prima: Send DHCP stop Indication in disconnect case
wlan: Disassoc peers in SAP mode during stop adapter
wlan: Fix possible buffer overflow in sirConvertAddtsRsp2Struct
parent 29223332
Loading
Loading
Loading
Loading
+36 −6
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 *
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
 *
@@ -1391,10 +1391,10 @@ enum qca_wlan_vendor_attr_link_properties {
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_RATE_FLAGS = 2,
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_RATE_FLAGS = 2,
    /* Unsigned 32bit value for operating frequency */
    /* Unsigned 32bit value for operating frequency */
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_FREQ       = 3,
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_FREQ       = 3,
    /* Unsigned 32bit value for STA flags*/
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS  = 4,
    /*  An array of 6 Unsigned 8bit values for the STA MAC address*/
    /*  An array of 6 Unsigned 8bit values for the STA MAC address*/
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_MAC  = 5,
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR = 4,
    /* Unsigned 32bit value for STA flags*/
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS  = 5,


    /* KEEP LAST */
    /* KEEP LAST */
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_AFTER_LAST,
    QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_AFTER_LAST,
@@ -1732,6 +1732,29 @@ void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel);
 */
 */
int wlan_hdd_restore_channels(hdd_context_t *pHddCtx);
int wlan_hdd_restore_channels(hdd_context_t *pHddCtx);


/*
 * wlan_hdd_disable_channels() - Cache the the channels
 * and current state of the channels from the channel list
 * received in the command and disable the channels on the
 * wiphy and NV table.
 * @hdd_ctx: Pointer to hdd context
 *
 * @return: 0 on success, Error code on failure
 */
int wlan_hdd_disable_channels(hdd_context_t *hdd_ctx);

/*
 * hdd_check_and_disconnect_sta_on_invalid_channel() - Disconnect STA if it is
 * on indoor channel
 * @hdd_ctx: pointer to hdd context
 *
 * STA should be disconnected before starting the SAP if it is on indoor
 * channel.
 *
 * Return: void
 */
void hdd_check_and_disconnect_sta_on_invalid_channel(hdd_context_t *hdd_ctx);

/*
/*
 * hdd_update_indoor_channel() - enable/disable indoor channel
 * hdd_update_indoor_channel() - enable/disable indoor channel
 * @hdd_ctx: hdd context
 * @hdd_ctx: hdd context
@@ -1853,8 +1876,15 @@ static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
}
}
#endif
#endif


struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
/*
   hdd_adapter_t *pAdapter, tSirMacAddr bssid);
 * wlan_hdd_cfg80211_unlink_bss :to inform nl80211
 * interface that BSS might have been lost.
 * @pAdapter: adapter
 * @bssid: bssid which might have been lost
 *
 * Return: void
 */
void wlan_hdd_cfg80211_unlink_bss(hdd_adapter_t *pAdapter, tSirMacAddr bssid);


struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
struct cfg80211_bss *wlan_hdd_cfg80211_inform_bss_frame(hdd_adapter_t *pAdapter,
		tSirBssDescription *bss_desc);
		tSirBssDescription *bss_desc);
+2 −0
Original line number Original line Diff line number Diff line
@@ -134,6 +134,8 @@
#define FW_STATE_WAIT_TIME 500
#define FW_STATE_WAIT_TIME 500
#define FW_STATE_RSP_LEN 100
#define FW_STATE_RSP_LEN 100


#define WLAN_WAIT_TIME_FEATURE_CAPS 300

/* Amount of time to wait for sme close session callback.
/* Amount of time to wait for sme close session callback.
   This value should be larger than the timeout used by WDI to wait for
   This value should be larger than the timeout used by WDI to wait for
   a response from WCNSS */
   a response from WCNSS */
+10 −3
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 *
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
 *
@@ -1250,6 +1250,13 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
    {
    {
        VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
        VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                 "wlan: disconnected");
                 "wlan: disconnected");
        if (pHddCtx->btCoexModeSet) {
            VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
                       FL("Wlan disconnected, sending DHCP stop indication"));
            pHddCtx->btCoexModeSet = FALSE;
            sme_DHCPStopInd(pHddCtx->hHal, pAdapter->device_mode,
                            pAdapter->sessionId);
        }
        type = WLAN_STA_DISASSOC_DONE_IND;
        type = WLAN_STA_DISASSOC_DONE_IND;
        memset(wrqu.ap_addr.sa_data,'\0',ETH_ALEN);
        memset(wrqu.ap_addr.sa_data,'\0',ETH_ALEN);


@@ -1873,7 +1880,7 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
       /* clear scan cache for Link Lost */
       /* clear scan cache for Link Lost */
       if (pRoamInfo && !pRoamInfo->reasonCode &&
       if (pRoamInfo && !pRoamInfo->reasonCode &&
           (eCSR_ROAM_LOSTLINK == roamStatus)) {
           (eCSR_ROAM_LOSTLINK == roamStatus)) {
           wlan_hdd_cfg80211_update_bss_list(pAdapter,
           wlan_hdd_cfg80211_unlink_bss(pAdapter,
                               pHddStaCtx->conn_info.bssId);
                               pHddStaCtx->conn_info.bssId);
           sme_remove_bssid_from_scan_list(pHddCtx->hHal,
           sme_remove_bssid_from_scan_list(pHddCtx->hHal,
                               pHddStaCtx->conn_info.bssId);
                               pHddStaCtx->conn_info.bssId);
@@ -2669,7 +2676,7 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
           ((eSIR_SME_JOIN_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode) ||
           ((eSIR_SME_JOIN_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode) ||
           (eSIR_SME_AUTH_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode) ||
           (eSIR_SME_AUTH_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode) ||
           (eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode)))) {
           (eSIR_SME_ASSOC_TIMEOUT_RESULT_CODE == pRoamInfo->statusCode)))) {
             wlan_hdd_cfg80211_update_bss_list(pAdapter,
             wlan_hdd_cfg80211_unlink_bss(pAdapter,
                    pRoamInfo ? pRoamInfo->bssid : pWextState->req_bssId);
                    pRoamInfo ? pRoamInfo->bssid : pWextState->req_bssId);
             sme_remove_bssid_from_scan_list(pHddCtx->hHal,
             sme_remove_bssid_from_scan_list(pHddCtx->hHal,
                    pRoamInfo ? pRoamInfo->bssid : pWextState->req_bssId);
                    pRoamInfo ? pRoamInfo->bssid : pWextState->req_bssId);
+40 −47
Original line number Original line Diff line number Diff line
@@ -311,6 +311,9 @@ static struct ieee80211_supported_band wlan_hdd_band_2_4_GHZ =
    .ht_cap.mcs.rx_mask    = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    .ht_cap.mcs.rx_mask    = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    .ht_cap.mcs.rx_highest = cpu_to_le16( 72 ),
    .ht_cap.mcs.rx_highest = cpu_to_le16( 72 ),
    .ht_cap.mcs.tx_params  = IEEE80211_HT_MCS_TX_DEFINED,
    .ht_cap.mcs.tx_params  = IEEE80211_HT_MCS_TX_DEFINED,
    .vht_cap.vht_supported   = 1,
    .vht_cap.cap = IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454
                            | IEEE80211_VHT_CAP_SHORT_GI_80,
};
};
static struct ieee80211_supported_band wlan_hdd_band_5_GHZ =
static struct ieee80211_supported_band wlan_hdd_band_5_GHZ =
@@ -332,6 +335,9 @@ static struct ieee80211_supported_band wlan_hdd_band_5_GHZ =
    .ht_cap.mcs.rx_mask    = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    .ht_cap.mcs.rx_mask    = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, },
    .ht_cap.mcs.rx_highest = cpu_to_le16( 72 ),
    .ht_cap.mcs.rx_highest = cpu_to_le16( 72 ),
    .ht_cap.mcs.tx_params  = IEEE80211_HT_MCS_TX_DEFINED,
    .ht_cap.mcs.tx_params  = IEEE80211_HT_MCS_TX_DEFINED,
    .vht_cap.vht_supported   = 1,
    .vht_cap.cap = IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454
                            | IEEE80211_VHT_CAP_SHORT_GI_80,
};
};
/* This structure contain information what kind of frame are expected in
/* This structure contain information what kind of frame are expected in
@@ -5540,6 +5546,7 @@ static int __wlan_hdd_cfg80211_set_spoofed_mac_oui(struct wiphy *wiphy,
{
{
    hdd_context_t *pHddCtx      = wiphy_priv(wiphy);
    hdd_context_t *pHddCtx      = wiphy_priv(wiphy);
    hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(wdev->netdev);
    struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI_MAX + 1];
    struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_SET_SCANNING_MAC_OUI_MAX + 1];
    ENTER();
    ENTER();
@@ -5547,6 +5554,17 @@ static int __wlan_hdd_cfg80211_set_spoofed_mac_oui(struct wiphy *wiphy,
    if (0 != wlan_hdd_validate_context(pHddCtx)){
    if (0 != wlan_hdd_validate_context(pHddCtx)){
        return -EINVAL;
        return -EINVAL;
    }
    }
    if (!adapter) {
        hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD adpater is NULL"));
        return -EINVAL;
    }
    if (adapter->device_mode != WLAN_HDD_INFRA_STATION) {
        hddLog(VOS_TRACE_LEVEL_INFO, FL("MAC_SPOOFED_SCAN allowed only in STA"));
        return -ENOTSUPP;
    }
    if (0 == pHddCtx->cfg_ini->enableMacSpoofing) {
    if (0 == pHddCtx->cfg_ini->enableMacSpoofing) {
        hddLog(VOS_TRACE_LEVEL_INFO, FL("MAC_SPOOFED_SCAN disabled in ini"));
        hddLog(VOS_TRACE_LEVEL_INFO, FL("MAC_SPOOFED_SCAN disabled in ini"));
        return -ENOTSUPP;
        return -ENOTSUPP;
@@ -10742,16 +10760,6 @@ disconnected:
    return result;
    return result;
}
}
/*
 * hdd_check_and_disconnect_sta_on_invalid_channel() - Disconnect STA if it is
 * on indoor channel
 * @hdd_ctx: pointer to hdd context
 *
 * STA should be disconnected before starting the SAP if it is on indoor
 * channel.
 *
 * Return: void
 */
void hdd_check_and_disconnect_sta_on_invalid_channel(hdd_context_t *hdd_ctx)
void hdd_check_and_disconnect_sta_on_invalid_channel(hdd_context_t *hdd_ctx)
{
{
@@ -10841,6 +10849,13 @@ int wlan_hdd_restore_channels(hdd_context_t *hdd_ctx)
					wiphy_channel->flags =
					wiphy_channel->flags =
						cache_chann->
						cache_chann->
						channel_info[i].wiphy_status;
						channel_info[i].wiphy_status;
					hddLog(VOS_TRACE_LEVEL_DEBUG,
					"Restore channel %d reg_stat %d wiphy_stat 0x%x",
					cache_chann->
						channel_info[i].channel_num,
					cache_chann->
						channel_info[i].reg_status,
					wiphy_channel->flags);
					break;
					break;
				}
				}
			}
			}
@@ -10859,17 +10874,7 @@ int wlan_hdd_restore_channels(hdd_context_t *hdd_ctx)
	return 0;
	return 0;
}
}
/*
int wlan_hdd_disable_channels(hdd_context_t *hdd_ctx)
 * wlan_hdd_disable_channels() - Cache the the channels
 * and current state of the channels from the channel list
 * received in the command and disable the channels on the
 * wiphy and NV table.
 * @hdd_ctx: Pointer to hdd context
 *
 * @return: 0 on success, Error code on failure
 */
static int wlan_hdd_disable_channels(hdd_context_t *hdd_ctx)
{
{
	struct hdd_cache_channels *cache_chann;
	struct hdd_cache_channels *cache_chann;
	struct wiphy *wiphy;
	struct wiphy *wiphy;
@@ -11034,12 +11039,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
            hdd_check_and_disconnect_sta_on_invalid_channel(pHddCtx);
            hdd_check_and_disconnect_sta_on_invalid_channel(pHddCtx);
    }
    }
    if (pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP) {
        /* Disable the channels received in command SET_DISABLE_CHANNEL_LIST*/
        wlan_hdd_disable_channels(pHddCtx);
        hdd_check_and_disconnect_sta_on_invalid_channel(pHddCtx);
    }
    pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
    pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
    pConfig = &pHostapdAdapter->sessionCtx.ap.sapConfig;
    pConfig = &pHostapdAdapter->sessionCtx.ap.sapConfig;
@@ -11638,8 +11637,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
   return 0;
   return 0;
error:
error:
    if (pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP)
        wlan_hdd_restore_channels(pHddCtx);
   /* Revert the indoor to passive marking if START BSS fails */
   /* Revert the indoor to passive marking if START BSS fails */
    if (iniConfig->disable_indoor_channel &&
    if (iniConfig->disable_indoor_channel &&
                   pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP) {
                   pHostapdAdapter->device_mode == WLAN_HDD_SOFTAP) {
@@ -13009,8 +13006,8 @@ VOS_STATUS wlan_hdd_send_sta_authorized_event(
					const v_MACADDR_t *mac_addr)
					const v_MACADDR_t *mac_addr)
{
{
	struct sk_buff *vendor_event;
	struct sk_buff *vendor_event;
	uint32_t sta_flags = 0;
	VOS_STATUS status;
	VOS_STATUS status;
	struct  nl80211_sta_flag_update sta_flags;
	ENTER();
	ENTER();
@@ -13035,18 +13032,22 @@ VOS_STATUS wlan_hdd_send_sta_authorized_event(
		return -EINVAL;
		return -EINVAL;
	}
	}
	sta_flags |= BIT(NL80211_STA_FLAG_AUTHORIZED);
	sta_flags.mask |= BIT(NL80211_STA_FLAG_AUTHORIZED);
	sta_flags.set = true;
	status = nla_put_u32(vendor_event,
	status = nla_put(vendor_event,
			 QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS,
			 QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_FLAGS,
			     sta_flags);
			 sizeof(struct  nl80211_sta_flag_update),
			 &sta_flags);
	if (status) {
	if (status) {
		hddLog(VOS_TRACE_LEVEL_ERROR, FL("STA flag put fails"));
		hddLog(VOS_TRACE_LEVEL_ERROR, FL("STA flag put fails"));
		kfree_skb(vendor_event);
		kfree_skb(vendor_event);
		return VOS_STATUS_E_FAILURE;
		return VOS_STATUS_E_FAILURE;
	}
	}
	status = nla_put(vendor_event,
	status = nla_put(vendor_event,
			 QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_STA_MAC,
			 QCA_WLAN_VENDOR_ATTR_LINK_PROPERTIES_MAC_ADDR,
			 VOS_MAC_ADDR_SIZE, mac_addr->bytes);
			 VOS_MAC_ADDR_SIZE, mac_addr->bytes);
	if (status) {
	if (status) {
		hddLog(VOS_TRACE_LEVEL_ERROR, FL("STA MAC put fails"));
		hddLog(VOS_TRACE_LEVEL_ERROR, FL("STA MAC put fails"));
@@ -14250,16 +14251,7 @@ static struct cfg80211_bss* wlan_hdd_cfg80211_inform_bss(
                rssi, GFP_KERNEL );
                rssi, GFP_KERNEL );
}
}
/*
void wlan_hdd_cfg80211_unlink_bss(hdd_adapter_t *pAdapter, tSirMacAddr bssid)
 * wlan_hdd_cfg80211_update_bss_list :to inform nl80211
 * interface that BSS might have been lost.
 * @pAdapter: adaptor
 * @bssid: bssid which might have been lost
 *
 * Return: bss which is unlinked from kernel cache
 */
struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
   hdd_adapter_t *pAdapter, tSirMacAddr bssid)
{
{
    struct net_device *dev = pAdapter->dev;
    struct net_device *dev = pAdapter->dev;
    struct wireless_dev *wdev = dev->ieee80211_ptr;
    struct wireless_dev *wdev = dev->ieee80211_ptr;
@@ -14269,14 +14261,15 @@ struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
    bss = hdd_get_bss_entry(wiphy,
    bss = hdd_get_bss_entry(wiphy,
          NULL, bssid,
          NULL, bssid,
          NULL, 0);
          NULL, 0);
    if (bss == NULL) {
    if (!bss) {
        hddLog(LOGE, FL("BSS not present"));
        hddLog(LOGE, FL("BSS not present"));
    } else {
    } else {
        hddLog(LOG1, FL("cfg80211_unlink_bss called for BSSID "
        hddLog(LOG1, FL("cfg80211_unlink_bss called for BSSID "
               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(bssid));
               MAC_ADDRESS_STR), MAC_ADDR_ARRAY(bssid));
        cfg80211_unlink_bss(wiphy, bss);
        cfg80211_unlink_bss(wiphy, bss);
        /* cfg80211_get_bss get bss with ref count so release it */
        cfg80211_put_bss(wiphy, bss);
    }
    }
    return bss;
}
}
+101 −17
Original line number Original line Diff line number Diff line
@@ -3835,6 +3835,12 @@ int hdd_parse_disable_chan_cmd(hdd_adapter_t *adapter, tANI_U8 *ptr)
mem_alloc_failed:
mem_alloc_failed:
	mutex_unlock(&hdd_ctx->cache_channel_lock);
	mutex_unlock(&hdd_ctx->cache_channel_lock);
        /* Disable the channels received in command SET_DISABLE_CHANNEL_LIST*/
	if (!is_command_repeated) {
		wlan_hdd_disable_channels(hdd_ctx);
		hdd_check_and_disconnect_sta_on_invalid_channel(hdd_ctx);
	}
	EXIT();
	EXIT();
	return ret;
	return ret;
@@ -10469,7 +10475,12 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter,
         break;
         break;
      case WLAN_HDD_SOFTAP:
      case WLAN_HDD_SOFTAP:
          /* Delete all associated STAs before stopping AP */
          if (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags))
               hdd_del_all_sta(pAdapter);
          /* Fall through */
      case WLAN_HDD_P2P_GO:
      case WLAN_HDD_P2P_GO:
          if ( VOS_TRUE == bCloseSession )
          if ( VOS_TRUE == bCloseSession )
          {
          {
              status = hdd_sta_id_hash_detach(pAdapter);
              status = hdd_sta_id_hash_detach(pAdapter);
@@ -12649,6 +12660,80 @@ void hdd_prevent_suspend_timeout(v_U32_t timeout, uint32_t reason)
}
}
/**
 * hdd_get_feature_caps_cb() - Callback invoked from WDA
 * @cookie: to identify HDD request to firmware
 *
 * This function is invoked from WDA when feature capabilities response
 * is received from firmware.
 *
 * Return: None
 */
static void hdd_get_feature_caps_cb(void *cookie)
{
	struct hdd_request *request;
	request = hdd_request_get(cookie);
	if (!request) {
		hddLog(VOS_TRACE_LEVEL_ERROR, FL("Obsolete request"));
		return;
	}
	pr_info("%s: Firmware feature capabilities received\n", __func__);
	hdd_request_complete(request);
	hdd_request_put(request);
}
/**
 * hdd_get_feature_caps() - Get features supported by firmware
 * @hdd_ctx: Pointer to HDD context
 *
 * This function uses request manager framework to get the feature
 * capabilities from firmware.
 *
 * Return: None
 */
static void hdd_get_feature_caps(hdd_context_t *hdd_ctx)
{
	VOS_STATUS status;
	void *cookie;
	int ret;
	struct hdd_request *request;
	static const struct hdd_request_params params = {
		.priv_size = 0,
		.timeout_ms = WLAN_WAIT_TIME_FEATURE_CAPS,
	};
	struct sir_feature_caps_params caps_params = {0};
	request = hdd_request_alloc(&params);
	if (!request) {
		pr_err("%s: Request allocation failure\n", __func__);
		return;
	}
	cookie = hdd_request_cookie(request);
	caps_params.user_data = cookie;
	caps_params.feature_caps_cb = hdd_get_feature_caps_cb;
	status = sme_featureCapsExchange(&caps_params);
	if (status != VOS_STATUS_SUCCESS) {
		pr_err("%s: Unable to get feature caps\n", __func__);
		goto end;
	}
	/* request was sent -- wait for the response */
	ret = hdd_request_wait_for_response(request);
	if (ret) {
		pr_err("%s: SME timeout while retrieving feature caps\n",
			__func__);
		goto end;
	}
end:
	hdd_request_put(request);
}
/**---------------------------------------------------------------------------
/**---------------------------------------------------------------------------
  \brief hdd_exchange_version_and_caps() - HDD function to exchange version and capability
  \brief hdd_exchange_version_and_caps() - HDD function to exchange version and capability
@@ -12783,12 +12868,13 @@ void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx)
            sme_disableFeatureCapablity(IBSS_HEARTBEAT_OFFLOAD);
            sme_disableFeatureCapablity(IBSS_HEARTBEAT_OFFLOAD);
         }
         }
         sme_featureCapsExchange(pHddCtx->hHal);
         hdd_get_feature_caps(pHddCtx);
      }
      }
   } while (0);
   } while (0);
}
}
void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
void wlan_hdd_send_svc_nlink_msg(int type, void *data, int len)
{
{
       struct sk_buff *skb;
       struct sk_buff *skb;
@@ -13055,7 +13141,7 @@ int wlan_hdd_mon_open(hdd_context_t *pHddCtx)
   }
   }
   WLANTL_SetMonRxCbk( pVosContext, hdd_rx_packet_monitor_cbk );
   WLANTL_SetMonRxCbk( pVosContext, hdd_rx_packet_monitor_cbk );
   WDA_featureCapsExchange(pVosContext);
   sme_featureCapsExchange(NULL);
   wcnss_wlan_set_drvdata(pHddCtx->parent_dev, pHddCtx);
   wcnss_wlan_set_drvdata(pHddCtx->parent_dev, pHddCtx);
   pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_MONITOR, "wlan%d",
   pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_MONITOR, "wlan%d",
@@ -13897,6 +13983,14 @@ int hdd_wlan_startup(struct device *dev )
   wcnss_wlan_set_drvdata(pHddCtx->parent_dev, pHddCtx);
   wcnss_wlan_set_drvdata(pHddCtx->parent_dev, pHddCtx);
#ifdef SAP_AUTH_OFFLOAD
   if (!sme_IsFeatureSupportedByFW(SAP_OFFLOADS))
   {
       hddLog(VOS_TRACE_LEVEL_INFO, FL(" SAP AUTH OFFLOAD not supp by FW"));
       pHddCtx->cfg_ini->enable_sap_auth_offload = 0;
   }
#endif
   if (VOS_STA_SAP_MODE == hdd_get_conparam())
   if (VOS_STA_SAP_MODE == hdd_get_conparam())
   {
   {
     pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_SOFTAP, "softap.%d", 
     pAdapter = hdd_open_adapter( pHddCtx, WLAN_HDD_SOFTAP, "softap.%d", 
@@ -14179,25 +14273,15 @@ int hdd_wlan_startup(struct device *dev )
#endif
#endif
#ifdef SAP_AUTH_OFFLOAD
   if (!sme_IsFeatureSupportedByFW(SAP_OFFLOADS))
   {
       hddLog(VOS_TRACE_LEVEL_INFO, FL(" SAP AUTH OFFLOAD not supp by FW"));
       pHddCtx->cfg_ini->enable_sap_auth_offload = 0;
   }
#endif
   if (vos_is_multicast_logging())
   if (vos_is_multicast_logging())
       wlan_logging_set_log_level();
       wlan_logging_set_log_level();
   hdd_register_mcast_bcast_filter(pHddCtx);
   hdd_register_mcast_bcast_filter(pHddCtx);
   if (VOS_STA_SAP_MODE != hdd_get_conparam())
   {
   /* Action frame registered in one adapter which will
   /* Action frame registered in one adapter which will
    * applicable to all interfaces
    * applicable to all interfaces
    */
    */
   wlan_hdd_cfg80211_register_frames(pAdapter);
   wlan_hdd_cfg80211_register_frames(pAdapter);
   }
   mutex_init(&pHddCtx->sap_lock);
   mutex_init(&pHddCtx->sap_lock);
   mutex_init(&pHddCtx->roc_lock);
   mutex_init(&pHddCtx->roc_lock);
Loading