* Re: [PATCH] nl80211: fix the setting of RSSI threshold value for mesh
From: Johannes Berg @ 2013-07-11 9:56 UTC (permalink / raw)
To: Chun-Yeow Yeoh; +Cc: linux-wireless, linville, devel, distro11s
In-Reply-To: <1373534615-17270-1-git-send-email-yeohchunyeow@gmail.com>
On Thu, 2013-07-11 at 17:23 +0800, Chun-Yeow Yeoh wrote:
> RSSI threshold value used for mesh peering should be in
> negative value. After range checks to mesh parameters is
> introduced, this is not allowed. Fix this.
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
> ---
> net/wireless/nl80211.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index a9444cd..e6164ab 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -4803,9 +4803,9 @@ do { \
> FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1,
> mask, NL80211_MESHCONF_FORWARDING,
> nla_get_u8);
> - FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255,
> - mask, NL80211_MESHCONF_RSSI_THRESHOLD,
> - nla_get_u32);
> + FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold,
> + 0x80000000, 0xFFFFFFFF, mask,
> + NL80211_MESHCONF_RSSI_THRESHOLD, nla_get_u32);
Maybe use nla_get_s32() instead?
johannes
^ permalink raw reply
* [PATCH v2] nl80211: fix the setting of RSSI threshold value for mesh
From: Chun-Yeow Yeoh @ 2013-07-11 10:24 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes, linville, devel, distro11s, Chun-Yeow Yeoh
RSSI threshold value used for mesh peering should be in
negative value. After range checks to mesh parameters is
introduced, this is not allowed. Fix this.
Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com>
---
v2:
use nla_get_s32 instead (Johannes)
net/wireless/nl80211.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index a9444cd..0fc6e3a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -4803,9 +4803,9 @@ do { \
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshForwarding, 0, 1,
mask, NL80211_MESHCONF_FORWARDING,
nla_get_u8);
- FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, 1, 255,
+ FILL_IN_MESH_PARAM_IF_SET(tb, cfg, rssi_threshold, -255, 0,
mask, NL80211_MESHCONF_RSSI_THRESHOLD,
- nla_get_u32);
+ nla_get_s32);
FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, 0, 16,
mask, NL80211_MESHCONF_HT_OPMODE,
nla_get_u16);
--
1.7.0.4
^ permalink raw reply related
* Re: [PATCH v2] nl80211: fix the setting of RSSI threshold value for mesh
From: Johannes Berg @ 2013-07-11 10:59 UTC (permalink / raw)
To: Chun-Yeow Yeoh; +Cc: linux-wireless, linville, devel, distro11s
In-Reply-To: <1373538243-17628-1-git-send-email-yeohchunyeow@gmail.com>
On Thu, 2013-07-11 at 18:24 +0800, Chun-Yeow Yeoh wrote:
> RSSI threshold value used for mesh peering should be in
> negative value. After range checks to mesh parameters is
> introduced, this is not allowed. Fix this.
Applied.
johannes
^ permalink raw reply
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: José Miguel Gonçalves @ 2013-07-11 12:08 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <1373488063.8385.31.camel@cumari.coelho.fi>
Hi Luca,
On 10-07-2013 21:27, Luciano Coelho wrote:
> I have a text console only system. I could put tcpdump on my system, but I think I
> can not monitor wireless traffic with it, or can I?
> tcpdump will probably not be enough. But since this stuff is *wireless*
> you can sniff from a different PC. If you have Linux PC, just plug in
> your TP-Link dongle in it, launch wireshark and you should be able to
> sniff (unencrypted) connections between other devices easily.
>
I've setup my Linuc PC as a sniffer and yes I see a lot of of authentication
frames on the air when I try to associate with my open AP (Android phone).
I've repeated the process with a TP-Link dongle and I see a clean 802.11
association sequence.
What I found strange is that I don't see "probe request" frames on the wl12xx
captured frames, it starts directly with an "authentication" frame, when with the
TP-Link dongle (ath9k_htc driver) the first frame sent by is a "probe request"!
I can provide the Wirehsark capture files. What is the best way to send them
through the mailing list?
Best regards,
José Gonçalves
^ permalink raw reply
* Re: [PATCH 05/50] USB: misc: uss720: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 12:15 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel
In-Reply-To: <1373533573-12272-6-git-send-email-ming.lei@canonical.com>
Hello.
On 11-07-2013 13:05, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/usb/misc/uss720.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
> index e129cf6..f7d15e8 100644
> --- a/drivers/usb/misc/uss720.c
> +++ b/drivers/usb/misc/uss720.c
> @@ -121,6 +121,7 @@ static void async_complete(struct urb *urb)
> dev_err(&urb->dev->dev, "async_complete: urb error %d\n",
> status);
> } else if (rq->dr.bRequest == 3) {
> + unsigned long flags;
Empty line wouldn't hurt here, after declaration.
> memcpy(priv->reg, rq->reg, sizeof(priv->reg));
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 08/50] USB: legousbtower: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 12:18 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Juergen Stuber
In-Reply-To: <1373533573-12272-9-git-send-email-ming.lei@canonical.com>
Hello.
On 11-07-2013 13:05, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
> Cc: Juergen Stuber <starblue@users.sourceforge.net>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/usb/misc/legousbtower.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
> index 8089479..4044989 100644
> --- a/drivers/usb/misc/legousbtower.c
> +++ b/drivers/usb/misc/legousbtower.c
> @@ -771,6 +771,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
> struct lego_usb_tower *dev = urb->context;
> int status = urb->status;
> int retval;
> + unsigned long flags;
>
> dbg(4, "%s: enter, status %d", __func__, status);
>
> @@ -788,7 +789,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
> }
>
> if (urb->actual_length > 0) {
> - spin_lock (&dev->read_buffer_lock);
> + spin_lock_irqsave (&dev->read_buffer_lock, flags);
> if (dev->read_buffer_length + urb->actual_length < read_buffer_size) {
> memcpy (dev->read_buffer + dev->read_buffer_length,
> dev->interrupt_in_buffer,
> @@ -799,7 +800,7 @@ static void tower_interrupt_in_callback (struct urb *urb)
> } else {
> printk(KERN_WARNING "%s: read_buffer overflow, %d bytes dropped", __func__, urb->actual_length);
> }
> - spin_unlock (&dev->read_buffer_lock);
> + spin_unlock_irqrestore (&dev->read_buffer_lock, flags);
> }
I don't think this patch passes checkpatch.pl.
WBR, Sergei
^ permalink raw reply
* [PATCH 1/3] iw: dump station rx bit rate information
From: Felix Fietkau @ 2013-07-11 12:20 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
iw.h | 2 +-
link.c | 2 +-
station.c | 12 ++++++++++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/iw.h b/iw.h
index 8816e88..854d356 100644
--- a/iw.h
+++ b/iw.h
@@ -170,7 +170,7 @@ enum print_ie_type {
void print_ies(unsigned char *ie, int ielen, bool unknown,
enum print_ie_type ptype);
-void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
+void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen);
DECLARE_SECTION(set);
DECLARE_SECTION(get);
diff --git a/link.c b/link.c
index b8acd5c..f7818f5 100644
--- a/link.c
+++ b/link.c
@@ -165,7 +165,7 @@ static int print_link_sta(struct nl_msg *msg, void *arg)
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
char buf[100];
- parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
+ parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
printf("\ttx bitrate: %s\n", buf);
}
diff --git a/station.c b/station.c
index dde552f..5a161eb 100644
--- a/station.c
+++ b/station.c
@@ -43,7 +43,7 @@ static void print_power_mode(struct nlattr *a)
}
}
-void parse_tx_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
+void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
{
int rate = 0;
char *pos = buf;
@@ -107,6 +107,7 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
[NL80211_STA_INFO_SIGNAL] = { .type = NLA_U8 },
[NL80211_STA_INFO_T_OFFSET] = { .type = NLA_U64 },
[NL80211_STA_INFO_TX_BITRATE] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_RX_BITRATE] = { .type = NLA_NESTED },
[NL80211_STA_INFO_LLID] = { .type = NLA_U16 },
[NL80211_STA_INFO_PLID] = { .type = NLA_U16 },
[NL80211_STA_INFO_PLINK_STATE] = { .type = NLA_U8 },
@@ -177,10 +178,17 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
if (sinfo[NL80211_STA_INFO_TX_BITRATE]) {
char buf[100];
- parse_tx_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
+ parse_bitrate(sinfo[NL80211_STA_INFO_TX_BITRATE], buf, sizeof(buf));
printf("\n\ttx bitrate:\t%s", buf);
}
+ if (sinfo[NL80211_STA_INFO_RX_BITRATE]) {
+ char buf[100];
+
+ parse_bitrate(sinfo[NL80211_STA_INFO_RX_BITRATE], buf, sizeof(buf));
+ printf("\n\trx bitrate:\t%s", buf);
+ }
+
if (sinfo[NL80211_STA_INFO_LLID])
printf("\n\tmesh llid:\t%d",
nla_get_u16(sinfo[NL80211_STA_INFO_LLID]));
--
1.8.0.2
^ permalink raw reply related
* [PATCH 3/3] iw: add the active monitor flag
From: Felix Fietkau @ 2013-07-11 12:20 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes
In-Reply-To: <1373545239-78697-1-git-send-email-nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
interface.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/interface.c b/interface.c
index b52c8dd..f769752 100644
--- a/interface.c
+++ b/interface.c
@@ -16,7 +16,8 @@
"fcsfail: show frames with FCS errors\n"\
"control: show control frames\n"\
"otherbss: show frames from other BSSes\n"\
- "cook: use cooked mode"
+ "cook: use cooked mode\n"\
+ "active: use active mode (ACK incoming unicast packets)"
SECTION(interface);
@@ -27,6 +28,7 @@ static char *mntr_flags[NL80211_MNTR_FLAG_MAX + 1] = {
"control",
"otherbss",
"cook",
+ "active",
};
static int parse_mntr_flags(int *_argc, char ***_argv,
--
1.8.0.2
^ permalink raw reply related
* [PATCH 2/3] iw: dump station per-chain signal strength information
From: Felix Fietkau @ 2013-07-11 12:20 UTC (permalink / raw)
To: linux-wireless; +Cc: johannes
In-Reply-To: <1373545239-78697-1-git-send-email-nbd@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
station.c | 45 +++++++++++++++++++++++++++++++++++++++++----
1 file changed, 41 insertions(+), 4 deletions(-)
diff --git a/station.c b/station.c
index 5a161eb..07acdbc 100644
--- a/station.c
+++ b/station.c
@@ -91,6 +91,33 @@ void parse_bitrate(struct nlattr *bitrate_attr, char *buf, int buflen)
" VHT-NSS %d", nla_get_u8(rinfo[NL80211_RATE_INFO_VHT_NSS]));
}
+static char *get_chain_signal(struct nlattr *attr_list)
+{
+ struct nlattr *attr;
+ static char buf[64];
+ char *cur = buf;
+ int i = 0, rem;
+ const char *prefix;
+
+ if (!attr_list)
+ return "";
+
+ nla_for_each_nested(attr, attr_list, rem) {
+ if (i++ > 0)
+ prefix = ", ";
+ else
+ prefix = "[";
+
+ cur += snprintf(cur, sizeof(buf) - (cur - buf), "%s%d", prefix,
+ (int8_t) nla_get_u8(attr));
+ }
+
+ if (i)
+ snprintf(cur, sizeof(buf) - (cur - buf), "] ");
+
+ return buf;
+}
+
static int print_sta_handler(struct nl_msg *msg, void *arg)
{
struct nlattr *tb[NL80211_ATTR_MAX + 1];
@@ -118,7 +145,10 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
[NL80211_STA_INFO_LOCAL_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_PEER_PM] = { .type = NLA_U32},
[NL80211_STA_INFO_NONPEER_PM] = { .type = NLA_U32},
+ [NL80211_STA_INFO_CHAIN_SIGNAL] = { .type = NLA_NESTED },
+ [NL80211_STA_INFO_CHAIN_SIGNAL_AVG] = { .type = NLA_NESTED },
};
+ char *chain;
nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0),
genlmsg_attrlen(gnlh, 0), NULL);
@@ -165,12 +195,19 @@ static int print_sta_handler(struct nl_msg *msg, void *arg)
if (sinfo[NL80211_STA_INFO_TX_FAILED])
printf("\n\ttx failed:\t%u",
nla_get_u32(sinfo[NL80211_STA_INFO_TX_FAILED]));
+
+ chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL]);
if (sinfo[NL80211_STA_INFO_SIGNAL])
- printf("\n\tsignal: \t%d dBm",
- (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]));
+ printf("\n\tsignal: \t%d %sdBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]),
+ chain);
+
+ chain = get_chain_signal(sinfo[NL80211_STA_INFO_CHAIN_SIGNAL_AVG]);
if (sinfo[NL80211_STA_INFO_SIGNAL_AVG])
- printf("\n\tsignal avg:\t%d dBm",
- (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]));
+ printf("\n\tsignal avg:\t%d %sdBm",
+ (int8_t)nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL_AVG]),
+ chain);
+
if (sinfo[NL80211_STA_INFO_T_OFFSET])
printf("\n\tToffset:\t%lld us",
(unsigned long long)nla_get_u64(sinfo[NL80211_STA_INFO_T_OFFSET]));
--
1.8.0.2
^ permalink raw reply related
* Re: [PATCH 1/3] iw: dump station rx bit rate information
From: Johannes Berg @ 2013-07-11 12:27 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless
In-Reply-To: <1373545239-78697-1-git-send-email-nbd@openwrt.org>
Applied all, thanks.
johannes
^ permalink raw reply
* Re: [PATCH 08/50] USB: legousbtower: spin_lock in complete() cleanup
From: Oliver Neukum @ 2013-07-11 12:36 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Ming Lei, Greg Kroah-Hartman, linux-usb, Alan Stern, linux-input,
linux-bluetooth, netdev, linux-wireless, linux-media, alsa-devel,
Juergen Stuber
In-Reply-To: <51DEA289.5050509@cogentembedded.com>
On Thursday 11 July 2013 16:18:17 Sergei Shtylyov wrote:
> I don't think this patch passes checkpatch.pl.
This series is a mechanical replacement in dozens of drivers.
We cannot demand nice formatting. If you want to do something
productive, check the locking in the driver.
Regards
Oliver
^ permalink raw reply
* Re: [PATCH 36/50] media: usb: em28xx: spin_lock in complete() cleanup
From: Devin Heitmueller @ 2013-07-11 12:42 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Mauro Carvalho Chehab
In-Reply-To: <1373533573-12272-37-git-send-email-ming.lei@canonical.com>
On Thu, Jul 11, 2013 at 5:05 AM, Ming Lei <ming.lei@canonical.com> wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/media/usb/em28xx/em28xx-core.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
> index fc157af..0d698f9 100644
> --- a/drivers/media/usb/em28xx/em28xx-core.c
> +++ b/drivers/media/usb/em28xx/em28xx-core.c
> @@ -941,6 +941,7 @@ static void em28xx_irq_callback(struct urb *urb)
> {
> struct em28xx *dev = urb->context;
> int i;
> + unsigned long flags;
>
> switch (urb->status) {
> case 0: /* success */
> @@ -956,9 +957,9 @@ static void em28xx_irq_callback(struct urb *urb)
> }
>
> /* Copy data from URB */
> - spin_lock(&dev->slock);
> + spin_lock_irqsave(&dev->slock, flags);
> dev->usb_ctl.urb_data_copy(dev, urb);
> - spin_unlock(&dev->slock);
> + spin_unlock_irqrestore(&dev->slock, flags);
>
> /* Reset urb buffers */
> for (i = 0; i < urb->number_of_packets; i++) {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
I actually stumbled across this a couple of weeks ago, and have had an
identical patch running in a local dev tree.
Reviewed-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Tested-by: Devin Heitmueller <dheitmueller@kernellabs.com>
--
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com
^ permalink raw reply
* Re: [PATCH 08/50] USB: legousbtower: spin_lock in complete() cleanup
From: Ming Lei @ 2013-07-11 12:42 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Juergen Stuber
In-Reply-To: <51DEA289.5050509@cogentembedded.com>
On Thu, Jul 11, 2013 at 8:18 PM, Sergei Shtylyov
<sergei.shtylyov@cogentembedded.com> wrote:
> Hello.
>
>
> On 11-07-2013 13:05, Ming Lei wrote:
>
>> Complete() will be run with interrupt enabled, so change to
>> spin_lock_irqsave().
>
>
>> Cc: Juergen Stuber <starblue@users.sourceforge.net>
>> Signed-off-by: Ming Lei <ming.lei@canonical.com>
>> ---
>> drivers/usb/misc/legousbtower.c | 5 +++--
>> 1 file changed, 3 insertions(+), 2 deletions(-)
>
>
>> diff --git a/drivers/usb/misc/legousbtower.c
>> b/drivers/usb/misc/legousbtower.c
>> index 8089479..4044989 100644
>> --- a/drivers/usb/misc/legousbtower.c
>> +++ b/drivers/usb/misc/legousbtower.c
>> @@ -771,6 +771,7 @@ static void tower_interrupt_in_callback (struct urb
>> *urb)
>> struct lego_usb_tower *dev = urb->context;
>> int status = urb->status;
>> int retval;
>> + unsigned long flags;
>>
>> dbg(4, "%s: enter, status %d", __func__, status);
>>
>> @@ -788,7 +789,7 @@ static void tower_interrupt_in_callback (struct urb
>> *urb)
>> }
>>
>> if (urb->actual_length > 0) {
>> - spin_lock (&dev->read_buffer_lock);
>> + spin_lock_irqsave (&dev->read_buffer_lock, flags);
>> if (dev->read_buffer_length + urb->actual_length <
>> read_buffer_size) {
>> memcpy (dev->read_buffer +
>> dev->read_buffer_length,
>> dev->interrupt_in_buffer,
>> @@ -799,7 +800,7 @@ static void tower_interrupt_in_callback (struct urb
>> *urb)
>> } else {
>> printk(KERN_WARNING "%s: read_buffer overflow, %d
>> bytes dropped", __func__, urb->actual_length);
>> }
>> - spin_unlock (&dev->read_buffer_lock);
>> + spin_unlock_irqrestore (&dev->read_buffer_lock, flags);
>> }
>
>
> I don't think this patch passes checkpatch.pl.
No errors reported from checkpatch.pl, only warnings which isn't introduced
by this patch.
Thanks,
--
Ming Lei
^ permalink raw reply
* Re: [PATCH 17/50] USB: serial: sierra: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:02 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Johan Hovold
In-Reply-To: <1373533573-12272-18-git-send-email-ming.lei@canonical.com>
Hello.
On 11-07-2013 13:05, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
> Cc: Johan Hovold <jhovold@gmail.com>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/usb/serial/sierra.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
> diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
> index de958c5..e79b6ad 100644
> --- a/drivers/usb/serial/sierra.c
> +++ b/drivers/usb/serial/sierra.c
> @@ -433,6 +433,7 @@ static void sierra_outdat_callback(struct urb *urb)
> struct sierra_port_private *portdata = usb_get_serial_port_data(port);
> struct sierra_intf_private *intfdata;
> int status = urb->status;
> + unsigned long flags;
>
> intfdata = port->serial->private;
>
> @@ -443,12 +444,12 @@ static void sierra_outdat_callback(struct urb *urb)
> dev_dbg(&port->dev, "%s - nonzero write bulk status "
> "received: %d\n", __func__, status);
>
> - spin_lock(&portdata->lock);
> + spin_lock_irqsave(&portdata->lock, flags);
> --portdata->outstanding_urbs;
> - spin_unlock(&portdata->lock);
> - spin_lock(&intfdata->susp_lock);
> + spin_unlock_irqrestore(&portdata->lock, flags);
> + spin_lock_irqsave(&intfdata->susp_lock, flags);
You are allowing an interrupt enabled window where previously it
wasn't possible. Why notleave these 2 lines as is?
> --intfdata->in_flight;
> - spin_unlock(&intfdata->susp_lock);
> + spin_unlock_irqrestore(&intfdata->susp_lock, flags);
>
> usb_serial_port_softint(port);
> }
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 45/50] sound: usb: usx2y: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:08 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Jaroslav Kysela, Takashi Iwai
In-Reply-To: <1373533573-12272-46-git-send-email-ming.lei@canonical.com>
On 11-07-2013 13:06, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
Changelog doesn't match the patch.
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> sound/usb/usx2y/usbusx2yaudio.c | 4 ++++
> 1 file changed, 4 insertions(+)
> diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
> index 4967fe9..e2ee893 100644
> --- a/sound/usb/usx2y/usbusx2yaudio.c
> +++ b/sound/usb/usx2y/usbusx2yaudio.c
> @@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y)
> struct snd_usX2Y_substream *subs = usX2Y->subs[s];
> if (subs) {
> if (atomic_read(&subs->state) >= state_PRERUNNING) {
> + unsigned long flags;
> +
> + local_irq_save(flags);
> snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN);
> + local_irq_restore(flags);
> }
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 46/50] Sound: usb: ua101: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:10 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Clemens Ladisch, Jaroslav Kysela, Takashi Iwai
In-Reply-To: <1373533573-12272-47-git-send-email-ming.lei@canonical.com>
On 11-07-2013 13:06, Ming Lei wrote:
Here the subject doesn't match the patch.
> Complete() will be run with interrupt enabled, so disable local
> interrupt before holding a global lock which is held without irqsave.
> Cc: Clemens Ladisch <clemens@ladisch.de>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> sound/usb/misc/ua101.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
> diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
> index 8b5d2c5..52a60c6 100644
> --- a/sound/usb/misc/ua101.c
> +++ b/sound/usb/misc/ua101.c
> @@ -613,14 +613,24 @@ static int start_usb_playback(struct ua101 *ua)
>
> static void abort_alsa_capture(struct ua101 *ua)
> {
> - if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states))
> + if (test_bit(ALSA_CAPTURE_RUNNING, &ua->states)) {
> + unsigned long flags;
> +
> + local_irq_save(flags);
> snd_pcm_stop(ua->capture.substream, SNDRV_PCM_STATE_XRUN);
> + local_irq_restore(flags);
> + }
> }
>
> static void abort_alsa_playback(struct ua101 *ua)
> {
> - if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states))
> + if (test_bit(ALSA_PLAYBACK_RUNNING, &ua->states)) {
> + unsigned long flags;
> +
> + local_irq_save(flags);
> snd_pcm_stop(ua->playback.substream, SNDRV_PCM_STATE_XRUN);
> + local_irq_restore(flags);
> + }
> }
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 44/50] sound: usb: caiaq: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:12 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Daniel Mack, Jaroslav Kysela, Takashi Iwai
In-Reply-To: <1373533573-12272-45-git-send-email-ming.lei@canonical.com>
On 11-07-2013 13:06, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> sound/usb/caiaq/audio.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
> index 7103b09..e5675ab 100644
> --- a/sound/usb/caiaq/audio.c
> +++ b/sound/usb/caiaq/audio.c
> @@ -672,10 +672,11 @@ static void read_completed(struct urb *urb)
> offset += len;
>
> if (len > 0) {
> - spin_lock(&cdev->spinlock);
> + unsigned long flags;
Emoty line wouldn't hurt here, after declaration.
> + spin_lock_irqsave(&cdev->spinlock, flags);
> fill_out_urb(cdev, out, &out->iso_frame_desc[outframe]);
> read_in_urb(cdev, urb, &urb->iso_frame_desc[frame]);
> - spin_unlock(&cdev->spinlock);
> + spin_unlock_irqrestore(&cdev->spinlock, flags);
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 42/50] media: usb: tlg2300: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:13 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Mauro Carvalho Chehab
In-Reply-To: <1373533573-12272-43-git-send-email-ming.lei@canonical.com>
On 11-07-2013 13:06, Ming Lei wrote:
Subject doesn't match the patch.
> Complete() will be run with interrupt enabled, so disable local
> interrupt before holding a global lock which is held without
> irqsave.
>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/media/usb/tlg2300/pd-alsa.c | 3 +++
> 1 file changed, 3 insertions(+)
> diff --git a/drivers/media/usb/tlg2300/pd-alsa.c b/drivers/media/usb/tlg2300/pd-alsa.c
> index 3f3e141..cbccc96 100644
> --- a/drivers/media/usb/tlg2300/pd-alsa.c
> +++ b/drivers/media/usb/tlg2300/pd-alsa.c
[...]
> @@ -156,6 +157,7 @@ static inline void handle_audio_data(struct urb *urb, int *period_elapsed)
> memcpy(runtime->dma_area + oldptr * stride, cp, len * stride);
>
> /* update the statas */
> + local_irq_save(flags);
> snd_pcm_stream_lock(pa->capture_pcm_substream);
> pa->rcv_position += len;
> if (pa->rcv_position >= runtime->buffer_size)
> @@ -167,6 +169,7 @@ static inline void handle_audio_data(struct urb *urb, int *period_elapsed)
> *period_elapsed = 1;
> }
> snd_pcm_stream_unlock(pa->capture_pcm_substream);
> + local_irq_restore(flags);
> }
WBR, Sergei
^ permalink raw reply
* [PATCH] ath5k: fix extra set bit in multicast mask
From: Bob Copeland @ 2013-07-11 13:19 UTC (permalink / raw)
To: linux-wireless, linville; +Cc: ath5k-devel, mickflemm
Bit 32 was always set which looks to have been accidental,
according to git history.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
Just found this while reading old code -- I could maybe see
bit 0 being special, but bit 32 seemed odd. Then looked
back through the history and looks like it was accidentally
added when prepare_multicast() was introduced; prior both
were initialized to 0.
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 06f86f4..f5f1bc7 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -325,7 +325,7 @@ ath5k_prepare_multicast(struct ieee80211_hw *hw,
struct netdev_hw_addr *ha;
mfilt[0] = 0;
- mfilt[1] = 1;
+ mfilt[1] = 0;
netdev_hw_addr_list_for_each(ha, mc_list) {
/* calculate XOR of eight 6-bit values */
--
1.7.10.4
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply related
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: Luciano Coelho @ 2013-07-11 13:29 UTC (permalink / raw)
To: José Miguel Gonçalves; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <51DEA05A.5020401@inov.pt>
On Thu, 2013-07-11 at 13:08 +0100, José Miguel Gonçalves wrote:
> Hi Luca,
>
> On 10-07-2013 21:27, Luciano Coelho wrote:
> > I have a text console only system. I could put tcpdump on my system, but I think I
> > can not monitor wireless traffic with it, or can I?
> > tcpdump will probably not be enough. But since this stuff is *wireless*
> > you can sniff from a different PC. If you have Linux PC, just plug in
> > your TP-Link dongle in it, launch wireshark and you should be able to
> > sniff (unencrypted) connections between other devices easily.
> >
>
> I've setup my Linuc PC as a sniffer and yes I see a lot of of authentication
> frames on the air when I try to associate with my open AP (Android phone).
>
> I've repeated the process with a TP-Link dongle and I see a clean 802.11
> association sequence.
>
> What I found strange is that I don't see "probe request" frames on the wl12xx
> captured frames, it starts directly with an "authentication" frame, when with the
> TP-Link dongle (ath9k_htc driver) the first frame sent by is a "probe request"!
Usually the connection will start with a probe request, but if there is
a response in the cache, we may skip it. In any case, this is probably
happening because your sniffer is missing those frames (which again
points to problems with RF).
> I can provide the Wirehsark capture files. What is the best way to send them
> through the mailing list?
Cut only the portion that matters, so the file is small and gzip it.
Small files can be sent as attachments to the list.
--
Luca.
^ permalink raw reply
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: José Miguel Gonçalves @ 2013-07-11 13:33 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <1373549359.8385.36.camel@cumari.coelho.fi>
[-- Attachment #1: Type: text/plain, Size: 1152 bytes --]
On 11-07-2013 14:29, Luciano Coelho wrote:
> On Thu, 2013-07-11 at 13:08 +0100, José Miguel Gonçalves wrote:
>>
>> I've setup my Linuc PC as a sniffer and yes I see a lot of of authentication
>> frames on the air when I try to associate with my open AP (Android phone).
>>
>> I've repeated the process with a TP-Link dongle and I see a clean 802.11
>> association sequence.
>>
>> What I found strange is that I don't see "probe request" frames on the wl12xx
>> captured frames, it starts directly with an "authentication" frame, when with the
>> TP-Link dongle (ath9k_htc driver) the first frame sent by is a "probe request"!
> Usually the connection will start with a probe request, but if there is
> a response in the cache, we may skip it. In any case, this is probably
> happening because your sniffer is missing those frames (which again
> points to problems with RF).
>
>
>> I can provide the Wirehsark capture files. What is the best way to send them
>> through the mailing list?
> Cut only the portion that matters, so the file is small and gzip it.
> Small files can be sent as attachments to the list.
>
Here they go...
José Gonçalves
[-- Attachment #2: ath9k_htc.pcap.gz --]
[-- Type: application/x-gzip, Size: 417 bytes --]
[-- Attachment #3: wl12xx.pcap.gz --]
[-- Type: application/x-gzip, Size: 2298 bytes --]
^ permalink raw reply
* Re: [PATCH 08/50] USB: legousbtower: spin_lock in complete() cleanup
From: Sergei Shtylyov @ 2013-07-11 13:47 UTC (permalink / raw)
To: Oliver Neukum
Cc: Ming Lei, Greg Kroah-Hartman, linux-usb, Alan Stern, linux-input,
linux-bluetooth, netdev, linux-wireless, linux-media, alsa-devel,
Juergen Stuber
In-Reply-To: <3187374.nPY1jDDWKm@linux-5eaq.site>
Hello.
On 11-07-2013 16:36, Oliver Neukum wrote:
>> I don't think this patch passes checkpatch.pl.
> This series is a mechanical replacement in dozens of drivers.
That mechanicity shows too much in some patches.
> We cannot demand nice formatting. If you want to do something
> productive, check the locking in the driver.
I'm not paid for it and don't have time to do it for free.
> Regards
> Oliver
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 45/50] sound: usb: usx2y: spin_lock in complete() cleanup
From: Takashi Iwai @ 2013-07-11 13:50 UTC (permalink / raw)
To: Sergei Shtylyov
Cc: Ming Lei, Greg Kroah-Hartman, linux-usb, Oliver Neukum,
Alan Stern, linux-input, linux-bluetooth, netdev, linux-wireless,
linux-media, alsa-devel, Jaroslav Kysela
In-Reply-To: <51DEAE4E.90204@cogentembedded.com>
At Thu, 11 Jul 2013 17:08:30 +0400,
Sergei Shtylyov wrote:
>
> On 11-07-2013 13:06, Ming Lei wrote:
>
> > Complete() will be run with interrupt enabled, so change to
> > spin_lock_irqsave().
>
> Changelog doesn't match the patch.
Yep, but moreover...
> > Cc: Jaroslav Kysela <perex@perex.cz>
> > Cc: Takashi Iwai <tiwai@suse.de>
> > Cc: alsa-devel@alsa-project.org
> > Signed-off-by: Ming Lei <ming.lei@canonical.com>
> > ---
> > sound/usb/usx2y/usbusx2yaudio.c | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> > diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c
> > index 4967fe9..e2ee893 100644
> > --- a/sound/usb/usx2y/usbusx2yaudio.c
> > +++ b/sound/usb/usx2y/usbusx2yaudio.c
> > @@ -273,7 +273,11 @@ static void usX2Y_clients_stop(struct usX2Ydev *usX2Y)
> > struct snd_usX2Y_substream *subs = usX2Y->subs[s];
> > if (subs) {
> > if (atomic_read(&subs->state) >= state_PRERUNNING) {
> > + unsigned long flags;
> > +
> > + local_irq_save(flags);
> > snd_pcm_stop(subs->pcm_substream, SNDRV_PCM_STATE_XRUN);
> > + local_irq_restore(flags);
> > }
... actually this snd_pcm_stop() call should have been covered by
snd_pcm_stream_lock(). Maybe it'd be enough to have a single patch
together with the change, i.e. wrapping with
snd_pcm_stream_lock_irqsave().
I'll prepare the patch for 3.11 independently from your patch series,
so please drop this one.
BTW, the word "cleanup" in the subject is inappropriate. This is
rather a fix together with the core change.
And, I wonder whether we can take a safer approach. When the caller
condition changed, we often introduced either a different ops
(e.g. ioctl case) or a flag for the new condition, at least during the
transition period.
Last but not least, is a conversion to tasklet really preferred?
tasklet is rather an obsoleted infrastructure nowadays, and people
don't recommend to use it any longer, AFAIK.
thanks,
Takashi
^ permalink raw reply
* Re: wl127x: Unable to associate with a WPA2-PSK AP
From: Luciano Coelho @ 2013-07-11 13:59 UTC (permalink / raw)
To: José Miguel Gonçalves; +Cc: Arik Nemtsov, linux-wireless
In-Reply-To: <51DEB436.9000300@inov.pt>
On Thu, 2013-07-11 at 14:33 +0100, José Miguel Gonçalves wrote:
> On 11-07-2013 14:29, Luciano Coelho wrote:
> > On Thu, 2013-07-11 at 13:08 +0100, José Miguel Gonçalves wrote:
> >>
> >> I've setup my Linuc PC as a sniffer and yes I see a lot of of authentication
> >> frames on the air when I try to associate with my open AP (Android phone).
> >>
> >> I've repeated the process with a TP-Link dongle and I see a clean 802.11
> >> association sequence.
> >>
> >> What I found strange is that I don't see "probe request" frames on the wl12xx
> >> captured frames, it starts directly with an "authentication" frame, when with the
> >> TP-Link dongle (ath9k_htc driver) the first frame sent by is a "probe request"!
> > Usually the connection will start with a probe request, but if there is
> > a response in the cache, we may skip it. In any case, this is probably
> > happening because your sniffer is missing those frames (which again
> > points to problems with RF).
> >
> >
> >> I can provide the Wirehsark capture files. What is the best way to send them
> >> through the mailing list?
> > Cut only the portion that matters, so the file is small and gzip it.
> > Small files can be sent as attachments to the list.
> >
>
> Here they go...
It seems that the wl1273 is not receiving the frames correctly. What
happens in the first 3 frames is all normal, but we keep retransmitting
the auth frame as if the AP hadn't sent us an ACK.
1. wl1273 sends auth to the AP
2. the AP acks the frame
3. the AP sends an auth back to us
4. we should send an ACK and continue, but instead we retransmit
And from then on everything is screwed up.
You could try to use the calibrator's RX statistics commands to see if
you're getting lots of bad frames and such.
This could be a problem in the firmware, but my hunch is that it's RF.
What kind of antenna are you using?
BTW, you should set a proper MAC address in your NVS too (calibrator's
set_mac command). You could first try to set it to 00:00:00:00:00:00,
which will check if the chip has a MAC in the Fuse ROM and use it from
there. If that doesn't work, create your own and set it in the NVS.
The TP-Link log is "too clean", missing some frames, we don't see most
of the ACKs and we don't see the auth frame being sent back from the AP.
--
Luca.
^ permalink raw reply
* Re: [PATCH 44/50] sound: usb: caiaq: spin_lock in complete() cleanup
From: Daniel Mack @ 2013-07-11 14:06 UTC (permalink / raw)
To: Ming Lei
Cc: Greg Kroah-Hartman, linux-usb, Oliver Neukum, Alan Stern,
linux-input, linux-bluetooth, netdev, linux-wireless, linux-media,
alsa-devel, Jaroslav Kysela, Takashi Iwai
In-Reply-To: <1373533573-12272-45-git-send-email-ming.lei@canonical.com>
On 11.07.2013 11:06, Ming Lei wrote:
> Complete() will be run with interrupt enabled, so change to
> spin_lock_irqsave().
>
> Cc: Daniel Mack <zonque@gmail.com>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
Sound right to me, thanks.
Acked-by: Daniel Mack <zonque@gmail.com>
> ---
> sound/usb/caiaq/audio.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/sound/usb/caiaq/audio.c b/sound/usb/caiaq/audio.c
> index 7103b09..e5675ab 100644
> --- a/sound/usb/caiaq/audio.c
> +++ b/sound/usb/caiaq/audio.c
> @@ -672,10 +672,11 @@ static void read_completed(struct urb *urb)
> offset += len;
>
> if (len > 0) {
> - spin_lock(&cdev->spinlock);
> + unsigned long flags;
> + spin_lock_irqsave(&cdev->spinlock, flags);
> fill_out_urb(cdev, out, &out->iso_frame_desc[outframe]);
> read_in_urb(cdev, urb, &urb->iso_frame_desc[frame]);
> - spin_unlock(&cdev->spinlock);
> + spin_unlock_irqrestore(&cdev->spinlock, flags);
> check_for_elapsed_periods(cdev, cdev->sub_playback);
> check_for_elapsed_periods(cdev, cdev->sub_capture);
> send_it = 1;
>
^ permalink raw reply
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