icnss2: Reject wlan host driver loading
Reject wlan host driver loading if wlan driver dev_info is null. Wlan host driver needs to pass correct dev_info to get driver loaded. Change-Id: I6b4e94c42c6192a063d0e3ccf20deb73714fab8c CRs-Fixed: 3178902
This commit is contained in:
@@ -2455,11 +2455,6 @@ enable_pdr:
|
|||||||
static int icnss_dev_id_match(struct icnss_priv *priv,
|
static int icnss_dev_id_match(struct icnss_priv *priv,
|
||||||
struct device_info *dev_info)
|
struct device_info *dev_info)
|
||||||
{
|
{
|
||||||
if (!dev_info) {
|
|
||||||
icnss_pr_info("WLAN driver devinfo is null, Continue driver loading");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (dev_info->device_id) {
|
while (dev_info->device_id) {
|
||||||
if (priv->device_id == dev_info->device_id)
|
if (priv->device_id == dev_info->device_id)
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2662,6 +2657,11 @@ int __icnss_register_driver(struct icnss_driver_ops *ops,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ops->dev_info) {
|
||||||
|
icnss_pr_err("WLAN driver devinfo is null, Reject wlan driver loading");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!icnss_dev_id_match(priv, ops->dev_info)) {
|
if (!icnss_dev_id_match(priv, ops->dev_info)) {
|
||||||
icnss_pr_err("WLAN driver dev name is %s, not supported by platform driver\n",
|
icnss_pr_err("WLAN driver dev name is %s, not supported by platform driver\n",
|
||||||
ops->dev_info->name);
|
ops->dev_info->name);
|
||||||
|
Reference in New Issue
Block a user