qcacld-3.0: Free wifi features sysfs file only if it is created
Currently driver creates sysfs features file if fw provides file name in oem data event, but it tries to free without any condition, this leeds to an unexpected behaviour if fw does not provides file name in oem data event. To address above issue, free wifi features sysfs file only if fw provides file name in oem data event. Change-Id: Ida6a69846638ba6edd5d0e5322323ef66433b364 CRs-Fixed: 3266097
This commit is contained in:
committed by
Madan Koyyalamudi
parent
bfcf3d08f6
commit
f7b3e8f61a
@@ -77,12 +77,12 @@ void hdd_sysfs_create_wifi_feature_interface(struct kobject *wifi_kobject)
|
||||
if (!hdd_ctx)
|
||||
return;
|
||||
|
||||
if (!wifi_kobject) {
|
||||
hdd_err("could not get wifi kobject!");
|
||||
if (!hdd_ctx->oem_data_len || !hdd_ctx->file_name) {
|
||||
hdd_err("Invalid oem data length or file name");
|
||||
return;
|
||||
}
|
||||
if (!hdd_ctx->oem_data_len) {
|
||||
hdd_err("Invalid oem data length");
|
||||
if (!wifi_kobject) {
|
||||
hdd_err("could not get wifi kobject!");
|
||||
return;
|
||||
}
|
||||
feature_set_attribute.attr.name = hdd_ctx->file_name;
|
||||
@@ -98,6 +98,18 @@ void hdd_sysfs_create_wifi_feature_interface(struct kobject *wifi_kobject)
|
||||
|
||||
void hdd_sysfs_destroy_wifi_feature_interface(struct kobject *wifi_kobject)
|
||||
{
|
||||
struct hdd_context *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
|
||||
|
||||
if (!hdd_ctx) {
|
||||
hdd_err("HDD context is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hdd_ctx->file_name) {
|
||||
hdd_debug("file name is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!wifi_kobject) {
|
||||
hdd_err("could not get wifi kobject!");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user