Re: Rate limiting AP bandwidth change messages in ieee80211_config_bw?

2015-09-30 Thread Johannes Berg
On Wed, 2015-09-30 at 13:02 -0400, Josh Boyer wrote:
> Hi Johannes,
> 
> We've seen a handful of reports that seem to have verbose output from
> the ieee80211_config_bw function in net/mac80211/mlme.c.  It looks
> similar to this:
> 
> [   66.578652] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
> is 2437 MHz, width 2 (2447/0 MHz)
> [   68.522437] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
> is 2437 MHz, width 1 (2437/0 MHz)

> Essentially, this looks like the AP is changing the bandwidth (and
> only the width) every second or so.  Why it is doing this, I'm not
> sure.  However, this doesn't seem to actually be an error case yet the
> kernel logs are getting spammed with this message.
> 
> I'm wondering if we could either change this message to use sdata_dbg
> instead of sdata_info, or if we could possibly ratelimit it somehow.
> I'd be happy to come up with a patch for either, but I wanted to get
> your feedback on it before I started.  Do you have any objections or
> preference?
> 

I'm not sure ratelimiting it would even work - it's not *that* high
frequency? Not really sure though.

I think we can do either, it's not such a terribly important message as
far as I can tell.

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


Re: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Ben Greear

On 09/30/2015 10:14 AM, Johannes Berg wrote:

On Wed, 2015-09-30 at 08:44 -0700, Ben Greear wrote:


Any idea how this could be done in the stack instead of the driver?


I don't see why it should be?


The problem is that this is a receiver-side issue, so even if I manage
to hack the ath10k firmware or driver rx logic, it would not fix any other
IBSS peer connected to ath10k peer.



You mean it's a transmitter-side issue? In that case you should
probably simply disable aggregation on the broken transmitter ...


Yes, it is a transmitter side problem, and A-MSDU on IBSS
is disabled by default in all ath10k firmware versions that I am aware of.

I was hoping there might be a way to allow A-MSDU + IBSS + ath10k
to work in future kernels without applying out-of-tree
kernel hacks.  This would let people with appropriate firmware
enable IBSS + A-MSDU for added performance in cases where they
knew the peer could support the needed work-around.

I don't think it is worth a lot of effort, but if it were relatively
simple to fix, then maybe it is worth it.

Thanks,
Ben

--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com

--
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: Low latency communication over wifi

2015-09-30 Thread Johannes Berg
On Wed, 2015-09-30 at 19:24 +0200, Pavel Machek wrote:
> On Mon 2015-09-28 09:41:43, Johannes Berg wrote:
> > On Sat, 2015-09-26 at 12:24 +0200, Pavel Machek wrote:
> > > 
> > > That would be equivalent to ping -Q, right? It does not seem to have
> > > any effect :-(. I'd expect at least local machine to use shorter waits
> > > for medium, and thus drop packets instead of waiting.
> > 
> > Correct. But it won't *drop* packets, it just increases the chances of
> > getting medium access.
> 
> Increases chances of medium access, but limits number of retries, so
> it should drop sooner, no?

No, assigning VO AC by itself won't (typically) limit the number of
retries.

> This should send the second  ping to the priority queue based on -Q,
> but I don't see an effect against one access point and it seems to
> work somehow against second one. Good!
> 
Well it depends on whether or not your AP supports WMM/QoS to start
with :)

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


Re: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Ben Greear

On 09/30/2015 11:30 AM, Johannes Berg wrote:

On Wed, 2015-09-30 at 10:20 -0700, Ben Greear wrote:


Yes, it is a transmitter side problem, and A-MSDU on IBSS
is disabled by default in all ath10k firmware versions that I am aware of.


Right.


I was hoping there might be a way to allow A-MSDU + IBSS + ath10k
to work in future kernels without applying out-of-tree
kernel hacks.  This would let people with appropriate firmware
enable IBSS + A-MSDU for added performance in cases where they
knew the peer could support the needed work-around.

I don't think it is worth a lot of effort, but if it were relatively
simple to fix, then maybe it is worth it.



Had it been a receiver-side issue, then it'd seem reasonable to work
around it. But it being a transmitter-side issue it doesn't really seem
so - *every* possible peer would have to be adjusted, and some might
not even be able to get adjusted (e.g. devices that have A-MSDU
deaggregation in hardware/firmware) ...

So to do that properly you'd have to advertise some sort of quirk
vendor IE, and all that, which seems excessive given the limited use.


I was figuring the main users of this would be people rolling out
IBSS mesh networks and such, and they might have good knowledge of exactly
what peers will be used.

It is a small enough hack to the stack to just ignore the BSSID for
adhoc, and since CT firmware related patches are not accepted upstream
anyway, I guess anyone doing this is likely running custom patches
already.

Thanks,
Ben


--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com

--
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: Low latency communication over wifi

2015-09-30 Thread Bastian Bittorf
* Pavel Machek  [30.09.2015 19:27]:
> This should send the second  ping to the priority queue based on -Q,
> but I don't see an effect against one access point and it seems to
> work somehow against second one. Good!

you still need to hack/tune minstrel, because a lot of magic is
happen there including rts/cts on/off switching. a starting point is
e.g. this:
https://github.com/steinwurf/openwrt-patches/blob/master/openwrt-r41097/mac80211/910-minstrel-retry-limit.patch

bye, bastian
--
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


No more posts about ath10k CT firmware for a while.

2015-09-30 Thread Ben Greear

I've been asked to not post any ath10k CT firmware related info
to these lists.  Not clear exactly what all I'm requested not to post
at this time, but until I get this resolved one way or another,
I at least won't post any firmware release notes.

For those that still want to be notified somehow, for now,
try adding me to your circle on google+.  I am gree...@gmail.com
there.  I will post ath10k CT firmware/kernel-patch release notes
and such there (as well as on my normal ath10k related web page),
and blessedly few cat pictures.

Thanks,
Ben

--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com

--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Johannes Berg
On Wed, 2015-09-30 at 08:44 -0700, Ben Greear wrote:
> 
> Any idea how this could be done in the stack instead of the driver?

I don't see why it should be?

> The problem is that this is a receiver-side issue, so even if I manage
> to hack the ath10k firmware or driver rx logic, it would not fix any other
> IBSS peer connected to ath10k peer.
> 

You mean it's a transmitter-side issue? In that case you should
probably simply disable aggregation on the broken transmitter ...

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


Re: Low latency communication over wifi

2015-09-30 Thread Pavel Machek
On Mon 2015-09-28 09:41:43, Johannes Berg wrote:
> On Sat, 2015-09-26 at 12:24 +0200, Pavel Machek wrote:
> > 
> > That would be equivalent to ping -Q, right? It does not seem to have
> > any effect :-(. I'd expect at least local machine to use shorter waits
> > for medium, and thus drop packets instead of waiting.
> 
> Correct. But it won't *drop* packets, it just increases the chances of
> getting medium access.

Increases chances of medium access, but limits number of retries, so
it should drop sooner, no?

> > > # you have to add some magic for matching your data
> > > e.g. $IPT -t mangle -I OUTPUT -j DSCP --set-dscp-class CS7
> > 
> > Again, this is ping -Q equivalent, right? I was doing
> 
> Yes.
> 
> > ping -c 300 -i .2 -Q $[56*4] -s 500 amd
> > 300 packets transmitted, 300 received, 0% packet loss, time 60989ms
> > rtt min/avg/max/mdev = 2.155/8.599/44.475/5.677 ms
> > 300 packets transmitted, 300 received, +1 duplicates, 0% packet loss, time 
> > 61030ms
> > rtt min/avg/max/mdev = 2.158/23.809/300.956/49.969 ms, pipe 2
> > 
> > I would expect packet loss, but got long delays instead.
> 
> See above :)
> 
> > > also you should consider force the ACK-timing to 450m / Class1
> > > and forbid retransmission in minstrel
> > 
> > Yes, disabling retransmission would be useful. How would I do that?
> > 
> It won't work on Intel devices though since they don't use
> minstrel(_ht)

I'm using ath5k for testing... that should use minstrel AFAICT.

02:02.0 Ethernet controller: Qualcomm Atheros AR5211 Wireless Network
Adapter [AR5001X 802.11ab] (rev 01)

I'm now trying:

# Background load
sudo ping -f amd -s 8000
# Test
ping -c 30 -i .2 -Q $[0*4] -s 500 amd
ping -c 30 -i .2 -Q $[40*4] -s 500 amd
ping -c 30 -i .2 -Q $[56*4] -s 500 amd

This should send the second  ping to the priority queue based on -Q,
but I don't see an effect against one access point and it seems to
work somehow against second one. Good!

avg/maximum latency goes from 8/24 (-Q $[40*4]) to 80/258 (same
settings, every second frame is slow?!) to 8/26 to 7/32 to 6/18. But
this jumps to 92/123, 95/139, 91/128 and 135/678 with (-Q 0). -Q
$[56*4] produces 6/10, 8/23, 6/14, 5/9, 5/14. Good.

Thanks!

Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) 
http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Felix Fietkau
On 2015-09-30 20:34, Ben Greear wrote:
> On 09/30/2015 11:30 AM, Johannes Berg wrote:
>> On Wed, 2015-09-30 at 10:20 -0700, Ben Greear wrote:
>>>
>>> Yes, it is a transmitter side problem, and A-MSDU on IBSS
>>> is disabled by default in all ath10k firmware versions that I am aware of.
>>
>> Right.
>>
>>> I was hoping there might be a way to allow A-MSDU + IBSS + ath10k
>>> to work in future kernels without applying out-of-tree
>>> kernel hacks.  This would let people with appropriate firmware
>>> enable IBSS + A-MSDU for added performance in cases where they
>>> knew the peer could support the needed work-around.
>>>
>>> I don't think it is worth a lot of effort, but if it were relatively
>>> simple to fix, then maybe it is worth it.
>>>
>>
>> Had it been a receiver-side issue, then it'd seem reasonable to work
>> around it. But it being a transmitter-side issue it doesn't really seem
>> so - *every* possible peer would have to be adjusted, and some might
>> not even be able to get adjusted (e.g. devices that have A-MSDU
>> deaggregation in hardware/firmware) ...
>>
>> So to do that properly you'd have to advertise some sort of quirk
>> vendor IE, and all that, which seems excessive given the limited use.
> 
> I was figuring the main users of this would be people rolling out
> IBSS mesh networks and such, and they might have good knowledge of exactly
> what peers will be used.
> 
> It is a small enough hack to the stack to just ignore the BSSID for
> adhoc, and since CT firmware related patches are not accepted upstream
> anyway, I guess anyone doing this is likely running custom patches
> already.
I think instead of making a bunch of assumptions about who is going to
use this for what, you should just leave A-MSDU disabled for IBSS.

If you present this as a way to improve performance, users will probably
mindlessly enable it without trying to understand why it wasn't enabled
by default. Afterwards, they will create annoying and hard-to-debug bug
reports for you and other people to waste time on.

- Felix
--
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: Rate limiting AP bandwidth change messages in ieee80211_config_bw?

2015-09-30 Thread Johannes Berg

> 
> I'm not sure ratelimiting it would even work - it's not *that* high
> frequency? Not really sure though.
> 
> I think we can do either, it's not such a terribly important message as
> far as I can tell.
> 

Seems like Emmanuel would like to see the message stay in some form -
perhaps we should try rate limiting it then? Could you check if that
actually works?

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


Re: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Johannes Berg
On Wed, 2015-09-30 at 10:20 -0700, Ben Greear wrote:
> 
> Yes, it is a transmitter side problem, and A-MSDU on IBSS
> is disabled by default in all ath10k firmware versions that I am aware of.

Right.

> I was hoping there might be a way to allow A-MSDU + IBSS + ath10k
> to work in future kernels without applying out-of-tree
> kernel hacks.  This would let people with appropriate firmware
> enable IBSS + A-MSDU for added performance in cases where they
> knew the peer could support the needed work-around.
> 
> I don't think it is worth a lot of effort, but if it were relatively
> simple to fix, then maybe it is worth it.
> 

Had it been a receiver-side issue, then it'd seem reasonable to work
around it. But it being a transmitter-side issue it doesn't really seem
so - *every* possible peer would have to be adjusted, and some might
not even be able to get adjusted (e.g. devices that have A-MSDU
deaggregation in hardware/firmware) ...

So to do that properly you'd have to advertise some sort of quirk
vendor IE, and all that, which seems excessive given the limited use.

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


Re: No more posts about ath10k CT firmware for a while.

2015-09-30 Thread Bastian Bittorf
* Ben Greear  [30.09.2015 21:08]:
> I've been asked to not post any ath10k CT firmware related info

this makes me sad, because it is related.
whoever asked you, can she/he stand up and explain?

bye, bastian
--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Nicolas Cavallari
On 26/09/2015 01:00, Ben Greear wrote:
> It seems that ath10k ar988X hardware has a bug where the BSSID
> for IBSS AMSDU frames is all zeros.  The 'main' 636 ath10k firmware
> does not seem to use AMSDUs for IBSS, and when I enable it in my CT
> firmware, then I see the breakage.  So, I suspect it is not
> just a simple software/firmware bug.
> 
> If I simply ignore the bssid_match check in ieee80211_accept_frame,
> then it seems everything runs fine.
> 
> So, I'm curious if anyone knows what sorts of bad things could happen
> if the bssid_match check is ignored?  Maybe bcast/mcast frames could
> be accepted when they shouldn't be in certain cases?

Given that all it takes for an IBSS station to be added as a neighbor
is to see a frame from an unknown station with the same BSSID
(ieee80211_ibss_rx_no_sta(), just 10 lines below), your ath10k chip
will consider all stations for neighboring IBSS to be part of this BSS.

If RSN is used, or any other protocol/program that watches the list of
neighbors, then your station will try to communicate with them.  Good
(those who don't ignore bssid checks) neighbors will normally drop the
frames. But if you deploy several machines ignoring the bssid check,
then they cannot run two concurrent IBSS networks.

Also, if there is a limit on how much stations the ath10k hardware can
handle, then that limit have a higher chance of being reached.
--
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] staging: wilc1000: fix build error for openrisc-allmodconfig

2015-09-30 Thread Chaehyun Lim
The kbuild test robot reports the following build error for
openrisc-allmodconfig.

>> drivers/staging/wilc1000/wilc_sdio.c:584:2: error: implicit
>> declaration of function 'memset'

The error occurs due to missing a standard header file as
 so that three .c files are included it.

Signed-off-by: Chaehyun Lim 
---
 drivers/staging/wilc1000/wilc_sdio.c | 1 +
 drivers/staging/wilc1000/wilc_spi.c  | 1 +
 drivers/staging/wilc1000/wilc_wlan_cfg.c | 1 +
 3 files changed, 3 insertions(+)

diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
b/drivers/staging/wilc1000/wilc_sdio.c
index 6da65e8..6e28ca0 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -7,6 +7,7 @@
 /*  */
 /* 
 */
 
+#include 
 #include "wilc_wlan_if.h"
 #include "wilc_wlan.h"
 
diff --git a/drivers/staging/wilc1000/wilc_spi.c 
b/drivers/staging/wilc1000/wilc_spi.c
index f762770..0e06fc2 100644
--- a/drivers/staging/wilc1000/wilc_spi.c
+++ b/drivers/staging/wilc1000/wilc_spi.c
@@ -7,6 +7,7 @@
 /*  */
 /* 
 */
 
+#include 
 #include "wilc_wlan_if.h"
 #include "wilc_wlan.h"
 
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c 
b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index 73a1508..d761a37 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -7,6 +7,7 @@
 /*  */
 /* / */
 
+#include 
 #include "wilc_wlan_if.h"
 #include "wilc_wlan.h"
 #include "wilc_wlan_cfg.h"
-- 
2.6.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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Johannes Berg
On Fri, 2015-09-25 at 16:00 -0700, Ben Greear wrote:
> It seems that ath10k ar988X hardware has a bug where the BSSID
> for IBSS AMSDU frames is all zeros.  The 'main' 636 ath10k firmware
> does not seem to use AMSDUs for IBSS, and when I enable it in my CT
> firmware, then I see the breakage.  So, I suspect it is not
> just a simple software/firmware bug.
> 
> If I simply ignore the bssid_match check in ieee80211_accept_frame,
> then it seems everything runs fine.
> 
> So, I'm curious if anyone knows what sorts of bad things could happen
> if the bssid_match check is ignored?  Maybe bcast/mcast frames could
> be accepted when they shouldn't be in certain cases?
> 

You could end up accepting multicast frames from a different,
overlapping, BSS? Seems like a bad idea.

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


Re: Linux Firmware Signing

2015-09-30 Thread Luis R. Rodriguez
On Thu, Sep 03, 2015 at 02:14:18PM -0700, Kees Cook wrote:
> [removed bounced email addresses]
> 
> On Wed, Sep 2, 2015 at 2:37 PM, Luis R. Rodriguez  wrote:
> > On Wed, Sep 02, 2015 at 01:54:43PM -0700, Kees Cook wrote:
> >> On Wed, Sep 2, 2015 at 11:46 AM, Luis R. Rodriguez  wrote:
> >> > On Tue, Sep 01, 2015 at 11:35:05PM -0400, Mimi Zohar wrote:
> >> >> > OK great, I think that instead of passing the actual routine name we 
> >> >> > should
> >> >> > instead pass an enum type for to the LSM, that'd be easier to parse 
> >> >> > and we'd
> >> >> > then have each case well documented. Each LSM then could add its own
> >> >> > documetnation for this and can switch on it. If we went with a name 
> >> >> > we'd have
> >> >> > to to use something like __func__ and then parse that, its not clear 
> >> >> > if we need
> >> >> > to get that specific.
> >> >>
> >> >> Agreed.  IMA already defines an enumeration.
> >> >>
> >> >> /* IMA policy related functions */
> >> >> enum ima_hooks { FILE_CHECK = 1, MMAP_CHECK, BPRM_CHECK, MODULE_CHECK,
> >> >>  FIRMWARE_CHECK, POLICY_CHECK, POST_SETATTR };
> >> >>
> >> >
> >> > We want something that is not only useful for IMA but any other LSM,
> >> > and FILE_CHECK seems very broad, not sure what BPRM_CHECK is even upon
> >> > inspecting kernel code. Likewise for POST_SETATTR. POLICY_CHECK might
> >> > be broad, perhaps its best we define then a generic set of enums to
> >> > which IMA can map them to then and let it decide. This would ensure
> >> > that the kernel defines each use caes for file inspection carefully,
> >> > documents and defines them and if an LSM wants to bunch a set together
> >> > it can do so easily with a switch statement to map set of generic
> >> > file checks in kernel to a group it already handles.
> >> >
> >> > For instance at least in the short term we'd try to unify:
> >> >
> >> > security_kernel_fw_from_file()
> >> > security_kernel_module_from_file()
> >> >
> >> > to perhaps:
> >> >
> >> > security_kernel_from_file()
> >> >
> >> > As far, as far as I can tell, the only ones we'd be ready to start
> >> > grouping immediately or with small amount of work rather soon:
> >> >
> >> > /**
> >> >  *
> >> >  * enum security_filecheck - known kernel security file checks types
> >> >  *
> >> >  * @__SECURITY_FILECHECK_UNSPEC: attribute 0 reserved
> >> >  * @SECURITY_FILECHECK_MODULE: the file being processed is a Linux 
> >> > kernel module
> >> >  * @SECURITY_FILECHECK_SYSDATA: the file being processed is either a 
> >> > firmware
> >> >  *  file or a system data file read from /lib/firmware/* by 
> >> > firmware_class
> >>
> >> I'd prefer a distinct category for firmware, as it carries an
> >> implication that it is an executable blob of some sort (I know not all
> >> are, though).
> >
> > The ship has sailed in terms of folks using frimrware API for things
> > that are not-firmware per se. The first one I am aware of was the
> > EEPROM override for the p54 driver. The other similar one was CPU
> > microcode, but that's a bit more close to home with "firmware". We
> > could ask users on the new system data request API I am building
> > to describe the type of file being used, as I agree differentiating
> > this for security purposes might be important. So other than just
> > file type we could have sub type category, then we could have,
> >
> > SECURITY_FILECHECK_SYSDATA, and then:
> 
> I object to executable code being called data. :)
> 
> > SECURITY_FILE_SYSDATA_FW
> > SECURITY_FILE_SYSDATA_MICROCODE
> > SECURITY_FILE_SYSDATA_EEPROM
> > SECURITY_FILE_SYSDATA_POLICY (for 802.11 regulatory I suppose)
> 
> The exception to the firmware loading is data, so the primary name
> should be firmware. Regardless, if we want distinct objects, just name
> them:
> 
> SECURITY_FILE_FIRMWARE
> SECURITY_FILE_SYSDATA
> 
> Do we need finer-grain sub types?

These two work for me.

 Luis
--
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 20/32] staging: wilc1000: rename strHostIfStaInactiveT

2015-09-30 Thread Tony Cho
This patch renames strHostIfStaInactiveT to mac_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index de64bd2..5a54608 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -382,7 +382,7 @@ union message_body {
struct del_sta del_sta_info;
struct add_sta_param edit_sta_info;
struct power_mgmt_param pwr_mgmt_info;
-   struct sta_inactive_t strHostIfStaInactiveT;
+   struct sta_inactive_t mac_info;
struct set_ip_addr strHostIfSetIP;
struct drv_handler strHostIfSetDrvHandler;
struct set_multicast strHostIfSetMulti;
@@ -4139,7 +4139,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_GET_INACTIVETIME:
-   Handle_Get_InActiveTime(msg.drvHandler, 
);
+   Handle_Get_InActiveTime(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_SCAN_TIMER_FIRED:
@@ -5533,7 +5533,7 @@ s32 host_int_get_inactive_time(tstrWILC_WFIDrv *hWFIDrv, 
const u8 *mac, u32 *pu3
memset(, 0, sizeof(struct host_if_msg));
 
 
-   memcpy(msg.body.strHostIfStaInactiveT.mac,
+   memcpy(msg.body.mac_info.mac,
mac, ETH_ALEN);
 
msg.id = HOST_IF_MSG_GET_INACTIVETIME;
-- 
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


[PATCH 16/32] staging: wilc1000: rename strDelStaParam

2015-09-30 Thread Tony Cho
This patch renames strDelStaParam to del_sta_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d9d0b2d..94559bd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -393,7 +393,7 @@ union message_body {
struct channel_attr channel_info;
struct beacon_attr beacon_info;
struct add_sta_param add_sta_info;
-   struct del_sta strDelStaParam;
+   struct del_sta del_sta_info;
struct add_sta_param strEditStaParam;
struct timer_cb strTimerCb;
struct power_mgmt_param strPowerMgmtparam;
@@ -4146,7 +4146,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_DEL_STATION:
-   Handle_DelStation(msg.drvHandler, 
);
+   Handle_DelStation(msg.drvHandler, 
_sta_info);
break;
 
case HOST_IF_MSG_EDIT_STATION:
@@ -6700,7 +6700,7 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const 
u8 *pu8MacAddr)
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct del_sta *pstrDelStationMsg = 
+   struct del_sta *pstrDelStationMsg = _sta_info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
-- 
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


[PATCH 15/32] staging: wilc1000: rename strAddStaParam

2015-09-30 Thread Tony Cho
This patch renames strAddStaParam to add_sta_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 7e53aa9..d9d0b2d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -392,7 +392,7 @@ union message_body {
struct cfg_param_attr cfg_info;
struct channel_attr channel_info;
struct beacon_attr beacon_info;
-   struct add_sta_param strAddStaParam;
+   struct add_sta_param add_sta_info;
struct del_sta strDelStaParam;
struct add_sta_param strEditStaParam;
struct timer_cb strTimerCb;
@@ -4142,7 +4142,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_ADD_STATION:
-   Handle_AddStation(msg.drvHandler, 
);
+   Handle_AddStation(msg.drvHandler, 
_sta_info);
break;
 
case HOST_IF_MSG_DEL_STATION:
@@ -6651,7 +6651,7 @@ s32 host_int_add_station(tstrWILC_WFIDrv *hWFIDrv,
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct add_sta_param *pstrAddStationMsg = 
+   struct add_sta_param *pstrAddStationMsg = _sta_info;
 
 
if (pstrWFIDrv == NULL) {
@@ -6802,7 +6802,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv,
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct add_sta_param *pstrAddStationMsg = 
+   struct add_sta_param *pstrAddStationMsg = _sta_info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
-- 
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


[PATCH 13/32] staging: wilc1000: rename struct set_beacon

2015-09-30 Thread Tony Cho
This patch renames struct set_beacon to beacon_attr to keep the naming
convention as scan_attr, connect_attr and channel_attr.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 686402a9..2f211f9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -248,7 +248,7 @@ struct channel_attr {
  * } tstrScanComplete;*/
 
 /*!
- *  @struct set_beacon
+ *  @struct beacon_attr
  *  @brief Set Beacon  message body
  *  @details
  *  @todo
@@ -257,7 +257,7 @@ struct channel_attr {
  *  @date  10 July 2012
  *  @version   1.0
  */
-struct set_beacon {
+struct beacon_attr {
u32 u32Interval;/*!< Beacon Interval. Period 
between two successive beacons on air  */
u32 u32DTIMPeriod;  /*!< DTIM Period. Indicates how many 
Beacon frames

*  (including the current frame) appear 
before the next DTIM*/
@@ -391,7 +391,7 @@ union message_body {
struct key_attr key_info;
struct cfg_param_attr cfg_info;
struct channel_attr channel_info;
-   struct set_beacon strHostIFSetBeacon;
+   struct beacon_attr strHostIFSetBeacon;
struct add_sta_param strAddStaParam;
struct del_sta strDelStaParam;
struct add_sta_param strEditStaParam;
@@ -3158,14 +3158,14 @@ static s32 Handle_Get_InActiveTime(tstrWILC_WFIDrv 
*drvHandler,
 /**
  *  @brief Handle_AddBeacon
  *  @details   Sending config packet to add beacon
- *  @param[in]struct set_beacon *pstrSetBeaconParam
+ *  @param[in]struct beacon_attr *pstrSetBeaconParam
  *  @return NONE
  *  @author
  *  @date
  *  @version   1.0
  */
 static void Handle_AddBeacon(tstrWILC_WFIDrv *drvHandler,
-struct set_beacon *pstrSetBeaconParam)
+struct beacon_attr *pstrSetBeaconParam)
 {
s32 s32Error = 0;
tstrWID strWID;
@@ -6548,7 +6548,7 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 
u32Interval,
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct set_beacon *pstrSetBeaconParam = 
+   struct beacon_attr *pstrSetBeaconParam = 
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
-- 
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


[PATCH 21/32] staging: wilc1000: rename strHostIfSetDrvHandler

2015-09-30 Thread Tony Cho
This patch renames strHostIfSetDrvHandler to drv to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5a54608..b8ef165 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -384,7 +384,7 @@ union message_body {
struct power_mgmt_param pwr_mgmt_info;
struct sta_inactive_t mac_info;
struct set_ip_addr strHostIfSetIP;
-   struct drv_handler strHostIfSetDrvHandler;
+   struct drv_handler drv;
struct set_multicast strHostIfSetMulti;
struct op_mode strHostIfSetOperationMode;
struct set_mac_addr strHostIfSetMacAddress;
@@ -4159,7 +4159,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_SET_WFIDRV_HANDLER:
Handle_SetWfiDrvHandler(msg.drvHandler,
-   
);
+   );
break;
 
case HOST_IF_MSG_SET_OPERATION_MODE:
@@ -5382,7 +5382,7 @@ s32 host_int_set_wfi_drv_handler(tstrWILC_WFIDrv 
*u32address)
 
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_WFIDRV_HANDLER;
-   msg.body.strHostIfSetDrvHandler.u32Address = 
get_id_from_handler(u32address);
+   msg.body.drv.u32Address = get_id_from_handler(u32address);
msg.drvHandler = u32address;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 22/32] staging: wilc1000: rename strHostIfSetIP

2015-09-30 Thread Tony Cho
This patch renames strHostIfSetIP to ip_info to avoid CamelCase naming
convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b8ef165..596d68f 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -383,7 +383,7 @@ union message_body {
struct add_sta_param edit_sta_info;
struct power_mgmt_param pwr_mgmt_info;
struct sta_inactive_t mac_info;
-   struct set_ip_addr strHostIfSetIP;
+   struct set_ip_addr ip_info;
struct drv_handler drv;
struct set_multicast strHostIfSetMulti;
struct op_mode strHostIfSetOperationMode;
@@ -4168,12 +4168,12 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_SET_IPADDRESS:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
-   Handle_set_IPAddress(msg.drvHandler, 
msg.body.strHostIfSetIP.au8IPAddr, msg.body.strHostIfSetIP.idx);
+   Handle_set_IPAddress(msg.drvHandler, 
msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
break;
 
case HOST_IF_MSG_GET_IPADDRESS:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_SET_IPADDRESS\n");
-   Handle_get_IPAddress(msg.drvHandler, 
msg.body.strHostIfSetIP.au8IPAddr, msg.body.strHostIfSetIP.idx);
+   Handle_get_IPAddress(msg.drvHandler, 
msg.body.ip_info.au8IPAddr, msg.body.ip_info.idx);
break;
 
case HOST_IF_MSG_SET_MAC_ADDRESS:
@@ -7232,9 +7232,9 @@ s32 host_int_setup_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 
*u16ipadd, u8 idx)
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_SET_IPADDRESS;
 
-   msg.body.strHostIfSetIP.au8IPAddr = u16ipadd;
+   msg.body.ip_info.au8IPAddr = u16ipadd;
msg.drvHandler = hWFIDrv;
-   msg.body.strHostIfSetIP.idx = idx;
+   msg.body.ip_info.idx = idx;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
if (s32Error)
@@ -7269,9 +7269,9 @@ s32 host_int_get_ipaddress(tstrWILC_WFIDrv *hWFIDrv, u8 
*u16ipadd, u8 idx)
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_GET_IPADDRESS;
 
-   msg.body.strHostIfSetIP.au8IPAddr = u16ipadd;
+   msg.body.ip_info.au8IPAddr = u16ipadd;
msg.drvHandler = hWFIDrv;
-   msg.body.strHostIfSetIP.idx = idx;
+   msg.body.ip_info.idx = idx;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
if (s32Error)
-- 
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


[PATCH 19/32] staging: wilc1000: rename strPowerMgmtparam

2015-09-30 Thread Tony Cho
This patch renames strPowerMgmtparam to pwr_mgmt_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 7d51122..de64bd2 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -381,7 +381,7 @@ union message_body {
struct add_sta_param add_sta_info;
struct del_sta del_sta_info;
struct add_sta_param edit_sta_info;
-   struct power_mgmt_param strPowerMgmtparam;
+   struct power_mgmt_param pwr_mgmt_info;
struct sta_inactive_t strHostIfStaInactiveT;
struct set_ip_addr strHostIfSetIP;
struct drv_handler strHostIfSetDrvHandler;
@@ -4154,7 +4154,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_POWER_MGMT:
-   Handle_PowerManagement(msg.drvHandler, 
);
+   Handle_PowerManagement(msg.drvHandler, 
_mgmt_info);
break;
 
case HOST_IF_MSG_SET_WFIDRV_HANDLER:
@@ -6826,7 +6826,7 @@ s32 host_int_set_power_mgmt(tstrWILC_WFIDrv *hWFIDrv, 
bool bIsEnabled, u32 u32Ti
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct power_mgmt_param *pstrPowerMgmtParam = 

+   struct power_mgmt_param *pstrPowerMgmtParam = _mgmt_info;
 
PRINT_INFO(HOSTINF_DBG, "\n\n>> Setting PS to %d <<\n\n", bIsEnabled);
 
-- 
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


[PATCH 17/32] staging: wilc1000: rename strEditStaParam

2015-09-30 Thread Tony Cho
This patch renames strEditStaParam to edit_sta_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 94559bd..da8e589 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -394,7 +394,7 @@ union message_body {
struct beacon_attr beacon_info;
struct add_sta_param add_sta_info;
struct del_sta del_sta_info;
-   struct add_sta_param strEditStaParam;
+   struct add_sta_param edit_sta_info;
struct timer_cb strTimerCb;
struct power_mgmt_param strPowerMgmtparam;
struct sta_inactive_t strHostIfStaInactiveT;
@@ -4150,7 +4150,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_EDIT_STATION:
-   Handle_EditStation(msg.drvHandler, 
);
+   Handle_EditStation(msg.drvHandler, 
_sta_info);
break;
 
case HOST_IF_MSG_GET_INACTIVETIME:
-- 
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


[PATCH 18/32] staging: wilc1000: remove struct timer_cb

2015-09-30 Thread Tony Cho
This patch removes struct timer_cb which is not used.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 15 ---
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index da8e589..7d51122 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -315,20 +315,6 @@ struct del_sta {
 };
 
 /*!
- *  @struct timer_cb
- *  @brief Timer callback message body
- *  @details
- *  @todo
- *  @sa
- *  @authorMostafa Abu Bakr
- *  @date  25 March 2012
- *  @version   1.0
- */
-struct timer_cb {
-   void *pvUsrArg; /*!< Private data passed at timer start 
*/
-};
-
-/*!
  *  @struct power_mgmt_param
  *  @brief Power management message body
  *  @details
@@ -395,7 +381,6 @@ union message_body {
struct add_sta_param add_sta_info;
struct del_sta del_sta_info;
struct add_sta_param edit_sta_info;
-   struct timer_cb strTimerCb;
struct power_mgmt_param strPowerMgmtparam;
struct sta_inactive_t strHostIfStaInactiveT;
struct set_ip_addr strHostIfSetIP;
-- 
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: [PATCH 29/32] staging: wilc1000: rename strHostIfRegisterFrame

2015-09-30 Thread Dan Carpenter
On Wed, Sep 30, 2015 at 06:55:11PM +0900, Tony Cho wrote:
> This patch renames strHostIfRegisterFrame to reg_f to avoid CamelCase
> naming convention.

Could we go with "reg_frame"?  f is very ambigous.

regards,
dan carpenter

--
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 05/12] mwifiex: avoid gettimeofday in ba_threshold setting

2015-09-30 Thread Arnd Bergmann
mwifiex_get_random_ba_threshold() uses a complex homegrown implementation
to generate a pseudo-random number from the current time as returned
from do_gettimeofday().

This currently requires two 32-bit divisions plus a couple of other
computations that are eventually discarded as only eight bits of
the microsecond portion are used at all.

We could replace this with a call to get_random_bytes(), but that
might drain the entropy pool too fast if this is called for each
packet.

Instead, this patch converts it to use ktime_get_ns(), which is a
bit faster than do_gettimeofday(), and then uses a similar algorithm
as before, but in a way that takes both the nanosecond and second
portion into account for slightly-more-but-still-not-very-random
pseudorandom number.

Signed-off-by: Arnd Bergmann 
Cc: Amitkumar Karwar 
Cc: Nishant Sarmukadam 
Cc: Kalle Valo 
Cc: linux-wireless@vger.kernel.org
---
 drivers/net/wireless/mwifiex/wmm.c | 15 ---
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/wmm.c 
b/drivers/net/wireless/mwifiex/wmm.c
index 173d3663c2e0..878d358063dc 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -117,22 +117,15 @@ mwifiex_wmm_allocate_ralist_node(struct mwifiex_adapter 
*adapter, const u8 *ra)
  */
 static u8 mwifiex_get_random_ba_threshold(void)
 {
-   u32 sec, usec;
-   struct timeval ba_tstamp;
-   u8 ba_threshold;
-
+   u64 ns;
/* setup ba_packet_threshold here random number between
 * [BA_SETUP_PACKET_OFFSET,
 * BA_SETUP_PACKET_OFFSET+BA_SETUP_MAX_PACKET_THRESHOLD-1]
 */
+   ns = ktime_get_ns();
+   ns += (ns >> 32) + (ns >> 16);
 
-   do_gettimeofday(_tstamp);
-   sec = (ba_tstamp.tv_sec & 0x) + (ba_tstamp.tv_sec >> 16);
-   usec = (ba_tstamp.tv_usec & 0x) + (ba_tstamp.tv_usec >> 16);
-   ba_threshold = (((sec << 16) + usec) % BA_SETUP_MAX_PACKET_THRESHOLD)
- + BA_SETUP_PACKET_OFFSET;
-
-   return ba_threshold;
+   return ((u8)ns % BA_SETUP_MAX_PACKET_THRESHOLD) + 
BA_SETUP_PACKET_OFFSET;
 }
 
 /*
-- 
2.1.0.rc2

--
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 06/12] mac80211: use ktime_get_seconds

2015-09-30 Thread Arnd Bergmann
The mac80211 code uses ktime_get_ts to measure the connected time.
As this uses monotonic time, it is y2038 safe on 32-bit systems,
but we still want to deprecate the use of 'timespec' because most
other users are broken.

This changes the code to use ktime_get_seconds() instead, which
avoids the timespec structure and is slightly more efficient.

Signed-off-by: Arnd Bergmann 
Cc: Johannes Berg 
Cc: linux-wireless@vger.kernel.org
---
 net/mac80211/sta_info.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 64f1936350c6..c3644458e2ee 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -303,7 +303,6 @@ struct sta_info *sta_info_alloc(struct 
ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local;
struct ieee80211_hw *hw = >hw;
struct sta_info *sta;
-   struct timespec uptime;
int i;
 
sta = kzalloc(sizeof(*sta) + hw->sta_data_size, gfp);
@@ -339,8 +338,7 @@ struct sta_info *sta_info_alloc(struct 
ieee80211_sub_if_data *sdata,
/* Mark TID as unreserved */
sta->reserved_tid = IEEE80211_TID_UNRESERVED;
 
-   ktime_get_ts();
-   sta->last_connected = uptime.tv_sec;
+   sta->last_connected = ktime_get_seconds();
ewma_signal_init(>avg_signal);
for (i = 0; i < ARRAY_SIZE(sta->chain_signal_avg); i++)
ewma_signal_init(>chain_signal_avg[i]);
@@ -1813,7 +1811,6 @@ void sta_set_sinfo(struct sta_info *sta, struct 
station_info *sinfo)
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
struct rate_control_ref *ref = NULL;
-   struct timespec uptime;
u32 thr = 0;
int i, ac;
 
@@ -1838,8 +1835,7 @@ void sta_set_sinfo(struct sta_info *sta, struct 
station_info *sinfo)
 BIT(NL80211_STA_INFO_RX_DROP_MISC) |
 BIT(NL80211_STA_INFO_BEACON_LOSS);
 
-   ktime_get_ts();
-   sinfo->connected_time = uptime.tv_sec - sta->last_connected;
+   sinfo->connected_time = ktime_get_seconds() - sta->last_connected;
sinfo->inactive_time = jiffies_to_msecs(jiffies - sta->last_rx);
 
if (!(sinfo->filled & (BIT(NL80211_STA_INFO_TX_BYTES64) |
-- 
2.1.0.rc2

--
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 11/32] staging: wilc1000: rename strHostIFSetChan

2015-09-30 Thread Tony Cho
This patch renames strHostIFSetChan to channel_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e66118a..4559ed5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -406,7 +406,7 @@ union message_body {
struct rcvd_async_info async_info;
struct key_attr key_info;
struct cfg_param_attr cfg_info;
-   struct channel_attr strHostIFSetChan;
+   struct channel_attr channel_info;
struct set_beacon strHostIFSetBeacon;
struct del_beacon strHostIFDelBeacon;
struct add_sta_param strAddStaParam;
@@ -4113,7 +4113,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_SET_CHANNEL:
-   Handle_SetChannel(msg.drvHandler, 
);
+   Handle_SetChannel(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_DISCONNECT:
@@ -5368,7 +5368,7 @@ s32 host_int_set_mac_chnl_num(tstrWILC_WFIDrv *hWFIDrv, 
u8 u8ChNum)
/* prepare the set channel message */
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_CHANNEL;
-   msg.body.strHostIFSetChan.u8SetChan = u8ChNum;
+   msg.body.channel_info.u8SetChan = u8ChNum;
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 12/32] staging: wilc1000: remove struct del_beacon

2015-09-30 Thread Tony Cho
This patch removes struct del_beacon which is not necessary. This patch
also changes Handle_DelBeacon function by removing 2nd parameter, struct
del_beacon because it is not used inside.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 24 +++-
 1 file changed, 3 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 4559ed5..686402a9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -269,22 +269,6 @@ struct set_beacon {

*  after the TIM inormation element */
 };
 
-
-
-/*!
- *  @struct del_beacon
- *  @brief Del Beacon  message body
- *  @details
- *  @todo
- *  @sa
- *  @authorAdham Abozaeid
- *  @date  15 July 2012
- *  @version   1.0
- */
-struct del_beacon {
-   u8 u8dummy;
-};
-
 /*!
  *  @struct set_multicast
  *  @brief set Multicast filter Address
@@ -408,7 +392,6 @@ union message_body {
struct cfg_param_attr cfg_info;
struct channel_attr channel_info;
struct set_beacon strHostIFSetBeacon;
-   struct del_beacon strHostIFDelBeacon;
struct add_sta_param strAddStaParam;
struct del_sta strDelStaParam;
struct add_sta_param strEditStaParam;
@@ -3244,14 +3227,13 @@ ERRORHANDLER:
 /**
  *  @brief Handle_AddBeacon
  *  @details   Sending config packet to delete beacon
- *  @param[in]   struct del_beacon *pstrDelBeacon
+ *  @param[in] tstrWILC_WFIDrv *drvHandler
  *  @return NONE
  *  @author
  *  @date
  *  @version   1.0
  */
-static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler,
-struct del_beacon *pstrDelBeacon)
+static void Handle_DelBeacon(tstrWILC_WFIDrv *drvHandler)
 {
s32 s32Error = 0;
tstrWID strWID;
@@ -4156,7 +4138,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_DEL_BEACON:
-   Handle_DelBeacon(msg.drvHandler, 
);
+   Handle_DelBeacon(msg.drvHandler);
break;
 
case HOST_IF_MSG_ADD_STATION:
-- 
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


[PATCH 14/32] staging: wilc1000: rename strHostIFSetBeacon

2015-09-30 Thread Tony Cho
This patch renames strHostIFSetBeacon to beacon_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 2f211f9..7e53aa9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -391,7 +391,7 @@ union message_body {
struct key_attr key_info;
struct cfg_param_attr cfg_info;
struct channel_attr channel_info;
-   struct beacon_attr strHostIFSetBeacon;
+   struct beacon_attr beacon_info;
struct add_sta_param strAddStaParam;
struct del_sta strDelStaParam;
struct add_sta_param strEditStaParam;
@@ -4134,7 +4134,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_ADD_BEACON:
-   Handle_AddBeacon(msg.drvHandler, 
);
+   Handle_AddBeacon(msg.drvHandler, _info);
break;
 
case HOST_IF_MSG_DEL_BEACON:
@@ -6548,7 +6548,7 @@ s32 host_int_add_beacon(tstrWILC_WFIDrv *hWFIDrv, u32 
u32Interval,
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct beacon_attr *pstrSetBeaconParam = 
+   struct beacon_attr *pstrSetBeaconParam = _info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
-- 
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


[PATCH 09/32] staging: wilc1000: remove struct get_channel

2015-09-30 Thread Tony Cho
This patch removes struct get_channel from the driver because it is not
used anywhere.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 15 ---
 1 file changed, 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 76e82e6..e715f54 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -232,20 +232,6 @@ struct set_channel {
 };
 
 /*!
- *  @struct get_channel
- *  @brief Get Channel  message body
- *  @details
- *  @todo
- *  @sa
- *  @authorMai Daftedar
- *  @date  01 Jule 2012
- *  @version   1.0
- */
-struct get_channel {
-   u8 u8GetChan;
-};
-
-/*!
  *  @struct tstrScanComplete
  *  @brief hold received Async. Scan Complete message body
  *  @details
@@ -421,7 +407,6 @@ union message_body {
struct key_attr key_info;
struct cfg_param_attr cfg_info;
struct set_channel strHostIFSetChan;
-   struct get_channel strHostIFGetChan;
struct set_beacon strHostIFSetBeacon;
struct del_beacon strHostIFDelBeacon;
struct add_sta_param strAddStaParam;
-- 
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


[PATCH 07/32] staging: wilc1000: rename strHostIFkeyAttr

2015-09-30 Thread Tony Cho
This patch renames strHostIFkeyAttr to key_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 100 +++---
 1 file changed, 50 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b24c022..d4e8122 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -418,7 +418,7 @@ union message_body {
struct connect_attr con_info;
struct rcvd_net_info net_info;
struct rcvd_async_info async_info;
-   struct key_attr strHostIFkeyAttr;
+   struct key_attr key_info;
struct cfg_param_attr strHostIFCfgParamAttr;
struct set_channel strHostIFSetChan;
struct get_channel strHostIFGetChan;
@@ -4119,7 +4119,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_KEY:
-   Handle_Key(msg.drvHandler, );
+   Handle_Key(msg.drvHandler, _info);
break;
 
case HOST_IF_MSG_CFG_PARAMS:
@@ -4363,13 +4363,13 @@ s32 host_int_remove_wep_key(tstrWILC_WFIDrv *hWFIDrv, 
u8 u8keyIdx)
 
 
msg.id = HOST_IF_MSG_KEY;
-   msg.body.strHostIFkeyAttr.enuKeyType = WEP;
-   msg.body.strHostIFkeyAttr.u8KeyAction = REMOVEKEY;
+   msg.body.key_info.enuKeyType = WEP;
+   msg.body.key_info.u8KeyAction = REMOVEKEY;
msg.drvHandler = hWFIDrv;
 
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8keyIdx;
 
/* send the message */
@@ -4411,12 +4411,12 @@ s32 host_int_set_WEPDefaultKeyID(tstrWILC_WFIDrv 
*hWFIDrv, u8 u8Index)
 
 
msg.id = HOST_IF_MSG_KEY;
-   msg.body.strHostIFkeyAttr.enuKeyType = WEP;
-   msg.body.strHostIFkeyAttr.u8KeyAction = DEFAULTKEY;
+   msg.body.key_info.enuKeyType = WEP;
+   msg.body.key_info.u8KeyAction = DEFAULTKEY;
msg.drvHandler = hWFIDrv;
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Index;
 
/* send the message */
@@ -4465,22 +4465,22 @@ s32 host_int_add_wep_key_bss_sta(tstrWILC_WFIDrv 
*hWFIDrv, const u8 *pu8WepKey,
 
 
msg.id = HOST_IF_MSG_KEY;
-   msg.body.strHostIFkeyAttr.enuKeyType = WEP;
-   msg.body.strHostIFkeyAttr.u8KeyAction = ADDKEY;
+   msg.body.key_info.enuKeyType = WEP;
+   msg.body.key_info.u8KeyAction = ADDKEY;
msg.drvHandler = hWFIDrv;
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, 
GFP_KERNEL);
 
-   
memcpy(msg.body.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey,
+   memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey,
pu8WepKey, u8WepKeylen);
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen);
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx;
 
/* send the message */
@@ -4531,29 +4531,29 @@ s32 host_int_add_wep_key_bss_ap(tstrWILC_WFIDrv 
*hWFIDrv, const u8 *pu8WepKey, u
PRINT_INFO(HOSTAPD_DBG, "KEY is %x\n", pu8WepKey[i]);
}
msg.id = HOST_IF_MSG_KEY;
-   msg.body.strHostIFkeyAttr.enuKeyType = WEP;
-   msg.body.strHostIFkeyAttr.u8KeyAction = ADDKEY_AP;
+   msg.body.key_info.enuKeyType = WEP;
+   msg.body.key_info.u8KeyAction = ADDKEY_AP;
msg.drvHandler = hWFIDrv;
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey = kmalloc(u8WepKeylen, 
GFP_KERNEL);
 
 
-   
memcpy(msg.body.strHostIFkeyAttr.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey,
+   memcpy(msg.body.key_info.uniHostIFkeyAttr.strHostIFwepAttr.pu8WepKey,
pu8WepKey, (u8WepKeylen));
 
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8WepKeylen = (u8WepKeylen);
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8Wepidx = u8Keyidx;
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.u8mode = u8mode;
 
-   msg.body.strHostIFkeyAttr.
+   msg.body.key_info.
uniHostIFkeyAttr.strHostIFwepAttr.tenuAuth_type = tenuAuth_type;
/* send the message */
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
@@ -4606,26 +4606,26 @@ s32 host_int_add_ptk(tstrWILC_WFIDrv *hWFIDrv, const u8 
*pu8Ptk, u8 u8PtkKeylen,
 
 
msg.id = HOST_IF_MSG_KEY;
-   msg.body.strHostIFkeyAttr.enuKeyType = WPAPtk;
+   

[PATCH 08/32] staging: wilc1000: rename strHostIFCfgParamAttr

2015-09-30 Thread Tony Cho
This patch renames strHostIFCfgParamAttr to cfg_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d4e8122..76e82e6 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -419,7 +419,7 @@ union message_body {
struct rcvd_net_info net_info;
struct rcvd_async_info async_info;
struct key_attr key_info;
-   struct cfg_param_attr strHostIFCfgParamAttr;
+   struct cfg_param_attr cfg_info;
struct set_channel strHostIFSetChan;
struct get_channel strHostIFGetChan;
struct set_beacon strHostIFSetBeacon;
@@ -4124,7 +4124,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_CFG_PARAMS:
 
-   Handle_CfgParam(msg.drvHandler, 
);
+   Handle_CfgParam(msg.drvHandler, _info);
break;
 
case HOST_IF_MSG_SET_CHANNEL:
@@ -5854,7 +5854,7 @@ s32 hif_set_cfg(tstrWILC_WFIDrv *hWFIDrv, tstrCfgParamVal 
*pstrCfgParamVal)
/* prepare the WiphyParams Message */
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_CFG_PARAMS;
-   msg.body.strHostIFCfgParamAttr.pstrCfgParamVal = *pstrCfgParamVal;
+   msg.body.cfg_info.pstrCfgParamVal = *pstrCfgParamVal;
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 10/32] staging: wilc1000: rename struct set_channel

2015-09-30 Thread Tony Cho
This patch renames struct set_channel to channel_attr to keep the naming
convention such as scan_attr and connect_attr.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e715f54..e66118a 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -218,7 +218,7 @@ struct rcvd_async_info {
 };
 
 /*!
- *  @struct set_channel
+ *  @structchannel_attr
  *  @brief Set Channel  message body
  *  @details
  *  @todo
@@ -227,7 +227,7 @@ struct rcvd_async_info {
  *  @date  25 March 2012
  *  @version   1.0
  */
-struct set_channel {
+struct channel_attr {
u8 u8SetChan;
 };
 
@@ -406,7 +406,7 @@ union message_body {
struct rcvd_async_info async_info;
struct key_attr key_info;
struct cfg_param_attr cfg_info;
-   struct set_channel strHostIFSetChan;
+   struct channel_attr strHostIFSetChan;
struct set_beacon strHostIFSetBeacon;
struct del_beacon strHostIFDelBeacon;
struct add_sta_param strAddStaParam;
@@ -599,14 +599,14 @@ static tstrWILC_WFIDrv *get_handler_from_id(int id)
 /**
  *  @brief Handle_SetChannel
  *  @detailsSending config packet to firmware to set channel
- *  @param[in]   struct set_channel *pstrHostIFSetChan
+ *  @param[in]   struct channel_attr *pstrHostIFSetChan
  *  @return Error code.
  *  @author
  *  @date
  *  @version   1.0
  */
 static s32 Handle_SetChannel(tstrWILC_WFIDrv *drvHandler,
-struct set_channel *pstrHostIFSetChan)
+struct channel_attr *pstrHostIFSetChan)
 {
 
s32 s32Error = 0;
-- 
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


[PATCH 27/32] staging: wilc1000: rename strHostIfBASessionInfo

2015-09-30 Thread Tony Cho
This patch renames strHostIfBASessionInfo to session_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a6702dd..b7797a5 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -389,7 +389,7 @@ union message_body {
struct op_mode mode;
struct set_mac_addr set_mac_info;
struct get_mac_addr get_mac_info;
-   struct ba_session_info strHostIfBASessionInfo;
+   struct ba_session_info session_info;
struct remain_ch strHostIfRemainOnChan;
struct reg_frame strHostIfRegisterFrame;
char *pUserData;
@@ -4204,11 +4204,11 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_ADD_BA_SESSION:
-   Handle_AddBASession(msg.drvHandler, 
);
+   Handle_AddBASession(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_DEL_ALL_RX_BA_SESSIONS:
-   Handle_DelAllRxBASessions(msg.drvHandler, 
);
+   Handle_DelAllRxBASessions(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_DEL_ALL_STA:
@@ -7119,7 +7119,7 @@ static int host_int_addBASession(tstrWILC_WFIDrv 
*hWFIDrv, char *pBSSID, char TI
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct ba_session_info *pBASessionInfo = 

+   struct ba_session_info *pBASessionInfo = _info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
@@ -7150,7 +7150,7 @@ s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char 
*pBSSID, char TID)
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct ba_session_info *pBASessionInfo = 

+   struct ba_session_info *pBASessionInfo = _info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
@@ -7180,7 +7180,7 @@ s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv 
*hWFIDrv, char *pBSSID, char T
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct ba_session_info *pBASessionInfo = 

+   struct ba_session_info *pBASessionInfo = _info;
 
if (pstrWFIDrv == NULL) {
PRINT_ER("driver is null\n");
-- 
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: [PATCH 32/32] staging: wilc1000: fix kernel fail after ifconfig wlan0 up

2015-09-30 Thread Dan Carpenter
Ugh...  No.  Just do this:

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 869736a..52d8f95 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -102,6 +102,8 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 
up(>hSem);
 
+   return 0;
+
 ERRORHANDLER:
/* error occured, free any allocations */
if (pstrMessage) {
--
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 03/32] staging: wilc1000: rename strHostIFscanAttr

2015-09-30 Thread Tony Cho
This patch renames strHostIFscanAttr to scan_info in order to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index be01de5..a039f04 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -414,7 +414,7 @@ struct sta_inactive_t {
  *  @version   1.0
  */
 union message_body {
-   struct scan_attr strHostIFscanAttr;
+   struct scan_attr scan_info;
struct connect_attr strHostIFconnectAttr;
struct rcvd_net_info strRcvdNetworkInfo;
struct rcvd_async_info strRcvdGnrlAsyncInfo;
@@ -4099,7 +4099,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_SCAN:
-   Handle_Scan(msg.drvHandler, 
);
+   Handle_Scan(msg.drvHandler, _info);
break;
 
case HOST_IF_MSG_CONNECT:
@@ -5789,26 +5789,26 @@ s32 host_int_scan(tstrWILC_WFIDrv *hWFIDrv, u8 
u8ScanSource,
msg.id = HOST_IF_MSG_SCAN;
 
if (pstrHiddenNetwork != NULL) {
-   
msg.body.strHostIFscanAttr.strHiddenNetwork.pstrHiddenNetworkInfo = 
pstrHiddenNetwork->pstrHiddenNetworkInfo;
-   msg.body.strHostIFscanAttr.strHiddenNetwork.u8ssidnum = 
pstrHiddenNetwork->u8ssidnum;
+   msg.body.scan_info.strHiddenNetwork.pstrHiddenNetworkInfo = 
pstrHiddenNetwork->pstrHiddenNetworkInfo;
+   msg.body.scan_info.strHiddenNetwork.u8ssidnum = 
pstrHiddenNetwork->u8ssidnum;
 
} else
PRINT_D(HOSTINF_DBG, "pstrHiddenNetwork IS EQUAL TO NULL\n");
 
msg.drvHandler = hWFIDrv;
-   msg.body.strHostIFscanAttr.u8ScanSource = u8ScanSource;
-   msg.body.strHostIFscanAttr.u8ScanType = u8ScanType;
-   msg.body.strHostIFscanAttr.pfScanResult = ScanResult;
-   msg.body.strHostIFscanAttr.pvUserArg = pvUserArg;
-
-   msg.body.strHostIFscanAttr.u8ChnlListLen = u8ChnlListLen;
-   msg.body.strHostIFscanAttr.pu8ChnlFreqList = kmalloc(u8ChnlListLen, 
GFP_KERNEL);/* will be deallocated by the receiving thread */
-   memcpy(msg.body.strHostIFscanAttr.pu8ChnlFreqList,
+   msg.body.scan_info.u8ScanSource = u8ScanSource;
+   msg.body.scan_info.u8ScanType = u8ScanType;
+   msg.body.scan_info.pfScanResult = ScanResult;
+   msg.body.scan_info.pvUserArg = pvUserArg;
+
+   msg.body.scan_info.u8ChnlListLen = u8ChnlListLen;
+   msg.body.scan_info.pu8ChnlFreqList = kmalloc(u8ChnlListLen, 
GFP_KERNEL);/* will be deallocated by the receiving thread */
+   memcpy(msg.body.scan_info.pu8ChnlFreqList,
pu8ChnlFreqList, u8ChnlListLen);
 
-   msg.body.strHostIFscanAttr.IEsLen = IEsLen;
-   msg.body.strHostIFscanAttr.pu8IEs = kmalloc(IEsLen, GFP_KERNEL);
/* will be deallocated by the receiving thread */
-   memcpy(msg.body.strHostIFscanAttr.pu8IEs,
+   msg.body.scan_info.IEsLen = IEsLen;
+   msg.body.scan_info.pu8IEs = kmalloc(IEsLen, GFP_KERNEL);/* will 
be deallocated by the receiving thread */
+   memcpy(msg.body.scan_info.pu8IEs,
pu8IEs, IEsLen);
 
/* send the message */
-- 
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


[PATCH 04/32] staging: wilc1000: rename strHostIFconnectAttr

2015-09-30 Thread Tony Cho
This patch renames strHostIFconnectAttr to con_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 32 +++
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a039f04..96f0b69 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -415,7 +415,7 @@ struct sta_inactive_t {
  */
 union message_body {
struct scan_attr scan_info;
-   struct connect_attr strHostIFconnectAttr;
+   struct connect_attr con_info;
struct rcvd_net_info strRcvdNetworkInfo;
struct rcvd_async_info strRcvdGnrlAsyncInfo;
struct key_attr strHostIFkeyAttr;
@@ -4103,7 +4103,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_CONNECT:
-   Handle_Connect(msg.drvHandler, 
);
+   Handle_Connect(msg.drvHandler, _info);
break;
 
case HOST_IF_MSG_FLUSH_CONNECT:
@@ -5084,32 +5084,32 @@ s32 host_int_set_join_req(tstrWILC_WFIDrv *hWFIDrv, u8 
*pu8bssid,
 
msg.id = HOST_IF_MSG_CONNECT;
 
-   msg.body.strHostIFconnectAttr.u8security = u8security;
-   msg.body.strHostIFconnectAttr.tenuAuth_type = tenuAuth_type;
-   msg.body.strHostIFconnectAttr.u8channel = u8channel;
-   msg.body.strHostIFconnectAttr.pfConnectResult = pfConnectResult;
-   msg.body.strHostIFconnectAttr.pvUserArg = pvUserArg;
-   msg.body.strHostIFconnectAttr.pJoinParams = pJoinParams;
+   msg.body.con_info.u8security = u8security;
+   msg.body.con_info.tenuAuth_type = tenuAuth_type;
+   msg.body.con_info.u8channel = u8channel;
+   msg.body.con_info.pfConnectResult = pfConnectResult;
+   msg.body.con_info.pvUserArg = pvUserArg;
+   msg.body.con_info.pJoinParams = pJoinParams;
msg.drvHandler = hWFIDrv;
 
if (pu8bssid != NULL) {
-   msg.body.strHostIFconnectAttr.pu8bssid = kmalloc(6, 
GFP_KERNEL); /* will be deallocated by the receiving thread */
-   memcpy(msg.body.strHostIFconnectAttr.pu8bssid,
+   msg.body.con_info.pu8bssid = kmalloc(6, GFP_KERNEL); /* will be 
deallocated by the receiving thread */
+   memcpy(msg.body.con_info.pu8bssid,
pu8bssid, 6);
}
 
if (pu8ssid != NULL) {
-   msg.body.strHostIFconnectAttr.ssidLen = ssidLen;
-   msg.body.strHostIFconnectAttr.pu8ssid = kmalloc(ssidLen, 
GFP_KERNEL); /* will be deallocated by the receiving thread */
-   memcpy(msg.body.strHostIFconnectAttr.pu8ssid,
+   msg.body.con_info.ssidLen = ssidLen;
+   msg.body.con_info.pu8ssid = kmalloc(ssidLen, GFP_KERNEL); /* 
will be deallocated by the receiving thread */
+   memcpy(msg.body.con_info.pu8ssid,
 
pu8ssid, ssidLen);
}
 
if (pu8IEs != NULL) {
-   msg.body.strHostIFconnectAttr.IEsLen = IEsLen;
-   msg.body.strHostIFconnectAttr.pu8IEs = kmalloc(IEsLen, 
GFP_KERNEL); /* will be deallocated by the receiving thread */
-   memcpy(msg.body.strHostIFconnectAttr.pu8IEs,
+   msg.body.con_info.IEsLen = IEsLen;
+   msg.body.con_info.pu8IEs = kmalloc(IEsLen, GFP_KERNEL); /* will 
be deallocated by the receiving thread */
+   memcpy(msg.body.con_info.pu8IEs,
pu8IEs, IEsLen);
}
if (pstrWFIDrv->enuHostIFstate < HOST_IF_CONNECTING)
-- 
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


[PATCH 05/32] staging: wilc1000: rename strRcvdNetworkInfo

2015-09-30 Thread Tony Cho
This patch renames strRcvdNetworkInfo to net_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 96f0b69..8a93112 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -416,7 +416,7 @@ struct sta_inactive_t {
 union message_body {
struct scan_attr scan_info;
struct connect_attr con_info;
-   struct rcvd_net_info strRcvdNetworkInfo;
+   struct rcvd_net_info net_info;
struct rcvd_async_info strRcvdGnrlAsyncInfo;
struct key_attr strHostIFkeyAttr;
struct cfg_param_attr strHostIFCfgParamAttr;
@@ -4111,7 +4111,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_RCVD_NTWRK_INFO:
-   Handle_RcvdNtwrkInfo(msg.drvHandler, 
);
+   Handle_RcvdNtwrkInfo(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO:
@@ -6302,9 +6302,9 @@ void NetworkInfoReceived(u8 *pu8Buffer, u32 u32Length)
msg.id = HOST_IF_MSG_RCVD_NTWRK_INFO;
msg.drvHandler = pstrWFIDrv;
 
-   msg.body.strRcvdNetworkInfo.u32Length = u32Length;
-   msg.body.strRcvdNetworkInfo.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); 
/* will be deallocated by the receiving thread */
-   memcpy(msg.body.strRcvdNetworkInfo.pu8Buffer,
+   msg.body.net_info.u32Length = u32Length;
+   msg.body.net_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will 
be deallocated by the receiving thread */
+   memcpy(msg.body.net_info.pu8Buffer,
pu8Buffer, u32Length);
 
/* send the message */
-- 
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


[PATCH 06/32] staging: wilc1000: rename strRcvdGnrlAsyncInfo

2015-09-30 Thread Tony Cho
This patch renames strRcvdGnrlAsyncInfo to async_info to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 8a93112..b24c022 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -417,7 +417,7 @@ union message_body {
struct scan_attr scan_info;
struct connect_attr con_info;
struct rcvd_net_info net_info;
-   struct rcvd_async_info strRcvdGnrlAsyncInfo;
+   struct rcvd_async_info async_info;
struct key_attr strHostIFkeyAttr;
struct cfg_param_attr strHostIFCfgParamAttr;
struct set_channel strHostIFSetChan;
@@ -4115,7 +4115,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_RCVD_GNRL_ASYNC_INFO:
-   Handle_RcvdGnrlAsyncInfo(msg.drvHandler, 
);
+   Handle_RcvdGnrlAsyncInfo(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_KEY:
@@ -6359,9 +6359,9 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)
msg.drvHandler = pstrWFIDrv;
 
 
-   msg.body.strRcvdGnrlAsyncInfo.u32Length = u32Length;
-   msg.body.strRcvdGnrlAsyncInfo.pu8Buffer = kmalloc(u32Length, 
GFP_KERNEL); /* will be deallocated by the receiving thread */
-   memcpy(msg.body.strRcvdGnrlAsyncInfo.pu8Buffer,
+   msg.body.async_info.u32Length = u32Length;
+   msg.body.async_info.pu8Buffer = kmalloc(u32Length, GFP_KERNEL); /* will 
be deallocated by the receiving thread */
+   memcpy(msg.body.async_info.pu8Buffer,
pu8Buffer, u32Length);
 
/* send the message */
-- 
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


[PATCH 29/32] staging: wilc1000: rename strHostIfRegisterFrame

2015-09-30 Thread Tony Cho
This patch renames strHostIfRegisterFrame to reg_f to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 9dac906..79957f9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -391,7 +391,7 @@ union message_body {
struct get_mac_addr get_mac_info;
struct ba_session_info session_info;
struct remain_ch remain_on_ch;
-   struct reg_frame strHostIfRegisterFrame;
+   struct reg_frame reg_f;
char *pUserData;
struct del_all_sta strHostIFDelAllSta;
 };
@@ -4191,7 +4191,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_REGISTER_FRAME:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REGISTER_FRAME\n");
-   Handle_RegisterFrame(msg.drvHandler, 
);
+   Handle_RegisterFrame(msg.drvHandler, _f);
break;
 
case HOST_IF_MSG_LISTEN_TIMER_FIRED:
@@ -6489,20 +6489,20 @@ s32 host_int_frame_register(tstrWILC_WFIDrv *hWFIDrv, 
u16 u16FrameType, bool bRe
switch (u16FrameType) {
case ACTION:
PRINT_D(HOSTINF_DBG, "ACTION\n");
-   msg.body.strHostIfRegisterFrame.u8Regid = ACTION_FRM_IDX;
+   msg.body.reg_f.u8Regid = ACTION_FRM_IDX;
break;
 
case PROBE_REQ:
PRINT_D(HOSTINF_DBG, "PROBE REQ\n");
-   msg.body.strHostIfRegisterFrame.u8Regid = PROBE_REQ_IDX;
+   msg.body.reg_f.u8Regid = PROBE_REQ_IDX;
break;
 
default:
PRINT_D(HOSTINF_DBG, "Not valid frame type\n");
break;
}
-   msg.body.strHostIfRegisterFrame.u16FrameType = u16FrameType;
-   msg.body.strHostIfRegisterFrame.bReg = bReg;
+   msg.body.reg_f.u16FrameType = u16FrameType;
+   msg.body.reg_f.bReg = bReg;
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 23/32] staging: wilc1000: rename strHostIfSetMulti

2015-09-30 Thread Tony Cho
This patch renames strHostIfSetMulti to multicast_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 596d68f..034e3d9 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -385,7 +385,7 @@ union message_body {
struct sta_inactive_t mac_info;
struct set_ip_addr ip_info;
struct drv_handler drv;
-   struct set_multicast strHostIfSetMulti;
+   struct set_multicast multicast_info;
struct op_mode strHostIfSetOperationMode;
struct set_mac_addr strHostIfSetMacAddress;
struct get_mac_addr strHostIfGetMacAddress;
@@ -4200,7 +4200,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_SET_MULTICAST_FILTER:
PRINT_D(HOSTINF_DBG, 
"HOST_IF_MSG_SET_MULTICAST_FILTER\n");
-   Handle_SetMulticastFilter(msg.drvHandler, 
);
+   Handle_SetMulticastFilter(msg.drvHandler, 
_info);
break;
 
case HOST_IF_MSG_ADD_BA_SESSION:
@@ -6860,7 +6860,7 @@ s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv 
*hWFIDrv, bool bIsEnabled, u
 
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct set_multicast *pstrMulticastFilterParam = 

+   struct set_multicast *pstrMulticastFilterParam = 
_info;
 
 
if (pstrWFIDrv == NULL) {
-- 
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


[PATCH 24/32] staging: wilc1000: rename strHostIfSetOperationMode

2015-09-30 Thread Tony Cho
This patch renames strHostIfSetOperationMode to mode to avoid CamelCase
naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 034e3d9..a66f78d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -386,7 +386,7 @@ union message_body {
struct set_ip_addr ip_info;
struct drv_handler drv;
struct set_multicast multicast_info;
-   struct op_mode strHostIfSetOperationMode;
+   struct op_mode mode;
struct set_mac_addr strHostIfSetMacAddress;
struct get_mac_addr strHostIfGetMacAddress;
struct ba_session_info strHostIfBASessionInfo;
@@ -4163,7 +4163,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_SET_OPERATION_MODE:
-   Handle_SetOperationMode(msg.drvHandler, 
);
+   Handle_SetOperationMode(msg.drvHandler, );
break;
 
case HOST_IF_MSG_SET_IPADDRESS:
@@ -5407,7 +5407,7 @@ s32 host_int_set_operation_mode(tstrWILC_WFIDrv *hWFIDrv, 
u32 u32mode)
 
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_OPERATION_MODE;
-   msg.body.strHostIfSetOperationMode.u32Mode = u32mode;
+   msg.body.mode.u32Mode = u32mode;
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 28/32] staging: wilc1000: rename strHostIfRemainOnChan

2015-09-30 Thread Tony Cho
This patch renames strHostIfRemainOnChan to remain_on_ch to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index b7797a5..9dac906 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -390,7 +390,7 @@ union message_body {
struct set_mac_addr set_mac_info;
struct get_mac_addr get_mac_info;
struct ba_session_info session_info;
-   struct remain_ch strHostIfRemainOnChan;
+   struct remain_ch remain_on_ch;
struct reg_frame strHostIfRegisterFrame;
char *pUserData;
struct del_all_sta strHostIFDelAllSta;
@@ -3693,7 +3693,7 @@ static void ListenTimerCB(unsigned long arg)
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_LISTEN_TIMER_FIRED;
msg.drvHandler = pstrWFIDrv;
-   msg.body.strHostIfRemainOnChan.u32ListenSessionID = 
pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID;
+   msg.body.remain_on_ch.u32ListenSessionID = 
pstrWFIDrv->strHostIfRemainOnChan.u32ListenSessionID;
 
/* send the message */
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
@@ -4098,7 +4098,7 @@ static int hostIFthread(void *pvArg)
Handle_ScanDone(msg.drvHandler, SCAN_EVENT_DONE);
 
if (pstrWFIDrv->u8RemainOnChan_pendingreq)
-   Handle_RemainOnChan(msg.drvHandler, 
);
+   Handle_RemainOnChan(msg.drvHandler, 
_on_ch);
 
break;
 
@@ -4186,7 +4186,7 @@ static int hostIFthread(void *pvArg)
 
case HOST_IF_MSG_REMAIN_ON_CHAN:
PRINT_D(HOSTINF_DBG, "HOST_IF_MSG_REMAIN_ON_CHAN\n");
-   Handle_RemainOnChan(msg.drvHandler, 
);
+   Handle_RemainOnChan(msg.drvHandler, 
_on_ch);
break;
 
case HOST_IF_MSG_REGISTER_FRAME:
@@ -4195,7 +4195,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_LISTEN_TIMER_FIRED:
-   Handle_ListenStateExpired(msg.drvHandler, 
);
+   Handle_ListenStateExpired(msg.drvHandler, 
_on_ch);
break;
 
case HOST_IF_MSG_SET_MULTICAST_FILTER:
@@ -6407,12 +6407,12 @@ s32 host_int_remain_on_channel(tstrWILC_WFIDrv 
*hWFIDrv, u32 u32SessionID, u32 u
 
/* prepare the WiphyParams Message */
msg.id = HOST_IF_MSG_REMAIN_ON_CHAN;
-   msg.body.strHostIfRemainOnChan.u16Channel = chan;
-   msg.body.strHostIfRemainOnChan.pRemainOnChanExpired = 
RemainOnChanExpired;
-   msg.body.strHostIfRemainOnChan.pRemainOnChanReady = RemainOnChanReady;
-   msg.body.strHostIfRemainOnChan.pVoid = pvUserArg;
-   msg.body.strHostIfRemainOnChan.u32duration = u32duration;
-   msg.body.strHostIfRemainOnChan.u32ListenSessionID = u32SessionID;
+   msg.body.remain_on_ch.u16Channel = chan;
+   msg.body.remain_on_ch.pRemainOnChanExpired = RemainOnChanExpired;
+   msg.body.remain_on_ch.pRemainOnChanReady = RemainOnChanReady;
+   msg.body.remain_on_ch.pVoid = pvUserArg;
+   msg.body.remain_on_ch.u32duration = u32duration;
+   msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
@@ -6454,7 +6454,7 @@ s32 host_int_ListenStateExpired(tstrWILC_WFIDrv *hWFIDrv, 
u32 u32SessionID)
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_LISTEN_TIMER_FIRED;
msg.drvHandler = hWFIDrv;
-   msg.body.strHostIfRemainOnChan.u32ListenSessionID = u32SessionID;
+   msg.body.remain_on_ch.u32ListenSessionID = u32SessionID;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
if (s32Error)
-- 
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


[PATCH 25/32] staging: wilc1000: rename strHostIfSetMacAddress

2015-09-30 Thread Tony Cho
This patch renames strHostIfSetMacAddress to set_mac_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index a66f78d..2fa1158 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -387,7 +387,7 @@ union message_body {
struct drv_handler drv;
struct set_multicast multicast_info;
struct op_mode mode;
-   struct set_mac_addr strHostIfSetMacAddress;
+   struct set_mac_addr set_mac_info;
struct get_mac_addr strHostIfGetMacAddress;
struct ba_session_info strHostIfBASessionInfo;
struct remain_ch strHostIfRemainOnChan;
@@ -4177,7 +4177,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_SET_MAC_ADDRESS:
-   Handle_SetMacAddress(msg.drvHandler, 
);
+   Handle_SetMacAddress(msg.drvHandler, 
_mac_info);
break;
 
case HOST_IF_MSG_GET_MAC_ADDRESS:
@@ -4892,7 +4892,7 @@ s32 host_int_set_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 
*pu8MacAddress)
/* prepare setting mac address message */
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_MAC_ADDRESS;
-   memcpy(msg.body.strHostIfSetMacAddress.u8MacAddress, pu8MacAddress, 
ETH_ALEN);
+   memcpy(msg.body.set_mac_info.u8MacAddress, pu8MacAddress, ETH_ALEN);
msg.drvHandler = hWFIDrv;
 
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 26/32] staging: wilc1000: rename strHostIfGetMacAddress

2015-09-30 Thread Tony Cho
This patch renames strHostIfGetMacAddress to get_mac_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 2fa1158..a6702dd 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -388,7 +388,7 @@ union message_body {
struct set_multicast multicast_info;
struct op_mode mode;
struct set_mac_addr set_mac_info;
-   struct get_mac_addr strHostIfGetMacAddress;
+   struct get_mac_addr get_mac_info;
struct ba_session_info strHostIfBASessionInfo;
struct remain_ch strHostIfRemainOnChan;
struct reg_frame strHostIfRegisterFrame;
@@ -4181,7 +4181,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_GET_MAC_ADDRESS:
-   Handle_GetMacAddress(msg.drvHandler, 
);
+   Handle_GetMacAddress(msg.drvHandler, 
_mac_info);
break;
 
case HOST_IF_MSG_REMAIN_ON_CHAN:
@@ -4858,7 +4858,7 @@ s32 host_int_get_MacAddress(tstrWILC_WFIDrv *hWFIDrv, u8 
*pu8MacAddress)
memset(, 0, sizeof(struct host_if_msg));
 
msg.id = HOST_IF_MSG_GET_MAC_ADDRESS;
-   msg.body.strHostIfGetMacAddress.u8MacAddress = pu8MacAddress;
+   msg.body.get_mac_info.u8MacAddress = pu8MacAddress;
msg.drvHandler = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 32/32] staging: wilc1000: fix kernel fail after ifconfig wlan0 up

2015-09-30 Thread Tony Cho
From: Leo Kim 

This patch fix kernel fail after ifconfig wlan0 up.
 - if normal operation, kfree functions don't execute.

Signed-off-by: Leo Kim 
Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/wilc_msgqueue.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index d5ebd6d..f412121 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -76,8 +76,10 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 
/* construct a new message */
pstrMessage = kmalloc(sizeof(Message), GFP_ATOMIC);
-   if (!pstrMessage)
-   return -ENOMEM;
+   if (!pstrMessage) {
+   result = -ENOMEM;
+   goto ERRORHANDLER;
+   }
pstrMessage->u32Length = u32SendBufferSize;
pstrMessage->pstrNext = NULL;
pstrMessage->pvBuffer = kmalloc(u32SendBufferSize, GFP_ATOMIC);
@@ -104,10 +106,12 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
up(>hSem);
 
 ERRORHANDLER:
-   /* error occured, free any allocations */
-   if (pstrMessage) {
-   kfree(pstrMessage->pvBuffer);
-   kfree(pstrMessage);
+   if (result) {
+   /* error occured, free any allocations */
+   if (pstrMessage) {
+   kfree(pstrMessage->pvBuffer);
+   kfree(pstrMessage);
+   }
}
 
return result;
-- 
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


[PATCH 31/32] staging: wilc1000: rename strHostIFDelAllSta

2015-09-30 Thread Tony Cho
This patch renames strHostIFDelAllSta to del_all_sta_info to avoid
CamelCase naming convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 3769595..aad0f5d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -393,7 +393,7 @@ union message_body {
struct remain_ch remain_on_ch;
struct reg_frame reg_f;
char *data;
-   struct del_all_sta strHostIFDelAllSta;
+   struct del_all_sta del_all_sta_info;
 };
 
 /*!
@@ -4212,7 +4212,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_DEL_ALL_STA:
-   Handle_DelAllSta(msg.drvHandler, 
);
+   Handle_DelAllSta(msg.drvHandler, 
_all_sta_info);
break;
 
default:
@@ -6726,7 +6726,7 @@ s32 host_int_del_allstation(tstrWILC_WFIDrv *hWFIDrv, u8 
pu8MacAddr[][ETH_ALEN])
s32 s32Error = 0;
tstrWILC_WFIDrv *pstrWFIDrv = (tstrWILC_WFIDrv *)hWFIDrv;
struct host_if_msg msg;
-   struct del_all_sta *pstrDelAllStationMsg = 
+   struct del_all_sta *pstrDelAllStationMsg = _all_sta_info;
u8 au8Zero_Buff[ETH_ALEN] = {0};
u32 i;
u8 u8AssocNumb = 0;
-- 
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


[PATCH 30/32] staging: wilc1000: rename pUserData

2015-09-30 Thread Tony Cho
This patch renames pUserData to data to avoid CamelCase naming
convention.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/host_interface.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 79957f9..3769595 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -392,7 +392,7 @@ union message_body {
struct ba_session_info session_info;
struct remain_ch remain_on_ch;
struct reg_frame reg_f;
-   char *pUserData;
+   char *data;
struct del_all_sta strHostIFDelAllSta;
 };
 
@@ -4111,7 +4111,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_GET_STATISTICS:
-   Handle_GetStatistics(msg.drvHandler, (tstrStatistics 
*)msg.body.pUserData);
+   Handle_GetStatistics(msg.drvHandler, (tstrStatistics 
*)msg.body.data);
break;
 
case HOST_IF_MSG_GET_CHNL:
@@ -5689,7 +5689,7 @@ s32 host_int_get_statistics(tstrWILC_WFIDrv *hWFIDrv, 
tstrStatistics *pstrStatis
memset(, 0, sizeof(struct host_if_msg));
 
msg.id = HOST_IF_MSG_GET_STATISTICS;
-   msg.body.pUserData = (char *)pstrStatistics;
+   msg.body.data = (char *)pstrStatistics;
msg.drvHandler = hWFIDrv;
/* send the message */
s32Error = wilc_mq_send(, , sizeof(struct host_if_msg));
-- 
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


[PATCH 04/12] mwifiex: use ktime_get_real for timestamping

2015-09-30 Thread Arnd Bergmann
The mwifiex_11n_aggregate_pkt() function creates a ktime_t from
a timeval returned by do_gettimeofday, which is slow and causes
an overflow in 2038 on 32-bit architectures.

This solves both problems by using the appropriate ktime_get_real()
function.

Signed-off-by: Arnd Bergmann 
Cc: Amitkumar Karwar 
Cc: Nishant Sarmukadam 
Cc: Kalle Valo 
Cc: linux-wireless@vger.kernel.org
---
 drivers/net/wireless/mwifiex/11n_aggr.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c 
b/drivers/net/wireless/mwifiex/11n_aggr.c
index f7c717253a66..78853c51774d 100644
--- a/drivers/net/wireless/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/mwifiex/11n_aggr.c
@@ -173,7 +173,6 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
int pad = 0, aggr_num = 0, ret;
struct mwifiex_tx_param tx_param;
struct txpd *ptx_pd = NULL;
-   struct timeval tv;
int headroom = adapter->iface_type == MWIFIEX_USB ? 0 : INTF_HEADER_LEN;
 
skb_src = skb_peek(_list->skb_head);
@@ -203,8 +202,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
tx_info_aggr->flags |= MWIFIEX_BUF_FLAG_AGGR_PKT;
skb_aggr->priority = skb_src->priority;
 
-   do_gettimeofday();
-   skb_aggr->tstamp = timeval_to_ktime(tv);
+   skb_aggr->tstamp = ktime_get_real();
 
do {
/* Check if AMSDU can accommodate this MSDU */
-- 
2.1.0.rc2

--
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] staging: wilc1000: fix build error for openrisc-allmodconfig

2015-09-30 Thread Greg KH
On Wed, Sep 30, 2015 at 05:52:14PM +0900, Chaehyun Lim wrote:
> The kbuild test robot reports the following build error for
> openrisc-allmodconfig.
> 
> >> drivers/staging/wilc1000/wilc_sdio.c:584:2: error: implicit
> >> declaration of function 'memset'
> 
> The error occurs due to missing a standard header file as
>  so that three .c files are included it.
> 
> Signed-off-by: Chaehyun Lim 

You forgot to add a Reported-by: line giving credit to kbuild, I've done
that by hand.

thanks,

greg k-h
--
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] staging: wilc1000: fix build error for openrisc-allmodconfig

2015-09-30 Thread Chaehyun Lim
On Wed, Sep 30, 2015 at 7:20 PM, Greg KH  wrote:
> On Wed, Sep 30, 2015 at 05:52:14PM +0900, Chaehyun Lim wrote:
>> The kbuild test robot reports the following build error for
>> openrisc-allmodconfig.
>>
>> >> drivers/staging/wilc1000/wilc_sdio.c:584:2: error: implicit
>> >> declaration of function 'memset'
>>
>> The error occurs due to missing a standard header file as
>>  so that three .c files are included it.
>>
>> Signed-off-by: Chaehyun Lim 
>
> You forgot to add a Reported-by: line giving credit to kbuild, I've done
> that by hand.
>
> thanks,
>
> greg k-h

I understood. I will keep it in my mind to send patch.

Regards
Chaehyun Lim
--
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 01/32] staging: wilc1000: remove PLL_WORKAROUND

2015-09-30 Thread Tony Cho
This patch removes unnecessary definition, PLL_WORKAROUND from the
Makefile. There is no use throughout the driver.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index e965df9..d226ebe 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -9,7 +9,7 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"
 
 ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
-   -DPLL_WORKAROUND -DAGING_ALG \
+   -DAGING_ALG \
-Wno-unused-function -DWILC_DEBUGFS
 #ccflags-y += -DTCP_ACK_FILTER
 
-- 
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


[PATCH 02/32] staging: wilc1000: remove AGING_ALG

2015-09-30 Thread Tony Cho
This patch removes AGING_ALG from the Makefile because it is always in
use.

Signed-off-by: Tony Cho 
---
 drivers/staging/wilc1000/Makefile   | 1 -
 drivers/staging/wilc1000/coreconfigurator.h | 2 --
 2 files changed, 3 deletions(-)

diff --git a/drivers/staging/wilc1000/Makefile 
b/drivers/staging/wilc1000/Makefile
index d226ebe..f495061 100644
--- a/drivers/staging/wilc1000/Makefile
+++ b/drivers/staging/wilc1000/Makefile
@@ -9,7 +9,6 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \
-DP2P_CONCURRENCY_FIRMWARE=\"atmel/wilc1000_p2p_fw.bin\"
 
 ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \
-   -DAGING_ALG \
-Wno-unused-function -DWILC_DEBUGFS
 #ccflags-y += -DTCP_ACK_FILTER
 
diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 253c7f0..58aa13c 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -96,9 +96,7 @@ typedef struct {
unsigned long u32TimeRcvdInScanCached;
unsigned long u32TimeRcvdInScan;
bool bNewNetwork;
-#ifdef AGING_ALG
u8 u8Found;
-#endif
u32 u32Tsf;
u8 *pu8IEs;
u16 u16IEsLen;
-- 
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: [PATCH 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists

2015-09-30 Thread Chandra Gorentla
On Tue, Sep 29, 2015 at 05:31:53AM +0300, Dan Carpenter wrote:
> On Mon, Sep 28, 2015 at 11:43:55PM +0530, Chandra S Gorentla wrote:
> >  - The message queue is replaced with standard Linux linked list
> >  - kmem_cache is used for list members
> >  - A check for return value of receive method is added
> >  - GFP_ATOMIC is changed to GFP_KERNEL
> >  - A few other related minor changes
> 
> These should be listed and explained.
OK.  I will try to send seperate patches.
> 
> >  
> > while (1) {
> > -   wilc_mq_recv(, , sizeof(struct host_if_msg), 
> > );
> > +   ret = wilc_mq_recv(, ,
> > +   sizeof(struct host_if_msg), );
> > +   if (ret)
> > +   continue;
> > +
> 
> I asked before if this was a forever loop and never got a response.
> Also what does this have to do with list macros?
The only exit condition of this loop is to receive a message
'HOST_IF_MSG_EXIT'.  If this check is not there and 'wilc_mq_recv'
returns an error, the switch case below it will be executed for
the previously received message.

I will send this change in a different patch.
> 
> regards,
> dan carpenter
--
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 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists

2015-09-30 Thread Dan Carpenter
On Wed, Sep 30, 2015 at 06:12:50PM +0530, Chandra Gorentla wrote:
> > >   while (1) {
> > > - wilc_mq_recv(, , sizeof(struct host_if_msg), 
> > > );
> > > + ret = wilc_mq_recv(, ,
> > > + sizeof(struct host_if_msg), );
> > > + if (ret)
> > > + continue;
> > > +
> > 
> > I asked before if this was a forever loop and never got a response.
> > Also what does this have to do with list macros?
> The only exit condition of this loop is to receive a message
> 'HOST_IF_MSG_EXIT'.  If this check is not there and 'wilc_mq_recv'
> returns an error, the switch case below it will be executed for
> the previously received message.

Oh, hm...  It looks like wilc_mq_recv() can return -EFAULT, -EOVERFLOW
or success here.  If it returns -EFUALT is calling wilc_mq_recv() again
really the right thing?  I suspect we should break in that case.  We
should probably at least sleep for a bit intsead of looping so tightly
if it returns -EOVERFLOW?

I'm not sure.

regards,
dan carpenter

--
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 32/32] staging: wilc1000: fix kernel fail after ifconfig wlan0 up

2015-09-30 Thread Kim, Leo
Dear Dan,

Thank you! 
Always helpful your advice listen carefully.

I will send in the morning.

 Thanks, BR
 Leo

-Original Message-
From: Dan Carpenter [mailto:dan.carpen...@oracle.com] 
Sent: Wednesday, September 30, 2015 7:05 PM
To: Cho, Tony
Cc: gre...@linuxfoundation.org; de...@driverdev.osuosl.org; Kim, Rachel; Park, 
Chris; Shin, Austin; linux-wireless@vger.kernel.org; Kim, Johnny; Ferre, 
Nicolas; Noureldin, Adel; Kim, Leo; Abozaeid, Adham
Subject: Re: [PATCH 32/32] staging: wilc1000: fix kernel fail after ifconfig 
wlan0 up

Ugh...  No.  Just do this:

diff --git a/drivers/staging/wilc1000/wilc_msgqueue.c 
b/drivers/staging/wilc1000/wilc_msgqueue.c
index 869736a..52d8f95 100644
--- a/drivers/staging/wilc1000/wilc_msgqueue.c
+++ b/drivers/staging/wilc1000/wilc_msgqueue.c
@@ -102,6 +102,8 @@ int wilc_mq_send(WILC_MsgQueueHandle *pHandle,
 
up(>hSem);
 
+   return 0;
+
 ERRORHANDLER:
/* error occured, free any allocations */
if (pstrMessage) {
--
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 1/2] drivers: staging: wilc1000: Replace message queue with standard Linux lists

2015-09-30 Thread Chandra Gorentla
On Tue, Sep 29, 2015 at 02:44:02AM +0200, Greg KH wrote:
> On Mon, Sep 28, 2015 at 11:43:55PM +0530, Chandra S Gorentla wrote:
> >  - The message queue is replaced with standard Linux linked list
> >  - kmem_cache is used for list members
> 
> Why?
The list entires are of fixed type and repeatedly allocated and deallocated
for messages.
> 
> >  - A check for return value of receive method is added
> >  - GFP_ATOMIC is changed to GFP_KERNEL
> 
> Why?  Are you sure that is safe?
The allocations are moved out of 'spin_lock_irqsave' and
'spin_unlock_irqrestore'.  Hence they are safe.
> 
> >  - A few other related minor changes
> 
> Be specific please.
OK.  I will try to send seperate patches.
> 
> thanks,
> 
> greg k-h

Thank you,
chandra
--
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] iw: Memory leak in error condition

2015-09-30 Thread James Cameron
On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
> >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
> From: Ola Olsson 
> Date: Thu, 1 Oct 2015 00:43:06 +0200
> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
>  Olsson 
> 
> ---
>  scan.c |2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scan.c b/scan.c
> index e959c1b..f248981 100644
> --- a/scan.c
> +++ b/scan.c
> @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
> if (ies || meshid) {
> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
> if (!tmpies)
> +   free(ies);
> +   free(meshid);
> goto nla_put_failure;

Braces?  { }


> if (ies) {
> memcpy(tmpies, ies, ies_len);
> -- 
> 1.7.9.5
> --
> 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

-- 
James Cameron
http://quozl.linux.org.au/
--
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] iw: Memory leak in error condition

2015-09-30 Thread Ola Olsson
Oh yes! :)
Suddenly valgrind was happy as well.

>From 2724dd259f2bf61a2b7c85a70a70fd640a583453 Mon Sep 17 00:00:00 2001
From: Ola Olsson 
Date: Thu, 1 Oct 2015 00:43:06 +0200
Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola Olsson
 

---
 scan.c |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scan.c b/scan.c
index e959c1b..f3441a7 100644
--- a/scan.c
+++ b/scan.c
@@ -445,8 +445,11 @@ static int handle_scan(struct nl80211_state *state,

if (ies || meshid) {
tmpies = (unsigned char *) malloc(ies_len + meshid_len);
-   if (!tmpies)
+   if (!tmpies) {
+   free(ies);
+   free(meshid);
goto nla_put_failure;
+   }
if (ies) {
memcpy(tmpies, ies, ies_len);
free(ies);
-- 
1.7.9.5

On Thu, Oct 1, 2015 at 1:16 AM, James Cameron  wrote:
> On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
>> >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
>> From: Ola Olsson 
>> Date: Thu, 1 Oct 2015 00:43:06 +0200
>> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
>>  Olsson 
>>
>> ---
>>  scan.c |2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/scan.c b/scan.c
>> index e959c1b..f248981 100644
>> --- a/scan.c
>> +++ b/scan.c
>> @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
>> if (ies || meshid) {
>> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
>> if (!tmpies)
>> +   free(ies);
>> +   free(meshid);
>> goto nla_put_failure;
>
> Braces?  { }
>
>
>> if (ies) {
>> memcpy(tmpies, ies, ies_len);
>> --
>> 1.7.9.5
>> --
>> 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
>
> --
> James Cameron
> http://quozl.linux.org.au/
--
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] iw: Memory leak in error condition

2015-09-30 Thread Julian Calaby
Hi Ola,

On Thu, Oct 1, 2015 at 9:39 AM, Ola Olsson  wrote:
> I guess not since there is a goto statement in between. Please correct
> me if I am wrong.

Oh, wait, you are right. I'm used to goto-free code.

Sorry for the noise.

Thanks,

Julian Calaby


> /Ola
>
> On Thu, Oct 1, 2015 at 1:34 AM, Julian Calaby  wrote:
>> Hi Ola,
>>
>> On Thu, Oct 1, 2015 at 9:27 AM, Ola Olsson  wrote:
>>> Oh yes! :)
>>> Suddenly valgrind was happy as well.
>>>
>>> From 2724dd259f2bf61a2b7c85a70a70fd640a583453 Mon Sep 17 00:00:00 2001
>>> From: Ola Olsson 
>>> Date: Thu, 1 Oct 2015 00:43:06 +0200
>>> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola 
>>> Olsson
>>>  
>>>
>>> ---
>>>  scan.c |5 -
>>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scan.c b/scan.c
>>> index e959c1b..f3441a7 100644
>>> --- a/scan.c
>>> +++ b/scan.c
>>> @@ -445,8 +445,11 @@ static int handle_scan(struct nl80211_state *state,
>>>
>>> if (ies || meshid) {
>>> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
>>> -   if (!tmpies)
>>> +   if (!tmpies) {
>>> +   free(ies);
>>> +   free(meshid);
>>> goto nla_put_failure;
>>> +   }
>>> if (ies) {
>>
>> free() doesn't set it to "null" or anything like that, so isn't the
>> line above a use-after-free?
>>
>>> memcpy(tmpies, ies, ies_len);
>>> free(ies);
>>> --
>>> 1.7.9.5
>>>
>>> On Thu, Oct 1, 2015 at 1:16 AM, James Cameron  wrote:
 On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
> >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
> From: Ola Olsson 
> Date: Thu, 1 Oct 2015 00:43:06 +0200
> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
>  Olsson 
>
> ---
>  scan.c |2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scan.c b/scan.c
> index e959c1b..f248981 100644
> --- a/scan.c
> +++ b/scan.c
> @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
> if (ies || meshid) {
> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
> if (!tmpies)
> +   free(ies);
> +   free(meshid);
> goto nla_put_failure;

 Braces?  { }


> if (ies) {
> memcpy(tmpies, ies, ies_len);
> --
> 1.7.9.5
> --
> 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

 --
 James Cameron
 http://quozl.linux.org.au/
>>> --
>>> 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
>>
>>
>>
>> --
>> Julian Calaby
>>
>> Email: julian.cal...@gmail.com
>> Profile: http://www.google.com/profiles/julian.calaby/



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
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] iw: Memory leak in error condition

2015-09-30 Thread Ola Olsson
I guess not since there is a goto statement in between. Please correct
me if I am wrong.

/Ola

On Thu, Oct 1, 2015 at 1:34 AM, Julian Calaby  wrote:
> Hi Ola,
>
> On Thu, Oct 1, 2015 at 9:27 AM, Ola Olsson  wrote:
>> Oh yes! :)
>> Suddenly valgrind was happy as well.
>>
>> From 2724dd259f2bf61a2b7c85a70a70fd640a583453 Mon Sep 17 00:00:00 2001
>> From: Ola Olsson 
>> Date: Thu, 1 Oct 2015 00:43:06 +0200
>> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola Olsson
>>  
>>
>> ---
>>  scan.c |5 -
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/scan.c b/scan.c
>> index e959c1b..f3441a7 100644
>> --- a/scan.c
>> +++ b/scan.c
>> @@ -445,8 +445,11 @@ static int handle_scan(struct nl80211_state *state,
>>
>> if (ies || meshid) {
>> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
>> -   if (!tmpies)
>> +   if (!tmpies) {
>> +   free(ies);
>> +   free(meshid);
>> goto nla_put_failure;
>> +   }
>> if (ies) {
>
> free() doesn't set it to "null" or anything like that, so isn't the
> line above a use-after-free?
>
>> memcpy(tmpies, ies, ies_len);
>> free(ies);
>> --
>> 1.7.9.5
>>
>> On Thu, Oct 1, 2015 at 1:16 AM, James Cameron  wrote:
>>> On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
 >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
 From: Ola Olsson 
 Date: Thu, 1 Oct 2015 00:43:06 +0200
 Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
  Olsson 

 ---
  scan.c |2 ++
  1 file changed, 2 insertions(+)

 diff --git a/scan.c b/scan.c
 index e959c1b..f248981 100644
 --- a/scan.c
 +++ b/scan.c
 @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
 if (ies || meshid) {
 tmpies = (unsigned char *) malloc(ies_len + meshid_len);
 if (!tmpies)
 +   free(ies);
 +   free(meshid);
 goto nla_put_failure;
>>>
>>> Braces?  { }
>>>
>>>
 if (ies) {
 memcpy(tmpies, ies, ies_len);
 --
 1.7.9.5
 --
 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
>>>
>>> --
>>> James Cameron
>>> http://quozl.linux.org.au/
>> --
>> 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
>
>
>
> --
> Julian Calaby
>
> Email: julian.cal...@gmail.com
> Profile: http://www.google.com/profiles/julian.calaby/
--
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] iw: Memory leak in error condition

2015-09-30 Thread Ola Olsson
>From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
From: Ola Olsson 
Date: Thu, 1 Oct 2015 00:43:06 +0200
Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
 Olsson 

---
 scan.c |2 ++
 1 file changed, 2 insertions(+)

diff --git a/scan.c b/scan.c
index e959c1b..f248981 100644
--- a/scan.c
+++ b/scan.c
@@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
if (ies || meshid) {
tmpies = (unsigned char *) malloc(ies_len + meshid_len);
if (!tmpies)
+   free(ies);
+   free(meshid);
goto nla_put_failure;
if (ies) {
memcpy(tmpies, ies, ies_len);
-- 
1.7.9.5
--
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: Rate limiting AP bandwidth change messages in ieee80211_config_bw?

2015-09-30 Thread Josh Boyer
On Wed, Sep 30, 2015 at 3:04 PM, Johannes Berg
 wrote:
>
>>
>> I'm not sure ratelimiting it would even work - it's not *that* high
>> frequency? Not really sure though.
>>
>> I think we can do either, it's not such a terribly important message as
>> far as I can tell.
>>
>
> Seems like Emmanuel would like to see the message stay in some form -

For what purpose?  Or rather, when a user sees this in their dmesg,
what are they supposed to do about it?

> perhaps we should try rate limiting it then? Could you check if that
> actually works?

I'll think on it, sure.  I was hoping sdata_dbg would be sufficient
because it's much easier, but if there's value in the message I can
look at limiting it in some fashion.

josh
--
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] iw: Memory leak in error condition

2015-09-30 Thread Julian Calaby
Hi Ola,

On Thu, Oct 1, 2015 at 9:27 AM, Ola Olsson  wrote:
> Oh yes! :)
> Suddenly valgrind was happy as well.
>
> From 2724dd259f2bf61a2b7c85a70a70fd640a583453 Mon Sep 17 00:00:00 2001
> From: Ola Olsson 
> Date: Thu, 1 Oct 2015 00:43:06 +0200
> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola Olsson
>  
>
> ---
>  scan.c |5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/scan.c b/scan.c
> index e959c1b..f3441a7 100644
> --- a/scan.c
> +++ b/scan.c
> @@ -445,8 +445,11 @@ static int handle_scan(struct nl80211_state *state,
>
> if (ies || meshid) {
> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
> -   if (!tmpies)
> +   if (!tmpies) {
> +   free(ies);
> +   free(meshid);
> goto nla_put_failure;
> +   }
> if (ies) {

free() doesn't set it to "null" or anything like that, so isn't the
line above a use-after-free?

> memcpy(tmpies, ies, ies_len);
> free(ies);
> --
> 1.7.9.5
>
> On Thu, Oct 1, 2015 at 1:16 AM, James Cameron  wrote:
>> On Thu, Oct 01, 2015 at 01:01:18AM +0200, Ola Olsson wrote:
>>> >From 5239e8e9aa79a131b716398efbf7a1203decbd9b Mon Sep 17 00:00:00 2001
>>> From: Ola Olsson 
>>> Date: Thu, 1 Oct 2015 00:43:06 +0200
>>> Subject: [PATCH] iw: Memory leak in error condition Signed-off-by: Ola
>>>  Olsson 
>>>
>>> ---
>>>  scan.c |2 ++
>>>  1 file changed, 2 insertions(+)
>>>
>>> diff --git a/scan.c b/scan.c
>>> index e959c1b..f248981 100644
>>> --- a/scan.c
>>> +++ b/scan.c
>>> @@ -446,6 +446,8 @@ static int handle_scan(struct nl80211_state *state,
>>> if (ies || meshid) {
>>> tmpies = (unsigned char *) malloc(ies_len + meshid_len);
>>> if (!tmpies)
>>> +   free(ies);
>>> +   free(meshid);
>>> goto nla_put_failure;
>>
>> Braces?  { }
>>
>>
>>> if (ies) {
>>> memcpy(tmpies, ies, ies_len);
>>> --
>>> 1.7.9.5
>>> --
>>> 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
>>
>> --
>> James Cameron
>> http://quozl.linux.org.au/
> --
> 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



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
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: only advertise mesh support in raw mode

2015-09-30 Thread Bob Copeland
On Mon, Sep 28, 2015 at 10:27:30AM -0700, Peter Oh wrote:
> I prefer the current design to this new approach because drivers already
> know if it's mesh capable or not at build time, hence adding runtime
> configuration is redundant.

I do think the proposed patch is a bit overboard, so I suppose my vote is to
keep it the way it is, even if a little user-unfriendly.

> One more thing we have to think about is enabling mesh in only raw mode.
> In standard view point, mesh is only available in raw mode on ath10k,
> however ath10k is also able to run mesh in native WiFi mode in current
> mac80211 design since mac80211 handles packets per interface. So that
> mac80211 knows that packets are for mesh without looking at mesh control
> present bit when they come into mesh interface.

This is true, it'll work with mac80211, but it violates the standard
(802.11-2012 8.2.4.7.3).

For the benefit of others, as I just retested non-rawmode -- the issue is
that QoS control in nwifi frames is missing the "Mesh Control Present" bit.
However, it still includes the mesh control field, which is the part
that has the mesh sequence number and address extension fields.

As a result, a packet parser might misinterpret the mesh control field as
the LLC header -- the wireshark dissector at least gets confused like this.

I would think a small change to ath10k firmware could fix this though,
vendor willing.

-- 
Bob Copeland %% http://bobcopeland.com/
--
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: only advertise mesh support in raw mode

2015-09-30 Thread Yeoh Chun-Yeow
>
> I would think a small change to ath10k firmware could fix this though,
> vendor willing.
>
+1 for this. Or even coming out with mesh mode instead of using AP
mode in ath10k firmware.

---
Chun-Yeow
--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Johannes Berg
On Wed, 2015-09-30 at 08:07 -0700, Ben Greear wrote:
> 
> On 09/29/2015 11:46 PM, Johannes Berg wrote:
> > On Fri, 2015-09-25 at 16:00 -0700, Ben Greear wrote:
> > > It seems that ath10k ar988X hardware has a bug where the BSSID
> > > for IBSS AMSDU frames is all zeros.  The 'main' 636 ath10k firmware
> > > does not seem to use AMSDUs for IBSS, and when I enable it in my CT
> > > firmware, then I see the breakage.  So, I suspect it is not
> > > just a simple software/firmware bug.
> > > 
> > > If I simply ignore the bssid_match check in ieee80211_accept_frame,
> > > then it seems everything runs fine.
> > > 
> > > So, I'm curious if anyone knows what sorts of bad things could happen
> > > if the bssid_match check is ignored?  Maybe bcast/mcast frames could
> > > be accepted when they shouldn't be in certain cases?
> > > 
> > 
> > You could end up accepting multicast frames from a different,
> > overlapping, BSS? Seems like a bad idea.
> 
> It's definitely not a great idea.
> 
> In my testing, I always see the first frame of the AMPDU have
> a proper IBSS BSSID.  Any idea if it would be OK (and even possible)
> for the driver or stack to detect this and save the BSSID aside
> for the subsequent frames?

That seems reasonable.

> Its not clear to me whether the rest of the AMPDU frames could
> somehow be interleaved with frames from a different BSSID?
> 

They can't be, at least not without some very strange hacks on the
transmitter.

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


Re: ipw2200-bss

2015-09-30 Thread Dan Williams
On Wed, 2015-09-30 at 15:21 +, Aaron Kempf wrote:
> I am a tiny bit confused why this 'centrino' driver isn't in the 650mb
> cd download for Debian 8.2

The driver is included in the kernel, so it should be there already.
What may not be included on the CD is the firmware, which you may have
to install later.  It's supposedly in the "firmware-ipw2x00" package.

See also: https://wiki.debian.org/ipw2200

Dan

> I detest Ubuntu in all flavors.. and if you guys would get this driver
> into the Debian kernel, and on the default CD installer.. it would
> make my life a lot easier.
> 
> I wish I could help to do this.. but I am a lowly DBA tryng to get
> deeper into Linux / Debian / BSD.
> 
> Please call me if you could help me to transfer this from a Xubuntu
> 15.04 usb device onto my 8.2 installed system.  I would really
> appreciate it.
> 
> Aaron Kempf
> Microsoft Certified IT Professional: DBA
> Voice: 415-786-0776
> 
> PS - if you guys know of any DBA jobs in San Francisco.. I know my way
> around SQL to say the least :) http://www.fullstackaaron.com/resume
> --
> 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


--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Ben Greear

On 09/30/2015 08:17 AM, Johannes Berg wrote:

On Wed, 2015-09-30 at 08:07 -0700, Ben Greear wrote:


On 09/29/2015 11:46 PM, Johannes Berg wrote:

On Fri, 2015-09-25 at 16:00 -0700, Ben Greear wrote:

It seems that ath10k ar988X hardware has a bug where the BSSID
for IBSS AMSDU frames is all zeros.  The 'main' 636 ath10k firmware
does not seem to use AMSDUs for IBSS, and when I enable it in my CT
firmware, then I see the breakage.  So, I suspect it is not
just a simple software/firmware bug.

If I simply ignore the bssid_match check in ieee80211_accept_frame,
then it seems everything runs fine.

So, I'm curious if anyone knows what sorts of bad things could happen
if the bssid_match check is ignored?  Maybe bcast/mcast frames could
be accepted when they shouldn't be in certain cases?



You could end up accepting multicast frames from a different,
overlapping, BSS? Seems like a bad idea.


It's definitely not a great idea.

In my testing, I always see the first frame of the AMPDU have
a proper IBSS BSSID.  Any idea if it would be OK (and even possible)
for the driver or stack to detect this and save the BSSID aside
for the subsequent frames?


That seems reasonable.


Any idea how this could be done in the stack instead of the driver?

The problem is that this is a receiver-side issue, so even if I manage
to hack the ath10k firmware or driver rx logic, it would not fix any other
IBSS peer connected to ath10k peer.

Thanks,
Ben




Its not clear to me whether the rest of the AMPDU frames could
somehow be interleaved with frames from a different BSSID?



They can't be, at least not without some very strange hacks on the
transmitter.

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




--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com

--
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: Can we ignore frames with invalid BSSID in IBSS mode?

2015-09-30 Thread Ben Greear



On 09/29/2015 11:46 PM, Johannes Berg wrote:

On Fri, 2015-09-25 at 16:00 -0700, Ben Greear wrote:

It seems that ath10k ar988X hardware has a bug where the BSSID
for IBSS AMSDU frames is all zeros.  The 'main' 636 ath10k firmware
does not seem to use AMSDUs for IBSS, and when I enable it in my CT
firmware, then I see the breakage.  So, I suspect it is not
just a simple software/firmware bug.

If I simply ignore the bssid_match check in ieee80211_accept_frame,
then it seems everything runs fine.

So, I'm curious if anyone knows what sorts of bad things could happen
if the bssid_match check is ignored?  Maybe bcast/mcast frames could
be accepted when they shouldn't be in certain cases?



You could end up accepting multicast frames from a different,
overlapping, BSS? Seems like a bad idea.


It's definitely not a great idea.

In my testing, I always see the first frame of the AMPDU have
a proper IBSS BSSID.  Any idea if it would be OK (and even possible)
for the driver or stack to detect this and save the BSSID aside
for the subsequent frames?

Its not clear to me whether the rest of the AMPDU frames could
somehow be interleaved with frames from a different BSSID?

Thanks,
Ben


--
Ben Greear 
Candela Technologies Inc  http://www.candelatech.com
--
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: question about potential integer truncation in mwifiex_set_wapi_ie and mwifiex_set_wps_ie

2015-09-30 Thread PaX Team
On 30 Sep 2015 at 9:10, James Cameron wrote:

> On Tue, Sep 29, 2015 at 05:21:28PM +0200, PaX Team wrote:
> > hi all,
> > 
> > in drivers/net/wireless/mwifiex/sta_ioctl.c the following functions
> > 
> > mwifiex_set_wpa_ie_helper
> > mwifiex_set_wapi_ie
> > mwifiex_set_wps_ie
> > 
> > can truncate the incoming ie_len argument from u16 to u8 when it gets
> > stored in mwifiex_private.wpa_ie_len, mwifiex_private.wapi_ie_len and
> > mwifiex_private.wps_ie_len, respectively. based on some light code
> > reading it seems a length value of 256 is valid (IEEE_MAX_IE_SIZE and
> > MWIFIEX_MAX_VSIE_LEN seem to limit it) and thus would get truncated
> > to 0 when stored in those u8 fields. the question is whether this is
> > intentional or a bug somewhere.
> 
> i agree, while there is a test to ensure ie_len is not greater than
> 256, there is a possibility that it will be exactly 256, which means
> 256 bytes will be given to memcpy but
> mwifiex_private.{wpa,wapi,wps}_ie_len will be zero.
> 
> i suggest changing the lengths to u16.  not tested.

while this is probably a necessary first step you'll also have to verify
all loads from these fields for integer truncation that can occur now
(the stores were checked by the plugin i mentioned above). based on a
naive grep the code seems to be fine but someone with actual knowledge
of the code had better verify it ;).

> diff --git a/drivers/net/wireless/mwifiex/main.h 
> b/drivers/net/wireless/mwifiex/main.h
> index fe12560..b66e9a7 100644
> --- a/drivers/net/wireless/mwifiex/main.h
> +++ b/drivers/net/wireless/mwifiex/main.h
> @@ -512,14 +512,14 @@ struct mwifiex_private {
>   struct mwifiex_wep_key wep_key[NUM_WEP_KEYS];
>   u16 wep_key_curr_index;
>   u8 wpa_ie[256];
> - u8 wpa_ie_len;
> + u16 wpa_ie_len;
>   u8 wpa_is_gtk_set;
>   struct host_cmd_ds_802_11_key_material aes_key;
>   struct host_cmd_ds_802_11_key_material_v2 aes_key_v2;
>   u8 wapi_ie[256];
> - u8 wapi_ie_len;
> + u16 wapi_ie_len;
>   u8 *wps_ie;
> - u8 wps_ie_len;
> + u16 wps_ie_len;
>   u8 wmm_required;
>   u8 wmm_enabled;
>   u8 wmm_qosinfo;
> 
> -- 
> James Cameron
> http://quozl.linux.org.au/
> 



--
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


ipw2200-bss

2015-09-30 Thread Aaron Kempf
I am a tiny bit confused why this 'centrino' driver isn't in the 650mb
cd download for Debian 8.2

I detest Ubuntu in all flavors.. and if you guys would get this driver
into the Debian kernel, and on the default CD installer.. it would
make my life a lot easier.

I wish I could help to do this.. but I am a lowly DBA tryng to get
deeper into Linux / Debian / BSD.

Please call me if you could help me to transfer this from a Xubuntu
15.04 usb device onto my 8.2 installed system.  I would really
appreciate it.

Aaron Kempf
Microsoft Certified IT Professional: DBA
Voice: 415-786-0776

PS - if you guys know of any DBA jobs in San Francisco.. I know my way
around SQL to say the least :) http://www.fullstackaaron.com/resume
--
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] brcmfmac: firmware refresh for BCM43602 PCIE devices

2015-09-30 Thread Arend van Spriel

On 09/25/2015 02:00 AM, Kyle McMartin wrote:

On Thu, Sep 24, 2015 at 08:45:04PM +0200, Arend van Spriel wrote:

A number of end-users reported issues with BCM43602 on the 2015
MacBook Pro. It turned out the previously released firmware did
not properly support that device [1]. Hence an update of the STA
firmware and while at it refresh the AP firmware as well. The
latter has been tested using Netgear R8000. The STA firmware has
been tested on MacBook Pro.



Are there version numbers we could update in WHENCE to make this
easier to track?


Hi Kyle,

For brcmfmac firmware we do not have version numbers in the WHENCE file. 
The firmware file itself contains the version number which can be shown 
using hexdump. I can make a note of that fact in the WHENCE file if needed.


Regards,
Arend


regards, --jkkm


[1] https://bugzilla.kernel.org/show_bug.cgi?id=100201

Cc: Rafal Milecki 
Tested-by: Knuth Posern 
Reviewed-by: Pieter-Paul Giesberts 
Signed-off-by: Arend van Spriel 
---
This patch fixes a couple of issues mentioned in kernel bugzilla
#100201 with 2015 MacBook Pro machines using this wifi chipset.

The patch applies to master branch of the linux-firmware repository
on top of commit f88e5c2e2ff5 ("Merge 'c11384c' of
git://people.freedesktop.org/~vivijim/linux-firmware...").


--
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


Rate limiting AP bandwidth change messages in ieee80211_config_bw?

2015-09-30 Thread Josh Boyer
Hi Johannes,

We've seen a handful of reports that seem to have verbose output from
the ieee80211_config_bw function in net/mac80211/mlme.c.  It looks
similar to this:

[   66.578652] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   68.522437] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   69.548353] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   70.568677] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   71.489416] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   72.512917] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   73.535866] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   81.777530] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   82.540576] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   94.513467] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   95.634855] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   97.474767] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[   98.498036] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[   99.520472] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[  100.551344] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)
[  101.571100] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 1 (2437/0 MHz)
[  102.490708] wlp3s0: AP xx:xx:xx:xx:xx changed bandwidth, new config
is 2437 MHz, width 2 (2447/0 MHz)

Essentially, this looks like the AP is changing the bandwidth (and
only the width) every second or so.  Why it is doing this, I'm not
sure.  However, this doesn't seem to actually be an error case yet the
kernel logs are getting spammed with this message.

I'm wondering if we could either change this message to use sdata_dbg
instead of sdata_info, or if we could possibly ratelimit it somehow.
I'd be happy to come up with a patch for either, but I wanted to get
your feedback on it before I started.  Do you have any objections or
preference?

josh
--
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