1. 24 10月, 2014 1 次提交
    • K
      mac80211: minstrel_ht: use group flags instead of index to display rates · 8ec7886b
      Karl Beldan 提交于
      When displaying a rate through debugfs minstrel_ht guesses its flags
      comparing group indexes.  Since 3ec373c4 ("mac80211: minstrel_ht:
      include type (cck/ht) in rates flag"), the rate flags of interest are
      present in the mcs_group-s, so use it.
      While improving the code, this also fixes a smatch false positive
      "error: testing array offset 'i' after use" in minstrel_ht_stats_dump.
      This warning only triggers after 9208247d ("mac80211: minstrel_ht:
      add basic support for VHT rates <= 3SS@80MHz") with
      CONFIG_MAC80211_RC_MINSTREL_VHT unset because then MINSTREL_VHT_GROUP_0
      is above MINSTREL_GROUPS_NB and smatch only barks when the "testing
      array offset" seems to prevent possible out of bonds accesses (which
      does not happen here since i < ARRAY_SIZE(mi->groups)).
      Signed-off-by: NKarl Beldan <karl.beldan@rivierawaves.com>
      Cc: Felix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      8ec7886b
  2. 21 10月, 2014 2 次提交
  3. 20 10月, 2014 1 次提交
    • K
      mac80211: minstrels: fix buffer overflow in HT debugfs rc_stats · 11b2357d
      Karl Beldan 提交于
      ATM an HT rc_stats line is 106 chars.
      Times 8(MCS_GROUP_RATES)*3(SS)*2(GI)*2(BW) + CCK(4), i.e. x100, this is
      well above the current 8192 - sizeof(*ms) currently allocated.
      
      Fix this by squeezing the output as follows (not that we're short on
      memory but this also improves readability and range, the new format adds
      one more digit to *ok/*cum and ok/cum):
      
      - Before (HT) (106 ch):
      type           rate     throughput  ewma prob   this prob  retry   this succ/attempt   success    attempts
      CCK/LP          5.5M           0.0        0.0         0.0      0              0(  0)         0           0
      HT20/LGI ABCDP MCS0            0.0        0.0         0.0      1              0(  0)         0           0
      - After (75 ch):
      type           rate     tpt eprob *prob ret  *ok(*cum)        ok(      cum)
      CCK/LP          5.5M    0.0   0.0   0.0   0    0(   0)         0(        0)
      HT20/LGI ABCDP MCS0     0.0   0.0   0.0   1    0(   0)         0(        0)
      
      - Align non-HT format Before (non-HT) (83 ch):
      rate      throughput  ewma prob  this prob  this succ/attempt   success    attempts
      ABCDP  6         0.0        0.0        0.0             0(  0)         0           0
            54         0.0        0.0        0.0             0(  0)         0           0
      - After (61 ch):
      rate          tpt eprob *prob  *ok(*cum)        ok(      cum)
      ABCDP  1      0.0   0.0   0.0    0(   0)         0(        0)
            54      0.0   0.0   0.0    0(   0)         0(        0)
      
      *This also adds dynamic checks for overflow, lowers the size of the
      non-HT request (allowing > 30 entries) and replaces the buddy-rounded
      allocations (s/sizeof(*ms) + 8192/8192).
      Signed-off-by: NKarl Beldan <karl.beldan@rivierawaves.com>
      Acked-by: NFelix Fietkau <nbd@openwrt.org>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      11b2357d
  4. 11 9月, 2014 1 次提交
  5. 26 11月, 2013 1 次提交
  6. 13 2月, 2013 1 次提交
  7. 12 2月, 2013 1 次提交
  8. 01 11月, 2011 1 次提交
  9. 16 9月, 2010 1 次提交
  10. 25 6月, 2010 1 次提交
  11. 03 6月, 2010 1 次提交