This repository has been archived by the owner on Mar 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Wifi on kernels newer than 5.1.6
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io>
- Loading branch information
Showing
1 changed file
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
From 2f655d488a53f7bf3fc398238da231575749e9db Mon Sep 17 00:00:00 2001 | ||
From: Dorian Stoll <dorian.stoll@tmsp.io> | ||
Date: Fri, 21 Jun 2019 12:55:57 +0200 | ||
Subject: [PATCH] wifi | ||
|
||
Signed-off-by: Dorian Stoll <dorian.stoll@tmsp.io> | ||
--- | ||
drivers/net/wireless/marvell/mwifiex/scan.c | 19 ------------------- | ||
1 file changed, 19 deletions(-) | ||
|
||
diff --git a/drivers/net/wireless/marvell/mwifiex/scan.c b/drivers/net/wireless/marvell/mwifiex/scan.c | ||
index c269a0de9413..935778ec9a1b 100644 | ||
--- a/drivers/net/wireless/marvell/mwifiex/scan.c | ||
+++ b/drivers/net/wireless/marvell/mwifiex/scan.c | ||
@@ -1247,8 +1247,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
} | ||
switch (element_id) { | ||
case WLAN_EID_SSID: | ||
- if (element_len > IEEE80211_MAX_SSID_LEN) | ||
- return -EINVAL; | ||
bss_entry->ssid.ssid_len = element_len; | ||
memcpy(bss_entry->ssid.ssid, (current_ptr + 2), | ||
element_len); | ||
@@ -1258,8 +1256,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_SUPP_RATES: | ||
- if (element_len > MWIFIEX_SUPPORTED_RATES) | ||
- return -EINVAL; | ||
memcpy(bss_entry->data_rates, current_ptr + 2, | ||
element_len); | ||
memcpy(bss_entry->supported_rates, current_ptr + 2, | ||
@@ -1269,8 +1265,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_FH_PARAMS: | ||
- if (element_len + 2 < sizeof(*fh_param_set)) | ||
- return -EINVAL; | ||
fh_param_set = | ||
(struct ieee_types_fh_param_set *) current_ptr; | ||
memcpy(&bss_entry->phy_param_set.fh_param_set, | ||
@@ -1279,8 +1273,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_DS_PARAMS: | ||
- if (element_len + 2 < sizeof(*ds_param_set)) | ||
- return -EINVAL; | ||
ds_param_set = | ||
(struct ieee_types_ds_param_set *) current_ptr; | ||
|
||
@@ -1292,8 +1284,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_CF_PARAMS: | ||
- if (element_len + 2 < sizeof(*cf_param_set)) | ||
- return -EINVAL; | ||
cf_param_set = | ||
(struct ieee_types_cf_param_set *) current_ptr; | ||
memcpy(&bss_entry->ss_param_set.cf_param_set, | ||
@@ -1302,8 +1292,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_IBSS_PARAMS: | ||
- if (element_len + 2 < sizeof(*ibss_param_set)) | ||
- return -EINVAL; | ||
ibss_param_set = | ||
(struct ieee_types_ibss_param_set *) | ||
current_ptr; | ||
@@ -1313,14 +1301,10 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_ERP_INFO: | ||
- if (!element_len) | ||
- return -EINVAL; | ||
bss_entry->erp_flags = *(current_ptr + 2); | ||
break; | ||
|
||
case WLAN_EID_PWR_CONSTRAINT: | ||
- if (!element_len) | ||
- return -EINVAL; | ||
bss_entry->local_constraint = *(current_ptr + 2); | ||
bss_entry->sensed_11h = true; | ||
break; | ||
@@ -1361,9 +1345,6 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter, | ||
break; | ||
|
||
case WLAN_EID_VENDOR_SPECIFIC: | ||
- if (element_len + 2 < sizeof(vendor_ie->vend_hdr)) | ||
- return -EINVAL; | ||
- | ||
vendor_ie = (struct ieee_types_vendor_specific *) | ||
current_ptr; | ||
|
||
-- | ||
2.21.0 | ||
|