Re: Buggy rhashtable walking

2016-08-04 Thread Johannes Berg

> So I'm going to fix this by consolidating identical objects into
> a single rhashtable entry which also lets us get rid of the
> insecure_elasticity setting.

Hm. Would you rather allocate a separate head entry for the hashtable,
or chain the entries?

(Luckily) the colliding key case practically never happens, and some
drivers don't even allow it, so that's perhaps something to keep in
mind for this. Perhaps we should just generally disallow it - but a few
people (hi Ben) would be really unhappy about that I guess.

I think this might affect more than one use of rhashtable in mac80211
now, since the mesh paths also use it.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v4] cfg80211: Provision to allow the support for different beacon intervals

2016-08-04 Thread Purushottam Kushwaha
This commit provides the option for the host drivers to advertise the
support for different beacon intervals among the respective interface
combinations, through supp_diff_beacon_int (bool).

Signed-off-by: Purushottam Kushwaha 
---
 include/net/cfg80211.h   |  4 
 include/uapi/linux/nl80211.h |  7 +--
 net/wireless/core.c  | 13 -
 net/wireless/nl80211.c   |  3 +++
 net/wireless/util.c  | 24 +++-
 5 files changed, 47 insertions(+), 4 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9c23f4d3..1b7cd42 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2939,6 +2939,8 @@ struct ieee80211_iface_limit {
  * only in special cases.
  * @radar_detect_widths: bitmap of channel widths supported for radar detection
  * @radar_detect_regions: bitmap of regions supported for radar detection
+ * @supp_diff_beacon_int: In this combination, the interface combinations
+ * support different beacon intervals.
  *
  * With this structure the driver can describe which interface
  * combinations it supports concurrently.
@@ -2970,6 +2972,7 @@ struct ieee80211_iface_limit {
  * .n_limits = ARRAY_SIZE(limits2),
  * .max_interfaces = 8,
  * .num_different_channels = 1,
+ * .supp_diff_beacon_int = true,
  *  };
  *
  *
@@ -2997,6 +3000,7 @@ struct ieee80211_iface_combination {
bool beacon_int_infra_match;
u8 radar_detect_widths;
u8 radar_detect_regions;
+   bool supp_diff_beacon_int;
 };
 
 struct ieee80211_txrx_stypes {
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 2206941..b8d147c 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -4203,6 +4203,8 @@ enum nl80211_iface_limit_attrs {
  * of supported channel widths for radar detection.
  * @NL80211_IFACE_COMB_RADAR_DETECT_REGIONS: u32 attribute containing the 
bitmap
  * of supported regulatory regions for radar detection.
+ * @NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL: flag attribute specifying that
+ * different beacon interval within this group is allowed.
  * @NUM_NL80211_IFACE_COMB: number of attributes
  * @MAX_NL80211_IFACE_COMB: highest attribute number
  *
@@ -4210,8 +4212,8 @@ enum nl80211_iface_limit_attrs {
  * limits = [ #{STA} <= 1, #{AP} <= 1 ], matching BI, channels = 1, max = 2
  * => allows an AP and a STA that must match BIs
  *
- * numbers = [ #{AP, P2P-GO} <= 8 ], channels = 1, max = 8
- * => allows 8 of AP/GO
+ * numbers = [ #{AP, P2P-GO} <= 8 ], different BI, channels = 1, max = 8,
+ * => allows 8 of AP/GO that may have different beacon interval
  *
  * numbers = [ #{STA} <= 2 ], channels = 2, max = 2
  * => allows two STAs on different channels
@@ -4237,6 +4239,7 @@ enum nl80211_if_combination_attrs {
NL80211_IFACE_COMB_NUM_CHANNELS,
NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
+   NL80211_IFACE_COMB_DIFF_BEACON_INTERVAL,
 
/* keep last */
NUM_NL80211_IFACE_COMB,
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 7645e97..204f861 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -485,7 +485,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
int i, j;
 
for (i = 0; i < wiphy->n_iface_combinations; i++) {
-   u32 cnt = 0;
+   u32 cnt = 0, ap_cnt;
u16 all_iftypes = 0;
 
c = &wiphy->iface_combinations[i];
@@ -517,6 +517,7 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
if (WARN_ON(!c->n_limits))
return -EINVAL;
 
+   ap_cnt = 0;
for (j = 0; j < c->n_limits; j++) {
u16 types = c->limits[j].types;
 
@@ -538,6 +539,9 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
return -EINVAL;
 
cnt += c->limits[j].max;
+   ap_cnt += (types & (BIT(NL80211_IFTYPE_AP) |
+   BIT(NL80211_IFTYPE_P2P_GO))) ?
+   c->limits[j].max : 0;
/*
 * Don't advertise an unsupported type
 * in a combination.
@@ -546,6 +550,13 @@ static int wiphy_verify_combinations(struct wiphy *wiphy)
return -EINVAL;
}
 
+   /*
+* Different beacon interval allowed only in AP or P2P_GO
+* multi-interface combinations.
+*/
+   if (WARN_ON(c->supp_diff_beacon_int && (ap_cnt < 2)))
+   return -EINVAL;
+
/* You can't even choose that many! */
if (WARN_ON(cnt < c->max_interfaces))
return -EINVAL;
diff --git a/net/wireless/nl80211.c b/net/wireles

[PATCH] cfg80211: Add support for user configurable beacon data rate

2016-08-04 Thread Purushottam Kushwaha
This will allow user to configure beacon tx rate (u8) from userspace.

Signed-off-by: Purushottam Kushwaha 
---
 include/net/cfg80211.h | 25 +++-
 net/wireless/nl80211.c | 62 +-
 2 files changed, 55 insertions(+), 32 deletions(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9c23f4d3..dd900de 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -676,6 +676,18 @@ struct cfg80211_acl_data {
struct mac_address mac_addrs[];
 };
 
+/*
+ * cfg80211_bitrate_mask - masks for bitrate control
+ */
+struct cfg80211_bitrate_mask {
+   struct {
+   u32 legacy;
+   u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
+   u16 vht_mcs[NL80211_VHT_NSS_MAX];
+   enum nl80211_txrate_gi gi;
+   } control[NUM_NL80211_BANDS];
+};
+
 /**
  * struct cfg80211_ap_settings - AP configuration
  *
@@ -700,6 +712,7 @@ struct cfg80211_acl_data {
  * MAC address based access control
  * @pbss: If set, start as a PCP instead of AP. Relevant for DMG
  * networks.
+ * @beacon_rate: masks for setting user configured beacon tx rate.
  */
 struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef;
@@ -719,6 +732,7 @@ struct cfg80211_ap_settings {
bool p2p_opp_ps;
const struct cfg80211_acl_data *acl;
bool pbss;
+   struct cfg80211_bitrate_mask beacon_rate;
 };
 
 /**
@@ -2001,17 +2015,6 @@ enum wiphy_params_flags {
WIPHY_PARAM_DYN_ACK = 1 << 5,
 };
 
-/*
- * cfg80211_bitrate_mask - masks for bitrate control
- */
-struct cfg80211_bitrate_mask {
-   struct {
-   u32 legacy;
-   u8 ht_mcs[IEEE80211_HT_MCS_MASK_LEN];
-   u16 vht_mcs[NL80211_VHT_NSS_MAX];
-   enum nl80211_txrate_gi gi;
-   } control[NUM_NL80211_BANDS];
-};
 /**
  * struct cfg80211_pmksa - PMK Security Association
  *
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 46417f9..53e7bf5 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -36,6 +36,8 @@ static int nl80211_pre_doit(const struct genl_ops *ops, 
struct sk_buff *skb,
struct genl_info *info);
 static void nl80211_post_doit(const struct genl_ops *ops, struct sk_buff *skb,
  struct genl_info *info);
+static int nl80211_parse_tx_bitrate_mask(struct genl_info *info,
+struct cfg80211_bitrate_mask *mask);
 
 /* the netlink family */
 static struct genl_family nl80211_fam = {
@@ -3457,6 +3459,11 @@ static int nl80211_start_ap(struct sk_buff *skb, struct 
genl_info *info)
err = cfg80211_validate_beacon_int(rdev, params.beacon_interval);
if (err)
return err;
+   if (info->attrs[NL80211_ATTR_TX_RATES]) {
+   err = nl80211_parse_tx_bitrate_mask(info, ¶ms.beacon_rate);
+   if (err)
+   return err;
+   }
 
/*
 * In theory, some of these attributes should be required here
@@ -8696,22 +8703,17 @@ static const struct nla_policy 
nl80211_txattr_policy[NL80211_TXRATE_MAX + 1] = {
[NL80211_TXRATE_GI] = { .type = NLA_U8 },
 };
 
-static int nl80211_set_tx_bitrate_mask(struct sk_buff *skb,
-  struct genl_info *info)
+static int nl80211_parse_tx_bitrate_mask(struct genl_info *info,
+struct cfg80211_bitrate_mask *mask)
 {
struct nlattr *tb[NL80211_TXRATE_MAX + 1];
struct cfg80211_registered_device *rdev = info->user_ptr[0];
-   struct cfg80211_bitrate_mask mask;
int rem, i;
-   struct net_device *dev = info->user_ptr[1];
struct nlattr *tx_rates;
struct ieee80211_supported_band *sband;
u16 vht_tx_mcs_map;
 
-   if (!rdev->ops->set_bitrate_mask)
-   return -EOPNOTSUPP;
-
-   memset(&mask, 0, sizeof(mask));
+   memset(mask, 0, sizeof(*mask));
/* Default to all rates enabled */
for (i = 0; i < NUM_NL80211_BANDS; i++) {
sband = rdev->wiphy.bands[i];
@@ -8719,16 +8721,16 @@ static int nl80211_set_tx_bitrate_mask(struct sk_buff 
*skb,
if (!sband)
continue;
 
-   mask.control[i].legacy = (1 << sband->n_bitrates) - 1;
-   memcpy(mask.control[i].ht_mcs,
+   mask->control[i].legacy = (1 << sband->n_bitrates) - 1;
+   memcpy(mask->control[i].ht_mcs,
   sband->ht_cap.mcs.rx_mask,
-  sizeof(mask.control[i].ht_mcs));
+  sizeof(mask->control[i].ht_mcs));
 
if (!sband->vht_cap.vht_supported)
continue;
 
vht_tx_mcs_map = le16_to_cpu(sband->vht_cap.vht_mcs.tx_mcs_map);
-   vht_build_mcs_mask(vht_tx_mcs_map, mask.control[i].vht_mcs);
+   vht_build_mcs_mask(v

[PATCH 2/2] ath9k: improve powersave filter handling

2016-08-04 Thread Felix Fietkau
For non-aggregated frames, ath9k was leaving handling of powersave
filtered packets to mac80211. This can be too slow if the intermediate
queue is already filled with packets and mac80211 does not immediately
send a new packet via drv_tx().

Improve response time with filtered frames by triggering clearing the
powersave filter internally.

Signed-off-by: Felix Fietkau 
---
 drivers/net/wireless/ath/ath9k/xmit.c | 12 +---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c 
b/drivers/net/wireless/ath/ath9k/xmit.c
index 5693558..a3e292f 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -461,13 +461,13 @@ static void ath_tx_count_frames(struct ath_softc *sc, 
struct ath_buf *bf,
 static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 struct ath_buf *bf, struct list_head *bf_q,
 struct ieee80211_sta *sta,
+struct ath_atx_tid *tid,
 struct ath_tx_status *ts, int txok)
 {
struct ath_node *an = NULL;
struct sk_buff *skb;
struct ieee80211_hdr *hdr;
struct ieee80211_tx_info *tx_info;
-   struct ath_atx_tid *tid = NULL;
struct ath_buf *bf_next, *bf_last = bf->bf_lastbf;
struct list_head bf_head;
struct sk_buff_head bf_pending;
@@ -509,7 +509,6 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, 
struct ath_txq *txq,
}
 
an = (struct ath_node *)sta->drv_priv;
-   tid = ath_get_skb_tid(sc, an, skb);
seq_first = tid->seq_start;
isba = ts->ts_flags & ATH9K_TX_BA;
 
@@ -695,6 +694,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, 
struct ath_txq *txq,
struct ieee80211_tx_info *info;
struct ieee80211_sta *sta;
struct ieee80211_hdr *hdr;
+   struct ath_atx_tid *tid = NULL;
bool txok, flush;
 
txok = !(ts->ts_status & ATH9K_TXERR_MASK);
@@ -710,6 +710,12 @@ static void ath_tx_process_buffer(struct ath_softc *sc, 
struct ath_txq *txq,
 
hdr = (struct ieee80211_hdr *) bf->bf_mpdu->data;
sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
+   if (sta) {
+   struct ath_node *an = (struct ath_node *)sta->drv_priv;
+   tid = ath_get_skb_tid(sc, an, bf->bf_mpdu);
+   if (ts->ts_status & (ATH9K_TXERR_FILT | ATH9K_TXERR_XRETRY))
+   tid->clear_ps_filter = true;
+   }
 
if (!bf_isampdu(bf)) {
if (!flush) {
@@ -721,7 +727,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, 
struct ath_txq *txq,
}
ath_tx_complete_buf(sc, bf, txq, bf_head, sta, ts, txok);
} else
-   ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, ts, txok);
+   ath_tx_complete_aggr(sc, txq, bf, bf_head, sta, tid, ts, txok);
 
if (!flush)
ath_txq_schedule(sc, txq);
-- 
2.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ath9k: use ieee80211_tx_status_noskb where possible

2016-08-04 Thread Felix Fietkau
It removes the need for undoing the padding changes to skb->data and it
improves performance by eliminating one tx status lookup per MPDU in the
status path. It is also useful for preparing a follow-up fix to better
handle powersave filtering.

Signed-off-by: Felix Fietkau 
---
 drivers/net/wireless/ath/ath9k/xmit.c | 94 +++
 1 file changed, 62 insertions(+), 32 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c 
b/drivers/net/wireless/ath/ath9k/xmit.c
index 39d9383..5693558 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -50,9 +50,11 @@ static u16 bits_per_symbol[][2] = {
 static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
   struct ath_atx_tid *tid, struct sk_buff *skb);
 static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
-   int tx_flags, struct ath_txq *txq);
+   int tx_flags, struct ath_txq *txq,
+   struct ieee80211_sta *sta);
 static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
struct ath_txq *txq, struct list_head *bf_q,
+   struct ieee80211_sta *sta,
struct ath_tx_status *ts, int txok);
 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
 struct list_head *head, bool internal);
@@ -77,6 +79,22 @@ enum {
 /* Aggregation logic */
 /*/
 
+static void ath_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb)
+{
+   struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+   struct ieee80211_sta *sta = info->status.status_driver_data[0];
+
+   if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS) {
+   ieee80211_tx_status(hw, skb);
+   return;
+   }
+
+   if (sta)
+   ieee80211_tx_status_noskb(hw, sta, info);
+
+   dev_kfree_skb(skb);
+}
+
 void ath_txq_lock(struct ath_softc *sc, struct ath_txq *txq)
__acquires(&txq->axq_lock)
 {
@@ -92,6 +110,7 @@ void ath_txq_unlock(struct ath_softc *sc, struct ath_txq 
*txq)
 void ath_txq_unlock_complete(struct ath_softc *sc, struct ath_txq *txq)
__releases(&txq->axq_lock)
 {
+   struct ieee80211_hw *hw = sc->hw;
struct sk_buff_head q;
struct sk_buff *skb;
 
@@ -100,7 +119,7 @@ void ath_txq_unlock_complete(struct ath_softc *sc, struct 
ath_txq *txq)
spin_unlock_bh(&txq->axq_lock);
 
while ((skb = __skb_dequeue(&q)))
-   ieee80211_tx_status(sc->hw, skb);
+   ath_tx_status(hw, skb);
 }
 
 static void ath_tx_queue_tid(struct ath_softc *sc, struct ath_txq *txq,
@@ -268,7 +287,7 @@ static void ath_tx_flush_tid(struct ath_softc *sc, struct 
ath_atx_tid *tid)
}
 
list_add_tail(&bf->list, &bf_head);
-   ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
+   ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
}
 
if (sendbar) {
@@ -333,12 +352,12 @@ static void ath_tid_drain(struct ath_softc *sc, struct 
ath_txq *txq,
bf = fi->bf;
 
if (!bf) {
-   ath_tx_complete(sc, skb, ATH_TX_ERROR, txq);
+   ath_tx_complete(sc, skb, ATH_TX_ERROR, txq, NULL);
continue;
}
 
list_add_tail(&bf->list, &bf_head);
-   ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
+   ath_tx_complete_buf(sc, bf, txq, &bf_head, NULL, &ts, 0);
}
 }
 
@@ -441,12 +460,11 @@ static void ath_tx_count_frames(struct ath_softc *sc, 
struct ath_buf *bf,
 
 static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 struct ath_buf *bf, struct list_head *bf_q,
+struct ieee80211_sta *sta,
 struct ath_tx_status *ts, int txok)
 {
struct ath_node *an = NULL;
struct sk_buff *skb;
-   struct ieee80211_sta *sta;
-   struct ieee80211_hw *hw = sc->hw;
struct ieee80211_hdr *hdr;
struct ieee80211_tx_info *tx_info;
struct ath_atx_tid *tid = NULL;
@@ -475,12 +493,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, 
struct ath_txq *txq,
for (i = 0; i < ts->ts_rateindex; i++)
retries += rates[i].count;
 
-   rcu_read_lock();
-
-   sta = ieee80211_find_sta_by_ifaddr(hw, hdr->addr1, hdr->addr2);
if (!sta) {
-   rcu_read_unlock();
-
INIT_LIST_HEAD(&bf_head);
while (bf) {
bf_next = bf->bf_next;
@@ -488,7 +501,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, 
struct ath_txq *txq,
if (!bf->bf_state.stale || bf_next != NULL)
 

Re: [v5.1] ucc_fast: Fix to avoid IS_ERR_VALUE abuses and dead code on 64bit systems.

2016-08-04 Thread Arnd Bergmann
On Thursday, August 4, 2016 10:22:43 PM CEST Arvind Yadav wrote:
> index df8ea79..ada9070 100644
> --- a/include/soc/fsl/qe/ucc_fast.h
> +++ b/include/soc/fsl/qe/ucc_fast.h
> @@ -165,10 +165,12 @@ struct ucc_fast_private {
> int stopped_tx; /* Whether channel has been stopped for Tx
>(STOP_TX, etc.) */
> int stopped_rx; /* Whether channel has been stopped for Rx */
> -   u32 ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base of Tx
> -   virtual fifo */
> -   u32 ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base of Rx
> -   virtual fifo */
> +   unsigned long ucc_fast_tx_virtual_fifo_base_offset;/* pointer to base 
> of
> +   * Tx virtual fifo
> +   */
> +   unsigned long ucc_fast_rx_virtual_fifo_base_offset;/* pointer to base 
> of
> +   * Rx virtual fifo
> +   */
>  #ifdef STATISTICS
> u32 tx_frames;  /* Transmitted frames counter. */
> u32 rx_frames;  /* Received frames counter (only frames
> 

This change seems ok, but what about the other u32 variables in ucc_geth.c
that get checked for IS_ERR_VALUE?

Arnd


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Wireless Workshop accepted into the 2016 Linux Kernel Summit and Linux Plumbers Conference

2016-08-04 Thread Johannes Berg

> Please join us for a timely and important discussion [4]!
> 
> KS [5] will be held October 31-November 1 and LPC [6] will be held
> November 1-4, both in Santa Fe, New Mexico, US.

The workshop is going to be on November 1st, the combined day.

I've put up a new wiki page here:

https://wireless.wiki.kernel.org/en/developers/summits/santa-fe-2016

Please consider adding yourself, I have a number of free/reduced passes
to hand out so I'll assign those maybe next week. You do need to be
registered for LPC, which is currently closed for registrations, but
I'm trying to see if we can get reservations or maybe workshop-only
tickets.

Please add yourself if you are considering attending, so I can get a
better idea of the numbers.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ath10k: hide kernel addresses from logs using %pK format specifier

2016-08-04 Thread c_mkenna
From: Maharaja Kennadyrajan 

With the %pK format specifier we hide the kernel addresses
with the help of kptr_restrict sysctl.
In this patch, %p is changed to %pK in the driver code.

The sysctl is documented in Documentation/sysctl/kernel.txt.

Signed-off-by: Maharaja Kennadyrajan 
---
 drivers/net/wireless/ath/ath10k/ahb.c  |2 +-
 drivers/net/wireless/ath/ath10k/bmi.c  |4 ++--
 drivers/net/wireless/ath/ath10k/ce.c   |4 ++--
 drivers/net/wireless/ath/ath10k/core.c |4 ++--
 drivers/net/wireless/ath/ath10k/htc.c  |6 +++---
 drivers/net/wireless/ath/ath10k/htt_rx.c   |2 +-
 drivers/net/wireless/ath/ath10k/mac.c  |   20 ++--
 drivers/net/wireless/ath/ath10k/pci.c  |2 +-
 drivers/net/wireless/ath/ath10k/testmode.c |4 ++--
 drivers/net/wireless/ath/ath10k/txrx.c |2 +-
 drivers/net/wireless/ath/ath10k/wmi.c  |4 ++--
 11 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/ahb.c 
b/drivers/net/wireless/ath/ath10k/ahb.c
index acec16b..dede026 100644
--- a/drivers/net/wireless/ath/ath10k/ahb.c
+++ b/drivers/net/wireless/ath/ath10k/ahb.c
@@ -577,7 +577,7 @@ static int ath10k_ahb_resource_init(struct ath10k *ar)
 
ath10k_dbg(ar, ATH10K_DBG_BOOT, "irq: %d\n", ar_ahb->irq);
 
-   ath10k_dbg(ar, ATH10K_DBG_BOOT, "mem: 0x%p mem_len: %lu gcc mem: 0x%p 
tcsr_mem: 0x%p\n",
+   ath10k_dbg(ar, ATH10K_DBG_BOOT, "mem: 0x%pK mem_len: %lu gcc mem: 0x%pK 
tcsr_mem: 0x%pK\n",
   ar_ahb->mem, ar_ahb->mem_len,
   ar_ahb->gcc_mem, ar_ahb->tcsr_mem);
return 0;
diff --git a/drivers/net/wireless/ath/ath10k/bmi.c 
b/drivers/net/wireless/ath/ath10k/bmi.c
index 3d29b08..2872d34 100644
--- a/drivers/net/wireless/ath/ath10k/bmi.c
+++ b/drivers/net/wireless/ath/ath10k/bmi.c
@@ -221,7 +221,7 @@ int ath10k_bmi_lz_data(struct ath10k *ar, const void 
*buffer, u32 length)
u32 txlen;
int ret;
 
-   ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi lz data buffer 0x%p length %d\n",
+   ath10k_dbg(ar, ATH10K_DBG_BMI, "bmi lz data buffer 0x%pK length %d\n",
   buffer, length);
 
if (ar->bmi.done_sent) {
@@ -287,7 +287,7 @@ int ath10k_bmi_fast_download(struct ath10k *ar,
int ret;
 
ath10k_dbg(ar, ATH10K_DBG_BMI,
-  "bmi fast download address 0x%x buffer 0x%p length %d\n",
+  "bmi fast download address 0x%x buffer 0x%pK length %d\n",
   address, buffer, length);
 
ret = ath10k_bmi_lz_stream_start(ar, address);
diff --git a/drivers/net/wireless/ath/ath10k/ce.c 
b/drivers/net/wireless/ath/ath10k/ce.c
index 9fb8d74..65d8d71 100644
--- a/drivers/net/wireless/ath/ath10k/ce.c
+++ b/drivers/net/wireless/ath/ath10k/ce.c
@@ -840,7 +840,7 @@ static int ath10k_ce_init_src_ring(struct ath10k *ar,
ath10k_ce_src_ring_highmark_set(ar, ctrl_addr, nentries);
 
ath10k_dbg(ar, ATH10K_DBG_BOOT,
-  "boot init ce src ring id %d entries %d base_addr %p\n",
+  "boot init ce src ring id %d entries %d base_addr %pK\n",
   ce_id, nentries, src_ring->base_addr_owner_space);
 
return 0;
@@ -874,7 +874,7 @@ static int ath10k_ce_init_dest_ring(struct ath10k *ar,
ath10k_ce_dest_ring_highmark_set(ar, ctrl_addr, nentries);
 
ath10k_dbg(ar, ATH10K_DBG_BOOT,
-  "boot ce dest ring id %d entries %d base_addr %p\n",
+  "boot ce dest ring id %d entries %d base_addr %pK\n",
   ce_id, nentries, dest_ring->base_addr_owner_space);
 
return 0;
diff --git a/drivers/net/wireless/ath/ath10k/core.c 
b/drivers/net/wireless/ath/ath10k/core.c
index e889829..ffcf6b8 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -699,7 +699,7 @@ static int ath10k_download_and_run_otp(struct ath10k *ar)
 
if (!ar->running_fw->fw_file.otp_data ||
!ar->running_fw->fw_file.otp_len) {
-   ath10k_warn(ar, "Not running otp, calibration will be incorrect 
(otp-data %p otp_len %zd)!\n",
+   ath10k_warn(ar, "Not running otp, calibration will be incorrect 
(otp-data %pK otp_len %zd)!\n",
ar->running_fw->fw_file.otp_data,
ar->running_fw->fw_file.otp_len);
return 0;
@@ -753,7 +753,7 @@ static int ath10k_download_fw(struct ath10k *ar)
}
 
ath10k_dbg(ar, ATH10K_DBG_BOOT,
-  "boot uploading firmware image %p len %d\n",
+  "boot uploading firmware image %pK len %d\n",
   data, data_len);
 
ret = ath10k_bmi_fast_download(ar, address, data, data_len);
diff --git a/drivers/net/wireless/ath/ath10k/htc.c 
b/drivers/net/wireless/ath/ath10k/htc.c
index 5b3c6bc..175aae3 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -44,7 +44,7 

[PATCH 0/2] get_expected_throughput interface update

2016-08-04 Thread Maxim Altshul
These two patches are two important patches (mainly 1/2)
that solve a regression issue that was found in wlcore
(where wl was found to be null in some cases)

Also, they make it easier for driver to get hw->priv when op is invoked. 


Maxim Altshul (2):
  mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput
  wlcore: Remove wl pointer from wl_sta structure

 drivers/net/wireless/ti/wlcore/main.c | 6 +++---
 drivers/net/wireless/ti/wlcore/wlcore_i.h | 1 -
 include/net/mac80211.h| 3 ++-
 net/mac80211/driver-ops.h | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ath10k: disable wake_tx_queue for older devices

2016-08-04 Thread Dave Taht
On Thu, Aug 4, 2016 at 12:07 PM, Roman Yeryomin  wrote:
> On 1 August 2016 at 12:04, Dave Taht  wrote:
>> On Mon, Aug 1, 2016 at 1:35 AM, Roman Yeryomin  wrote:
>>> On 7 July 2016 at 19:30, Valo, Kalle  wrote:
 Michal Kazior  writes:

> Ideally wake_tx_queue should be used regardless as
> it is a requirement for reducing bufferbloat and
> implementing airtime fairness in the future.
>
> However some setups (typically low-end platforms
> hosting QCA988X) suffer performance regressions
> with the current wake_tx_queue implementation.
> Therefore disable it unless it is really
> beneficial with current codebase (which is when
> firmware supports smart pull-push tx scheduling).
>
> Signed-off-by: Michal Kazior 

 I think it's too late to send this to 4.7 anymore (and this due to my
 vacation). So I'm planning to queue this to 4.8, but if the feedback is
 positive we can always send this to a 4.7 stable release.

>>>
>>> Sorry guys, drowned.
>>> So, yes, applying this patch does the job. That is gets me to the
>>> results similar to
>>> https://lists.openwrt.org/pipermail/openwrt-devel/2016-May/041448.html
>>>
>>> Going to try latest code on same system...
>>
>> Can you try increasing the quantum to 1514, and reducing the codel
>> target to 5ms? (without this patch?)
>>
>
> So it was 1514 already...

based on some testing of 20, codel target should be 5ms and isn't.

https://github.com/torvalds/linux/commit/5caa328e3811b7cfa33fd02c93280ffa622deb0e

> Regards,
> Roman
>
> ___
> ath10k mailing list
> ath...@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath10k



-- 
Dave Täht
Let's go make home routers and wifi faster! With better software!
http://blog.cerowrt.org
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ath10k: disable wake_tx_queue for older devices

2016-08-04 Thread Roman Yeryomin
On 1 August 2016 at 12:04, Dave Taht  wrote:
> On Mon, Aug 1, 2016 at 1:35 AM, Roman Yeryomin  wrote:
>> On 7 July 2016 at 19:30, Valo, Kalle  wrote:
>>> Michal Kazior  writes:
>>>
 Ideally wake_tx_queue should be used regardless as
 it is a requirement for reducing bufferbloat and
 implementing airtime fairness in the future.

 However some setups (typically low-end platforms
 hosting QCA988X) suffer performance regressions
 with the current wake_tx_queue implementation.
 Therefore disable it unless it is really
 beneficial with current codebase (which is when
 firmware supports smart pull-push tx scheduling).

 Signed-off-by: Michal Kazior 
>>>
>>> I think it's too late to send this to 4.7 anymore (and this due to my
>>> vacation). So I'm planning to queue this to 4.8, but if the feedback is
>>> positive we can always send this to a 4.7 stable release.
>>>
>>
>> Sorry guys, drowned.
>> So, yes, applying this patch does the job. That is gets me to the
>> results similar to
>> https://lists.openwrt.org/pipermail/openwrt-devel/2016-May/041448.html
>>
>> Going to try latest code on same system...
>
> Can you try increasing the quantum to 1514, and reducing the codel
> target to 5ms? (without this patch?)
>

So it was 1514 already...

Regards,
Roman
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ath9k: fix AR5416 access GPIO warning

2016-08-04 Thread miaoqing
From: Miaoqing Pan 

The warning was seen on AR5416 chip, which invoke ath9k_hw_gio_get()
before the GPIO initialized correctly.

WARNING: CPU: 1 PID: 1159 at ~/drivers/net/wireless/ath/ath9k/hw.c:2776 
ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw]
...
CPU: 1 PID: 1159 Comm: systemd-udevd Not tainted 4.7.0-rc7-aptosid-amd64 #1 
aptosid 4.7~rc7-1~git92.slh.3
Hardware name:  /DH67CL, BIOS 
BLH6710H.86A.0160.2012.1204.1156 12/04/2012
  0286 f912d633 81290fd3 
   81063fd4 88040c6dc018 
  0002  0100 88040c6dc018
Call Trace:
  [] ? dump_stack+0x5c/0x79
  [] ? __warn+0xb4/0xd0
  [] ? ath9k_hw_gpio_get+0x148/0x1a0 [ath9k_hw]

Signed-off-by: Miaoqing Pan 
---
 drivers/net/wireless/ath/ath9k/hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c 
b/drivers/net/wireless/ath/ath9k/hw.c
index d1d0c06..14b13f0 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2482,6 +2482,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
return -EINVAL;
}
 
+   ath9k_gpio_cap_init(ah);
+
if (AR_SREV_9485(ah) ||
AR_SREV_9285(ah) ||
AR_SREV_9330(ah) ||
@@ -2531,8 +2533,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
else
pCap->hw_caps &= ~ATH9K_HW_CAP_HT;
 
-   ath9k_gpio_cap_init(ah);
-
if (AR_SREV_9160_10_OR_LATER(ah) || AR_SREV_9100(ah))
pCap->rts_aggr_limit = ATH_AMPDU_LIMIT_MAX;
else
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Buggy rhashtable walking

2016-08-04 Thread Herbert Xu
On Thu, Aug 04, 2016 at 03:18:46PM +0800, Herbert Xu wrote:
> 
> So the question is can wireless handle seeing an entry multiple
> times? In particular, __ieee80211_rx_handle_packet would appear
> to process the same packet multiple times if this were to happen.

It's worse than I thought.  In fact it's not walking the table
at all, rather it's doing a hash lookup by hand!

This cannot possibly work given that rhashtable makes use of
multiple hash tables.

In fact this also demonstrates why putting multiple identical
objects into the same table is crap.  Because there is no sane
way of returning all objects corresponding to a single key, given
that they may be spread over multiple tables.

So I'm going to fix this by consolidating identical objects into
a single rhashtable entry which also lets us get rid of the
insecure_elasticity setting.

So the next time someone comes along and wants to add multiple
objects with the same key to one table, please just say no.

Thanks,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Buggy rhashtable walking

2016-08-04 Thread Herbert Xu
Hi:

While working on rhashtable I noticed that wireless is walking
rhashtables by hand using rht_for_each_*.  You must not do that
as an rhashtable can entail multiple hash tables when resizing.
If you walk it by hand then you may end up missing entries.

The correct way to do it is to use the rhashtable walk interface.
However, even this comes with the caveat that a given entry may
show up multiple times.  So if you cannot handle that then you
must construct your own data structure outside of rhashtable, like
we do in IPsec.

So the question is can wireless handle seeing an entry multiple
times? In particular, __ieee80211_rx_handle_packet would appear
to process the same packet multiple times if this were to happen.

Cheers,
-- 
Email: Herbert Xu 
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html