-/* $OpenBSD: ieee80211_input.c,v 1.201 2018/05/05 06:58:05 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.202 2018/08/07 18:13:14 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
if (htcaps)
ieee80211_setup_htcaps(ni, htcaps + 2, htcaps[1]);
- if (htop && !ieee80211_setup_htop(ni, htop + 2, htop[1]))
+ if (htop && !ieee80211_setup_htop(ni, htop + 2, htop[1], 1))
htop = NULL; /* invalid HTOP */
ni->ni_dtimcount = dtim_count;
if (htcaps)
ieee80211_setup_htcaps(ni, htcaps + 2, htcaps[1]);
if (htop)
- ieee80211_setup_htop(ni, htop + 2, htop[1]);
+ ieee80211_setup_htop(ni, htop + 2, htop[1], 0);
ieee80211_ht_negotiate(ic, ni);
/* Hop into 11n mode after associating to an HT AP in a non-11n mode. */
-/* $OpenBSD: ieee80211_node.c,v 1.138 2018/08/06 11:28:01 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.139 2018/08/07 18:13:14 stsp Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
*/
int
ieee80211_setup_htop(struct ieee80211_node *ni, const uint8_t *data,
- uint8_t len)
+ uint8_t len, int isprobe)
{
if (len != 22)
return 0;
ni->ni_htop1 = (data[2] | (data[3] << 8));
ni->ni_htop2 = (data[3] | (data[4] << 8));
- memcpy(ni->ni_basic_mcs, &data[6], sizeof(ni->ni_basic_mcs));
+ if (isprobe)
+ memcpy(ni->ni_basic_mcs, &data[6], sizeof(ni->ni_basic_mcs));
return 1;
}
-/* $OpenBSD: ieee80211_node.h,v 1.75 2018/07/11 20:18:09 phessler Exp $ */
+/* $OpenBSD: ieee80211_node.h,v 1.76 2018/08/07 18:13:14 stsp Exp $ */
/* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */
/*-
uint8_t);
void ieee80211_clear_htcaps(struct ieee80211_node *);
int ieee80211_setup_htop(struct ieee80211_node *, const uint8_t *,
- uint8_t);
+ uint8_t, int);
int ieee80211_setup_rates(struct ieee80211com *,
struct ieee80211_node *, const u_int8_t *, const u_int8_t *, int);
int ieee80211_iserp_sta(const struct ieee80211_node *);