Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Apply OpenBSD if_iwm.c rev.1.148.
details: https://anonhg.NetBSD.org/src/rev/e8869d1d245d
branches: trunk
changeset: 350275:e8869d1d245d
user: nonaka <nonaka%NetBSD.org@localhost>
date: Mon Jan 09 12:45:49 2017 +0000
description:
Apply OpenBSD if_iwm.c rev.1.148.
> While setting up the basic rate bitmask for iwm's firmware, if the AP does
> not specify basic rates for either the CCK or OFDM set, add just the most
> basic rate to that set (1 Mbit/s in case of CCK, 6 Mbit/s in case of OFDM).
> This behaviour matches what code comments seem to imply.
> The previous code would add all possible basic rates in such cases.
> So if all basic rates were CCK only, the code would add all possible OFDM basic
> rates on top. Then the firmware would send some frames at too high rates, e.g.
> RTS frames would be sent at 24Mbit/s which is a bit risky on noisy channels.
diffstat:
sys/dev/pci/if_iwm.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (49 lines):
diff -r 1f5bfd7b774f -r e8869d1d245d sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Mon Jan 09 12:24:38 2017 +0000
+++ b/sys/dev/pci/if_iwm.c Mon Jan 09 12:45:49 2017 +0000
@@ -1,5 +1,5 @@
-/* $NetBSD: if_iwm.c,v 1.55 2017/01/09 10:42:45 khorben Exp $ */
-/* OpenBSD: if_iwm.c,v 1.147 2016/11/17 14:12:33 stsp Exp */
+/* $NetBSD: if_iwm.c,v 1.56 2017/01/09 12:45:49 nonaka Exp $ */
+/* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */
#define IEEE80211_NO_HT
/*
* Copyright (c) 2014, 2016 genua gmbh <info%genua.de@localhost>
@@ -107,7 +107,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.55 2017/01/09 10:42:45 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.56 2017/01/09 12:45:49 nonaka Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -5152,8 +5152,8 @@
{
struct ieee80211_node *ni = &in->in_ni;
struct ieee80211_rateset *rs = &ni->ni_rates;
- int lowest_present_ofdm = 100;
- int lowest_present_cck = 100;
+ int lowest_present_ofdm = -1;
+ int lowest_present_cck = -1;
uint8_t cck = 0;
uint8_t ofdm = 0;
int i;
@@ -5164,7 +5164,7 @@
if ((iwm_ridx2rate(rs, i) & IEEE80211_RATE_BASIC) == 0)
continue;
cck |= (1 << i);
- if (lowest_present_cck > i)
+ if (lowest_present_cck == -1 || lowest_present_cck > i)
lowest_present_cck = i;
}
}
@@ -5172,7 +5172,7 @@
if ((iwm_ridx2rate(rs, i) & IEEE80211_RATE_BASIC) == 0)
continue;
ofdm |= (1 << (i - IWM_FIRST_OFDM_RATE));
- if (lowest_present_ofdm > i)
+ if (lowest_present_ofdm == -1 || lowest_present_ofdm > i)
lowest_present_ofdm = i;
}
Home |
Main Index |
Thread Index |
Old Index