Răsfoiți Sursa

qcacld-3.0: Use wlan_cfg80211_nla_strscpy instead of nla_strlcpy

From 5.11 kernel, nla_strlcpy() is renamed to nla_strscpy(), hence
handle it accordingly in WLAN driver by using newly created wrapper
API wlan_cfg80211_nla_strscpy().

Change-Id: I8303c107539ac0755f5403174cce4f65b79d591d
CRs-fixed: 3060053
Yue Ma 3 ani în urmă
părinte
comite
df9def6927

+ 2 - 2
core/hdd/src/wlan_hdd_ext_scan.c

@@ -3737,8 +3737,8 @@ hdd_extscan_passpoint_fill_network(struct nlattr *network,
 		hdd_err("attr realm failed");
 		return -EINVAL;
 	}
-	len = nla_strlcpy(nw->realm, tb[id],
-			  WMI_PASSPOINT_REALM_LEN);
+	len = wlan_cfg80211_nla_strscpy(nw->realm, tb[id],
+					WMI_PASSPOINT_REALM_LEN);
 	/* Don't send partial realm to firmware */
 	if (len >= WMI_PASSPOINT_REALM_LEN) {
 		hdd_err("user passed invalid realm, len:%zu", len);

+ 2 - 2
core/hdd/src/wlan_hdd_mdns_offload.c

@@ -66,8 +66,8 @@ static int hdd_extract_mdns_attr(struct nlattr *tb[],
 	len = nla_len(tb[MDNS_FQDN]);
 	mdns_info->fqdn_len = len;
 	mdns_info->fqdn_type = MDNS_FQDN_TYPE_GENERAL;
-	nla_strlcpy(mdns_info->fqdn_data, tb[MDNS_FQDN],
-		    sizeof(mdns_info->fqdn_data));
+	wlan_cfg80211_nla_strscpy(mdns_info->fqdn_data, tb[MDNS_FQDN],
+				  sizeof(mdns_info->fqdn_data));
 
 	/* Configure mDNS Answer Payload*/