Re: [ath9k-devel] Standardisation - adding 2 bit STBC and Ness to MCS
Am 02.05.2013 22:44, schrieb Johannes Berg: > On Wed, 2013-05-01 at 16:34 +0200, Oleksij Rempel wrote: > >>> With this I believe we have everything needed to start the 3 week >>> comment period. > > Yeah, I guess there was plenty of time. I would have preferred a > separate thread, but I guess there's little enough traffic on this list > so it doesn't really matter. > >> There is a bit more then 3 week now. I would like to have this approved :) >> Are there any thing needed to finish this? > > http://www.radiotap.org/Standardisation > > johannes > ping. Johannes, are you the one who says last word on standardisation for radiotap? -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH] ath10k: fix rx descriptor definition
Fortunately we don't use these fields but it's good to have them defined correctly. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/rx_desc.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/rx_desc.h b/drivers/net/wireless/ath/ath10k/rx_desc.h index f203614..bfec6c8 100644 --- a/drivers/net/wireless/ath/ath10k/rx_desc.h +++ b/drivers/net/wireless/ath/ath10k/rx_desc.h @@ -247,15 +247,15 @@ enum htt_rx_mpdu_encrypt_type { #define RX_MPDU_START_INFO0_SEQ_NUM_LSB 16 #define RX_MPDU_START_INFO0_ENCRYPT_TYPE_MASK 0xf000 #define RX_MPDU_START_INFO0_ENCRYPT_TYPE_LSB 28 -#define RX_MPDU_START_INFO0_TID_MASK 0xf000 -#define RX_MPDU_START_INFO0_TID_LSB 28 - -#define RX_MPDU_START_INFO1_FROM_DS (1 << 11) -#define RX_MPDU_START_INFO1_TO_DS (1 << 12) -#define RX_MPDU_START_INFO1_ENCRYPTED (1 << 13) -#define RX_MPDU_START_INFO1_RETRY (1 << 14) -#define RX_MPDU_START_INFO1_TXBF_H_INFO (1 << 15) -#define RX_MPDU_START_INFO1_DIRECTED(1 << 16) +#define RX_MPDU_START_INFO0_FROM_DS (1 << 11) +#define RX_MPDU_START_INFO0_TO_DS (1 << 12) +#define RX_MPDU_START_INFO0_ENCRYPTED (1 << 13) +#define RX_MPDU_START_INFO0_RETRY (1 << 14) +#define RX_MPDU_START_INFO0_TXBF_H_INFO (1 << 15) + +#define RX_MPDU_START_INFO1_TID_MASK 0xf000 +#define RX_MPDU_START_INFO1_TID_LSB 28 +#define RX_MPDU_START_INFO1_DIRECTED (1 << 16) struct rx_mpdu_start { __le32 info0; -- 1.7.9.5 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] AR9380 frequent disconnect and stucks in AP mode.
Hi Ben, I tried compat-drivers-3.9-rc4-2-su, then also same problem I faced. I also tried compat-wireless-2.6.39-1 and compat-wireless-3.6.8-1, but facing the same issue. In a day more than one clients are facing the same issue. In the locked state, ping from client to AP not working and tcpdump on AP shows the echo response sent on wlan interface. Only few clients are facing this issue frequently, but those clients don't have identical WiFi hardware. Is it possible for hardware/firmware to drop the tx packets for particular client? For me look like only data packets are getting dropped. My environment is noisy, will it affect this situation? Thanks, Bhavesh. -Original Message- From: Ben Greear [mailto:gree...@candelatech.com] Sent: Monday, May 06, 2013 7:53 PM To: Bhavesh Kamani Cc: ath9k-de...@venema.h4ckr.net Subject: Re: [ath9k-devel] AR9380 frequent disconnect and stucks in AP mode. On 05/06/2013 07:03 AM, Bhavesh Kamani wrote: > Hi Team, > > I have AR9380 as an AP(using hostapd and ath9k) and more than 15 to 20 clients are connected to it. > > Few clients are disconnecting frequently and hostapd/ath9k is not logging any message for disconnection. Immediately those clients connects to AP. > > I can say it is a signal strength OR heavy interference issue for few clients, but many times clients are getting locked. > > In the locked state, hostapd and debugfs of driver has client mac entry, even on windows client utility it is showing as connected, but I am not able to ping AP > from the client. > > In this locked state clients will remain for more then 10 mins and no traffic is passing, but inactive time is continuously updating on AP side. > > I am using hostapd-1.0 and compact-wireless-2.6.39.1. Please provide me patch OR workaround for this locking state. Try a recent kernel...lots of fixes have gone in since the 2.6 series... Thanks, Ben > > Thanks, > > Bhavesh. > > > > ___ > ath9k-devel mailing list > ath9k-devel@lists.ath9k.org > https://lists.ath9k.org/mailman/listinfo/ath9k-devel > -- Ben Greear Candela Technologies Inc http://www.candelatech.com ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] AR9380 frequent disconnect and stucks in AP mode.
On 2013-05-07 2:03 PM, Bhavesh Kamani wrote: > > Hi Ben, > > I tried compat-drivers-3.9-rc4-2-su, then also same problem I faced. > I also tried compat-wireless-2.6.39-1 and compat-wireless-3.6.8-1, but > facing the same issue. > > In a day more than one clients are facing the same issue. > > In the locked state, ping from client to AP not working and tcpdump on AP > shows the echo response sent on wlan interface. Only few clients are facing > this issue frequently, but those clients don't have identical WiFi hardware. > > Is it possible for hardware/firmware to drop the tx packets for particular > client? For me look like only data packets are getting dropped. > My environment is noisy, will it affect this situation? You should also upgrade hostapd to something recent. It's relevant for AP mode stability as well. - Felix ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 0/6] ath10k: preliminary VHT support
Please review and send comments, I'm sure this is very buggy. --- Kalle Valo (6): ath10k: set vht_nss correctly ath10k: change chan_to_phymode() use chandef ath10k: remove band_center_freq() ath10k: include all management frames to ATH10K_DBG_BEACON ath10k: add ATH10K_DBG_DATA ath10k: preliminary VHT support drivers/net/wireless/ath/ath10k/debug.h |3 - drivers/net/wireless/ath/ath10k/mac.c | 140 ++- drivers/net/wireless/ath/ath10k/txrx.c |5 + drivers/net/wireless/ath/ath10k/wmi.c | 30 +-- drivers/net/wireless/ath/ath10k/wmi.h | 10 ++ 5 files changed, 135 insertions(+), 53 deletions(-) ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 1/6] ath10k: set vht_nss correctly
mac80211 requires that for VHT rate_idx contains just MCS and vht_nss contains NSS. Otherwise this triggers a warning in mac80211: [ 1336.359985] [ cut here ] [ 1336.362103] WARNING: at net/mac80211/rx.c:3279 ieee80211_rx+0x7aa/0x830 [mac80211]() [ 1336.364520] Hardware name: HP ProBook 6540b [ 1336.366943] Rate marked as a VHT rate but data is invalid: MCS: 27, NSS: 0 Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/txrx.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 9d0b1e2..732b162 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -211,7 +211,8 @@ static void process_rx_rates(struct ath10k *ar, struct htt_rx_info *info, bw = info1 & 3; sgi = info2 & 1; - status->rate_idx = mcs + (nss * 10); + status->rate_idx = mcs; + status->vht_nss = nss; if (sgi) status->flag |= RX_FLAG_SHORT_GI; ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 2/6] ath10k: change chan_to_phymode() use chandef
That's more logical instead of passing chandef fields one at a time. Also change ath10k_update_channel_list to hardcode the band directly. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/mac.c | 49 + 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index b5cc3c8..e886112f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -220,38 +220,46 @@ static int ath10k_clear_vdev_key(struct ath10k_vif *arvif, /* General utilities */ /*/ -static inline enum wmi_phy_mode chan_to_phymode(struct ieee80211_channel *chan, - enum nl80211_channel_type channel_type) +static inline enum wmi_phy_mode +chan_to_phymode(const struct cfg80211_chan_def *chandef) { enum wmi_phy_mode phymode = MODE_UNKNOWN; - switch (chan->band) { + switch (chandef->chan->band) { case IEEE80211_BAND_2GHZ: - switch (channel_type) { - case NL80211_CHAN_NO_HT: + switch (chandef->width) { + case NL80211_CHAN_WIDTH_20_NOHT: phymode = MODE_11G; break; - case NL80211_CHAN_HT20: + case NL80211_CHAN_WIDTH_20: phymode = MODE_11NG_HT20; break; - case NL80211_CHAN_HT40PLUS: - case NL80211_CHAN_HT40MINUS: + case NL80211_CHAN_WIDTH_40: phymode = MODE_11NG_HT40; break; + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + phymode = MODE_UNKNOWN; + break; } break; case IEEE80211_BAND_5GHZ: - switch (channel_type) { - case NL80211_CHAN_NO_HT: + switch (chandef->width) { + case NL80211_CHAN_WIDTH_20_NOHT: phymode = MODE_11A; break; - case NL80211_CHAN_HT20: + case NL80211_CHAN_WIDTH_20: phymode = MODE_11NA_HT20; break; - case NL80211_CHAN_HT40PLUS: - case NL80211_CHAN_HT40MINUS: + case NL80211_CHAN_WIDTH_40: phymode = MODE_11NA_HT40; break; + case NL80211_CHAN_WIDTH_80: + case NL80211_CHAN_WIDTH_80P80: + case NL80211_CHAN_WIDTH_160: + phymode = MODE_UNKNOWN; + break; } break; default: @@ -388,9 +396,7 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif) band_center_freq(channel, cfg80211_get_chandef_type(&conf->chandef)); - arg.channel.mode = - chan_to_phymode(channel, - cfg80211_get_chandef_type(&conf->chandef)); + arg.channel.mode = chan_to_phymode(&conf->chandef); arg.channel.min_power = channel->max_power * 3; arg.channel.max_power = channel->max_power * 4; @@ -462,7 +468,7 @@ static int ath10k_monitor_start(struct ath10k *ar, int vdev_id) /* TODO setup this dynamically, what in case we don't have any vifs? */ - arg.channel.mode = chan_to_phymode(channel, type); + arg.channel.mode = chan_to_phymode(&ar->hw->conf.chandef); arg.channel.min_power = channel->max_power * 3; arg.channel.max_power = channel->max_power * 4; @@ -1138,7 +1144,14 @@ static void ath10k_update_channel_list(struct ath10k *ar) ch->max_reg_power = channel->max_reg_power * 4; ch->max_antenna_gain = channel->max_antenna_gain; ch->reg_class_id = 0; /* FIXME */ - ch->mode = chan_to_phymode(channel, NL80211_CHAN_NO_HT); + + /* FIXME: why use only legacy modes, why not any +* HT/VHT modes? Would that even make any +* difference? */ + if (channel->band == IEEE80211_BAND_2GHZ) + ch->mode = MODE_11G; + else + ch->mode = MODE_11A; if (WARN_ON_ONCE(ch->mode == MODE_UNKNOWN)) continue; ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 3/6] ath10k: remove band_center_freq()
We can take the frequency directly from struct cfg80211_chan_def. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/mac.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index e886112f..ff56045 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -270,25 +270,6 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) return phymode; } -static int band_center_freq(struct ieee80211_channel *chan, - enum nl80211_channel_type channel_type) -{ - u32 center_freq = chan->center_freq; - - switch (channel_type) { - case NL80211_CHAN_HT40PLUS: - center_freq = chan->center_freq + 10; - break; - case NL80211_CHAN_HT40MINUS: - center_freq = chan->center_freq - 10; - break; - default: - break; - } - - return center_freq; -} - static u8 ath10k_parse_mpdudensity(u8 mpdudensity) { /* @@ -392,9 +373,7 @@ static int ath10k_vdev_start(struct ath10k_vif *arvif) arg.channel.freq = channel->center_freq; - arg.channel.band_center_freq1 = - band_center_freq(channel, -cfg80211_get_chandef_type(&conf->chandef)); + arg.channel.band_center_freq1 = conf->chandef.center_freq1; arg.channel.mode = chan_to_phymode(&conf->chandef); @@ -464,7 +443,7 @@ static int ath10k_monitor_start(struct ath10k *ar, int vdev_id) arg.vdev_id = vdev_id; arg.channel.freq = channel->center_freq; - arg.channel.band_center_freq1 = band_center_freq(channel, type); + arg.channel.band_center_freq1 = ar->hw->conf.chandef.center_freq1; /* TODO setup this dynamically, what in case we don't have any vifs? */ ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 5/6] ath10k: add ATH10K_DBG_DATA
Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/debug.h |1 + drivers/net/wireless/ath/ath10k/txrx.c |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index e0ad3af..739f3b7 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h @@ -31,6 +31,7 @@ enum ath10k_debug_mask { ATH10K_DBG_PCI_DUMP = 0x0040, ATH10K_DBG_HTT_DUMP = 0x0080, ATH10K_DBG_MGMT = 0x0100, + ATH10K_DBG_DATA = 0x0200, ATH10K_DBG_ANY = 0x, }; diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 732b162..eb7f321 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -279,7 +279,7 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info) status->freq = ch->center_freq; rcu_read_unlock(); - ath10k_dbg(ATH10K_DBG_HTT, + ath10k_dbg(ATH10K_DBG_DATA, "rx skb %p len %u %s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u\n", info->skb, info->skb->len, ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 4/6] ath10k: include all management frames to ATH10K_DBG_BEACON
Change ATH10K_DBG_BEACON to include all management frame tx and rx functionality. That way it doesn't spam rest of wmi debug logs. Rename the flag to ATH10K_DBG_MGMT to better reflect the functionality. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/debug.h |2 +- drivers/net/wireless/ath/ath10k/wmi.c | 17 + 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/debug.h b/drivers/net/wireless/ath/ath10k/debug.h index bbaaa37..e0ad3af 100644 --- a/drivers/net/wireless/ath/ath10k/debug.h +++ b/drivers/net/wireless/ath/ath10k/debug.h @@ -30,7 +30,7 @@ enum ath10k_debug_mask { ATH10K_DBG_CORE = 0x0020, ATH10K_DBG_PCI_DUMP = 0x0040, ATH10K_DBG_HTT_DUMP = 0x0080, - ATH10K_DBG_BEACON = 0x0100, + ATH10K_DBG_MGMT = 0x0100, ATH10K_DBG_ANY = 0x, }; diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 3b819c8..96284a6 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -332,7 +332,8 @@ static int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) memset(status, 0, sizeof(*status)); - ath10k_dbg(ATH10K_DBG_WMI, "event mgmt rx status %08x\n", rx_status); + ath10k_dbg(ATH10K_DBG_MGMT, + "event mgmt rx status %08x\n", rx_status); if (rx_status & WMI_RX_STATUS_ERR_DECRYPT) { dev_kfree_skb(skb); @@ -359,12 +360,12 @@ static int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) hdr = (struct ieee80211_hdr *)skb->data; fc = le16_to_cpu(hdr->frame_control); - ath10k_dbg(ATH10K_DBG_WMI, + ath10k_dbg(ATH10K_DBG_MGMT, "event mgmt rx skb %p len %d ftype %02x stype %02x\n", skb, skb->len, fc & IEEE80211_FCTL_FTYPE, fc & IEEE80211_FCTL_STYPE); - ath10k_dbg(ATH10K_DBG_WMI, + ath10k_dbg(ATH10K_DBG_MGMT, "event mgmt rx freq %d band %d snr %d, rate_idx %d\n", status->freq, status->band, status->signal, status->rate_idx); @@ -542,7 +543,7 @@ static void ath10k_wmi_update_tim(struct ath10k *ar, tim->bitmap_ctrl = !!__le32_to_cpu(bcn_info->tim_info.tim_mcast); memcpy(tim->virtual_map, arvif->u.ap.tim_bitmap, pvm_len); - ath10k_dbg(ATH10K_DBG_BEACON, "dtim %d/%d mcast %d pvmlen %d\n", + ath10k_dbg(ATH10K_DBG_MGMT, "dtim %d/%d mcast %d pvmlen %d\n", tim->dtim_count, tim->dtim_period, tim->bitmap_ctrl, pvm_len); } @@ -620,7 +621,7 @@ static void ath10k_wmi_update_noa(struct ath10k *ar, struct ath10k_vif *arvif, if (arvif->vdev_subtype != WMI_VDEV_SUBTYPE_P2P_GO) return; - ath10k_dbg(ATH10K_DBG_BEACON, "noa changed: %d\n", noa->changed); + ath10k_dbg(ATH10K_DBG_MGMT, "noa changed: %d\n", noa->changed); if (noa->changed & WMI_P2P_NOA_CHANGED_BIT) { new_len = ath10k_p2p_calc_noa_ie_len(noa); if (!new_len) @@ -667,12 +668,12 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) int vdev_id = 0; int ret; - ath10k_dbg(ATH10K_DBG_BEACON, "WMI_HOST_SWBA_EVENTID\n"); + ath10k_dbg(ATH10K_DBG_MGMT, "WMI_HOST_SWBA_EVENTID\n"); ev = (struct wmi_host_swba_event *)skb->data; map = __le32_to_cpu(ev->vdev_map); - ath10k_dbg(ATH10K_DBG_BEACON, "host swba:\n" + ath10k_dbg(ATH10K_DBG_MGMT, "host swba:\n" "-vdev map 0x%x\n", ev->vdev_map); @@ -689,7 +690,7 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb) bcn_info = &ev->bcn_info[i]; - ath10k_dbg(ATH10K_DBG_BEACON, + ath10k_dbg(ATH10K_DBG_MGMT, "-bcn_info[%d]:\n" "--tim_len %d\n" "--tim_mcast %d\n" ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [RFC PATCH 6/6] ath10k: preliminary VHT support
Adds preliminary VHT (802.11ac) support to ath10k. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/mac.c | 66 + drivers/net/wireless/ath/ath10k/wmi.c | 13 ++- drivers/net/wireless/ath/ath10k/wmi.h | 10 + 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index ff56045..4f542a6 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -256,6 +256,8 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef) phymode = MODE_11NA_HT40; break; case NL80211_CHAN_WIDTH_80: + phymode = MODE_11AC_VHT80; + break; case NL80211_CHAN_WIDTH_80P80: case NL80211_CHAN_WIDTH_160: phymode = MODE_UNKNOWN; @@ -871,6 +873,34 @@ static void ath10k_peer_assoc_h_ht(struct ath10k *ar, arg->peer_num_spatial_streams); } +static void ath10k_peer_assoc_h_vht(struct ath10k *ar, + struct ieee80211_sta *sta, + struct wmi_peer_assoc_complete_arg *arg) +{ + const struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; + + if (!vht_cap->vht_supported) + return; + + arg->peer_flags |= WMI_PEER_VHT; + + arg->peer_vht_caps = vht_cap->cap; + + if (sta->bandwidth == IEEE80211_STA_RX_BW_80) + arg->peer_flags |= WMI_PEER_80MHZ; + + arg->peer_vht_rates.rx_max_rate = + __le16_to_cpu(vht_cap->vht_mcs.rx_highest); + arg->peer_vht_rates.rx_mcs_set = + __le16_to_cpu(vht_cap->vht_mcs.rx_mcs_map); + arg->peer_vht_rates.tx_max_rate = + __le16_to_cpu(vht_cap->vht_mcs.tx_highest); + arg->peer_vht_rates.tx_mcs_set = + __le16_to_cpu(vht_cap->vht_mcs.tx_mcs_map); + + ath10k_dbg(ATH10K_DBG_MAC, "mac vht peer\n"); +} + /* * FIXME: Handle UAPSD later. */ @@ -896,6 +926,8 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, { enum wmi_phy_mode phymode = MODE_UNKNOWN; + /* FIXME: add VHT */ + switch (ar->hw->conf.chandef.chan->band) { case IEEE80211_BAND_2GHZ: if (sta->ht_cap.ht_supported) { @@ -940,6 +972,7 @@ static int ath10k_peer_assoc(struct ath10k *ar, ath10k_peer_assoc_h_crypto(ar, arvif, &arg); ath10k_peer_assoc_h_rates(ar, sta, &arg); ath10k_peer_assoc_h_ht(ar, sta, &arg); + ath10k_peer_assoc_h_vht(ar, sta, &arg); ath10k_peer_assoc_h_qos(ar, arvif, sta, bss_conf, &arg); ath10k_peer_assoc_h_phymode(ar, arvif, sta, &arg); @@ -1108,6 +1141,9 @@ static void ath10k_update_channel_list(struct ath10k *ar) ch->allow_ht = true; + /* FIXME: when should we really allow VHT? */ + ch->allow_vht = true; + ch->allow_ibss = !(channel->flags & IEEE80211_CHAN_NO_IBSS); @@ -2586,6 +2622,30 @@ static const struct ieee80211_iface_combination ath10k_if_comb = { .beacon_int_infra_match = true, }; +static struct ieee80211_sta_vht_cap ath10k_create_vht_cap(struct ath10k *ar) +{ + struct ieee80211_sta_vht_cap vht_cap = {0}; + u16 mcs_map; + + vht_cap.vht_supported = 1; + vht_cap.cap = ar->vht_cap_info; + + /* FIXME: check dynamically how many streams board supports */ + mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 | + IEEE80211_VHT_MCS_SUPPORT_0_9 << 2 | + IEEE80211_VHT_MCS_SUPPORT_0_9 << 4 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 | + IEEE80211_VHT_MCS_NOT_SUPPORTED << 14; + + vht_cap.vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map); + vht_cap.vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map); + + return vht_cap; +} + static struct ieee80211_sta_ht_cap ath10k_get_ht_cap(struct ath10k *ar) { int i; @@ -2685,6 +2745,7 @@ int ath10k_mac_register(struct ath10k *ar) { struct ath_common *common = ath10k_common(ar); struct ieee80211_supported_band *band; + struct ieee80211_sta_vht_cap vht_cap; struct ieee80211_sta_ht_cap ht_cap; void *channels; int ret; @@ -2694,6 +2755,7 @@ int ath10k_mac_register(struct ath10k *ar) SET_IEEE80211_DEV(ar->hw, ar->dev); ht_cap = ath10k_get_ht_cap(ar); + vht_cap = ath10k_create_vht_cap(ar); if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) { channels = kmemdup(ath10k_2ghz_channels, @@ -2708,6 +2770,9 @@ int ath10k_mac_register(struct ath10k *ar) ba
Re: [ath9k-devel] [PATCH 0/2] ath10k: module parameter fine tuning
Kalle Valo writes: > When running some build tests I found few issues releated to > module parameters. > > --- > > Kalle Valo (2): > ath10k: rename debug_mask > ath10k: rename ath10k_p2p module parameter to p2p Applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 3/5] ath10k: increase scan timeout
Michal Kazior writes: > We can't use the max scan time as the timeout > itself. We must account for various overheads (ie. > command/event processing). > > Signed-off-by: Michal Kazior > --- > drivers/net/wireless/ath/ath10k/mac.c |6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/mac.c > b/drivers/net/wireless/ath/ath10k/mac.c > index 3a27f35..df57772 100644 > --- a/drivers/net/wireless/ath/ath10k/mac.c > +++ b/drivers/net/wireless/ath/ath10k/mac.c > @@ -1481,8 +1481,10 @@ static int ath10k_start_scan(struct ath10k *ar, > /* the scan can complete earlier, before we even >* start the timer. in that case the timer handler >* checks ar->scan.in_progress and bails out if its > - * false. */ > - mod_timer(&ar->scan.timeout, jiffies + (arg->max_scan_time*HZ)/1000); > + * false. Add a 200ms margin to account event/command > + * processing. */ > + mod_timer(&ar->scan.timeout, jiffies + > + ((arg->max_scan_time+200)*HZ)/1000); This patch is ok (no need to resend), but this code could use msecs_to_jiffies(). -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/5] ath10k: scan/roc fixes
Michal Kazior writes: > Michal Kazior (5): > ath10k: use data_lock to protect {scan,rx}_channel > ath10k: simplify scan event locking > ath10k: increase scan timeout > ath10k: wait for remain on channel chan switch > ath10k: abort scan if start completion never came Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] Standardisation - adding 2 bit STBC and Ness to MCS
On Tue, 2013-05-07 at 09:40 +0200, Oleksij Rempel wrote: > Am 02.05.2013 22:44, schrieb Johannes Berg: > > On Wed, 2013-05-01 at 16:34 +0200, Oleksij Rempel wrote: > > > >>> With this I believe we have everything needed to start the 3 week > >>> comment period. > > > > Yeah, I guess there was plenty of time. I would have preferred a > > separate thread, but I guess there's little enough traffic on this list > > so it doesn't really matter. > > > >> There is a bit more then 3 week now. I would like to have this approved :) > >> Are there any thing needed to finish this? > > > > http://www.radiotap.org/Standardisation > > > > johannes > > > > ping. > > Johannes, are you the one who says last word on standardisation for > radiotap? No? I thought the link made that pretty clear. But since nobody poked holes in this and it's been a long time, I think you should probably just post "this has been adopted now" ... johannes ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] Standardisation - adding 2 bit STBC and Ness to MCS
On Tue, 2013-05-07 at 15:54 +0200, Johannes Berg wrote: > On Tue, 2013-05-07 at 09:40 +0200, Oleksij Rempel wrote: > > Am 02.05.2013 22:44, schrieb Johannes Berg: > > > On Wed, 2013-05-01 at 16:34 +0200, Oleksij Rempel wrote: > > > > > >>> With this I believe we have everything needed to start the 3 week > > >>> comment period. > > > > > > Yeah, I guess there was plenty of time. I would have preferred a > > > separate thread, but I guess there's little enough traffic on this list > > > so it doesn't really matter. > > > > > >> There is a bit more then 3 week now. I would like to have this approved > > >> :) > > >> Are there any thing needed to finish this? > > > > > > http://www.radiotap.org/Standardisation > > > > > > johannes > > > > > > > ping. > > > > Johannes, are you the one who says last word on standardisation for > > radiotap? > > No? I thought the link made that pretty clear. > > But since nobody poked holes in this and it's been a long time, I think > you should probably just post "this has been adopted now" ... Or actually, go to step 5, preferably reposting it as a separate thread. johannes ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 6/7] ath10k: cleanup pci suspend
Michal Kazior writes: > - left = wait_event_interruptible_timeout(ar->event_queue, > + ret = wait_event_interruptible_timeout(ar->event_queue, > ar->is_target_paused == true, > 1 * HZ); Actually I would prefered the name "left" as the variable contains more than just a normal error code, it also contains the time left before timeout. But I have applied the patch anyway. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 0/7] ath10k: random fixes/cleanups
Michal Kazior writes: > Michal Kazior (7): > ath10k: add error handling to some functions > ath10k: remove unnecessary check > ath10k: remove unnecessary prints > ath10k: cleanup warning/error prints > ath10k: move htc creation error handling > ath10k: cleanup pci suspend > ath10k: use ath10k_err for non-recoverable failures Thanks, all applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: avoid infinite loop
Michal Kazior writes: > Signed-off-by: Michal Kazior Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix htt debug flag
Bartosz Markowski writes: > Use HTT_DUMP for tx frag/msdu. > > Signed-off-by: Bartosz Markowski Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix possible htt rx memleak
Michal Kazior writes: > Signed-off-by: Michal Kazior Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH] ath10k: fix rx descriptor definition
Michal Kazior writes: > Fortunately we don't use these fields but it's > good to have them defined correctly. > > Signed-off-by: Michal Kazior Thanks, applied. -- Kalle Valo ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] Standardisation - adding 2 bit STBC and Ness to MCS
Am 07.05.2013 15:55, schrieb Johannes Berg: > On Tue, 2013-05-07 at 15:54 +0200, Johannes Berg wrote: >> On Tue, 2013-05-07 at 09:40 +0200, Oleksij Rempel wrote: >>> Am 02.05.2013 22:44, schrieb Johannes Berg: On Wed, 2013-05-01 at 16:34 +0200, Oleksij Rempel wrote: >> With this I believe we have everything needed to start the 3 week >> comment period. Yeah, I guess there was plenty of time. I would have preferred a separate thread, but I guess there's little enough traffic on this list so it doesn't really matter. > There is a bit more then 3 week now. I would like to have this approved :) > Are there any thing needed to finish this? http://www.radiotap.org/Standardisation johannes >>> >>> ping. >>> >>> Johannes, are you the one who says last word on standardisation for >>> radiotap? >> >> No? I thought the link made that pretty clear. >> >> But since nobody poked holes in this and it's been a long time, I think >> you should probably just post "this has been adopted now" ... > > Or actually, go to step 5, preferably reposting it as a separate thread. Simon, will you do it? You stared it and did most of the work... -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] ath9k_htc: Disabling HT does not work properly.
I set disable_ht=1 in the wpa_supplicant config file, and the ht_capa debugfs file shows 'ht disabled', but tx-rate still shows /n rates. cat /debug/ieee80211/wiphy1/netdev\:wlan1/stations/00\:a0\:00\:00\:00\:90/ht_capa ht not supported Rx rate is stuck to /g rates (ie, 54Mbps), as expected. Any idea if this is something easily fixed or not? Maybe requires firmware fixes? Not a big deal to me...more of a curiosity at this point. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] ath9k_htc works poorly in 3.9
Initially, I can associate and everything works fine, but after an hour or maybe a few, I get deauthenticated, with: [ 3115.047842] cfg80211: Calling CRDA for country: US [ 3116.383330] wlan0: authenticate with 00:14:c2:ae:e1:c0 [ 3116.480597] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) [ 3119.526272] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3) [ 3121.485530] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local choice (reason=3) [ 3123.386841] wlan0: authenticate with 00:14:c2:ae:e1:c0 [ 3123.483019] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) [ 3126.528663] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3) [ 3128.486335] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local choice (reason=3) [ 3130.879429] wlan0: authenticate with 00:14:c2:ae:e1:c0 [ 3130.976309] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) [ 3130.976512] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local choice (reason=3) in dmesg and May 07 23:32:57 roger NetworkManager[317]: Connection disconnected (reason -4) May 07 23:32:57 roger NetworkManager[317]: (wlan0): supplicant interface state: completed -> disconnected May 07 23:32:58 roger NetworkManager[317]: (wlan0): supplicant interface state: disconnected -> scanning May 07 23:32:59 roger NetworkManager[317]: (wlan0): supplicant interface state: scanning -> authenticating May 07 23:32:59 roger NetworkManager[317]: (wlan0): roamed from BSSID 00:14:C2:AE:E1:C0 (home1) to (none) ((none)) May 07 23:33:04 roger NetworkManager[317]: (wlan0): supplicant interface state: authenticating -> disconnected May 07 23:33:04 roger NetworkManager[317]: Connection disconnected (reason -3) May 07 23:33:05 roger NetworkManager[317]: (wlan0): supplicant interface state: disconnected -> scanning May 07 23:33:06 roger NetworkManager[317]: (wlan0): supplicant interface state: scanning -> authenticating May 07 23:33:11 roger NetworkManager[317]: (wlan0): supplicant interface state: authenticating -> disconnected May 07 23:33:11 roger NetworkManager[317]: Connection disconnected (reason -3) May 07 23:33:12 roger NetworkManager[317]: (wlan0): supplicant interface state: disconnected -> scanning May 07 23:33:13 roger NetworkManager[317]: (wlan0): link timed out. May 07 23:33:13 roger NetworkManager[317]: (wlan0): device state change: activated -> failed (reason 'SSID not found') [100 120 53] May 07 23:33:13 roger NetworkManager[317]: Activation (wlan0) failed for connection 'home1' May 07 23:33:13 roger NetworkManager[317]: (wlan0): device state change: failed -> disconnected (reason 'none') [120 30 0] May 07 23:33:13 roger NetworkManager[317]: (wlan0): deactivating device (reason 'none') [0] May 07 23:33:13 roger NetworkManager[317]: (wlan0): canceled DHCP transaction, DHCP client pid 527 May 07 23:33:14 roger NetworkManager[317]: (wlan0): supplicant interface state: scanning -> authenticating May 07 23:33:14 roger NetworkManager[317]: Connection disconnected (reason -3) May 07 23:33:14 roger NetworkManager[317]: (wlan0): supplicant interface state: authenticating -> disconnected May 07 23:33:14 roger NetworkManager[317]: Connection disconnected (reason -3) in the journal. Removing and reinserting the USB stick allows me to reassociate about 50% of the time; others need a reboot. This is a regression from 3.8. It was present in the earlier 3.9 RC's after Johannes' fix for idle sequence handling, but not before the changes that broke ath9k_htc, so I think something between the patch that broke the driver and the patch that fixed it is to blame. ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] ath9k_htc works poorly in 3.9
Am 08.05.2013 05:52, schrieb Corey Richardson: > Initially, I can associate and everything works fine, but after an > hour or maybe a few, I get deauthenticated, with: > > [ 3115.047842] cfg80211: Calling CRDA for country: US > [ 3116.383330] wlan0: authenticate with 00:14:c2:ae:e1:c0 > [ 3116.480597] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) > [ 3119.526272] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3) > [ 3121.485530] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local > choice (reason=3) > [ 3123.386841] wlan0: authenticate with 00:14:c2:ae:e1:c0 > [ 3123.483019] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) > [ 3126.528663] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 2/3) > [ 3128.486335] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local > choice (reason=3) > [ 3130.879429] wlan0: authenticate with 00:14:c2:ae:e1:c0 > [ 3130.976309] wlan0: send auth to 00:14:c2:ae:e1:c0 (try 1/3) > [ 3130.976512] wlan0: deauthenticating from 00:14:c2:ae:e1:c0 by local > choice (reason=3) > > in dmesg and > > May 07 23:32:57 roger NetworkManager[317]: Connection > disconnected (reason -4) > May 07 23:32:57 roger NetworkManager[317]: (wlan0): supplicant > interface state: completed -> disconnected > May 07 23:32:58 roger NetworkManager[317]: (wlan0): supplicant > interface state: disconnected -> scanning > May 07 23:32:59 roger NetworkManager[317]: (wlan0): supplicant > interface state: scanning -> authenticating > May 07 23:32:59 roger NetworkManager[317]: (wlan0): roamed from > BSSID 00:14:C2:AE:E1:C0 (home1) to (none) ((none)) > May 07 23:33:04 roger NetworkManager[317]: (wlan0): supplicant > interface state: authenticating -> disconnected > May 07 23:33:04 roger NetworkManager[317]: Connection > disconnected (reason -3) > May 07 23:33:05 roger NetworkManager[317]: (wlan0): supplicant > interface state: disconnected -> scanning > May 07 23:33:06 roger NetworkManager[317]: (wlan0): supplicant > interface state: scanning -> authenticating > May 07 23:33:11 roger NetworkManager[317]: (wlan0): supplicant > interface state: authenticating -> disconnected > May 07 23:33:11 roger NetworkManager[317]: Connection > disconnected (reason -3) > May 07 23:33:12 roger NetworkManager[317]: (wlan0): supplicant > interface state: disconnected -> scanning > May 07 23:33:13 roger NetworkManager[317]: (wlan0): link timed out. > May 07 23:33:13 roger NetworkManager[317]: (wlan0): device > state change: activated -> failed (reason 'SSID not found') [100 120 > 53] > May 07 23:33:13 roger NetworkManager[317]: Activation (wlan0) > failed for connection 'home1' > May 07 23:33:13 roger NetworkManager[317]: (wlan0): device > state change: failed -> disconnected (reason 'none') [120 30 0] > May 07 23:33:13 roger NetworkManager[317]: (wlan0): > deactivating device (reason 'none') [0] > May 07 23:33:13 roger NetworkManager[317]: (wlan0): canceled > DHCP transaction, DHCP client pid 527 > May 07 23:33:14 roger NetworkManager[317]: (wlan0): supplicant > interface state: scanning -> authenticating > May 07 23:33:14 roger NetworkManager[317]: Connection > disconnected (reason -3) > May 07 23:33:14 roger NetworkManager[317]: (wlan0): supplicant > interface state: authenticating -> disconnected > May 07 23:33:14 roger NetworkManager[317]: Connection > disconnected (reason -3) > > > in the journal. > > Removing and reinserting the USB stick allows me to reassociate about > 50% of the time; others need a reboot. > > This is a regression from 3.8. It was present in the earlier 3.9 RC's > after Johannes' fix for idle sequence handling, but not before the > changes that broke ath9k_htc, so I think something between the patch > that broke the driver and the patch that fixed it is to blame. Hi Corey, only person who can help to fix it is you ;) Currently I'm trying to reproduce other bug with this driver/firmware without luck. Yesterday i started my test, i streamed some hundred gigabytes over the air and my system is still working. My kernel is 3.9.0-wl-3-g4125f14 If it is an regression, can you please do "git bisect". If you can locate the patch which introduced this regression, it will be great. -- Regards, Oleksij ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 1/3] ath10k: Strip the QoS header only for QoS data frames
From: Sujith Manoharan Also, use ieee80211_hdrlen() to simplify things. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 50 +++ 1 file changed, 9 insertions(+), 41 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 930a092..59e9874 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1176,56 +1176,24 @@ static void ath10k_reg_notifier(struct wiphy *wiphy, /* TX handlers */ /***/ +/* + * Frames sent to the FW have to be in "Native Wifi" format. + * Strip the QoS field from the 802.11 header. + */ static void ath10k_tx_h_qos_workaround(struct ieee80211_hw *hw, struct ieee80211_tx_control *control, struct sk_buff *skb) { struct ieee80211_hdr *hdr = (void *)skb->data; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ath10k_vif *arvif; u8 *qos_ctl; - /* This is FW issue. It injects QoS Control to frames when WMM is -* active (as far as FW is concerned). We either strip out _our_ QoS -* Control so FW can append it on its own or we upgrade a Data frame to -* a QoS Data frame */ - - if (!ieee80211_is_data(hdr->frame_control)) - return; - - if (!info->control.vif) + if (!ieee80211_is_data_qos(hdr->frame_control)) return; - arvif = ath10k_vif_to_arvif(info->control.vif); - - switch (arvif->vdev_type) { - case WMI_VDEV_TYPE_STA: - case WMI_VDEV_TYPE_IBSS: - if (!info->control.vif->bss_conf.qos) - return; - break; - case WMI_VDEV_TYPE_AP: - if (!control->sta) - return; - - if (!control->sta->wme) - return; - break; - default: - return; - } - - if (!ieee80211_is_data_qos(hdr->frame_control)) { - hdr->frame_control = __cpu_to_le16( - __le16_to_cpu(hdr->frame_control) | - IEEE80211_STYPE_QOS_DATA); - } else { - qos_ctl = ieee80211_get_qos_ctl(hdr); - memmove(qos_ctl, qos_ctl + IEEE80211_QOS_CTL_LEN, - skb->len - - (qos_ctl + IEEE80211_QOS_CTL_LEN - skb->data)); - skb_trim(skb, skb->len - IEEE80211_QOS_CTL_LEN); - } + qos_ctl = ieee80211_get_qos_ctl(hdr); + memmove(qos_ctl, qos_ctl + IEEE80211_QOS_CTL_LEN, + skb->len - ieee80211_hdrlen(hdr->frame_control)); + skb_trim(skb, skb->len - IEEE80211_QOS_CTL_LEN); } static void ath10k_tx_h_update_wep_key(struct sk_buff *skb) -- 1.8.2.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
[ath9k-devel] [PATCH 2/3] ath10k: FW API update for version .629
From: Sujith Manoharan Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/hw.h | 2 +- drivers/net/wireless/ath/ath10k/wmi.c | 18 - drivers/net/wireless/ath/ath10k/wmi.h | 49 ++- 3 files changed, 44 insertions(+), 25 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/hw.h b/drivers/net/wireless/ath/ath10k/hw.h index c922726..44ed5af 100644 --- a/drivers/net/wireless/ath/ath10k/hw.h +++ b/drivers/net/wireless/ath/ath10k/hw.h @@ -24,7 +24,7 @@ #define SUPPORTED_FW_MAJOR 1 #define SUPPORTED_FW_MINOR 0 #define SUPPORTED_FW_RELEASE 0 -#define SUPPORTED_FW_BUILD 614 +#define SUPPORTED_FW_BUILD 629 /* QCA988X 1.0 definitions */ #define QCA988X_HW_1_0_VERSION 0x402c diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 15e8123..9410c00 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -415,18 +415,6 @@ static void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, complete(&ar->vdev_setup_done); } -static void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, - struct sk_buff *skb) -{ - ath10k_dbg(ATH10K_DBG_WMI, "WMI_VDEV_STANDBY_REQ_EVENTID\n"); -} - -static void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, -struct sk_buff *skb) -{ - ath10k_dbg(ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n"); -} - static void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb) { @@ -971,12 +959,6 @@ static void ath10k_wmi_event_process(struct ath10k *ar, struct sk_buff *skb) case WMI_VDEV_START_RESP_EVENTID: ath10k_wmi_event_vdev_start_resp(ar, skb); break; - case WMI_VDEV_STANDBY_REQ_EVENTID: - ath10k_wmi_event_vdev_standby_req(ar, skb); - break; - case WMI_VDEV_RESUME_REQ_EVENTID: - ath10k_wmi_event_vdev_resume_req(ar, skb); - break; case WMI_VDEV_STOPPED_EVENTID: ath10k_wmi_event_vdev_stopped(ar, skb); break; diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 2ad0431..82267e8 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -99,6 +99,11 @@ enum wmi_service_id { WMI_SERVICE_CHATTER, /* Chatter service */ WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */ WMI_SERVICE_PACKET_POWER_SAVE,/* packet power save service */ + WMI_SERVICE_FORCE_FW_HANG,/* To test firmware recovery mechanism */ + WMI_SERVICE_GPIO, /* GPIO service */ + WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */ + WMI_STA_UAPSD_BASIC_AUTO_TRIG,/* UAPSD AC Trigger Generation Method */ + WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */ WMI_SERVICE_LAST, WMI_MAX_SERVICE = 64 /* max service */ @@ -153,6 +158,10 @@ static inline char *wmi_service_name(int service_id) return "COEX_FREQAVOID"; case WMI_SERVICE_PACKET_POWER_SAVE: return "PACKET_POWER_SAVE"; + case WMI_SERVICE_FORCE_FW_HANG: + return "FORCE FW HANG"; + case WMI_SERVICE_GPIO: + return "GPIO"; default: return "UNKNOWN SERVICE\n"; } @@ -216,6 +225,7 @@ enum wmi_cmd_group { WMI_GRP_CHATTER, WMI_GRP_TID_ADDBA, WMI_GRP_MISC, + WMI_GRP_GPIO, }; #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1) @@ -244,6 +254,7 @@ enum wmi_cmd_id { WMI_PDEV_SET_QUIET_MODE_CMDID, WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, WMI_PDEV_GET_TPC_CONFIG_CMDID, + WMI_PDEV_SET_BASE_MACADDR_CMDID, /* VDEV (virtual device) specific commands */ WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV), @@ -253,8 +264,6 @@ enum wmi_cmd_id { WMI_VDEV_UP_CMDID, WMI_VDEV_STOP_CMDID, WMI_VDEV_DOWN_CMDID, - WMI_VDEV_STANDBY_RESPONSE_CMDID, - WMI_VDEV_RESUME_RESPONSE_CMDID, WMI_VDEV_SET_PARAM_CMDID, WMI_VDEV_INSTALL_KEY_CMDID, @@ -374,14 +383,23 @@ enum wmi_cmd_id { WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA), WMI_PEER_TID_DELBA_CMDID, + /* set station mimo powersave method */ + WMI_STA_DTIM_PS_METHOD_CMDID, + /* Configure the Station UAPSD AC Auto Trigger Parameters */ + WMI_STA_UAPSD_AUTO_TRIG_CMDID, + /* misc command group */ WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC), + WMI_PDEV_UTF_CMDID, WMI_DBGLOG_CFG_CMDID, WMI_PDEV_QVIT_CMDID, WMI_PDEV_FTM_INTG_CMDID, WMI_VDEV_SET_KEEPALIVE_CMDID, WMI_VDEV_GET_KEEPALIVE_CMDID,
[ath9k-devel] [PATCH 3/3] ath10k: Set the default TX encapsulation type
From: Sujith Manoharan Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/mac.c | 6 ++ drivers/net/wireless/ath/ath10k/wmi.h | 8 2 files changed, 14 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 59e9874..182bf67 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1674,6 +1674,12 @@ static int ath10k_add_interface(struct ieee80211_hw *hw, if (ret) ath10k_warn("Failed to set default keyid: %d\n", ret); + ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, + WMI_VDEV_PARAM_TX_ENCAP_TYPE, + ATH10K_HW_TXRX_NATIVE_WIFI); + if (ret) + ath10k_warn("Failed to set TX encap: %d\n", ret); + if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { ret = ath10k_peer_create(ar, arvif->vdev_id, vif->addr); if (ret) { diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h index 82267e8..d2c5d32 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h @@ -104,6 +104,7 @@ enum wmi_service_id { WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */ WMI_STA_UAPSD_BASIC_AUTO_TRIG,/* UAPSD AC Trigger Generation Method */ WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */ + WMI_SERVICE_TX_ENCAP, /* Packet type for TX encapsulation */ WMI_SERVICE_LAST, WMI_MAX_SERVICE = 64 /* max service */ @@ -162,6 +163,8 @@ static inline char *wmi_service_name(int service_id) return "FORCE FW HANG"; case WMI_SERVICE_GPIO: return "GPIO"; + case WMI_SERVICE_TX_ENCAP: + return "TX ENCAP"; default: return "UNKNOWN SERVICE\n"; } @@ -2185,6 +2188,11 @@ enum wmi_vdev_param { * otherwise forwards to host. */ WMI_VDEV_PARAM_DROP_UNENCRY, + + /* +* Set the encapsulation type for frames. +*/ + WMI_VDEV_PARAM_TX_ENCAP_TYPE, }; /* slot time long */ -- 1.8.2.2 ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH RFC] ath9k: collect statistics about Rx-Dup and Rx-STBC packets
Felix Fietkau wrote: > The problem I have with the current stats is they're just an arbitrary > collection of random stuff that is probably useless for 99% of all > users. In many cases the way the stats are collected also makes the data > completely meaningless (e.g. because the source/destination address is > not taken into account). > > Why care about the number of packets on the air that were sent with a > specific rate flag? Why care about the number of beacons on the air > (with no filter on a set of APs or anything)? Or what about the number > of fragments received? To me it just looks like an incoherent set of > useless facts. Yes, having per-station statistics would be useful, mainly for RX and TX. Right now, all the counters are global and there is no way to find out how a particular station is performing, especially in AP mode. Since mac80211 gives us proper debugfs hooks for station addition/deletion, relevant stuff can be moved there. The 'recv' file used to be just for HW errors (DESC, CRC etc.), now it has various counters that should probably be node-specific. The 'xmit' file can be trimmed and information can be maintained per-station. This will be really useful in AP mode - especially for diagnosing aggregation, QoS, PS etc. Other than these two files, the rest are simple. Sujith ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel
Re: [ath9k-devel] [PATCH 2/3] ath10k: FW API update for version .629
On 08/05/13 07:40, Sujith Manoharan wrote: > From: Sujith Manoharan > > Signed-off-by: Sujith Manoharan > --- > drivers/net/wireless/ath/ath10k/hw.h | 2 +- > drivers/net/wireless/ath/ath10k/wmi.c | 18 - > drivers/net/wireless/ath/ath10k/wmi.h | 49 > ++- > 3 files changed, 44 insertions(+), 25 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath10k/hw.h > b/drivers/net/wireless/ath/ath10k/hw.h > index c922726..44ed5af 100644 > --- a/drivers/net/wireless/ath/ath10k/hw.h > +++ b/drivers/net/wireless/ath/ath10k/hw.h > @@ -24,7 +24,7 @@ > #define SUPPORTED_FW_MAJOR 1 > #define SUPPORTED_FW_MINOR 0 > #define SUPPORTED_FW_RELEASE0 > -#define SUPPORTED_FW_BUILD 614 > +#define SUPPORTED_FW_BUILD 629 > > /* QCA988X 1.0 definitions */ > #define QCA988X_HW_1_0_VERSION 0x402c > diff --git a/drivers/net/wireless/ath/ath10k/wmi.c > b/drivers/net/wireless/ath/ath10k/wmi.c > index 15e8123..9410c00 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi.c > +++ b/drivers/net/wireless/ath/ath10k/wmi.c > @@ -415,18 +415,6 @@ static void ath10k_wmi_event_vdev_start_resp(struct > ath10k *ar, > complete(&ar->vdev_setup_done); > } > > -static void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, > - struct sk_buff *skb) > -{ > - ath10k_dbg(ATH10K_DBG_WMI, "WMI_VDEV_STANDBY_REQ_EVENTID\n"); > -} > - > -static void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, > - struct sk_buff *skb) > -{ > - ath10k_dbg(ATH10K_DBG_WMI, "WMI_VDEV_RESUME_REQ_EVENTID\n"); > -} > - > static void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, > struct sk_buff *skb) > { > @@ -971,12 +959,6 @@ static void ath10k_wmi_event_process(struct ath10k *ar, > struct sk_buff *skb) > case WMI_VDEV_START_RESP_EVENTID: > ath10k_wmi_event_vdev_start_resp(ar, skb); > break; > - case WMI_VDEV_STANDBY_REQ_EVENTID: > - ath10k_wmi_event_vdev_standby_req(ar, skb); > - break; > - case WMI_VDEV_RESUME_REQ_EVENTID: > - ath10k_wmi_event_vdev_resume_req(ar, skb); > - break; > case WMI_VDEV_STOPPED_EVENTID: > ath10k_wmi_event_vdev_stopped(ar, skb); > break; > diff --git a/drivers/net/wireless/ath/ath10k/wmi.h > b/drivers/net/wireless/ath/ath10k/wmi.h > index 2ad0431..82267e8 100644 > --- a/drivers/net/wireless/ath/ath10k/wmi.h > +++ b/drivers/net/wireless/ath/ath10k/wmi.h > @@ -99,6 +99,11 @@ enum wmi_service_id { > WMI_SERVICE_CHATTER, /* Chatter service */ > WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */ > WMI_SERVICE_PACKET_POWER_SAVE,/* packet power save service */ > + WMI_SERVICE_FORCE_FW_HANG,/* To test firmware recovery > mechanism */ > + WMI_SERVICE_GPIO, /* GPIO service */ > + WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */ > + WMI_STA_UAPSD_BASIC_AUTO_TRIG,/* UAPSD AC Trigger Generation Method > */ > + WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */ > > WMI_SERVICE_LAST, > WMI_MAX_SERVICE = 64 /* max service */ > @@ -153,6 +158,10 @@ static inline char *wmi_service_name(int service_id) > return "COEX_FREQAVOID"; > case WMI_SERVICE_PACKET_POWER_SAVE: > return "PACKET_POWER_SAVE"; > + case WMI_SERVICE_FORCE_FW_HANG: > + return "FORCE FW HANG"; > + case WMI_SERVICE_GPIO: > + return "GPIO"; > default: > return "UNKNOWN SERVICE\n"; > } > @@ -216,6 +225,7 @@ enum wmi_cmd_group { > WMI_GRP_CHATTER, > WMI_GRP_TID_ADDBA, > WMI_GRP_MISC, > + WMI_GRP_GPIO, > }; > > #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1) > @@ -244,6 +254,7 @@ enum wmi_cmd_id { > WMI_PDEV_SET_QUIET_MODE_CMDID, > WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID, > WMI_PDEV_GET_TPC_CONFIG_CMDID, > + WMI_PDEV_SET_BASE_MACADDR_CMDID, > > /* VDEV (virtual device) specific commands */ > WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV), > @@ -253,8 +264,6 @@ enum wmi_cmd_id { > WMI_VDEV_UP_CMDID, > WMI_VDEV_STOP_CMDID, > WMI_VDEV_DOWN_CMDID, > - WMI_VDEV_STANDBY_RESPONSE_CMDID, > - WMI_VDEV_RESUME_RESPONSE_CMDID, > WMI_VDEV_SET_PARAM_CMDID, > WMI_VDEV_INSTALL_KEY_CMDID, > > @@ -374,14 +383,23 @@ enum wmi_cmd_id { > WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA), > WMI_PEER_TID_DELBA_CMDID, > > + /* set station mimo powersave method */ > + WMI_STA_DTIM_PS_METHOD_CMDID, > + /* Configure the Station UAPSD AC Auto Trigger Parameters */ > + WMI_STA_UAPSD_AUTO_TRIG_CMDID, > + > /* misc command group */ > WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC), > + WMI_PDEV_UTF_
Re: [ath9k-devel] [PATCH 2/3] ath10k: FW API update for version .629
Michal Kazior wrote: > I think it would be a good idea to include the adequate cmdid structures > too, e.g. for WMI_PDEV_SET_BASE_MACADDR_CMDID. Sure, feel free to add them. I was tracking only the command IDs. Sujith ___ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel