* Re: [PATCH v2 2/3] mac80211: mesh: improve path resolving time
From: Johannes Berg @ 2016-08-11 13:22 UTC (permalink / raw)
To: Bob Copeland, Yaniv Machani
Cc: linux-kernel, Maital Hahn, David S. Miller, linux-wireless,
netdev
In-Reply-To: <20160719123648.GC11996@localhost>
On Tue, 2016-07-19 at 08:36 -0400, Bob Copeland wrote:
> On Wed, Jul 13, 2016 at 02:45:25PM +0300, Yaniv Machani wrote:
> >
> > When a packet is received for transmission,
> > a PREQ frame is sent to resolve the appropriate path to the desired
> > destination.
> > After path was established, any sequential PREQ will be sent only
> > after
> > dot11MeshHWMPpreqMinInterval, which usually set to few seconds.
> >
> > This implementation has an impact in cases where we would like to
> > resolve the path quickly.
> > A clear example is when a peer was disconnected from us,
> > while he acted as a hop to our destination.
> > Although the path table will be cleared, the next PREQ frame will
> > be sent only after reaching the MinInterval.
> > This will cause unwanted delay, possibly of few seconds until the
> > traffic will resume.
> >
> > if (!(mpath->flags & MESH_PATH_RESOLVING))
> > - mesh_queue_preq(mpath, PREQ_Q_F_START);
> > + mesh_queue_preq(mpath, PREQ_Q_F_START, true);
>
> What about something like this here instead:
>
> if (!(mpath->flags & MESH_PATH_RESOLVING)) {
> /* force next preq to be sent without delay */
> ifmsh->last_preq = jiffies - min_preq_int_jiff(sdata) - 1;
> mesh_queue_preq(mpath, PREQ_Q_F_START);
> }
>
Yaniv, did you disagree with this for some strong reason, or were you
going to resend?
Having a smaller patch seems nicer too.
johannes
^ permalink raw reply
* Re: [PATCH] cfg80211: validate beacon interval for MESH/IBSS
From: Johannes Berg @ 2016-08-11 12:52 UTC (permalink / raw)
To: Kushwaha, Purushottam
Cc: linux-wireless@vger.kernel.org, Malinen, Jouni,
Undekari, Sunil Dutt, Kalikot Veetil, Mahesh Kumar,
Hullur Subramanyam, Amarnath, Kumar, Deepak (QCA)
In-Reply-To: <99a970ef2b8f4d41b757c4e6b65648ac@aphydexm01b.ap.qualcomm.com>
On Thu, 2016-08-11 at 09:56 +0000, Kushwaha, Purushottam wrote:
> Johannes ,
> While addressing this change, we could notice that the minimum
> boundary for beacon interval for the case of IBSS is 1 but for Mesh
> it is 10. Also this check is not done for AP/P2P GO .
> Any reason why there is a discrepancy among them ? These
> configurations should be aligned , I guess.
> Shouldn't the minimum value be 10 ? If yes , the boundary check
> should be moved to cfg80211_validate_beacon_int ?
>
Yeah, I've applied the patch and moved the range checks in as well.
johannes
^ permalink raw reply
* [PATCH] Staging: rtl8723au: os_intfs: fixed case statement is variable issue
From: Bing Sun @ 2016-08-11 14:11 UTC (permalink / raw)
To: Larry.Finger, Jes.Sorensen
Cc: gregkh, linux-wireless, devel, linux-kernel, sunbing.linux,
Bing Sun
Fixed sparse parse error:
Expected constant expression in case statement.
Signed-off-by: Bing Sun <sunbing@redflag-linux.com>
---
drivers/staging/rtl8723au/os_dep/os_intfs.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c
index b8848c2..f30d5d2 100644
--- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
+++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
@@ -283,14 +283,13 @@ static u32 rtw_classify8021d(struct sk_buff *skb)
*/
if (skb->priority >= 256 && skb->priority <= 263)
return skb->priority - 256;
- switch (skb->protocol) {
- case htons(ETH_P_IP):
+
+ if (skb->protocol == htons(ETH_P_IP)) {
dscp = ip_hdr(skb)->tos & 0xfc;
- break;
- default:
- return 0;
+ return dscp >> 5;
}
- return dscp >> 5;
+
+ return 0;
}
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb,
--
2.1.0
^ permalink raw reply related
* [PATCH] rt2x00usb: Fix error return code
From: Christophe JAILLET @ 2016-08-11 14:38 UTC (permalink / raw)
To: sgruszka, helmut.schaa, kvalo
Cc: linux-wireless, linux-kernel, kernel-janitors, Christophe JAILLET
We know that 'retval = 0' because it has been tested a few lines above.
So, if 'devm_kmalloc' fails, 0 will be returned instead of an error code.
Return -ENOMEM instead.
Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/wireless/ralink/rt2x00/rt2x00usb.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
index 7cf26c6124d1..6005e14213ca 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c
@@ -831,8 +831,10 @@ int rt2x00usb_probe(struct usb_interface *usb_intf,
rt2x00dev->anchor = devm_kmalloc(&usb_dev->dev,
sizeof(struct usb_anchor),
GFP_KERNEL);
- if (!rt2x00dev->anchor)
+ if (!rt2x00dev->anchor) {
+ retval = -ENOMEM;
goto exit_free_reg;
+ }
init_usb_anchor(rt2x00dev->anchor);
return 0;
--
2.7.4
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
^ permalink raw reply related
* Re: [PATCH] rt2x00usb: Fix error return code
From: Stanislaw Gruszka @ 2016-08-11 14:48 UTC (permalink / raw)
To: Christophe JAILLET
Cc: helmut.schaa, kvalo, linux-wireless, linux-kernel,
kernel-janitors
In-Reply-To: <1470926334-24532-1-git-send-email-christophe.jaillet@wanadoo.fr>
On Thu, Aug 11, 2016 at 04:38:54PM +0200, Christophe JAILLET wrote:
> We know that 'retval = 0' because it has been tested a few lines above.
> So, if 'devm_kmalloc' fails, 0 will be returned instead of an error code.
> Return -ENOMEM instead.
>
> Fixes: 8b4c0009313f ("rt2x00usb: Use usb anchor to manage URB")
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
^ permalink raw reply
* [PATCH v2] mac80211: Re-structure aqm debugfs output and include CoDel drops
From: Toke Høiland-Jørgensen @ 2016-08-11 15:11 UTC (permalink / raw)
To: make-wifi-fast, linux-wireless; +Cc: Toke Høiland-Jørgensen
In-Reply-To: <20160720145442.1098-1-toke@toke.dk>
Currently the 'aqm' stats in mac80211 only keeps overlimit drop stats,
not CoDel stats. This moves the CoDel stats into the txqi structure to
keep them per txq in order to show them in debugfs.
In addition, the aqm debugfs output is restructured by splitting it up
into three files: One global per phy, one per netdev and one per
station, in the appropriate directories. The files are all called aqm,
and are only created if the driver supports the wake_tx_queue op (rather
than emitting an error on open as previously).
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
---
net/mac80211/debugfs.c | 151 ++++++++----------------------------------
net/mac80211/debugfs_netdev.c | 37 ++++++++++-
net/mac80211/debugfs_sta.c | 45 +++++++++++++
net/mac80211/ieee80211_i.h | 2 +-
net/mac80211/tx.c | 4 +-
5 files changed, 110 insertions(+), 129 deletions(-)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 27e6fb9..2f14141 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -71,138 +71,39 @@ DEBUGFS_READONLY_FILE(wep_iv, "%#08x",
DEBUGFS_READONLY_FILE(rate_ctrl_alg, "%s",
local->rate_ctrl ? local->rate_ctrl->ops->name : "hw/driver");
-struct aqm_info {
- struct ieee80211_local *local;
- size_t size;
- size_t len;
- unsigned char buf[0];
-};
-
-#define AQM_HDR_LEN 200
-#define AQM_HW_ENTRY_LEN 40
-#define AQM_TXQ_ENTRY_LEN 110
-
-static int aqm_open(struct inode *inode, struct file *file)
+static ssize_t aqm_read(struct file *file,
+ char __user *user_buf,
+ size_t count,
+ loff_t *ppos)
{
- struct ieee80211_local *local = inode->i_private;
- struct ieee80211_sub_if_data *sdata;
- struct sta_info *sta;
- struct txq_info *txqi;
+ struct ieee80211_local *local = file->private_data;
struct fq *fq = &local->fq;
- struct aqm_info *info = NULL;
+ char buf[200];
int len = 0;
- int i;
-
- if (!local->ops->wake_tx_queue)
- return -EOPNOTSUPP;
-
- len += AQM_HDR_LEN;
- len += 6 * AQM_HW_ENTRY_LEN;
-
- rcu_read_lock();
- list_for_each_entry_rcu(sdata, &local->interfaces, list)
- len += AQM_TXQ_ENTRY_LEN;
- list_for_each_entry_rcu(sta, &local->sta_list, list)
- len += AQM_TXQ_ENTRY_LEN * ARRAY_SIZE(sta->sta.txq);
- rcu_read_unlock();
-
- info = vmalloc(len);
- if (!info)
- return -ENOMEM;
spin_lock_bh(&local->fq.lock);
rcu_read_lock();
- file->private_data = info;
- info->local = local;
- info->size = len;
- len = 0;
-
- len += scnprintf(info->buf + len, info->size - len,
- "* hw\n"
- "access name value\n"
- "R fq_flows_cnt %u\n"
- "R fq_backlog %u\n"
- "R fq_overlimit %u\n"
- "R fq_collisions %u\n"
- "RW fq_limit %u\n"
- "RW fq_quantum %u\n",
- fq->flows_cnt,
- fq->backlog,
- fq->overlimit,
- fq->collisions,
- fq->limit,
- fq->quantum);
-
- len += scnprintf(info->buf + len,
- info->size - len,
- "* vif\n"
- "ifname addr ac backlog-bytes backlog-packets flows overlimit collisions tx-bytes tx-packets\n");
-
- list_for_each_entry_rcu(sdata, &local->interfaces, list) {
- txqi = to_txq_info(sdata->vif.txq);
- len += scnprintf(info->buf + len, info->size - len,
- "%s %pM %u %u %u %u %u %u %u %u\n",
- sdata->name,
- sdata->vif.addr,
- txqi->txq.ac,
- txqi->tin.backlog_bytes,
- txqi->tin.backlog_packets,
- txqi->tin.flows,
- txqi->tin.overlimit,
- txqi->tin.collisions,
- txqi->tin.tx_bytes,
- txqi->tin.tx_packets);
- }
-
- len += scnprintf(info->buf + len,
- info->size - len,
- "* sta\n"
- "ifname addr tid ac backlog-bytes backlog-packets flows overlimit collisions tx-bytes tx-packets\n");
-
- list_for_each_entry_rcu(sta, &local->sta_list, list) {
- sdata = sta->sdata;
- for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
- txqi = to_txq_info(sta->sta.txq[i]);
- len += scnprintf(info->buf + len, info->size - len,
- "%s %pM %d %d %u %u %u %u %u %u %u\n",
- sdata->name,
- sta->sta.addr,
- txqi->txq.tid,
- txqi->txq.ac,
- txqi->tin.backlog_bytes,
- txqi->tin.backlog_packets,
- txqi->tin.flows,
- txqi->tin.overlimit,
- txqi->tin.collisions,
- txqi->tin.tx_bytes,
- txqi->tin.tx_packets);
- }
- }
-
- info->len = len;
+ len = scnprintf(buf, sizeof(buf),
+ "access name value\n"
+ "R fq_flows_cnt %u\n"
+ "R fq_backlog %u\n"
+ "R fq_overlimit %u\n"
+ "R fq_collisions %u\n"
+ "RW fq_limit %u\n"
+ "RW fq_quantum %u\n",
+ fq->flows_cnt,
+ fq->backlog,
+ fq->overlimit,
+ fq->collisions,
+ fq->limit,
+ fq->quantum);
rcu_read_unlock();
spin_unlock_bh(&local->fq.lock);
- return 0;
-}
-
-static int aqm_release(struct inode *inode, struct file *file)
-{
- vfree(file->private_data);
- return 0;
-}
-
-static ssize_t aqm_read(struct file *file,
- char __user *user_buf,
- size_t count,
- loff_t *ppos)
-{
- struct aqm_info *info = file->private_data;
-
return simple_read_from_buffer(user_buf, count, ppos,
- info->buf, info->len);
+ buf, len);
}
static ssize_t aqm_write(struct file *file,
@@ -210,8 +111,7 @@ static ssize_t aqm_write(struct file *file,
size_t count,
loff_t *ppos)
{
- struct aqm_info *info = file->private_data;
- struct ieee80211_local *local = info->local;
+ struct ieee80211_local *local = file->private_data;
char buf[100];
size_t len;
@@ -237,8 +137,7 @@ static ssize_t aqm_write(struct file *file,
static const struct file_operations aqm_ops = {
.write = aqm_write,
.read = aqm_read,
- .open = aqm_open,
- .release = aqm_release,
+ .open = simple_open,
.llseek = default_llseek,
};
@@ -425,7 +324,9 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(hwflags);
DEBUGFS_ADD(user_power);
DEBUGFS_ADD(power);
- DEBUGFS_ADD_MODE(aqm, 0600);
+
+ if (local->ops->wake_tx_queue)
+ DEBUGFS_ADD_MODE(aqm, 0600);
statsd = debugfs_create_dir("statistics", phyd);
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 37ea30e..30c5b47 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -30,7 +30,7 @@ static ssize_t ieee80211_if_read(
size_t count, loff_t *ppos,
ssize_t (*format)(const struct ieee80211_sub_if_data *, char *, int))
{
- char buf[70];
+ char buf[200];
ssize_t ret = -EINVAL;
read_lock(&dev_base_lock);
@@ -486,6 +486,38 @@ static ssize_t ieee80211_if_fmt_num_buffered_multicast(
}
IEEE80211_IF_FILE_R(num_buffered_multicast);
+static ssize_t ieee80211_if_fmt_aqm(
+ const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
+{
+ struct ieee80211_local *local = sdata->local;
+ struct txq_info *txqi = to_txq_info(sdata->vif.txq);
+ int len;
+
+ spin_lock_bh(&local->fq.lock);
+ rcu_read_lock();
+
+ len = scnprintf(buf,
+ buflen,
+ "ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets\n"
+ "%u %u %u %u %u %u %u %u %u %u\n",
+ txqi->txq.ac,
+ txqi->tin.backlog_bytes,
+ txqi->tin.backlog_packets,
+ txqi->tin.flows,
+ txqi->cstats.drop_count,
+ txqi->cstats.ecn_mark,
+ txqi->tin.overlimit,
+ txqi->tin.collisions,
+ txqi->tin.tx_bytes,
+ txqi->tin.tx_packets);
+
+ rcu_read_unlock();
+ spin_unlock_bh(&local->fq.lock);
+
+ return len;
+}
+IEEE80211_IF_FILE_R(aqm);
+
/* IBSS attributes */
static ssize_t ieee80211_if_fmt_tsf(
const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
@@ -618,6 +650,9 @@ static void add_common_files(struct ieee80211_sub_if_data *sdata)
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_2ghz);
DEBUGFS_ADD(rc_rateidx_vht_mcs_mask_5ghz);
DEBUGFS_ADD(hw_queues);
+
+ if (sdata->local->ops->wake_tx_queue)
+ DEBUGFS_ADD(aqm);
}
static void add_sta_files(struct ieee80211_sub_if_data *sdata)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index a39512f..634b41c 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -109,6 +109,48 @@ static ssize_t sta_last_seq_ctrl_read(struct file *file, char __user *userbuf,
}
STA_OPS(last_seq_ctrl);
+#define AQM_TXQ_ENTRY_LEN 130
+
+static ssize_t sta_aqm_read(struct file *file, char __user *userbuf,
+ size_t count, loff_t *ppos)
+{
+ struct sta_info *sta = file->private_data;
+ struct ieee80211_local *local = sta->local;
+ char buf[AQM_TXQ_ENTRY_LEN*(IEEE80211_NUM_TIDS+1)], *p = buf;
+ struct txq_info *txqi;
+ int i;
+
+ spin_lock_bh(&local->fq.lock);
+ rcu_read_lock();
+
+ p += scnprintf(p,
+ sizeof(buf)+buf-p,
+ "tid ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets\n");
+
+ for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
+ txqi = to_txq_info(sta->sta.txq[i]);
+ p += scnprintf(p, sizeof(buf)+buf-p,
+ "%d %d %u %u %u %u %u %u %u %u %u\n",
+ txqi->txq.tid,
+ txqi->txq.ac,
+ txqi->tin.backlog_bytes,
+ txqi->tin.backlog_packets,
+ txqi->tin.flows,
+ txqi->cstats.drop_count,
+ txqi->cstats.ecn_mark,
+ txqi->tin.overlimit,
+ txqi->tin.collisions,
+ txqi->tin.tx_bytes,
+ txqi->tin.tx_packets);
+ }
+
+ rcu_read_unlock();
+ spin_unlock_bh(&local->fq.lock);
+
+ return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+}
+STA_OPS(aqm);
+
static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
@@ -370,6 +412,9 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
DEBUGFS_ADD_COUNTER(rx_fragments, rx_stats.fragments);
DEBUGFS_ADD_COUNTER(tx_filtered, status_stats.filtered);
+ if (local->ops->wake_tx_queue)
+ DEBUGFS_ADD(aqm);
+
if (sizeof(sta->driver_buffered_tids) == sizeof(u32))
debugfs_create_x32("driver_buffered_tids", 0400,
sta->debugfs.dir,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c9f8c80..9f11b13 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -812,6 +812,7 @@ struct txq_info {
struct fq_tin tin;
struct fq_flow def_flow;
struct codel_vars def_cvars;
+ struct codel_stats cstats;
unsigned long flags;
/* keep last! */
@@ -1106,7 +1107,6 @@ struct ieee80211_local {
struct fq fq;
struct codel_vars *cvars;
struct codel_params cparams;
- struct codel_stats cstats;
const struct ieee80211_ops *ops;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 682011e..201167d 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1339,7 +1339,7 @@ static struct sk_buff *fq_tin_dequeue_func(struct fq *fq,
local = container_of(fq, struct ieee80211_local, fq);
txqi = container_of(tin, struct txq_info, tin);
cparams = &local->cparams;
- cstats = &local->cstats;
+ cstats = &txqi->cstats;
if (flow == &txqi->def_flow)
cvars = &txqi->def_cvars;
@@ -1399,6 +1399,7 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata,
fq_tin_init(&txqi->tin);
fq_flow_init(&txqi->def_flow);
codel_vars_init(&txqi->def_cvars);
+ codel_stats_init(&txqi->cstats);
txqi->txq.vif = &sdata->vif;
@@ -1437,7 +1438,6 @@ int ieee80211_txq_setup_flows(struct ieee80211_local *local)
return ret;
codel_params_init(&local->cparams);
- codel_stats_init(&local->cstats);
local->cparams.interval = MS2TIME(100);
local->cparams.target = MS2TIME(20);
local->cparams.ecn = true;
--
2.9.2
^ permalink raw reply related
* Re: [PATCH] Staging: rtl8723au: os_intfs: fixed case statement is variable issue
From: Jes Sorensen @ 2016-08-11 15:25 UTC (permalink / raw)
To: Bing Sun
Cc: Larry.Finger, gregkh, linux-wireless, devel, linux-kernel,
sunbing.linux
In-Reply-To: <1470924695-14931-1-git-send-email-sunbing@redflag-linux.com>
Bing Sun <sunbing@redflag-linux.com> writes:
> Fixed sparse parse error:
> Expected constant expression in case statement.
>
> Signed-off-by: Bing Sun <sunbing@redflag-linux.com>
> ---
> drivers/staging/rtl8723au/os_dep/os_intfs.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/os_dep/os_intfs.c b/drivers/staging/rtl8723au/os_dep/os_intfs.c
> index b8848c2..f30d5d2 100644
> --- a/drivers/staging/rtl8723au/os_dep/os_intfs.c
> +++ b/drivers/staging/rtl8723au/os_dep/os_intfs.c
> @@ -283,14 +283,13 @@ static u32 rtw_classify8021d(struct sk_buff *skb)
> */
> if (skb->priority >= 256 && skb->priority <= 263)
> return skb->priority - 256;
> - switch (skb->protocol) {
> - case htons(ETH_P_IP):
> +
> + if (skb->protocol == htons(ETH_P_IP)) {
> dscp = ip_hdr(skb)->tos & 0xfc;
> - break;
> - default:
> - return 0;
> + return dscp >> 5;
> }
> - return dscp >> 5;
> +
> + return 0;
> }
Pardon me here, but I find it really hard to see how this change is an
improvement over the old code in any shape or form.
Jes
^ permalink raw reply
* RE: [PATCH v5] cfg80211: Provision to allow the support for different beacon intervals
From: Undekari, Sunil Dutt @ 2016-08-11 15:34 UTC (permalink / raw)
To: Johannes Berg, Kushwaha, Purushottam
Cc: linux-wireless@vger.kernel.org, Malinen, Jouni,
Hullur Subramanyam, Amarnath, Kumar, Deepak (QCA)
In-Reply-To: <1470920916.12075.15.camel@sipsolutions.net>
PiBUaGlzIHNlZW1zIG9kZC4gU2hvdWxkbid0IGl0IHVzZSBjZmc4MDIxMV9pdGVyX2NvbWJpbmF0
aW9ucygpPw0KWWVzIC4gV2Ugc2hvdWxkIGhhdmUgcmV1c2VkIGNmZzgwMjExX2l0ZXJfY29tYmlu
YXRpb25zLiBUaGFua3MgYSBsb3QgZm9yIHlvdXIgc3VnZ2VzdGlvbi4gDQoNCj4gc2VlbXMgd2Ug
bW9zdGx5IG1vdmVkIHRoYXQgdG8gbWFjODAyMTEsIGJ1dCBmb3IgdGhpcyBjYXNlIGl0IHNob3Vs
ZCBwcm9iYWJseSBzdGF5IGluIGNmZzgwMjExPyBPciBzaG91bGQgaXQ/DQpUaGUgc2NvcGUgaGVy
ZSBpcyB0byBrbm93IHRoZSBhZHZlcnRpc2VkICJkaWZmX2JlYWNvbl9pbnRfZ2NkIiBmb3IgdGhl
IHJlc3BlY3RpdmUgbWF0Y2hpbmcgaW50ZXJmYWNlIGNvbWJpbmF0aW9uIGFuZCBmdXJ0aGVyIHZh
bGlkYXRlIGl0IHdpdGggdGhlIGNvbmZpZ3VyZWQgb25lLiANClRvIGFkZHJlc3MgdGhpcyAiIGNm
ZzgwMjExX3ZhbGlkYXRlX2JlYWNvbl9pbnQiIG5lZWRzIHRvIGdldCBlbmhhbmNlZCAsIGlzbid0
ID8NCg0KUmVnYXJkcywNClN1bmlsDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTog
Sm9oYW5uZXMgQmVyZyBbbWFpbHRvOmpvaGFubmVzQHNpcHNvbHV0aW9ucy5uZXRdIA0KU2VudDog
VGh1cnNkYXksIEF1Z3VzdCAxMSwgMjAxNiA2OjM5IFBNDQpUbzogS3VzaHdhaGEsIFB1cnVzaG90
dGFtIDxwa3VzaHdhaEBxdGkucXVhbGNvbW0uY29tPg0KQ2M6IGxpbnV4LXdpcmVsZXNzQHZnZXIu
a2VybmVsLm9yZzsgTWFsaW5lbiwgSm91bmkgPGpvdW5pQHFjYS5xdWFsY29tbS5jb20+OyBVbmRl
a2FyaSwgU3VuaWwgRHV0dCA8dXNkdXR0QHF0aS5xdWFsY29tbS5jb20+OyBIdWxsdXIgU3VicmFt
YW55YW0sIEFtYXJuYXRoIDxhbWFybmF0aEBxY2EucXVhbGNvbW0uY29tPjsgS3VtYXIsIERlZXBh
ayAoUUNBKSA8ZGppbmRhbEBxdGkucXVhbGNvbW0uY29tPg0KU3ViamVjdDogUmU6IFtQQVRDSCB2
NV0gY2ZnODAyMTE6IFByb3Zpc2lvbiB0byBhbGxvdyB0aGUgc3VwcG9ydCBmb3IgZGlmZmVyZW50
IGJlYWNvbiBpbnRlcnZhbHMNCg0KDQo+ICtzdGF0aWMgYm9vbCBkaWZmX2JlYWNvbl9pbnRlcnZh
bF9zdXBwb3J0ZWQoc3RydWN0IHdpcGh5ICp3aXBoeSwgdTE2DQo+IHR5cGVzLA0KPiArCQkJCQnC
oMKgwqB1MzIgYmVhY29uX2ludCkNCj4gK3sNCj4gKwljb25zdCBzdHJ1Y3QgaWVlZTgwMjExX2lm
YWNlX2NvbWJpbmF0aW9uICpjOw0KPiArCXUxNiBhbGxfdHlwZXM7DQo+ICsJaW50IGksIGo7DQo+
ICsNCj4gKwlmb3IgKGkgPSAwOyBpIDwgd2lwaHktPm5faWZhY2VfY29tYmluYXRpb25zOyBpKysp
IHsNCj4gKwkJYyA9ICZ3aXBoeS0+aWZhY2VfY29tYmluYXRpb25zW2ldOw0KPiArDQo+ICsJCWlm
ICghYy0+ZGlmZl9iZWFjb25faW50X2djZCB8fA0KPiArCQnCoMKgwqDCoChiZWFjb25faW50ICUg
Yy0+ZGlmZl9iZWFjb25faW50X2djZCkpDQo+ICsJCQljb250aW51ZTsNCj4gKw0KPiArCQlhbGxf
dHlwZXMgPSAwOw0KPiArCQlmb3IgKGogPSAwOyBqIDwgYy0+bl9saW1pdHM7IGorKykNCj4gKwkJ
CWFsbF90eXBlcyB8PSBjLT5saW1pdHNbal0udHlwZXM7DQo+ICsNCj4gKwkJaWYgKGFsbF90eXBl
cyAmIHR5cGVzKQ0KPiArCQkJcmV0dXJuIHRydWU7DQo+ICsJfQ0KPiArDQo+ICsJcmV0dXJuIGZh
bHNlOw0KPiArfQ0KDQpUaGlzIHNlZW1zIG9kZC4gU2hvdWxkbid0IGl0IHVzZcKgY2ZnODAyMTFf
aXRlcl9jb21iaW5hdGlvbnMoKT8gTWlnaHQgbmVlZCBzb21lIGFkZGl0aW9uYWwgaGVscGVyIHRv
IHVuZGVyc3RhbmQgd2hpY2ggaW50ZXJmYWNlIHR5cGVzIGFyZSB1c2VkIHJpZ2h0IG5vdyAtIHNl
ZW1zIHdlIG1vc3RseSBtb3ZlZCB0aGF0IHRvIG1hYzgwMjExLCBidXQgZm9yIHRoaXMgY2FzZSBp
dCBzaG91bGQgcHJvYmFibHkgc3RheSBpbiBjZmc4MDIxMT8gT3Igc2hvdWxkIGl0Pw0KDQpqb2hh
bm5lcw0K
^ permalink raw reply
* Re: [PATCH 1/2] ath9k: use ieee80211_tx_status_noskb where possible
From: Zefir Kurtisi @ 2016-08-11 16:05 UTC (permalink / raw)
To: Felix Fietkau, linux-wireless; +Cc: kvalo
In-Reply-To: <20160804214940.78476-1-nbd@nbd.name>
On 08/04/2016 11:49 PM, Felix Fietkau wrote:
> 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.
>
For me, this one introduces a regression to the statistics, e.g.
'dot11TransmittedFragmentCount' is now accounted differently since it is not
updated from within ieee80211_tx_status_noskb().
Cheers,
Zefir
^ permalink raw reply
* Re: [PATCH v3 0/3] Improve wireless netdev detection
From: Denis Kenzior @ 2016-08-11 16:31 UTC (permalink / raw)
To: Johannes Berg, linux-wireless
In-Reply-To: <1470919457.12075.5.camel@sipsolutions.net>
Hi Johannes,
>
> Applied. I squashed 1/2 since it's kinda pointless to have a patch
> introducing infrastructure that's not used.
>
> I also made some minor cleanups - please check (both that it's right,
> and for next time)
>
Your changes look fine to me. Thanks for taking these.
Regards,
-Denis
^ permalink raw reply
* Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
From: Denis Kenzior @ 2016-08-11 16:38 UTC (permalink / raw)
To: Johannes Berg, linux-wireless
In-Reply-To: <1470919643.12075.7.camel@sipsolutions.net>
Hi Johannes,
On 08/11/2016 07:47 AM, Johannes Berg wrote:
> On Wed, 2016-08-03 at 17:02 -0500, Denis Kenzior wrote:
>>
>> +static int nl80211_dump_interface_parse(struct sk_buff *skb,
>> + struct netlink_callback *cb,
>> + int *filter_wiphy)
>
> Wrong indentation :)
Sorry :)
Speaking of indentation, can you point me to a doc of the rules I should
follow?
>
>> static int nl80211_dump_interface(struct sk_buff *skb, struct
>> netlink_callback *cb)
>> {
>> int wp_idx = 0;
>> int if_idx = 0;
>> int wp_start = cb->args[0];
>> int if_start = cb->args[1];
>> + int filter_wiphy = cb->args[2];
>> struct cfg80211_registered_device *rdev;
>> struct wireless_dev *wdev;
>>
>> + if (!wp_start && !if_start && !filter_wiphy) {
>
> This seems incorrect - you're setting
>
>> + int ret;
>> +
>> + filter_wiphy = -1;
>> +
>> + ret = nl80211_dump_interface_parse(skb, cb,
>> &filter_wiphy);
>
> it here, but it can take the value 0, so !filter_wiphy seems wrong?
>
I can confirm that I sanity checked this patch. Both ATTR_WIPHY,
ATTR_WDEV and wildcard dumps seemed to produce expected results.
I noticed you applied this patch. Is there a particular scenario where
it goes wrong or did you convince yourself it is correct?
Regards,
-Denis
^ permalink raw reply
* Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
From: Johannes Berg @ 2016-08-11 18:03 UTC (permalink / raw)
To: Denis Kenzior, linux-wireless
In-Reply-To: <57ACA9E9.4020507@gmail.com>
On Thu, 2016-08-11 at 11:38 -0500, Denis Kenzior wrote:
> Hi Johannes,
>
> On 08/11/2016 07:47 AM, Johannes Berg wrote:
> >
> > On Wed, 2016-08-03 at 17:02 -0500, Denis Kenzior wrote:
> > >
> > >
> > > +static int nl80211_dump_interface_parse(struct sk_buff *skb,
> > > + struct netlink_callback *cb,
> > > + int *filter_wiphy)
> >
> > Wrong indentation :)
>
> Sorry :)
>
> Speaking of indentation, can you point me to a doc of the rules I
> should follow?
You've seen Documentation/CodingStyle?
> I can confirm that I sanity checked this patch. Both ATTR_WIPHY,
> ATTR_WDEV and wildcard dumps seemed to produce expected results.
I think it probably works due to the other conditions?
> I noticed you applied this patch. Is there a particular scenario
> where it goes wrong or did you convince yourself it is correct?
>
No, that was a mistake :( I've removed it now.
johannes
^ permalink raw reply
* Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
From: Denis Kenzior @ 2016-08-11 18:20 UTC (permalink / raw)
To: Johannes Berg, linux-wireless
In-Reply-To: <1470938627.12075.25.camel@sipsolutions.net>
Hi Johannes,
>> Speaking of indentation, can you point me to a doc of the rules I
>> should follow?
>
> You've seen Documentation/CodingStyle?
Of course. But that one doesn't discuss that you want your function
parameters to be aligned to the opening '('. Is there a dialect
document specific to linux-wireless?
>
>> I can confirm that I sanity checked this patch. Both ATTR_WIPHY,
>> ATTR_WDEV and wildcard dumps seemed to produce expected results.
>
> I think it probably works due to the other conditions?
The initial conditions are that:
cb->args[0..2] == 0.
So on the first iteration we set filter_wiphy == -1 and check the filter
attributes. If set, we modify filter_wiphy accordingly.
Even if filter_wiphy is set to 0, the if statement should still never be
entered afterwards since wp_start and if_start are incremented.
Is this what you're worried about? Do you see a fault in my logic?
Regards,
-Denis
^ permalink raw reply
* Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
From: Arend Van Spriel @ 2016-08-11 18:58 UTC (permalink / raw)
To: Denis Kenzior, Johannes Berg, linux-wireless
In-Reply-To: <57ACC1F8.6070908@gmail.com>
On 11-8-2016 20:20, Denis Kenzior wrote:
> Hi Johannes,
>
>>> Speaking of indentation, can you point me to a doc of the rules I
>>> should follow?
>>
>> You've seen Documentation/CodingStyle?
>
> Of course. But that one doesn't discuss that you want your function
> parameters to be aligned to the opening '('. Is there a dialect
> document specific to linux-wireless?
You can find it in checkpatch.pl [1] :-p
Regards,
Arend
[1] http://lxr.free-electrons.com/source/scripts/checkpatch.pl#L2855
^ permalink raw reply
* default dtim period
From: Reinoud Koornstra @ 2016-08-11 19:03 UTC (permalink / raw)
To: linux-wireless
Hi Everybody,
Maybe not the correct mailinglist to ask, but I'm going to give it a shot.
Any advises on the most preferred default dtim period?
2 or 3? Not every driver has the same defaults.
Same question about the listen interval.
0x0258 (600 beacon intervals) sounds decent?
Thanks,
Reinoud.
^ permalink raw reply
* Re: [RESEND PATCH] nl80211: Allow GET_INTERFACE dumps to be filtered
From: Denis Kenzior @ 2016-08-11 19:05 UTC (permalink / raw)
To: Arend Van Spriel, Johannes Berg, linux-wireless
In-Reply-To: <f2fe3568-0b83-9db4-278e-be0a1ad08ae8@broadcom.com>
Hi Arend,
>
> You can find it in checkpatch.pl [1] :-p
>
Aha! Will use that one next time. Thanks.
Regards,
-Denis
^ permalink raw reply
* Re: [PATCH 1/4] cfg80211: rdev-ops: remove callback check from rdev_set_coalesce()
From: Arend Van Spriel @ 2016-08-11 19:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1470919713.12075.8.camel@sipsolutions.net>
On 11-8-2016 14:48, Johannes Berg wrote:
> On Wed, 2016-08-10 at 12:33 +0200, Arend van Spriel wrote:
>> The wrapper rdev_set_coalesce() checks whether the driver provides
>> the set_coalesce callback and returns -ENOTSUPP if not. However, this
>> check is already performed in nl80211_set_coalesce() resulting in
>> -EOPNOTSUPP. This patch removes check from rdev wrapper function.
>
> What's the point though? Presumably the compiler will optimise it out,
> and it seems safer to have it this way? Same for all patches in this
> series.
I was in doubt to raise the question first about getting this stuff
consistent, ie. keep rdev-ops as flat as possible, but decided just to
put it out there in patch format. My bad :-)
If you want the rdev-ops to be safe against (future) callers not
checking the callback, it seems you should add a check in all rdev-ops
where the callback is optional.
Regards,
Arend
^ permalink raw reply
* Re: [PATCH 1/2] ath9k: use ieee80211_tx_status_noskb where possible
From: Felix Fietkau @ 2016-08-11 19:27 UTC (permalink / raw)
To: Zefir Kurtisi, linux-wireless; +Cc: kvalo
In-Reply-To: <8aeb7913-d955-d894-d82c-4614e17d3ee4@neratec.com>
On 2016-08-11 18:05, Zefir Kurtisi wrote:
> On 08/04/2016 11:49 PM, Felix Fietkau wrote:
>> 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.
>>
>
> For me, this one introduces a regression to the statistics, e.g.
> 'dot11TransmittedFragmentCount' is now accounted differently since it is not
> updated from within ieee80211_tx_status_noskb().
Is this important? I guess it would be possible to make this more
accurate by extending the API, but I wonder if that's worth doing just
for these debugfs counters.
- Felix
^ permalink raw reply
* [PATCH 00/16] net: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:05 UTC (permalink / raw)
To: linux-usb
Cc: Wolfram Sang, brcm80211-dev-list.pdl, linux-can, linux-wireless,
netdev
This per-subsystem series is part of a tree wide cleanup. usb_alloc_urb() uses
kmalloc which already prints enough information on failure. So, let's simply
remove those "allocation failed" messages from drivers like we did already for
other -ENOMEM cases. gkh acked this approach when we talked about it at LCJ in
Tokyo a few weeks ago.
Wolfram Sang (16):
net: can: usb: ems_usb: don't print error when allocating urb fails
net: can: usb: esd_usb2: don't print error when allocating urb fails
net: can: usb: gs_usb: don't print error when allocating urb fails
net: can: usb: kvaser_usb: don't print error when allocating urb fails
net: can: usb: peak_usb: pcan_usb_core: don't print error when
allocating urb fails
net: can: usb: usb_8dev: don't print error when allocating urb fails
net: usb: hso: don't print error when allocating urb fails
net: usb: lan78xx: don't print error when allocating urb fails
net: usb: usbnet: don't print error when allocating urb fails
net: wimax: i2400m: usb-notif: don't print error when allocating urb
fails
net: wireless: ath: ar5523: ar5523: don't print error when allocating
urb fails
net: wireless: broadcom: brcm80211: brcmfmac: usb: don't print error
when allocating urb fails
net: wireless: intersil: orinoco: orinoco_usb: don't print error when
allocating urb fails
net: wireless: marvell: libertas_tf: if_usb: don't print error when
allocating urb fails
net: wireless: marvell: mwifiex: usb: don't print error when
allocating urb fails
net: wireless: realtek: rtlwifi: usb: don't print error when
allocating urb fails
drivers/net/can/usb/ems_usb.c | 9 ++-------
drivers/net/can/usb/esd_usb2.c | 3 ---
drivers/net/can/usb/gs_usb.c | 9 ++-------
drivers/net/can/usb/kvaser_usb.c | 7 +------
drivers/net/can/usb/peak_usb/pcan_usb_core.c | 6 +-----
drivers/net/can/usb/usb_8dev.c | 5 +----
drivers/net/usb/hso.c | 20 +++++---------------
drivers/net/usb/lan78xx.c | 4 +---
drivers/net/usb/usbnet.c | 5 +----
drivers/net/wimax/i2400m/usb-notif.c | 1 -
drivers/net/wireless/ath/ar5523/ar5523.c | 9 ++-------
.../net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 8 ++------
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +---
drivers/net/wireless/marvell/libertas_tf/if_usb.c | 12 +++---------
drivers/net/wireless/marvell/mwifiex/usb.c | 19 ++++---------------
drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +-------
16 files changed, 27 insertions(+), 102 deletions(-)
--
2.8.1
^ permalink raw reply
* [PATCH 11/16] net: wireless: ath: ar5523: ar5523: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:05 UTC (permalink / raw)
To: linux-usb; +Cc: Wolfram Sang, Pontus Fuchs, Kalle Valo, linux-wireless, netdev
In-Reply-To: <1470949539-25392-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/ath/ar5523/ar5523.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ar5523/ar5523.c b/drivers/net/wireless/ath/ar5523/ar5523.c
index 8aded24bcdf49e..7a60d2e652dad6 100644
--- a/drivers/net/wireless/ath/ar5523/ar5523.c
+++ b/drivers/net/wireless/ath/ar5523/ar5523.c
@@ -706,10 +706,8 @@ static int ar5523_alloc_rx_bufs(struct ar5523 *ar)
data->ar = ar;
data->urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!data->urb) {
- ar5523_err(ar, "could not allocate rx data urb\n");
+ if (!data->urb)
goto err;
- }
list_add_tail(&data->list, &ar->rx_data_free);
atomic_inc(&ar->rx_data_free_cnt);
}
@@ -824,7 +822,6 @@ static void ar5523_tx_work_locked(struct ar5523 *ar)
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
- ar5523_err(ar, "Failed to allocate TX urb\n");
ieee80211_free_txskb(ar->hw, skb);
continue;
}
@@ -949,10 +946,8 @@ static int ar5523_alloc_tx_cmd(struct ar5523 *ar)
init_completion(&cmd->done);
cmd->urb_tx = usb_alloc_urb(0, GFP_KERNEL);
- if (!cmd->urb_tx) {
- ar5523_err(ar, "could not allocate urb\n");
+ if (!cmd->urb_tx)
return -ENOMEM;
- }
cmd->buf_tx = usb_alloc_coherent(ar->dev, AR5523_MAX_TXCMDSZ,
GFP_KERNEL,
&cmd->urb_tx->transfer_dma);
--
2.8.1
^ permalink raw reply related
* [PATCH 12/16] net: wireless: broadcom: brcm80211: brcmfmac: usb: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:05 UTC (permalink / raw)
To: linux-usb
Cc: Wolfram Sang, Arend van Spriel, Franky Lin, Hante Meuleman,
Kalle Valo, linux-wireless, brcm80211-dev-list.pdl, netdev
In-Reply-To: <1470949539-25392-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index 98b15a9a2779f4..fa26619a7945d9 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -1099,15 +1099,11 @@ struct brcmf_usbdev *brcmf_usb_attach(struct brcmf_usbdev_info *devinfo,
devinfo->tx_freecount = ntxq;
devinfo->ctl_urb = usb_alloc_urb(0, GFP_ATOMIC);
- if (!devinfo->ctl_urb) {
- brcmf_err("usb_alloc_urb (ctl) failed\n");
+ if (!devinfo->ctl_urb)
goto error;
- }
devinfo->bulk_urb = usb_alloc_urb(0, GFP_ATOMIC);
- if (!devinfo->bulk_urb) {
- brcmf_err("usb_alloc_urb (bulk) failed\n");
+ if (!devinfo->bulk_urb)
goto error;
- }
return &devinfo->bus_pub;
--
2.8.1
^ permalink raw reply related
* [PATCH 13/16] net: wireless: intersil: orinoco: orinoco_usb: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
To: linux-usb; +Cc: Wolfram Sang, Kalle Valo, linux-wireless, netdev, linux-kernel
In-Reply-To: <1470949539-25392-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/intersil/orinoco/orinoco_usb.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
index 56f109bc83945d..bca6935a94db9a 100644
--- a/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/intersil/orinoco/orinoco_usb.c
@@ -1613,10 +1613,8 @@ static int ezusb_probe(struct usb_interface *interface,
}
upriv->read_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!upriv->read_urb) {
- err("No free urbs available");
+ if (!upriv->read_urb)
goto error;
- }
if (le16_to_cpu(ep->wMaxPacketSize) != 64)
pr_warn("bulk in: wMaxPacketSize!= 64\n");
if (ep->bEndpointAddress != (2 | USB_DIR_IN))
--
2.8.1
^ permalink raw reply related
* [PATCH 14/16] net: wireless: marvell: libertas_tf: if_usb: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
To: linux-usb; +Cc: Wolfram Sang, Kalle Valo, linux-wireless, netdev, linux-kernel
In-Reply-To: <1470949988-25705-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/marvell/libertas_tf/if_usb.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/marvell/libertas_tf/if_usb.c b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
index 799a2efe579372..e0ade40d9497d7 100644
--- a/drivers/net/wireless/marvell/libertas_tf/if_usb.c
+++ b/drivers/net/wireless/marvell/libertas_tf/if_usb.c
@@ -198,22 +198,16 @@ static int if_usb_probe(struct usb_interface *intf,
}
cardp->rx_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!cardp->rx_urb) {
- lbtf_deb_usbd(&udev->dev, "Rx URB allocation failed\n");
+ if (!cardp->rx_urb)
goto dealloc;
- }
cardp->tx_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!cardp->tx_urb) {
- lbtf_deb_usbd(&udev->dev, "Tx URB allocation failed\n");
+ if (!cardp->tx_urb)
goto dealloc;
- }
cardp->cmd_urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!cardp->cmd_urb) {
- lbtf_deb_usbd(&udev->dev, "Cmd URB allocation failed\n");
+ if (!cardp->cmd_urb)
goto dealloc;
- }
cardp->ep_out_buf = kmalloc(MRVDRV_ETH_TX_PACKET_BUFFER_SIZE,
GFP_KERNEL);
--
2.8.1
^ permalink raw reply related
* [PATCH 15/16] net: wireless: marvell: mwifiex: usb: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
To: linux-usb
Cc: Wolfram Sang, Amitkumar Karwar, Nishant Sarmukadam, Kalle Valo,
linux-wireless, netdev, linux-kernel
In-Reply-To: <1470949988-25705-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/marvell/mwifiex/usb.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index 0857575c5c39fe..3bd04f52f36988 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -657,11 +657,8 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter)
card->tx_cmd.ep = card->tx_cmd_ep;
card->tx_cmd.urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!card->tx_cmd.urb) {
- mwifiex_dbg(adapter, ERROR,
- "tx_cmd.urb allocation failed\n");
+ if (!card->tx_cmd.urb)
return -ENOMEM;
- }
for (i = 0; i < MWIFIEX_TX_DATA_PORT; i++) {
port = &card->port[i];
@@ -677,11 +674,8 @@ static int mwifiex_usb_tx_init(struct mwifiex_adapter *adapter)
port->tx_data_list[j].ep = port->tx_data_ep;
port->tx_data_list[j].urb =
usb_alloc_urb(0, GFP_KERNEL);
- if (!port->tx_data_list[j].urb) {
- mwifiex_dbg(adapter, ERROR,
- "urb allocation failed\n");
+ if (!port->tx_data_list[j].urb)
return -ENOMEM;
- }
}
}
@@ -697,10 +691,8 @@ static int mwifiex_usb_rx_init(struct mwifiex_adapter *adapter)
card->rx_cmd.ep = card->rx_cmd_ep;
card->rx_cmd.urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!card->rx_cmd.urb) {
- mwifiex_dbg(adapter, ERROR, "rx_cmd.urb allocation failed\n");
+ if (!card->rx_cmd.urb)
return -ENOMEM;
- }
card->rx_cmd.skb = dev_alloc_skb(MWIFIEX_RX_CMD_BUF_SIZE);
if (!card->rx_cmd.skb)
@@ -714,11 +706,8 @@ static int mwifiex_usb_rx_init(struct mwifiex_adapter *adapter)
card->rx_data_list[i].ep = card->rx_data_ep;
card->rx_data_list[i].urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!card->rx_data_list[i].urb) {
- mwifiex_dbg(adapter, ERROR,
- "rx_data_list[] urb allocation failed\n");
+ if (!card->rx_data_list[i].urb)
return -1;
- }
if (mwifiex_usb_submit_rx_urb(&card->rx_data_list[i],
MWIFIEX_RX_DATA_BUF_SIZE))
return -1;
--
2.8.1
^ permalink raw reply related
* [PATCH 16/16] net: wireless: realtek: rtlwifi: usb: don't print error when allocating urb fails
From: Wolfram Sang @ 2016-08-11 21:13 UTC (permalink / raw)
To: linux-usb
Cc: Wolfram Sang, Larry Finger, Chaoming Li, Kalle Valo,
linux-wireless, netdev, linux-kernel
In-Reply-To: <1470949988-25705-1-git-send-email-wsa-dev@sang-engineering.com>
kmalloc will print enough information in case of failure.
Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
---
drivers/net/wireless/realtek/rtlwifi/usb.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 41617b7b082260..32aa5c1d070a07 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -739,11 +739,8 @@ static int _rtl_usb_receive(struct ieee80211_hw *hw)
for (i = 0; i < rtlusb->rx_urb_num; i++) {
err = -ENOMEM;
urb = usb_alloc_urb(0, GFP_KERNEL);
- if (!urb) {
- RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
- "Failed to alloc URB!!\n");
+ if (!urb)
goto err_out;
- }
err = _rtl_prep_rx_urb(hw, rtlusb, urb, GFP_KERNEL);
if (err < 0) {
@@ -907,15 +904,12 @@ static void _rtl_tx_complete(struct urb *urb)
static struct urb *_rtl_usb_tx_urb_setup(struct ieee80211_hw *hw,
struct sk_buff *skb, u32 ep_num)
{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
struct urb *_urb;
WARN_ON(NULL == skb);
_urb = usb_alloc_urb(0, GFP_ATOMIC);
if (!_urb) {
- RT_TRACE(rtlpriv, COMP_USB, DBG_EMERG,
- "Can't allocate URB for bulk out!\n");
kfree_skb(skb);
return NULL;
}
--
2.8.1
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).