qcacld-3.0: Implement WAR for P2P GO 1x1 HT association with peer

In P2P GO mode, if the P2P client device is not VHT capable and
only HT capable, but the DUT P2P GO is VHT capable and advertises
2x2 NSS and sends packets with 2x2 rates, it results in interop
issues with HT only capable P2P client devices.

When GO is operating in DBS mode, GO beacons advertise 2x2
capability but include OMN IE to indicate current operating mode
of 1x1. But here peer device is only HT capable and will not
understand OMN IE.

Check if the P2P client device is only HT capable and has
"\x00\x50\xf2\x04". Then downgrade the P2P GO operation to 1x1
nss. Modify rx mcs map value in association response to enable
only mcs 0-7.

Change-Id: I7177c5aee9a560a20c50a63886c0ee77f7d617ae
CRs-Fixed: 2464925
This commit is contained in:
Pragaspathi Thilagaraj
2019-06-04 14:10:44 +05:30
committed by nshrivas
parent 0100fdd28a
commit b3472f0fcd
14 changed files with 319 additions and 22 deletions

View File

@@ -0,0 +1,41 @@
/*
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
* above copyright notice and this permission notice appear in all
* copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/**
* DOC: Contains p2p public data structure definitions
*/
#ifndef _WLAN_P2P_API_H_
#define _WLAN_P2P_API_H_
#include <qdf_types.h>
/**
* wlan_p2p_check_oui_and_force_1x1() - Function to get P2P client device
* attributes from assoc request frames
* @assoc_ie: pointer to assoc request frame IEs
* @ie_len: length of the assoc request frame IE
*
* When assoc request is received from P2P STA device, this function checks
* for specific OUI present in the P2P device info attribute. The caller should
* take care of checking if this is called only in P2P GO mode.
*
* Return: True if OUI is present, else false.
*/
bool wlan_p2p_check_oui_and_force_1x1(uint8_t *assoc_ie, uint32_t ie_len);
#endif

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -27,6 +27,15 @@
#define P2P_MAX_NOA_DESC 4
#define HEADER_LEN_P2P_IE 6
#define OUI_SIZE_P2P 4
#define P2P_1X1_WAR_OUI "\x00\x50\xf2\x04"
#define P2P_1X1_OUI_LEN 4
#define MAX_CONFIG_METHODS_LEN 2
#define DEVICE_CATEGORY_MAX_LEN 1
/**
* struct p2p_ps_params - P2P powersave related params
* @opp_ps: opportunistic power save
@@ -269,4 +278,67 @@ struct p2p_protocol_callbacks {
bool (*is_mgmt_protected)(uint32_t vdev_id, const uint8_t *peer_addr);
};
/**
* enum p2p_attr_id - enum for P2P attributes ID in P2P IE
* @P2P_ATTR_STATUS - Attribute Status none
* @P2P_ATTR_MINOR_REASON_CODE: Minor reason code attribute
* @P2P_ATTR_CAPABILITY: Capability attribute
* @P2P_ATTR_DEVICE_ID: device ID attribute
* @P2P_ATTR_GROUP_OWNER_INTENT: Group owner intent attribute
* @P2P_ATTR_CONFIGURATION_TIMEOUT: Config timeout attribute
* @P2P_ATTR_LISTEN_CHANNEL: listen channel attribute
* @P2P_ATTR_GROUP_BSSID: Group BSSID attribute
* @P2P_ATTR_EXT_LISTEN_TIMING: Listen timing attribute
* @P2P_ATTR_INTENDED_INTERFACE_ADDR: Intended interface address attribute
* @P2P_ATTR_MANAGEABILITY: Manageability attribute
* @P2P_ATTR_CHANNEL_LIST: Channel list attribute
* @P2P_ATTR_NOTICE_OF_ABSENCE: Notice of Absence attribute
* @P2P_ATTR_DEVICE_INFO: Device Info attribute
* @P2P_ATTR_GROUP_INFO: Group Info attribute
* @P2P_ATTR_GROUP_ID: Group ID attribute
* @P2P_ATTR_INTERFACE: Interface attribute
* @P2P_ATTR_OPERATING_CHANNEL: Operating channel attribute
* @P2P_ATTR_INVITATION_FLAGS: Invitation flags attribute
* @P2P_ATTR_OOB_GO_NEG_CHANNEL: GO neg channel attribute
* @P2P_ATTR_SERVICE_HASH: Service HASH attribute
* @P2P_ATTR_SESSION_INFORMATION_DATA: Session Info data attribute
* @P2P_ATTR_CONNECTION_CAPABILITY = Connection capability attribute
* @P2P_ATTR_ADVERTISEMENT_ID = Advertisement ID attribute
* @P2P_ATTR_ADVERTISED_SERVICE = Advertised Service attribute
* @P2P_ATTR_SESSION_ID = Session ID attribute
* @P2P_ATTR_FEATURE_CAPABILITY = Feature capability attribute
* @P2P_ATTR_PERSISTENT_GROUP -Persistent group attribute
* @P2P_ATTR_VENDOR_SPECIFIC - Vendor specific attribute
*/
enum p2p_attr_id {
P2P_ATTR_STATUS = 0,
P2P_ATTR_MINOR_REASON_CODE = 1,
P2P_ATTR_CAPABILITY = 2,
P2P_ATTR_DEVICE_ID = 3,
P2P_ATTR_GROUP_OWNER_INTENT = 4,
P2P_ATTR_CONFIGURATION_TIMEOUT = 5,
P2P_ATTR_LISTEN_CHANNEL = 6,
P2P_ATTR_GROUP_BSSID = 7,
P2P_ATTR_EXT_LISTEN_TIMING = 8,
P2P_ATTR_INTENDED_INTERFACE_ADDR = 9,
P2P_ATTR_MANAGEABILITY = 10,
P2P_ATTR_CHANNEL_LIST = 11,
P2P_ATTR_NOTICE_OF_ABSENCE = 12,
P2P_ATTR_DEVICE_INFO = 13,
P2P_ATTR_GROUP_INFO = 14,
P2P_ATTR_GROUP_ID = 15,
P2P_ATTR_INTERFACE = 16,
P2P_ATTR_OPERATING_CHANNEL = 17,
P2P_ATTR_INVITATION_FLAGS = 18,
P2P_ATTR_OOB_GO_NEG_CHANNEL = 19,
P2P_ATTR_SERVICE_HASH = 21,
P2P_ATTR_SESSION_INFORMATION_DATA = 22,
P2P_ATTR_CONNECTION_CAPABILITY = 23,
P2P_ATTR_ADVERTISEMENT_ID = 24,
P2P_ATTR_ADVERTISED_SERVICE = 25,
P2P_ATTR_SESSION_ID = 26,
P2P_ATTR_FEATURE_CAPABILITY = 27,
P2P_ATTR_PERSISTENT_GROUP = 28,
P2P_ATTR_VENDOR_SPECIFIC = 221
};
#endif /* _WLAN_P2P_PUBLIC_STRUCT_H_ */