diff mbox series

mwifiex: Fix skipped vendor specific IEs

Message ID 1532352699-3232-1-git-send-email-roman.stratiienko@globallogic.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show
Series mwifiex: Fix skipped vendor specific IEs | expand

Commit Message

Roman Stratiienko July 23, 2018, 1:31 p.m. UTC
From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Only microsoft specific IE is added by FW
Let other IEs to pass from userspace

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 drivers/net/wireless/marvell/mwifiex/ie.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Sergei Shtylyov July 24, 2018, 9:07 a.m. UTC | #1
Hello!

On 7/23/2018 4:31 PM, roman.stratiienko@globallogic.com wrote:

> From: Roman Stratiienko <roman.stratiienko@globallogic.com>
> 
> Only microsoft specific IE is added by FW
> Let other IEs to pass from userspace

    "To" not needed here.

> 
> Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
> ---
>   drivers/net/wireless/marvell/mwifiex/ie.c | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/marvell/mwifiex/ie.c b/drivers/net/wireless/marvell/mwifiex/ie.c
> index c488c30..c58b345 100644
> --- a/drivers/net/wireless/marvell/mwifiex/ie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/ie.c
> @@ -353,8 +353,16 @@ static int mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
>   		case WLAN_EID_HT_OPERATION:
>   		case WLAN_EID_VHT_CAPABILITY:
>   		case WLAN_EID_VHT_OPERATION:
> -		case WLAN_EID_VENDOR_SPECIFIC:
>   			break;
> +		case WLAN_EID_VENDOR_SPECIFIC:
> +			/* Skip only Microsoft IE that added by FW
                                                   ^^^^
    That's?

> +			 * Let other vendor specific IE to pass

    "To" not needed here as well...

[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/ie.c b/drivers/net/wireless/marvell/mwifiex/ie.c
index c488c30..c58b345 100644
--- a/drivers/net/wireless/marvell/mwifiex/ie.c
+++ b/drivers/net/wireless/marvell/mwifiex/ie.c
@@ -353,8 +353,16 @@  static int mwifiex_uap_parse_tail_ies(struct mwifiex_private *priv,
 		case WLAN_EID_HT_OPERATION:
 		case WLAN_EID_VHT_CAPABILITY:
 		case WLAN_EID_VHT_OPERATION:
-		case WLAN_EID_VENDOR_SPECIFIC:
 			break;
+		case WLAN_EID_VENDOR_SPECIFIC:
+			/* Skip only Microsoft IE that added by FW
+			 * Let other vendor specific IE to pass
+			 */
+			if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+						    WLAN_OUI_TYPE_MICROSOFT_WMM,
+						    (const u8 *)hdr,
+						    hdr->len + sizeof(struct ieee_types_header)))
+				break;
 		default:
 			memcpy(gen_ie->ie_buffer + ie_len, hdr,
 			       hdr->len + sizeof(struct ieee_types_header));