staging: rtl8192e: Remove struct rtllib_hdr_4addrqos
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Fri, 15 Sep 2023 16:09:25 +0000 (18:09 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Sep 2023 07:47:56 +0000 (09:47 +0200)
Replace struct rtllib_hdr_4addrqos with struct ieee80211_qos_hdr_4addr to
avoid proprietary code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/e146191ec1781a3989b318316fe9d8cdb330a52a.1694792595.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib.h
drivers/staging/rtl8192e/rtllib_rx.c

index e73292201e3a1c905214e237f03bd7e2d5ae0fd4..24060c9722e6a62c0668fb6951be7261d4360e5a 100644 (file)
@@ -679,18 +679,6 @@ struct rtllib_pspoll_hdr {
        u8 ta[ETH_ALEN];
 } __packed;
 
-struct rtllib_hdr_4addrqos {
-       __le16 frame_ctl;
-       __le16 duration_id;
-       u8 addr1[ETH_ALEN];
-       u8 addr2[ETH_ALEN];
-       u8 addr3[ETH_ALEN];
-       __le16 seq_ctl;
-       u8 addr4[ETH_ALEN];
-       __le16 qos_ctl;
-       u8 payload[];
-} __packed;
-
 struct rtllib_info_element {
        u8 id;
        u8 len;
index 265a718a20a40b2b79c91cc38049733e580bfc6d..cf98b020194bfb34704efe6242ef31c5c873ed80 100644 (file)
@@ -94,13 +94,13 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
        unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
        struct rtllib_frag_entry *entry;
        struct ieee80211_qos_hdr *hdr_3addrqos;
-       struct rtllib_hdr_4addrqos *hdr_4addrqos;
+       struct ieee80211_qos_hdr_4addr *hdr_4addrqos;
        u8 tid;
 
        if (((fc & RTLLIB_FCTL_DSTODS) == RTLLIB_FCTL_DSTODS) &&
            RTLLIB_QOS_HAS_SEQ(fc)) {
-               hdr_4addrqos = (struct rtllib_hdr_4addrqos *)hdr;
-               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & RTLLIB_QCTL_TID;
+               hdr_4addrqos = (struct ieee80211_qos_hdr_4addr *)hdr;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctrl) & RTLLIB_QCTL_TID;
                tid = UP2AC(tid);
                tid++;
        } else if (RTLLIB_QOS_HAS_SEQ(fc)) {
@@ -163,13 +163,13 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
        unsigned int seq = WLAN_GET_SEQ_SEQ(sc);
        struct rtllib_frag_entry *entry;
        struct ieee80211_qos_hdr *hdr_3addrqos;
-       struct rtllib_hdr_4addrqos *hdr_4addrqos;
+       struct ieee80211_qos_hdr_4addr *hdr_4addrqos;
        u8 tid;
 
        if (((fc & RTLLIB_FCTL_DSTODS) == RTLLIB_FCTL_DSTODS) &&
            RTLLIB_QOS_HAS_SEQ(fc)) {
-               hdr_4addrqos = (struct rtllib_hdr_4addrqos *)hdr;
-               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & RTLLIB_QCTL_TID;
+               hdr_4addrqos = (struct ieee80211_qos_hdr_4addr *)hdr;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctrl) & RTLLIB_QCTL_TID;
                tid = UP2AC(tid);
                tid++;
        } else if (RTLLIB_QOS_HAS_SEQ(fc)) {
@@ -356,13 +356,13 @@ static int is_duplicate_packet(struct rtllib_device *ieee,
        u16 *last_seq, *last_frag;
        unsigned long *last_time;
        struct ieee80211_qos_hdr *hdr_3addrqos;
-       struct rtllib_hdr_4addrqos *hdr_4addrqos;
+       struct ieee80211_qos_hdr_4addr *hdr_4addrqos;
        u8 tid;
 
        if (((fc & RTLLIB_FCTL_DSTODS) == RTLLIB_FCTL_DSTODS) &&
            RTLLIB_QOS_HAS_SEQ(fc)) {
-               hdr_4addrqos = (struct rtllib_hdr_4addrqos *)header;
-               tid = le16_to_cpu(hdr_4addrqos->qos_ctl) & RTLLIB_QCTL_TID;
+               hdr_4addrqos = (struct ieee80211_qos_hdr_4addr *)header;
+               tid = le16_to_cpu(hdr_4addrqos->qos_ctrl) & RTLLIB_QCTL_TID;
                tid = UP2AC(tid);
                tid++;
        } else if (RTLLIB_QOS_HAS_SEQ(fc)) {