Browse Source

qcacmn: Add an api to check if frame has SON repeater IE

Add an api to check if received frame has SON repeater IE or not.

Change-Id: Id89bfbc5dd555d58673e390e3e093e0da75b6d63
Neha Bisht 4 năm trước cách đây
mục cha
commit
7aa5b3ebb7
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h

+ 18 - 0
umac/cmn_services/cmn_defs/inc/wlan_cmn_ieee80211.h

@@ -79,6 +79,7 @@
 /* QCA OUI (in little endian) */
 #define QCA_OUI 0xf0fd8c
 #define QCA_OUI_WHC_TYPE  0x00
+#define QCA_OUI_WHC_REPT_TYPE 0x01
 
 /* Extender vendor specific IE */
 #define QCA_OUI_EXTENDER_TYPE           0x03
@@ -1896,6 +1897,23 @@ is_qca_son_oui(uint8_t *frm, uint8_t whc_subtype)
 		(*(frm + 6) == whc_subtype);
 }
 
+/**
+ * is_qca_son_rept_oui() - If vendor IE is QCA WHC repeater type
+ * @frm: vendor IE pointer
+ * @whc_subtype: subtype
+ *
+ * API to check if vendor IE is QCA WHC REPT
+ *
+ * Return: true if its QCA WHC REPT IE
+ */
+static inline bool
+is_qca_son_rept_oui(u_int8_t *frm, u_int8_t whc_subtype)
+{
+	return ((frm[1] > 4) && (LE_READ_4(frm + 2) ==
+		((QCA_OUI_WHC_REPT_TYPE << 24) | QCA_OUI)) &&
+		(*(frm + 6) == whc_subtype));
+}
+
 /**
  * is_ht_cap() - If vendor IE is vendor HT cap type
  * @frm: vendor IE pointer