Merge wireless/main into wireless-next/main
authorJohannes Berg <johannes.berg@intel.com>
Fri, 31 Mar 2023 08:51:45 +0000 (10:51 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 31 Mar 2023 09:07:40 +0000 (11:07 +0200)
There are a few merge conflicts due to overlapping
fixes and changes, merge wireless/main to fix them.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1  2 
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c
drivers/net/wireless/intel/iwlwifi/mvm/sta.c
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/rx.c
net/mac80211/util.c
net/wireless/nl80211.c

Simple merge
Simple merge
index 1c957194554b1f688ebd4877da789bf07ba27325,af57616d2f1d9368906dfcb68d6cc8f60938e725..db3451f5f2fb9860bba69776d637b1fb42271ee6
@@@ -2862,12 -2795,27 +2843,31 @@@ ieee80211_rx_mesh_data(struct ieee80211
                rcu_read_unlock();
        }
  
+       /* Frame has reached destination.  Don't forward */
+       if (ether_addr_equal(sdata->vif.addr, eth->h_dest))
+               goto rx_accept;
+       if (!--mesh_hdr->ttl) {
+               if (multicast)
+                       goto rx_accept;
+               IEEE80211_IFSTA_MESH_CTR_INC(ifmsh, dropped_frames_ttl);
+               return RX_DROP_MONITOR;
+       }
+       if (!ifmsh->mshcfg.dot11MeshForwarding) {
+               if (is_multicast_ether_addr(eth->h_dest))
+                       goto rx_accept;
+               return RX_DROP_MONITOR;
+       }
        skb_set_queue_mapping(skb, ieee802_1d_to_ac[skb->priority]);
  
 +      if (!multicast &&
 +          ieee80211_rx_mesh_fast_forward(sdata, skb, mesh_hdrlen))
 +              return RX_QUEUED;
 +
        ieee80211_fill_mesh_addresses(&hdr, &hdr.frame_control,
                                      eth->h_dest, eth->h_source);
        hdrlen = ieee80211_hdrlen(hdr.frame_control);
@@@ -2982,24 -2933,14 +2985,24 @@@ __ieee80211_rx_h_amsdu(struct ieee80211
                                          data_offset, true))
                return RX_DROP_UNUSABLE;
  
-       if (rx->sta && rx->sta->amsdu_mesh_control < 0) {
+       if (rx->sta->amsdu_mesh_control < 0) {
 -              bool valid_std = ieee80211_is_valid_amsdu(skb, true);
 -              bool valid_nonstd = ieee80211_is_valid_amsdu(skb, false);
 +              s8 valid = -1;
 +              int i;
 +
 +              for (i = 0; i <= 2; i++) {
 +                      if (!ieee80211_is_valid_amsdu(skb, i))
 +                              continue;
 +
 +                      if (valid >= 0) {
 +                              /* ambiguous */
 +                              valid = -1;
 +                              break;
 +                      }
  
 -              if (valid_std && !valid_nonstd)
 -                      rx->sta->amsdu_mesh_control = 1;
 -              else if (valid_nonstd && !valid_std)
 -                      rx->sta->amsdu_mesh_control = 0;
 +                      valid = i;
 +              }
 +
 +              rx->sta->amsdu_mesh_control = valid;
        }
  
        ieee80211_amsdu_to_8023s(skb, &frame_list, dev->dev_addr,
Simple merge
index 2c9edb0156523df7c5170bc024de246f4e9decf2,4f63059efd813ba6dd257a7c7ebebacb2f102cd1..d95f8053020d374e0c54ebd19bd981de77dc919c
@@@ -805,11 -810,8 +810,12 @@@ static const struct nla_policy nl80211_
        [NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
        [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
        [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
-       [NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
+       [NL80211_ATTR_PUNCT_BITMAP] =
+               NLA_POLICY_FULL_RANGE(NLA_U32, &nl80211_punct_bitmap_range),
 +
 +      [NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS] = { .type = NLA_U16 },
 +      [NL80211_ATTR_HW_TIMESTAMP_ENABLED] = { .type = NLA_FLAG },
 +      [NL80211_ATTR_EMA_RNR_ELEMS] = { .type = NLA_NESTED },
  };
  
  /* policy for the key attributes */