diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-02-05 16:08:45 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2016-02-05 16:08:45 +0000 |
commit | 95440ac113f9756142e11f3dbb2e5d02719a9d77 (patch) | |
tree | 2e08d3ddd5340728e1775a3b00d4d87adbefcab2 /sys/dev/pci/if_iwm.c | |
parent | f5330c57482ef7a647d7492c66196d257c364bc3 (diff) |
In iwm(4), set max A-MPDU length to 64k instead of 4k and tell the firmware
about A-MPDU spacing. Makes BlockAck happy.
tested by myself and abieber@
Diffstat (limited to 'sys/dev/pci/if_iwm.c')
-rw-r--r-- | sys/dev/pci/if_iwm.c | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c index 8cd422dbaa0..49291d88bbf 100644 --- a/sys/dev/pci/if_iwm.c +++ b/sys/dev/pci/if_iwm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwm.c,v 1.76 2016/01/25 11:27:11 stsp Exp $ */ +/* $OpenBSD: if_iwm.c,v 1.77 2016/02/05 16:08:44 stsp Exp $ */ /* * Copyright (c) 2014 genua mbh <info@genua.de> @@ -4466,6 +4466,7 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) struct iwm_mvm_add_sta_cmd_v6 add_sta_cmd; int ret; uint32_t status; + struct ieee80211com *ic = &sc->sc_ic; memset(&add_sta_cmd, 0, sizeof(add_sta_cmd)); @@ -4480,6 +4481,35 @@ iwm_mvm_sta_send_to_fw(struct iwm_softc *sc, struct iwm_node *in, int update) add_sta_cmd.station_flags_msk |= htole32(IWM_STA_FLG_FAT_EN_MSK | IWM_STA_FLG_MIMO_EN_MSK); + if (in->in_ni.ni_flags & IEEE80211_NODE_HT) { + add_sta_cmd.station_flags_msk + |= htole32(IWM_STA_FLG_MAX_AGG_SIZE_MSK | + IWM_STA_FLG_AGG_MPDU_DENS_MSK); + + add_sta_cmd.station_flags + |= htole32(IWM_STA_FLG_MAX_AGG_SIZE_64K); + switch (ic->ic_ampdu_params & IEEE80211_AMPDU_PARAM_SS) { + case IEEE80211_AMPDU_PARAM_SS_2: + add_sta_cmd.station_flags + |= htole32(IWM_STA_FLG_AGG_MPDU_DENS_2US); + break; + case IEEE80211_AMPDU_PARAM_SS_4: + add_sta_cmd.station_flags + |= htole32(IWM_STA_FLG_AGG_MPDU_DENS_4US); + break; + case IEEE80211_AMPDU_PARAM_SS_8: + add_sta_cmd.station_flags + |= htole32(IWM_STA_FLG_AGG_MPDU_DENS_8US); + break; + case IEEE80211_AMPDU_PARAM_SS_16: + add_sta_cmd.station_flags + |= htole32(IWM_STA_FLG_AGG_MPDU_DENS_16US); + break; + default: + break; + } + } + status = IWM_ADD_STA_SUCCESS; ret = iwm_mvm_send_add_sta_cmd_status(sc, &add_sta_cmd, &status); if (ret) @@ -6814,7 +6844,7 @@ iwm_attach(struct device *parent, struct device *self, void *aux) ic->ic_htxcaps = 0; ic->ic_txbfcaps = 0; ic->ic_aselcaps = 0; - ic->ic_ampdu_params = IEEE80211_AMPDU_PARAM_SS_4; + ic->ic_ampdu_params = (IEEE80211_AMPDU_PARAM_SS_4 | 0x3 /* 64k */); ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a; ic->ic_sup_rates[IEEE80211_MODE_11B] = ieee80211_std_rateset_11b; |