1. 28 8月, 2018 1 次提交
    • E
      mac80211: don't update the PM state of a peer upon a multicast frame · 20932750
      Emmanuel Grumbach 提交于
      I changed the way mac80211 updates the PM state of the peer.
      I forgot that we could also have multicast frames from the
      peer and that those frame should of course not change the
      PM state of the peer: A peer goes to power save when it
      needs to scan, but it won't send the broadcast Probe Request
      with the PM bit set.
      
      This made us mark the peer as awake when it wasn't and then
      Intel's firmware would fail to transmit because the peer is
      asleep according to its database. The driver warned about
      this and it looked like this:
      
       WARNING: CPU: 0 PID: 184 at /usr/src/linux-4.16.14/drivers/net/wireless/intel/iwlwifi/mvm/tx.c:1369 iwl_mvm_rx_tx_cmd+0x53b/0x860
       CPU: 0 PID: 184 Comm: irq/124-iwlwifi Not tainted 4.16.14 #1
       RIP: 0010:iwl_mvm_rx_tx_cmd+0x53b/0x860
       Call Trace:
        iwl_pcie_rx_handle+0x220/0x880
        iwl_pcie_irq_handler+0x6c9/0xa20
        ? irq_forced_thread_fn+0x60/0x60
        ? irq_thread_dtor+0x90/0x90
      
      The relevant code that spits the WARNING is:
      
              case TX_STATUS_FAIL_DEST_PS:
                      /* the FW should have stopped the queue and not
                       * return this status
                       */
                      WARN_ON(1);
                      info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=199967.
      
      Fixes: 9fef6544 ("mac80211: always update the PM state of a peer on MGMT / DATA frames")
      Cc: <stable@vger.kernel.org>   #4.16+
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      20932750
  2. 06 7月, 2018 1 次提交
    • D
      nl80211/mac80211: allow non-linear skb in rx_control_port · a948f713
      Denis Kenzior 提交于
      The current implementation of cfg80211_rx_control_port assumed that the
      caller could provide a contiguous region of memory for the control port
      frame to be sent up to userspace.  Unfortunately, many drivers produce
      non-linear skbs, especially for data frames.  This resulted in userspace
      getting notified of control port frames with correct metadata (from
      address, port, etc) yet garbage / nonsense contents, resulting in bad
      handshakes, disconnections, etc.
      
      mac80211 linearizes skbs containing management frames.  But it didn't
      seem worthwhile to do this for control port frames.  Thus the signature
      of cfg80211_rx_control_port was changed to take the skb directly.
      nl80211 then takes care of obtaining control port frame data directly
      from the (linear | non-linear) skb.
      
      The caller is still responsible for freeing the skb,
      cfg80211_rx_control_port does not take ownership of it.
      
      Fixes: 6a671a50 ("nl80211: Add CMD_CONTROL_PORT_FRAME API")
      Signed-off-by: NDenis Kenzior <denkenz@gmail.com>
      [fix some kernel-doc formatting, add fixes tag]
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a948f713
  3. 08 5月, 2018 1 次提交
  4. 29 3月, 2018 3 次提交
  5. 21 3月, 2018 1 次提交
  6. 16 3月, 2018 1 次提交
  7. 27 2月, 2018 4 次提交
  8. 23 2月, 2018 3 次提交
  9. 31 1月, 2018 1 次提交
  10. 04 1月, 2018 1 次提交
  11. 19 12月, 2017 1 次提交
  12. 11 12月, 2017 2 次提交
    • T
      mac80211: Add airtime account and scheduling to TXQs · b0d52ad8
      Toke Høiland-Jørgensen 提交于
      This adds airtime accounting and scheduling to the mac80211 TXQ
      scheduler. A new hardware flag, AIRTIME_ACCOUNTING, is added that
      drivers can set if they support reporting airtime usage of
      transmissions. When this flag is set, mac80211 will expect the actual
      airtime usage to be reported in the tx_time and rx_time fields of the
      respective status structs.
      
      When airtime information is present, mac80211 will schedule TXQs
      (through ieee80211_next_txq()) in a way that enforces airtime fairness
      between active stations. This scheduling works the same way as the ath9k
      in-driver airtime fairness scheduling.
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      b0d52ad8
    • E
      mac80211: always update the PM state of a peer on MGMT / DATA frames · 9fef6544
      Emmanuel Grumbach 提交于
      The 2016 version of the spec is more generic about when the
      AP should update the power management state of the peer:
      the AP shall update the state based on any management or
      data frames. This means that even non-bufferable management
      frames should be looked at to update to maintain the power
      management state of the peer.
      
      This can avoid problematic cases for example if a station
      disappears while being asleep and then re-appears. The AP
      would remember it as in power save, but the Authentication
      frame couldn't be used to set the peer as awake again.
      Note that this issues wasn't really critical since at some
      point (after the association) we would have removed the
      station and created another one with all the states cleared.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9fef6544
  13. 16 6月, 2017 3 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
    • J
      networking: introduce and use skb_put_data() · 59ae1d12
      Johannes Berg 提交于
      A common pattern with skb_put() is to just want to memcpy()
      some data into the new space, introduce skb_put_data() for
      this.
      
      An spatch similar to the one for skb_put_zero() converts many
      of the places using it:
      
          @@
          identifier p, p2;
          expression len, skb, data;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_data(skb, data, len);
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, len);
          |
          -memcpy(p, data, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb, data;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_data(skb, data, sizeof(t));
          )
          (
          p2 = (t2)p;
          -memcpy(p2, data, sizeof(*p));
          |
          -memcpy(p, data, sizeof(*p));
          )
      
          @@
          expression skb, len, data;
          @@
          -memcpy(skb_put(skb, len), data, len);
          +skb_put_data(skb, data, len);
      
      (again, manually post-processed to retain some comments)
      Reviewed-by: NStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      59ae1d12
    • J
      networking: convert many more places to skb_put_zero() · b080db58
      Johannes Berg 提交于
      There were many places that my previous spatch didn't find,
      as pointed out by yuan linyu in various patches.
      
      The following spatch found many more and also removes the
      now unnecessary casts:
      
          @@
          identifier p, p2;
          expression len;
          expression skb;
          type t, t2;
          @@
          (
          -p = skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          |
          -p = (t)skb_put(skb, len);
          +p = skb_put_zero(skb, len);
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, len);
          |
          -memset(p, 0, len);
          )
      
          @@
          type t, t2;
          identifier p, p2;
          expression skb;
          @@
          t *p;
          ...
          (
          -p = skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          |
          -p = (t *)skb_put(skb, sizeof(t));
          +p = skb_put_zero(skb, sizeof(t));
          )
          ... when != p
          (
          p2 = (t2)p;
          -memset(p2, 0, sizeof(*p));
          |
          -memset(p, 0, sizeof(*p));
          )
      
          @@
          expression skb, len;
          @@
          -memset(skb_put(skb, len), 0, len);
          +skb_put_zero(skb, len);
      
      Apply it to the tree (with one manual fixup to keep the
      comment in vxlan.c, which spatch removed.)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b080db58
  14. 13 6月, 2017 1 次提交
  15. 08 6月, 2017 1 次提交
    • J
      mac80211: manage RX BA session offload without SKB queue · 699cb58c
      Johannes Berg 提交于
      Instead of using the SKB queue with the fake pkt_type for the
      offloaded RX BA session management, also handle this with the
      normal aggregation state machine worker. This also makes the
      use of this more reliable since it gets rid of the allocation
      of the fake skb.
      
      Combined with the previous patch, this finally allows us to
      get rid of the pkt_type hack entirely, so do that as well.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      699cb58c
  16. 17 5月, 2017 1 次提交
    • R
      mac80211: strictly check mesh address extension mode · 5667c86a
      Rajkumar Manoharan 提交于
      Mesh forwarding path checks for address extension mode to fetch
      appropriate proxied address and MPP address. Existing condition
      that looks for 6 address format is not strict enough so that
      frames with improper values are processed and invalid entries
      are added into MPP table. Fix that by adding a stricter check before
      processing the packet.
      
      Per IEEE Std 802.11s-2011 spec. Table 7-6g1 lists address extension
      mode 0x3 as reserved one. And also Table Table 9-13 does not specify
      0x3 as valid address field.
      
      Fixes: 9b395bc3 ("mac80211: verify that skb data is present")
      Signed-off-by: NRajkumar Manoharan <rmanohar@qti.qualcomm.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      5667c86a
  17. 28 4月, 2017 3 次提交
    • J
      mac80211: rename ieee80211_rx_status::vht_nss to just nss · 8613c948
      Johannes Berg 提交于
      This field will need to be used again for HE, so rename it now.
      
      Again, mostly done with this spatch:
      
      @@
      expression status;
      @@
      -status->vht_nss
      +status->nss
      @@
      expression status;
      @@
      -status.vht_nss
      +status.nss
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8613c948
    • J
      mac80211: separate encoding/bandwidth from flags · da6a4352
      Johannes Berg 提交于
      We currently use a lot of flags that are mutually incompatible,
      separate this out into actual encoding and bandwidth enum values.
      
      Much of this again done with spatch, with manual post-editing,
      mostly to add the switch statements and get rid of the conversions.
      
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_80MHZ
      +status->bw = RATE_INFO_BW_80
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_40MHZ
      +status->bw = RATE_INFO_BW_40
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_20MHZ
      +status->bw = RATE_INFO_BW_20
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_160MHZ
      +status->bw = RATE_INFO_BW_160
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_5MHZ
      +status->bw = RATE_INFO_BW_5
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_10MHZ
      +status->bw = RATE_INFO_BW_10
      
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_VHT
      +status->encoding = RX_ENC_VHT
      @@
      expression status;
      @@
      -status->enc_flags |= RX_ENC_FLAG_HT
      +status->encoding = RX_ENC_HT
      @@
      expression status;
      @@
      -status.enc_flags |= RX_ENC_FLAG_VHT
      +status.encoding = RX_ENC_VHT
      @@
      expression status;
      @@
      -status.enc_flags |= RX_ENC_FLAG_HT
      +status.encoding = RX_ENC_HT
      
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_HT)
      +(status->encoding == RX_ENC_HT)
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_VHT)
      +(status->encoding == RX_ENC_VHT)
      
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_5MHZ)
      +(status->bw == RATE_INFO_BW_5)
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_10MHZ)
      +(status->bw == RATE_INFO_BW_10)
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_40MHZ)
      +(status->bw == RATE_INFO_BW_40)
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_80MHZ)
      +(status->bw == RATE_INFO_BW_80)
      @@
      expression status;
      @@
      -(status->enc_flags & RX_ENC_FLAG_160MHZ)
      +(status->bw == RATE_INFO_BW_160)
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      da6a4352
    • J
      mac80211: clean up rate encoding bits in RX status · 7fdd69c5
      Johannes Berg 提交于
      In preparation for adding support for HE rates, clean up
      the driver report encoding for rate/bandwidth reporting
      on RX frames.
      
      Much of this patch was done with the following spatch:
      
      @@
      expression status;
      @@
      -status->flag & (RX_FLAG_HT | RX_FLAG_VHT)
      +status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_SHORTPRE
      +status->enc_flags op RX_ENC_FLAG_SHORTPRE
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_SHORTPRE
      +status->enc_flags & RX_ENC_FLAG_SHORTPRE
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_HT
      +status->enc_flags op RX_ENC_FLAG_HT
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_HT
      +status->enc_flags & RX_ENC_FLAG_HT
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_40MHZ
      +status->enc_flags op RX_ENC_FLAG_40MHZ
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_40MHZ
      +status->enc_flags & RX_ENC_FLAG_40MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_SHORT_GI
      +status->enc_flags op RX_ENC_FLAG_SHORT_GI
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_SHORT_GI
      +status->enc_flags & RX_ENC_FLAG_SHORT_GI
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_HT_GF
      +status->enc_flags op RX_ENC_FLAG_HT_GF
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_HT_GF
      +status->enc_flags & RX_ENC_FLAG_HT_GF
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_VHT
      +status->enc_flags op RX_ENC_FLAG_VHT
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_VHT
      +status->enc_flags & RX_ENC_FLAG_VHT
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_STBC_MASK
      +status->enc_flags op RX_ENC_FLAG_STBC_MASK
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_STBC_MASK
      +status->enc_flags & RX_ENC_FLAG_STBC_MASK
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_LDPC
      +status->enc_flags op RX_ENC_FLAG_LDPC
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_LDPC
      +status->enc_flags & RX_ENC_FLAG_LDPC
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_10MHZ
      +status->enc_flags op RX_ENC_FLAG_10MHZ
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_10MHZ
      +status->enc_flags & RX_ENC_FLAG_10MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->flag op RX_FLAG_5MHZ
      +status->enc_flags op RX_ENC_FLAG_5MHZ
      @@
      expression status;
      @@
      -status->flag & RX_FLAG_5MHZ
      +status->enc_flags & RX_ENC_FLAG_5MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->vht_flag op RX_VHT_FLAG_80MHZ
      +status->enc_flags op RX_ENC_FLAG_80MHZ
      @@
      expression status;
      @@
      -status->vht_flag & RX_VHT_FLAG_80MHZ
      +status->enc_flags & RX_ENC_FLAG_80MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->vht_flag op RX_VHT_FLAG_160MHZ
      +status->enc_flags op RX_ENC_FLAG_160MHZ
      @@
      expression status;
      @@
      -status->vht_flag & RX_VHT_FLAG_160MHZ
      +status->enc_flags & RX_ENC_FLAG_160MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status->vht_flag op RX_VHT_FLAG_BF
      +status->enc_flags op RX_ENC_FLAG_BF
      @@
      expression status;
      @@
      -status->vht_flag & RX_VHT_FLAG_BF
      +status->enc_flags & RX_ENC_FLAG_BF
      
      @@
      assignment operator op;
      expression status, STBC;
      @@
      -status->flag op STBC << RX_FLAG_STBC_SHIFT
      +status->enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_SHORTPRE
      +status.enc_flags op RX_ENC_FLAG_SHORTPRE
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_SHORTPRE
      +status.enc_flags & RX_ENC_FLAG_SHORTPRE
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_HT
      +status.enc_flags op RX_ENC_FLAG_HT
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_HT
      +status.enc_flags & RX_ENC_FLAG_HT
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_40MHZ
      +status.enc_flags op RX_ENC_FLAG_40MHZ
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_40MHZ
      +status.enc_flags & RX_ENC_FLAG_40MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_SHORT_GI
      +status.enc_flags op RX_ENC_FLAG_SHORT_GI
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_SHORT_GI
      +status.enc_flags & RX_ENC_FLAG_SHORT_GI
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_HT_GF
      +status.enc_flags op RX_ENC_FLAG_HT_GF
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_HT_GF
      +status.enc_flags & RX_ENC_FLAG_HT_GF
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_VHT
      +status.enc_flags op RX_ENC_FLAG_VHT
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_VHT
      +status.enc_flags & RX_ENC_FLAG_VHT
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_STBC_MASK
      +status.enc_flags op RX_ENC_FLAG_STBC_MASK
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_STBC_MASK
      +status.enc_flags & RX_ENC_FLAG_STBC_MASK
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_LDPC
      +status.enc_flags op RX_ENC_FLAG_LDPC
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_LDPC
      +status.enc_flags & RX_ENC_FLAG_LDPC
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_10MHZ
      +status.enc_flags op RX_ENC_FLAG_10MHZ
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_10MHZ
      +status.enc_flags & RX_ENC_FLAG_10MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.flag op RX_FLAG_5MHZ
      +status.enc_flags op RX_ENC_FLAG_5MHZ
      @@
      expression status;
      @@
      -status.flag & RX_FLAG_5MHZ
      +status.enc_flags & RX_ENC_FLAG_5MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.vht_flag op RX_VHT_FLAG_80MHZ
      +status.enc_flags op RX_ENC_FLAG_80MHZ
      @@
      expression status;
      @@
      -status.vht_flag & RX_VHT_FLAG_80MHZ
      +status.enc_flags & RX_ENC_FLAG_80MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.vht_flag op RX_VHT_FLAG_160MHZ
      +status.enc_flags op RX_ENC_FLAG_160MHZ
      @@
      expression status;
      @@
      -status.vht_flag & RX_VHT_FLAG_160MHZ
      +status.enc_flags & RX_ENC_FLAG_160MHZ
      
      @@
      assignment operator op;
      expression status;
      @@
      -status.vht_flag op RX_VHT_FLAG_BF
      +status.enc_flags op RX_ENC_FLAG_BF
      @@
      expression status;
      @@
      -status.vht_flag & RX_VHT_FLAG_BF
      +status.enc_flags & RX_ENC_FLAG_BF
      
      @@
      assignment operator op;
      expression status, STBC;
      @@
      -status.flag op STBC << RX_FLAG_STBC_SHIFT
      +status.enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT
      
      @@
      @@
      -RX_FLAG_STBC_SHIFT
      +RX_ENC_FLAG_STBC_SHIFT
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      7fdd69c5
  18. 27 4月, 2017 1 次提交
  19. 26 4月, 2017 1 次提交
  20. 21 4月, 2017 1 次提交
  21. 18 4月, 2017 1 次提交
  22. 13 4月, 2017 2 次提交
    • J
      mac80211: fix MU-MIMO follow-MAC mode · 9e478066
      Johannes Berg 提交于
      There are two bugs in the follow-MAC code:
       * it treats the radiotap header as the 802.11 header
         (therefore it can't possibly work)
       * it doesn't verify that the skb data it accesses is actually
         present in the header, which is mitigated by the first point
      
      Fix this by moving all of this out into a separate function.
      This function copies the data it needs using skb_copy_bits()
      to make sure it can be accessed if it's paged, and offsets
      that by the possibly present vendor radiotap header.
      
      This also makes all those conditions more readable.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      9e478066
    • J
      mac80211: drop frames too short for FCS earlier · 30841f5c
      Johannes Berg 提交于
      Instead of dropping such frames only when removing the
      monitor info, drop them earlier (keeping the warning)
      and simplify removing monitor info. While at it, make
      that function return void.
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      30841f5c
  23. 28 2月, 2017 1 次提交
    • J
      mac80211: use driver-indicated transmitter STA only for data frames · 19d19e96
      Johannes Berg 提交于
      When I originally introduced using the driver-indicated station as an
      optimisation to avoid the hashtable lookup/iteration, of course it
      wasn't intended to really functionally change anything.
      
      I neglected, however, to take into account VLAN interfaces, which have
      the property that management and data frames are handled differently:
      data frames go directly to the station and the VLAN while management
      frames continue to be processed over the underlying/associated AP-type
      interface. As a consequence, when a driver used this optimisation for
      management frames and the user enabled VLANs, my change broke things
      since any management frames, particularly disassoc/deauth, were missed
      by hostapd.
      
      Fix this by restoring the original code path for non-data frames, they
      aren't critical for performance to begin with.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=194713.
      
      Big thanks goes to Jarek who bisected the issue and provided a very
      detailed bug report, including the crucial information that he was
      using VLANs in his configuration.
      
      Cc: stable@vger.kernel.org
      Fixes: 771e846bea9e ("mac80211: allow passing transmitter station on RX")
      Reported-and-tested-by: NJarek Kamiński <jarek@freeside.be>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      19d19e96
  24. 27 2月, 2017 2 次提交
  25. 26 1月, 2017 1 次提交
  26. 11 1月, 2017 1 次提交
    • J
      mac80211: recalculate min channel width on VHT opmode changes · d2941df8
      Johannes Berg 提交于
      When an associated station changes its VHT operating mode this
      can/will affect the bandwidth it's using, and consequently we
      must recalculate the minimum bandwidth we need to use. Failure
      to do so can lead to one of two scenarios:
       1) we use a too high bandwidth, this is benign
       2) we use a too narrow bandwidth, causing rate control and
          actual PHY configuration to be out of sync, which can in
          turn cause problems/crashes
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      d2941df8