]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
wifi: remove unused argument of ieee80211_get_tdls_action()
authorDmitry Antipov <dmantipov@yandex.ru>
Wed, 4 Oct 2023 15:30:29 +0000 (18:30 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 23 Oct 2023 10:23:46 +0000 (12:23 +0200)
Remove unused 'hdr_size' argument of 'ieee80211_get_tdls_action()'
and adjust 'ieee80211_report_used_skb()' accordingly.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://lore.kernel.org/r/20231004153032.206134-1-dmantipov@yandex.ru
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/linux/ieee80211.h
net/mac80211/status.c

index 62b4469c68669da9fb7a39d70b31cb4754f3bcc9..045a776ee547372f362114749dbfa163ed38205e 100644 (file)
@@ -4490,12 +4490,11 @@ static inline bool ieee80211_check_tim(const struct ieee80211_tim_ie *tim,
 /**
  * ieee80211_get_tdls_action - get tdls packet action (or -1, if not tdls packet)
  * @skb: the skb containing the frame, length will not be checked
- * @hdr_size: the size of the ieee80211_hdr that starts at skb->data
  *
  * This function assumes the frame is a data frame, and that the network header
  * is in the correct place.
  */
-static inline int ieee80211_get_tdls_action(struct sk_buff *skb, u32 hdr_size)
+static inline int ieee80211_get_tdls_action(struct sk_buff *skb)
 {
        if (!skb_is_nonlinear(skb) &&
            skb->len > (skb_network_offset(skb) + 2)) {
index f67eafada741e6b4a2eb6eb26d9bbe2ab5e2ab3d..807cdab38d5e695334b2574986227609c9e1312c 100644 (file)
@@ -731,12 +731,9 @@ static void ieee80211_report_used_skb(struct ieee80211_local *local,
                if (!sdata) {
                        skb->dev = NULL;
                } else if (!dropped) {
-                       unsigned int hdr_size =
-                               ieee80211_hdrlen(hdr->frame_control);
-
                        /* Check to see if packet is a TDLS teardown packet */
                        if (ieee80211_is_data(hdr->frame_control) &&
-                           (ieee80211_get_tdls_action(skb, hdr_size) ==
+                           (ieee80211_get_tdls_action(skb) ==
                             WLAN_TDLS_TEARDOWN)) {
                                ieee80211_tdls_td_tx_handle(local, sdata, skb,
                                                            info->flags);