qcacmn: Call cfg80211 functions with context aware allocation flags
There are instances in the code where the response is sent from the driver to the supplicant indicating the allocation flags which is used by the supplicant to allocate memory. In those situations, we should pass the allocation flags based on the context in which the response is sent. Send the response with the right allocation flags to the supplicant. Change-Id: I85f1c29fc66ba51a9f9c645692712c3a25b7fed1 CRs-Fixed: 2987552
This commit is contained in:

committato da
Madan Koyyalamudi

parent
5ee593e754
commit
f8167f4dbc
@@ -193,7 +193,7 @@ osif_connect_timeout(struct net_device *dev, const u8 *bssid,
|
||||
|
||||
osif_debug("nl_timeout_reason %d", nl_timeout_reason);
|
||||
|
||||
cfg80211_connect_timeout(dev, bssid, NULL, 0, GFP_KERNEL,
|
||||
cfg80211_connect_timeout(dev, bssid, NULL, 0, qdf_mem_malloc_flags(),
|
||||
nl_timeout_reason);
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ static void __osif_connect_bss(struct net_device *dev,
|
||||
|
||||
cfg80211_connect_bss(dev, rsp->bssid.bytes, bss,
|
||||
req_ptr, req_len, rsp_ptr, rsp_len, status,
|
||||
GFP_KERNEL, nl_timeout_reason);
|
||||
qdf_mem_malloc_flags(), nl_timeout_reason);
|
||||
}
|
||||
#else /* CFG80211_CONNECT_TIMEOUT_REASON_CODE */
|
||||
|
||||
@@ -239,7 +239,7 @@ static void osif_connect_timeout(
|
||||
const u8 *bssid,
|
||||
enum wlan_cm_connect_fail_reason reason)
|
||||
{
|
||||
cfg80211_connect_timeout(dev, bssid, NULL, 0, GFP_KERNEL);
|
||||
cfg80211_connect_timeout(dev, bssid, NULL, 0, qdf_mem_malloc_flags());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -260,7 +260,7 @@ static void __osif_connect_bss(struct net_device *dev,
|
||||
|
||||
cfg80211_connect_bss(dev, rsp->bssid.bytes, bss,
|
||||
req_ptr, req_len, rsp_ptr, rsp_len,
|
||||
status, GFP_KERNEL);
|
||||
status, qdf_mem_malloc_flags());
|
||||
}
|
||||
#endif /* CFG80211_CONNECT_TIMEOUT_REASON_CODE */
|
||||
|
||||
@@ -420,7 +420,7 @@ static void osif_connect_done(struct net_device *dev, struct cfg80211_bss *bss,
|
||||
}
|
||||
|
||||
osif_debug("Connect resp status %d", conn_rsp_params.status);
|
||||
cfg80211_connect_done(dev, &conn_rsp_params, GFP_KERNEL);
|
||||
cfg80211_connect_done(dev, &conn_rsp_params, qdf_mem_malloc_flags());
|
||||
if (rsp->connect_ies.fils_ie && rsp->connect_ies.fils_ie->hlp_data_len)
|
||||
osif_cm_set_hlp_data(dev, vdev, rsp);
|
||||
}
|
||||
@@ -687,7 +687,8 @@ static void osif_indcate_connect_results(struct wlan_objmgr_vdev *vdev,
|
||||
&rsp_len, &rsp_ptr);
|
||||
cfg80211_connect_result(osif_priv->wdev->netdev,
|
||||
rsp->bssid.bytes, req_ptr, req_len,
|
||||
rsp_ptr, rsp_len, status, GFP_KERNEL);
|
||||
rsp_ptr, rsp_len, status,
|
||||
qdf_mem_malloc_flags());
|
||||
}
|
||||
#endif /* WLAN_FEATURE_11BE_MLO */
|
||||
#endif /* CFG80211_CONNECT_BSS */
|
||||
|
@@ -229,9 +229,10 @@ QDF_STATUS osif_disconnect_handler(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
osif_cm_disconnect_comp_ind(vdev, rsp, OSIF_PRE_USERSPACE_UPDATE);
|
||||
osif_cm_indicate_disconnect(vdev, osif_priv->wdev->netdev,
|
||||
ieee80211_reason, locally_generated,
|
||||
rsp->ap_discon_ie.ptr,
|
||||
rsp->ap_discon_ie.len, GFP_KERNEL);
|
||||
ieee80211_reason,
|
||||
locally_generated, rsp->ap_discon_ie.ptr,
|
||||
rsp->ap_discon_ie.len,
|
||||
qdf_mem_malloc_flags());
|
||||
|
||||
osif_cm_disconnect_comp_ind(vdev, rsp, OSIF_POST_USERSPACE_UPDATE);
|
||||
|
||||
|
@@ -75,7 +75,7 @@ static void osif_roamed_ind(struct net_device *dev, struct cfg80211_bss *bss,
|
||||
info.req_ie_len = req_ie_len;
|
||||
info.resp_ie = resp_ie;
|
||||
info.resp_ie_len = resp_ie_len;
|
||||
cfg80211_roamed(dev, &info, GFP_KERNEL);
|
||||
cfg80211_roamed(dev, &info, qdf_mem_malloc_flags());
|
||||
}
|
||||
#else
|
||||
static inline void osif_roamed_ind(struct net_device *dev,
|
||||
@@ -85,7 +85,7 @@ static inline void osif_roamed_ind(struct net_device *dev,
|
||||
size_t resp_ie_len)
|
||||
{
|
||||
cfg80211_roamed_bss(dev, bss, req_ie, req_ie_len, resp_ie, resp_ie_len,
|
||||
GFP_KERNEL);
|
||||
qdf_mem_malloc_flags());
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -240,7 +240,7 @@ static int osif_send_roam_auth_event(struct wlan_objmgr_vdev *vdev,
|
||||
sizeof(uint16_t) + sizeof(uint8_t) +
|
||||
(9 * NLMSG_HDRLEN) + fils_params_len,
|
||||
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH_INDEX,
|
||||
GFP_KERNEL);
|
||||
qdf_mem_malloc_flags());
|
||||
|
||||
if (!skb) {
|
||||
osif_err("cfg80211_vendor_event_alloc failed");
|
||||
@@ -341,7 +341,7 @@ static int osif_send_roam_auth_event(struct wlan_objmgr_vdev *vdev,
|
||||
}
|
||||
}
|
||||
|
||||
cfg80211_vendor_event(skb, GFP_KERNEL);
|
||||
cfg80211_vendor_event(skb, qdf_mem_malloc_flags());
|
||||
return 0;
|
||||
|
||||
nla_put_failure:
|
||||
@@ -440,7 +440,7 @@ osif_pmksa_candidate_notify(struct wlan_objmgr_vdev *vdev,
|
||||
|
||||
cfg80211_pmksa_candidate_notify(wdev->netdev, index,
|
||||
bssid->bytes,
|
||||
preauth, GFP_KERNEL);
|
||||
preauth, qdf_mem_malloc_flags());
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* CONN_MGR_ADV_FEATURE */
|
||||
|
Fai riferimento in un nuovo problema
Block a user