From mcgrof at do-not-panic.com  Fri Mar  8 18:46:38 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Fri, 8 Mar 2013 15:46:38 -0800
Subject: [Announce] open ath9k_htc firmware
Message-ID: <CAB=NE6WwQDfx+H4zV2niLDaZ0vGAahEF5jg1WS+NU7YhTZ9rQw@mail.gmail.com>

Many thanks to Adrian for his hard work on all this and to everyone
else who volunteered to help make this happen, including the
understanding by our management at QCA and even Tensilica requires
some handsome applause for their commitment, understanding on letting
us get this out. We now have a public mailing list for development:

http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw

Full steam ahead!

  Luis

On Fri, Mar 8, 2013 at 3:32 PM, Adrian Chadd <adrian at freebsd.org> wrote:
> Hi,
>
> I hate fanfare.
>
> You can all thank Luis Rodriguez for his ridiculously long and hard
> fighting to get this stuff pushed through the grinder to make this
> happen.
>
> There's also been a hard working team of developers behind the scene -
> Felix Fietkau, Eugene Krasnikov, Sujith Manoharan, and the team from
> Cozybit. They've been working hard to get the codebase converted over
> to using the open source tensilica toolchain and finding/fixing up any
> silly issues that may creep up from that.
>
> I've just been involved in shepharding this stuff into a sensible
> shape and pushing it through the final stage (legal review) before
> publication.
>
> You can find it here:
>
> https://github.com/qca/open-ath9k-htc-firmware
>
> There's a bunch of sorely needed work to do in the short term:
>
> * felix has a replacement cmake build system that I'd like to now integrate;
> * there's lots of build warnings which need to be removed (and then
> build this thing using -Wall -Werror);
> * some general code cleanup and documentation wouldn't be rejected -
> but I don't really want any sweeping code changes to go in until we've
> tidied up the build warnings and validated that the image(s) work
> right.
>
> I plan on doing some test builds shortly. I plan on bumping the
> firmware to 1.4 once felix's cmake system is in place and people have
> validated that this work.s
>
> Thanks,
>
>
>
> Adrian
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


From sujith at msujith.org  Fri Mar  8 21:26:36 2013
From: sujith at msujith.org (Sujith Manoharan)
Date: Sat,  9 Mar 2013 07:56:36 +0530
Subject: [PATCH] First patch to get the ball rolling
Message-ID: <1362795996-18340-1-git-send-email-sujith@msujith.org>

Fix README - there are no AR9285+AR7010 cards.

Signed-off-by: Sujith Manoharan <sujith at msujith.org>
---
 README | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README b/README
index b14253a..f65902d 100644
--- a/README
+++ b/README
@@ -14,7 +14,7 @@ Ok, what are those NICs?
 
 The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
 It comes with an external wireless chip connected via PCIe - typically
-an AR9280 or AR9285.
+an AR9280 or AR9287.
 
 The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
 actual wireless chip.  The wireless core is an off-shoot of the AR9285.
-- 
1.8.1.5



From adrian at freebsd.org  Fri Mar  8 22:54:02 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 8 Mar 2013 19:54:02 -0800
Subject: [PATCH] First patch to get the ball rolling
In-Reply-To: <1362795996-18340-1-git-send-email-sujith@msujith.org>
References: <1362795996-18340-1-git-send-email-sujith@msujith.org>
Message-ID: <CAJ-Vmom5BDQUMsVZUMVXtqeRSnveaCEpJ+hBDxpsiZUOfN3f4A@mail.gmail.com>

Pushed, thanks!



adrian


On 8 March 2013 18:26, Sujith Manoharan <sujith at msujith.org> wrote:
> Fix README - there are no AR9285+AR7010 cards.
>
> Signed-off-by: Sujith Manoharan <sujith at msujith.org>
> ---
>  README | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/README b/README
> index b14253a..f65902d 100644
> --- a/README
> +++ b/README
> @@ -14,7 +14,7 @@ Ok, what are those NICs?
>
>  The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
>  It comes with an external wireless chip connected via PCIe - typically
> -an AR9280 or AR9285.
> +an AR9280 or AR9287.
>
>  The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
>  actual wireless chip.  The wireless core is an off-shoot of the AR9285.
> --
> 1.8.1.5
>
>
> _______________________________________________
> Ath9k_htc_fw mailing list
> Ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw


From sujith at msujith.org  Sat Mar  9 11:05:36 2013
From: sujith at msujith.org (Sujith Manoharan)
Date: Sat, 9 Mar 2013 21:35:36 +0530
Subject: Heads up: I'm about to push this open
In-Reply-To: <CAFSJ42bUwbgzcMj9dUe=PX4hpKds9dy-CLdeATZqJecYUCsjMQ@mail.gmail.com>
References: <48EC4E8D43A28947B1AB2639FA97CDB920B3CA38@nasanexd02a.na.qualcomm.com>
 <7A9ADFFA56024346AAE90B6BABC3BD15168250A2@NASANEXD02B.na.qualcomm.com>
 <48EC4E8D43A28947B1AB2639FA97CDB920B3CA59@nasanexd02a.na.qualcomm.com>
 <48EC4E8D43A28947B1AB2639FA97CDB920B3CA77@nasanexd02a.na.qualcomm.com>
 <7A9ADFFA56024346AAE90B6BABC3BD15168251CC@NASANEXD02B.na.qualcomm.com>
 <CAFSJ42bUwbgzcMj9dUe=PX4hpKds9dy-CLdeATZqJecYUCsjMQ@mail.gmail.com>
Message-ID: <20795.24016.954168.495139@gargle.gargle.HOWL>

(Moving to public mailing list).

Eugene Krasnikov wrote:
> Shall we do a code refactoring or fix build warnings? Shall we move all issues
> from?http://linuxwireless.org/en/users/Drivers/ath9k_htc#TODO
> to?http://github.com/qca/open-ath9k-htc-firmware/ issues?

Most of the TODO items will become obsolete if ath9k could be used for the
core functionality. Sharing code will also make sure that a bug-fix will be
applicable for both PCIE and USB cards.

> Also what is?ar9300?HAL for?

Nothing to do with ath9k_htc.

It's the HW code for the chips in the AR9003 family. This is already in ath9k,
but FreeBSD will probably make use of this HAL for its driver.

Sujith


From mcgrof at do-not-panic.com  Tue Mar 12 16:04:40 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Tue, 12 Mar 2013 13:04:40 -0700
Subject: [PATCH 0/3] ath9k_htc_firmware: few updates
Message-ID: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>

Just a few standard updates.

Luis R. Rodriguez (3):
  ath9k_htc_firmware: add list of commercial devices
  ath9k_htc_firmware: rename README to README.md
  ath9k_htc_firmware: document how to contribute

 CONTRIBUTING |    7 ++++
 README       |  100 ----------------------------------------------------------
 README.md    |   97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 104 insertions(+), 100 deletions(-)
 create mode 100644 CONTRIBUTING
 delete mode 100644 README
 create mode 100644 README.md

-- 
1.7.10.4



From mcgrof at do-not-panic.com  Tue Mar 12 16:04:41 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Tue, 12 Mar 2013 13:04:41 -0700
Subject: [PATCH 1/3] ath9k_htc_firmware: add list of commercial devices
In-Reply-To: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
References: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
Message-ID: <1363118683-2965-2-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>

Some folks are asking, and this is the best list we have
come up with so far.

Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
---
 README |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/README b/README
index 2b78e81..1f0730c 100644
--- a/README
+++ b/README
@@ -32,6 +32,10 @@ ECOS caveats in more detail.
 Ok, what are those NICs?
 ------------------------
 
+For a list of devices available on the market right now see:
+
+http://wireless.kernel.org/en/users/Drivers/ath9k_htc/devices
+
 The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
 It comes with an external wireless chip connected via PCIe - typically
 an AR9280 or AR9287.
-- 
1.7.10.4



From mcgrof at do-not-panic.com  Tue Mar 12 16:04:42 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Tue, 12 Mar 2013 13:04:42 -0700
Subject: [PATCH 2/3] ath9k_htc_firmware: rename README to README.md
In-Reply-To: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
References: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
Message-ID: <1363118683-2965-3-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>

Use the github markup language. This allows README's
to have dynamic links and display on github.

Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
---
 README    |  104 -------------------------------------------------------------
 README.md |   97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 104 deletions(-)
 delete mode 100644 README
 create mode 100644 README.md

diff --git a/README b/README
deleted file mode 100644
index 1f0730c..0000000
--- a/README
+++ /dev/null
@@ -1,104 +0,0 @@
-This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
-802.11n NICs.
-
-What is this exactly?
----------------------
-
-This is the firmware which resides in RAM on the AR7010/AR9271 NICs.
-It is used by ath9k (Linux) and athn (OpenBSD) to provide wireless
-services.
-
-What licence is this covered by?
---------------------------------
-
-The Qualcomm Atheros owned code is under the ISC licence.
-
-The NOTICES.TXT file contains copyright notices for software which
-this firmware release leverages.
-
-There is some code that is based off of work done under contract
-but is owned by Qualcomm Atheros; the original copyright statements
-from that work are in NOTICES.TXT.
-
-The Tensilica code (xtos/xtensa) is distributed with permission from
-Tensilica, Inc., under the MIT licence.
-
-There are three ECOS source files distributed under the terms of
-the GPLv2, with a caveat that linking or using the source files does
-not bring the rest of the binary under the GPLv2.  Please read the
-ECOS caveats in more detail.
-
-
-Ok, what are those NICs?
-------------------------
-
-For a list of devices available on the market right now see:
-
-http://wireless.kernel.org/en/users/Drivers/ath9k_htc/devices
-
-The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
-It comes with an external wireless chip connected via PCIe - typically
-an AR9280 or AR9287.
-
-The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
-actual wireless chip.  The wireless core is an off-shoot of the AR9285.
-It is a single-chip solution.
-
-How do I build it?
-------------------
-
-You're in for a treat.
-
-* You first have to build the toolchain.
-
-  * Linux:
-
-  $ make toolchain
-
-  * FreeBSD:
-
-  $ gmake toolchain
-
-  (Yes, I made this work on FreeBSD as well.)
-
-* Next, build the firmware.
-
-  * Linux:
-
-  $ ./build
-
-  * FreeBSD:
-
-  edit the build script, change make to gmake, and then
-
-  $ ./build
-
-You will end up with two .fw files - one for the AR7010 and one for
-the AR9271.
-
-
-Then what?
-----------
-
-You need to then copy this into the relevant location for your operating
-system.  Yes, this means you need a driver.  No, there's no FreeBSD
-driver yet for this particular chipset, sorry.
-
-
-Where do I file bugs?
----------------------
-
-Please file bugs in github - http://github.com/qca/open-ath9k-htc-firmware/issues .
-
-
-Mailing lists?
---------------
-
-Here you go:
-
-http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
-
-And
-
-ath9k_htc_fw at lists.infradead.org
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..09a44c3
--- /dev/null
+++ b/README.md
@@ -0,0 +1,97 @@
+This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
+802.11n NICs.
+
+# What is this exactly?
+
+This is the firmware which resides in RAM on the AR7010/AR9271 NICs.
+It is used by ath9k (Linux) and athn (OpenBSD) to provide wireless
+services.
+
+# What licence is this covered by?
+
+The Qualcomm Atheros owned code is under the ISC licence.
+
+The NOTICES.TXT file contains copyright notices for software which
+this firmware release leverages.
+
+There is some code that is based off of work done under contract
+but is owned by Qualcomm Atheros; the original copyright statements
+from that work are in NOTICES.TXT.
+
+The Tensilica code (xtos/xtensa) is distributed with permission from
+Tensilica, Inc., under the MIT licence.
+
+There are three ECOS source files distributed under the terms of
+the GPLv2, with a caveat that linking or using the source files does
+not bring the rest of the binary under the GPLv2.  Please read the
+ECOS caveats in more detail.
+
+
+# Ok, what are those NICs?
+
+For a list of devices available on the market right now see:
+
+http://wireless.kernel.org/en/users/Drivers/ath9k_htc/devices
+
+The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
+It comes with an external wireless chip connected via PCIe - typically
+an AR9280 or AR9287.
+
+The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
+actual wireless chip.  The wireless core is an off-shoot of the AR9285.
+It is a single-chip solution.
+
+# How do I build it?
+
+You're in for a treat.
+
+* You first have to build the toolchain.
+
+  * Linux:
+
+  $ make toolchain
+
+  * FreeBSD:
+
+  $ gmake toolchain
+
+  (Yes, I made this work on FreeBSD as well.)
+
+* Next, build the firmware.
+
+  * Linux:
+
+  $ ./build
+
+  * FreeBSD:
+
+  edit the build script, change make to gmake, and then
+
+  $ ./build
+
+You will end up with two .fw files - one for the AR7010 and one for
+the AR9271.
+
+
+# Then what?
+
+You need to then copy this into the relevant location for your operating
+system.  Yes, this means you need a driver.  No, there's no FreeBSD
+driver yet for this particular chipset, sorry.
+
+
+# Where do I file bugs?
+
+Please file bugs in github - http://github.com/qca/open-ath9k-htc-firmware/issues .
+
+
+# Mailing lists?
+
+Here you go:
+
+http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
+
+And
+
+ath9k_htc_fw at lists.infradead.org
+
-- 
1.7.10.4



From mcgrof at do-not-panic.com  Tue Mar 12 16:04:43 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Tue, 12 Mar 2013 13:04:43 -0700
Subject: [PATCH 3/3] ath9k_htc_firmware: document how to contribute
In-Reply-To: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
References: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
Message-ID: <1363118683-2965-4-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>

This relies on the new signed-off-by project which
tries to document the Developer Certificate of Origin
process used by the Linux kernel and allows other
projects to easily document following such same procedures.

In short:

This project tracks patch provenance and licensing using the Developer
Certificate of Origin and Signed-off-by tags initially developed by
the Linux kernel project.  Because the documentation for this
procedure is licensed under the GPLv2, we have chosen not to include
it in our project directly.  Instead, please see:

http://git.tremily.us/?p=signed-off-by.git;a=blob;f=Documentation/SubmittingPatches;h=34055986ab836553896f091225448c448a4cc62c;hb=refs/h

We have chosen the permissive license route of using
the DCO fork.

For details see:

https://github.com/wking/signed-off-by/
https://lkml.org/lkml/2012/11/20/636

Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
---
 CONTRIBUTING |    7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 CONTRIBUTING

diff --git a/CONTRIBUTING b/CONTRIBUTING
new file mode 100644
index 0000000..194038e
--- /dev/null
+++ b/CONTRIBUTING
@@ -0,0 +1,7 @@
+This project tracks patch provenance and licensing using the Developer
+Certificate of Origin and Signed-off-by tags initially developed by
+the Linux kernel project.  Because the documentation for this
+procedure is licensed under the GPLv2, we have chosen not to include
+it in our project directly.  Instead, please see:
+
+  http://git.tremily.us/?p=signed-off-by.git;a=blob;f=Documentation/SubmittingPatches;h=34055986ab836553896f091225448c448a4cc62c;hb=refs/heads/signed-off-by
-- 
1.7.10.4



From linux at rempel-privat.de  Sun Mar 17 08:29:06 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 13:29:06 +0100
Subject: build warnings
Message-ID: <5145B712.20409@rempel-privat.de>

Hallo all,

are there any one working on build warnings? I can start with it.
-- 
Regards,
Oleksij


From adrian at freebsd.org  Sun Mar 17 11:04:32 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Sun, 17 Mar 2013 08:04:32 -0700
Subject: build warnings
In-Reply-To: <5145B712.20409@rempel-privat.de>
References: <5145B712.20409@rempel-privat.de>
Message-ID: <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>

Nope! Go for it.



Adrian

On 17 March 2013 05:29, Oleksij Rempel <linux at rempel-privat.de> wrote:
> Hallo all,
>
> are there any one working on build warnings? I can start with it.
> --
> Regards,
> Oleksij
>
> _______________________________________________
> Ath9k_htc_fw mailing list
> Ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw


From linux at rempel-privat.de  Sun Mar 17 11:52:42 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 16:52:42 +0100
Subject: build warnings
In-Reply-To: <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
Message-ID: <5145E6CA.5050408@rempel-privat.de>

Should i remove AH_BYTE_ORDER and big endian optimisation in 
./target_firmware/wlan/ah_osdep.h?


Am 17.03.2013 16:04, schrieb Adrian Chadd:
> Nope! Go for it.
>
>
>
> Adrian
>
> On 17 March 2013 05:29, Oleksij Rempel <linux at rempel-privat.de> wrote:
>> Hallo all,
>>
>> are there any one working on build warnings? I can start with it.
>> --
>> Regards,
>> Oleksij
>>
>> _______________________________________________
>> Ath9k_htc_fw mailing list
>> Ath9k_htc_fw at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Sun Mar 17 14:03:01 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:03:01 +0100
Subject: build warnings
In-Reply-To: <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
 <5145E6CA.5050408@rempel-privat.de>
 <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>
Message-ID: <51460555.2060806@rempel-privat.de>

it should definitely be splitted. If you introduce
some regression, it should be bisectable.

hmm... what do we do now with patches? Some of my patches will conflict 
with yours and in some situations for same warning we did different 
decision.

Am 17.03.2013 18:00, schrieb Eugene Krasnikov:
> Hi Adrian,
>
> Shell we break fixing warnings in little pieces/patches?
> There is also a patch in attachment  that fixes warnings with
> proprietary toolchain. May be we can reuse it...
>
> 2013/3/17 Oleksij Rempel <linux at rempel-privat.de
> <mailto:linux at rempel-privat.de>>
>
>     Should i remove AH_BYTE_ORDER and big endian optimisation in
>     ./target_firmware/wlan/ah_osdep.h?
>
>
>     Am 17.03.2013 16:04, schrieb Adrian Chadd:
>
>         Nope! Go for it.
>
>
>
>         Adrian
>
>         On 17 March 2013 05:29, Oleksij Rempel <linux at rempel-privat.de
>         <mailto:linux at rempel-privat.de>> wrote:
>
>             Hallo all,
>
>             are there any one working on build warnings? I can start
>             with it.
>             --
>             Regards,
>             Oleksij
>
>             _______________________________________________
>             Ath9k_htc_fw mailing list
>             Ath9k_htc_fw at lists.infradead.org
>             <mailto:Ath9k_htc_fw at lists.infradead.org>
>             http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>
>
>
>     --
>     Regards,
>     Oleksij
>
>     _______________________________________________
>     Ath9k_htc_fw mailing list
>     Ath9k_htc_fw at lists.infradead.org
>     <mailto:Ath9k_htc_fw at lists.infradead.org>
>     http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>
>
>
>
> --
> Best regards,
> Eugene


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Sun Mar 17 14:14:24 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:24 +0100
Subject: [PATCH 0/6] build fix (work sync)
Message-ID: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>

Sinse we have some conflicts, let us sync our works.
Here are my pathces.

Oleksij Rempel (6):
  build fix: unsigned long = %lX
  build fix: Magpie_Sys_Commands_Tbl used only if MAGPIE_ENABLE_WLAN ==
    0
  build fix: remove unused *ahp
  build fix: src on memcpy is allways const
  build fix: remove byte order/swapping support
  build fix: excess elements in array initializer

 .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c  | 12 ++++-----
 .../magpie_fw_dev/target/adf/adf_os_mem_pvt.h      |  2 +-
 .../magpie_fw_dev/target/inc/adf_os_mem.h          |  2 +-
 target_firmware/magpie_fw_dev/target/init/magpie.c |  2 ++
 target_firmware/wlan/ah.h                          |  8 +++---
 target_firmware/wlan/ah_osdep.c                    |  2 +-
 target_firmware/wlan/ah_osdep.h                    | 31 +---------------------
 target_firmware/wlan/ar5416_hw.c                   |  2 --
 8 files changed, 16 insertions(+), 45 deletions(-)

-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:25 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:25 +0100
Subject: [PATCH 1/6] build fix: unsigned long = %lX
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-2-git-send-email-linux@rempel-privat.de>

From: Oleksij Rempel <bug-track at fisher-privat.net>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c            | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
index 6fd2541..5d3b14c 100755
--- a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
+++ b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
@@ -23,7 +23,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
         	    tmp_buf[2] = buf[i+2];
         	    tmp_buf[3] = buf[i+3];
 
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08lX, ", *((unsigned long *)(&tmp_buf[0])));
 
         } else {
             
@@ -34,7 +34,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
 			tmp_buf[1] = buf[i+2];
 			tmp_buf[2] = buf[i+1];
 			tmp_buf[3] = buf[i+0];
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08lX, ", *((unsigned long *)(&tmp_buf[0])));
 		}
         checksum = checksum ^ *((unsigned long *)(&tmp_buf[0]));
 	}
@@ -58,7 +58,7 @@ void write_rom(FILE *out, FILE *in)
 		if( size == 0 )
 		{
 			if (multiple)
-				fprintf(out, "%08X\n", checksum);
+				fprintf(out, "%08lX\n", checksum);
 
 			goto ERR_DONE;
 		}
@@ -66,7 +66,7 @@ void write_rom(FILE *out, FILE *in)
 		{
 		    multiple = 0;
 			write_file(out, buffer, size, NULL, 1);
-			fprintf(out, "%08X\n", checksum);
+			fprintf(out, "%08lX\n", checksum);
 			goto ERR_DONE;
 		}
 		else if (size==MAX_READ_SIZE)
@@ -104,7 +104,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 		{
 			if (multiple)
 			{
-				fprintf(out, "0x%08X\n", checksum);
+				fprintf(out, "0x%08lX\n", checksum);
 				file_size += 4;
 			}
 
@@ -118,7 +118,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 			multiple = 0;
 
 			write_file(out, buffer, size, NULL, hif);
-			fprintf(out, "0x%08X\n", checksum);
+			fprintf(out, "0x%08lX\n", checksum);
 
 			if( (size%4)!=0 )
 			    file_size += (4-(size%4));
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:27 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:27 +0100
Subject: [PATCH 3/6] build fix: remove unused *ahp
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-4-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ar5416_hw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target_firmware/wlan/ar5416_hw.c b/target_firmware/wlan/ar5416_hw.c
index 3045ab6..b512b44 100644
--- a/target_firmware/wlan/ar5416_hw.c
+++ b/target_firmware/wlan/ar5416_hw.c
@@ -731,7 +731,6 @@ HAL_BOOL ar5416SetupTxDesc_20(struct ath_hal *ah, struct ath_desc *ds,
 #define RTSCTS  (HAL_TXDESC_RTSENA|HAL_TXDESC_CTSENA)
 
         struct ar5416_desc *ads = AR5416DESC(ds);
-        struct ath_hal_5416 *ahp = AH5416(ah);
 
         (void) hdrLen;
 
@@ -902,7 +901,6 @@ void ar5416Set11nTxDesc_20(struct ath_hal *ah, struct ath_desc *ds,
 			   a_uint32_t flags)
 {
         struct ar5416_desc *ads = AR5416DESC(ds);
-        struct ath_hal_5416 *ahp = AH5416(ah);
 
         HALASSERT(isValidPktType(type));
         HALASSERT(isValidKeyType(keyType));
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:28 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:28 +0100
Subject: [PATCH 4/6] build fix: src on memcpy is allways const
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-5-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h | 2 +-
 target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h     | 2 +-
 target_firmware/wlan/ah_osdep.c                           | 2 +-
 target_firmware/wlan/ah_osdep.h                           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h b/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
index cf8dadd..d5d8684 100755
--- a/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
+++ b/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
@@ -17,7 +17,7 @@ static inline void 		__adf_os_mem_free(void *buf)
 }
 
 /* move a memory buffer */
-static inline void 		__adf_os_mem_copy(void *dst, void *src, adf_os_size_t size)
+static inline void 		__adf_os_mem_copy(void *dst, const void *src, adf_os_size_t size)
 {
     A_MEMCPY(dst,src,size);    
 }
diff --git a/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h b/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
index 3b42e95..a07d2e6 100755
--- a/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
+++ b/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
@@ -42,7 +42,7 @@ adf_os_mem_free(void *buf)
  * @param[in] size    buffer size
  */
 static inline void
-adf_os_mem_copy(void *dst, void *src, adf_os_size_t size)
+adf_os_mem_copy(void *dst, const void *src, adf_os_size_t size)
 {
     __adf_os_mem_copy(dst, src, size);
 }
diff --git a/target_firmware/wlan/ah_osdep.c b/target_firmware/wlan/ah_osdep.c
index bfcc608..6d2b407 100755
--- a/target_firmware/wlan/ah_osdep.c
+++ b/target_firmware/wlan/ah_osdep.c
@@ -107,7 +107,7 @@ ath_hal_memzero(void *dst, adf_os_size_t n)
 }
 
 void * __ahdecl
-ath_hal_memcpy(void *dst, void *src, adf_os_size_t n)
+ath_hal_memcpy(void *dst, const void *src, adf_os_size_t n)
 {
 	adf_os_mem_copy(dst, src, n);
 	return 0;
diff --git a/target_firmware/wlan/ah_osdep.h b/target_firmware/wlan/ah_osdep.h
index 54b2a9b..d62de3d 100755
--- a/target_firmware/wlan/ah_osdep.h
+++ b/target_firmware/wlan/ah_osdep.h
@@ -131,7 +131,7 @@ extern  void* __ahdecl ath_hal_ioremap(a_uint32_t addr, a_uint32_t len);
 #define OS_MEMZERO(_a, _n)  ath_hal_memzero((_a), (_n))
 extern void __ahdecl ath_hal_memzero(void *, size_t);
 #define OS_MEMCPY(_d, _s, _n)   ath_hal_memcpy(_d,_s,_n)
-extern void * __ahdecl ath_hal_memcpy(void *, void *, size_t);
+extern void * __ahdecl ath_hal_memcpy(void *, const void *, size_t);
 
 #ifndef abs
 #define abs(_a)     __builtin_abs(_a)
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:26 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:26 +0100
Subject: [PATCH 2/6] build fix: Magpie_Sys_Commands_Tbl used only if
 MAGPIE_ENABLE_WLAN == 0
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-3-git-send-email-linux@rempel-privat.de>

From: Oleksij Rempel <bug-track at fisher-privat.net>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/magpie_fw_dev/target/init/magpie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target_firmware/magpie_fw_dev/target/init/magpie.c b/target_firmware/magpie_fw_dev/target/init/magpie.c
index 4039eae..ffa14b9 100755
--- a/target_firmware/magpie_fw_dev/target/init/magpie.c
+++ b/target_firmware/magpie_fw_dev/target/init/magpie.c
@@ -19,6 +19,7 @@ void htc_setup_comp(void)
 static void dispatch_magpie_sys_cmds(void *pContext, A_UINT16 Command,
 				     A_UINT16 SeqNo, A_UINT8 *buffer, int Length);
 
+#if MAGPIE_ENABLE_WLAN == 0
 static WMI_DISPATCH_ENTRY Magpie_Sys_DispatchEntries[] =
 {
 	{dispatch_magpie_sys_cmds,  WMI_ECHO_CMDID, 0},
@@ -26,6 +27,7 @@ static WMI_DISPATCH_ENTRY Magpie_Sys_DispatchEntries[] =
 };
 
 static WMI_DECLARE_DISPATCH_TABLE(Magpie_Sys_Commands_Tbl, Magpie_Sys_DispatchEntries);
+#endif
 
 htc_handle_t htc_handle;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:29 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:29 +0100
Subject: [PATCH 5/6] build fix: remove byte order/swapping support
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-6-git-send-email-linux@rempel-privat.de>

currently AH_BYTE_ORDER is not defined. So this parst is unused any way.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah_osdep.h | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/target_firmware/wlan/ah_osdep.h b/target_firmware/wlan/ah_osdep.h
index d62de3d..58a07ec 100755
--- a/target_firmware/wlan/ah_osdep.h
+++ b/target_firmware/wlan/ah_osdep.h
@@ -141,41 +141,12 @@ struct ath_hal;
 extern  a_uint32_t __ahdecl ath_hal_getuptime(struct ath_hal *);
 #define OS_GETUPTIME(_ah)   ath_hal_getuptime(_ah)
 
-/*
- * Byte order/swapping support.
- */
-#define AH_LITTLE_ENDIAN    1234
-#define AH_BIG_ENDIAN       4321
-
-#if AH_BYTE_ORDER == AH_BIG_ENDIAN
-/*
- * This could be optimized but since we only use it for
- * a few registers there's little reason to do so.
- */
-#ifndef __bswap32
-static inline a_uint32_t
-__bswap32(a_uint32_t _x)
-{
-    return ((a_uint32_t)(
-          (((const a_uint8_t *)(&_x))[0]    ) |
-          (((const a_uint8_t *)(&_x))[1]<< 8) |
-          (((const a_uint8_t *)(&_x))[2]<<16) |
-          (((const a_uint8_t *)(&_x))[3]<<24))
-    );
-}
-#endif
-#ifndef __bswap16
-#define __bswap16(_x) ( (a_uint16_t)( (((const a_uint8_t *)(&_x))[0] ) |\
-                         ( ( (const a_uint8_t *)( &_x ) )[1]<< 8) ) )
-#endif
-#else
 #ifndef __bswap32
 #define __bswap32(_x)	(_x)
 #endif
 #ifndef __bswap16
 #define __bswap16(_x)	(_x)
 #endif
-#endif
 
 #define OS_REG_WRITE(_ah, _reg, _val)   ath_hal_reg_write_target(_ah, _reg, _val)
 #define OS_REG_READ(_ah, _reg)      ath_hal_reg_read_target(_ah, _reg)
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:14:30 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:14:30 +0100
Subject: [PATCH 6/6] build fix: excess elements in array initializer
In-Reply-To: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1363544070-17350-7-git-send-email-linux@rempel-privat.de>

in target_firmware/wlan/ar5416_phy.c:
HAL_RATE_TABLE ar5416_11ng_table
last part of array was probably ignored by compiler.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target_firmware/wlan/ah.h b/target_firmware/wlan/ah.h
index c86d115..493dc88 100755
--- a/target_firmware/wlan/ah.h
+++ b/target_firmware/wlan/ah.h
@@ -240,7 +240,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[33];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -254,7 +254,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[33];
 } HAL_RATE_TABLE;
 
 typedef struct {
@@ -271,7 +271,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[33];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -282,7 +282,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[33];
 } HAL_RATE_TABLE;
 
 #define HAL_RATESERIES_RTS_CTS    0x0001  /* use rts/cts w/this series */
-- 
1.8.1.2



From linux at rempel-privat.de  Sun Mar 17 14:49:34 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sun, 17 Mar 2013 19:49:34 +0100
Subject: build warnings
In-Reply-To: <CAFSJ42Y+Xf2GOPHNg6OTOQ19VXCtXp=f58QFA0OoKzwsxVziow@mail.gmail.com>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
 <5145E6CA.5050408@rempel-privat.de>
 <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>
 <51460555.2060806@rempel-privat.de>
 <CAFSJ42Y+Xf2GOPHNg6OTOQ19VXCtXp=f58QFA0OoKzwsxVziow@mail.gmail.com>
Message-ID: <5146103E.7080603@rempel-privat.de>

Am 17.03.2013 19:14, schrieb Eugene Krasnikov:
> My patch is obsolete since it was created based on old toolchain. I
> attached it just in case you wanna reuse some of the parts. suggestion
> is to go for yours.

ahh.. i see now.

> How much did you fix already?

i sended my patches to the list

> May be we can split our work some how?
> Let's say you take common part and ar7010 and i fix ar9271 specific
> warnings?

ok.

-- 
Regards,
Oleksij


From adrian at freebsd.org  Sun Mar 17 15:47:14 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Sun, 17 Mar 2013 12:47:14 -0700
Subject: build warnings
In-Reply-To: <5146103E.7080603@rempel-privat.de>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
 <5145E6CA.5050408@rempel-privat.de>
 <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>
 <51460555.2060806@rempel-privat.de>
 <CAFSJ42Y+Xf2GOPHNg6OTOQ19VXCtXp=f58QFA0OoKzwsxVziow@mail.gmail.com>
 <5146103E.7080603@rempel-privat.de>
Message-ID: <CAJ-Vmoks3FuRLWj+7StdJ4_JH6pJupdj4GdownaMA2QZdYm6HQ@mail.gmail.com>

Give me a couple days; I'm still finalising what the "accepting
contributions" process will be. :-)

But keep up the good work!



Adrian


On 17 March 2013 11:49, Oleksij Rempel <linux at rempel-privat.de> wrote:
> Am 17.03.2013 19:14, schrieb Eugene Krasnikov:
>
>> My patch is obsolete since it was created based on old toolchain. I
>> attached it just in case you wanna reuse some of the parts. suggestion
>> is to go for yours.
>
>
> ahh.. i see now.
>
>
>> How much did you fix already?
>
>
> i sended my patches to the list
>
>
>> May be we can split our work some how?
>> Let's say you take common part and ar7010 and i fix ar9271 specific
>> warnings?
>
>
> ok.
>
> --
> Regards,
> Oleksij


From linux at rempel-privat.de  Mon Mar 18 06:12:47 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Mon, 18 Mar 2013 11:12:47 +0100
Subject: [PATCH 1/6] build fix: unsigned long = %lX
In-Reply-To: <CAFSJ42bwHjNPw9cexHPUkeQqXUxPynL8BP0YpwXcM7X0rEWbhw@mail.gmail.com>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
 <1363544070-17350-2-git-send-email-linux@rempel-privat.de>
 <CAFSJ42bwHjNPw9cexHPUkeQqXUxPynL8BP0YpwXcM7X0rEWbhw@mail.gmail.com>
Message-ID: <5146E89F.90200@rempel-privat.de>

Am 18.03.2013 11:08, schrieb Eugene Krasnikov:
> For some reason 'make build' fails after applying this patch with a
> following error:
>
> target_firmware/magpie_fw_dev/build/magpie_1_1/image/magpie_ram/../../../..//build/magpie_1_1/image/magpie_ram/fwu.c:4:1:
> warning: large integer implicitly truncated to unsigned type [-Woverflow]
>
> Do you have the same error?

no. i use build script insted of "make build". hmm.. May be this make a 
difference.


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Mon Mar 18 06:36:32 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Mon, 18 Mar 2013 11:36:32 +0100
Subject: [PATCH 1/6] build fix: unsigned long = %lX
In-Reply-To: <5146E89F.90200@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
 <1363544070-17350-2-git-send-email-linux@rempel-privat.de>
 <CAFSJ42bwHjNPw9cexHPUkeQqXUxPynL8BP0YpwXcM7X0rEWbhw@mail.gmail.com>
 <5146E89F.90200@rempel-privat.de>
Message-ID: <5146EE30.1090103@rempel-privat.de>

Am 18.03.2013 11:12, schrieb Oleksij Rempel:
> Am 18.03.2013 11:08, schrieb Eugene Krasnikov:
>> For some reason 'make build' fails after applying this patch with a
>> following error:
>>
>> target_firmware/magpie_fw_dev/build/magpie_1_1/image/magpie_ram/../../../..//build/magpie_1_1/image/magpie_ram/fwu.c:4:1:
>>
>> warning: large integer implicitly truncated to unsigned type [-Woverflow]
>>
>> Do you have the same error?
>
> no. i use build script insted of "make build". hmm.. May be this make a
> difference.

found it now.


-- 
Regards,
Oleksij


From k.eugene.e at gmail.com  Mon Mar 18 13:03:48 2013
From: k.eugene.e at gmail.com (Eugene Krasnikov)
Date: Mon, 18 Mar 2013 18:03:48 +0100
Subject: Build warnings fixes
Message-ID: <CAFSJ42Zrx82f0Ti2ve3c6=+vjZSeKqOgg61MkaTh2WwfQyNjxw@mail.gmail.com>

Hi Oleksij,

To sync our work i'll send patches one by one as attachment int this mail
thread

-- 
Best regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130318/75cdb185/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-save_cmnos_printf-type-to-function-pointer.patch
Type: application/octet-stream
Size: 2431 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130318/75cdb185/attachment.obj>

From linux at rempel-privat.de  Tue Mar 19 06:07:07 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Tue, 19 Mar 2013 11:07:07 +0100
Subject: Build warnings fixes
In-Reply-To: <CAFSJ42Zrx82f0Ti2ve3c6=+vjZSeKqOgg61MkaTh2WwfQyNjxw@mail.gmail.com>
References: <CAFSJ42Zrx82f0Ti2ve3c6=+vjZSeKqOgg61MkaTh2WwfQyNjxw@mail.gmail.com>
Message-ID: <514838CB.9000308@rempel-privat.de>

Hi Eugene,

please send patches in body of email with different subjects, not as 
attachment. It makes it easier to review.

You can use "git send-email"

Am 18.03.2013 18:03, schrieb Eugene Krasnikov:
> Hi Oleksij,
>
> To sync our work i'll send patches one by one as attachment int this
> mail thread
>
> --
> Best regards,
> Eugene


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Tue Mar 19 06:10:06 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Tue, 19 Mar 2013 11:10:06 +0100
Subject: maeling list configuration
Message-ID: <5148397E.7030201@rempel-privat.de>

Hi Adrian,

can you please configure this list to have some kind of subject. For 
example [ath9k_htc_fw] ;)
-- 
Regards,
Oleksij


From kvalo at qca.qualcomm.com  Tue Mar 19 06:23:29 2013
From: kvalo at qca.qualcomm.com (Kalle Valo)
Date: Tue, 19 Mar 2013 12:23:29 +0200
Subject: maeling list configuration
In-Reply-To: <5148397E.7030201@rempel-privat.de> (Oleksij Rempel's message of
 "Tue, 19 Mar 2013 11:10:06 +0100")
References: <5148397E.7030201@rempel-privat.de>
Message-ID: <87d2uv1ye6.fsf@kamboji.qca.qualcomm.com>

Oleksij Rempel <linux at rempel-privat.de> writes:

> can you please configure this list to have some kind of subject. For
> example [ath9k_htc_fw] ;)

Please don't, those are annoying :)

Why do you need it? If you need it for filtering, you can use List-Id
header.

-- 
Kalle Valo


From adrian at freebsd.org  Wed Mar 27 14:35:26 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Wed, 27 Mar 2013 11:35:26 -0700
Subject: [PATCH 2/3] ath9k_htc_firmware: rename README to README.md
In-Reply-To: <1363118683-2965-3-git-send-email-mcgrof@do-not-panic.com>
References: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
 <1363118683-2965-3-git-send-email-mcgrof@do-not-panic.com>
Message-ID: <CAJ-Vmomgbk0JeX1uAoesCD1BjAC6QDmGin+KdJS2pQk=6yceMw@mail.gmail.com>

Hiya,

Would you mind resubmitting this against the current contents of README?

Thanks,



adrian


On 12 March 2013 13:04, Luis R. Rodriguez <mcgrof at do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>
>
> Use the github markup language. This allows README's
> to have dynamic links and display on github.
>
> Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
> ---
>  README    |  104 -------------------------------------------------------------
>  README.md |   97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 97 insertions(+), 104 deletions(-)
>  delete mode 100644 README
>  create mode 100644 README.md
>
> diff --git a/README b/README
> deleted file mode 100644
> index 1f0730c..0000000
> --- a/README
> +++ /dev/null
> @@ -1,104 +0,0 @@
> -This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
> -802.11n NICs.
> -
> -What is this exactly?
> ----------------------
> -
> -This is the firmware which resides in RAM on the AR7010/AR9271 NICs.
> -It is used by ath9k (Linux) and athn (OpenBSD) to provide wireless
> -services.
> -
> -What licence is this covered by?
> ---------------------------------
> -
> -The Qualcomm Atheros owned code is under the ISC licence.
> -
> -The NOTICES.TXT file contains copyright notices for software which
> -this firmware release leverages.
> -
> -There is some code that is based off of work done under contract
> -but is owned by Qualcomm Atheros; the original copyright statements
> -from that work are in NOTICES.TXT.
> -
> -The Tensilica code (xtos/xtensa) is distributed with permission from
> -Tensilica, Inc., under the MIT licence.
> -
> -There are three ECOS source files distributed under the terms of
> -the GPLv2, with a caveat that linking or using the source files does
> -not bring the rest of the binary under the GPLv2.  Please read the
> -ECOS caveats in more detail.
> -
> -
> -Ok, what are those NICs?
> -------------------------
> -
> -For a list of devices available on the market right now see:
> -
> -http://wireless.kernel.org/en/users/Drivers/ath9k_htc/devices
> -
> -The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
> -It comes with an external wireless chip connected via PCIe - typically
> -an AR9280 or AR9287.
> -
> -The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
> -actual wireless chip.  The wireless core is an off-shoot of the AR9285.
> -It is a single-chip solution.
> -
> -How do I build it?
> -------------------
> -
> -You're in for a treat.
> -
> -* You first have to build the toolchain.
> -
> -  * Linux:
> -
> -  $ make toolchain
> -
> -  * FreeBSD:
> -
> -  $ gmake toolchain
> -
> -  (Yes, I made this work on FreeBSD as well.)
> -
> -* Next, build the firmware.
> -
> -  * Linux:
> -
> -  $ ./build
> -
> -  * FreeBSD:
> -
> -  edit the build script, change make to gmake, and then
> -
> -  $ ./build
> -
> -You will end up with two .fw files - one for the AR7010 and one for
> -the AR9271.
> -
> -
> -Then what?
> -----------
> -
> -You need to then copy this into the relevant location for your operating
> -system.  Yes, this means you need a driver.  No, there's no FreeBSD
> -driver yet for this particular chipset, sorry.
> -
> -
> -Where do I file bugs?
> ----------------------
> -
> -Please file bugs in github - http://github.com/qca/open-ath9k-htc-firmware/issues .
> -
> -
> -Mailing lists?
> ---------------
> -
> -Here you go:
> -
> -http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
> -
> -And
> -
> -ath9k_htc_fw at lists.infradead.org
> -
> diff --git a/README.md b/README.md
> new file mode 100644
> index 0000000..09a44c3
> --- /dev/null
> +++ b/README.md
> @@ -0,0 +1,97 @@
> +This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
> +802.11n NICs.
> +
> +# What is this exactly?
> +
> +This is the firmware which resides in RAM on the AR7010/AR9271 NICs.
> +It is used by ath9k (Linux) and athn (OpenBSD) to provide wireless
> +services.
> +
> +# What licence is this covered by?
> +
> +The Qualcomm Atheros owned code is under the ISC licence.
> +
> +The NOTICES.TXT file contains copyright notices for software which
> +this firmware release leverages.
> +
> +There is some code that is based off of work done under contract
> +but is owned by Qualcomm Atheros; the original copyright statements
> +from that work are in NOTICES.TXT.
> +
> +The Tensilica code (xtos/xtensa) is distributed with permission from
> +Tensilica, Inc., under the MIT licence.
> +
> +There are three ECOS source files distributed under the terms of
> +the GPLv2, with a caveat that linking or using the source files does
> +not bring the rest of the binary under the GPLv2.  Please read the
> +ECOS caveats in more detail.
> +
> +
> +# Ok, what are those NICs?
> +
> +For a list of devices available on the market right now see:
> +
> +http://wireless.kernel.org/en/users/Drivers/ath9k_htc/devices
> +
> +The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
> +It comes with an external wireless chip connected via PCIe - typically
> +an AR9280 or AR9287.
> +
> +The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
> +actual wireless chip.  The wireless core is an off-shoot of the AR9285.
> +It is a single-chip solution.
> +
> +# How do I build it?
> +
> +You're in for a treat.
> +
> +* You first have to build the toolchain.
> +
> +  * Linux:
> +
> +  $ make toolchain
> +
> +  * FreeBSD:
> +
> +  $ gmake toolchain
> +
> +  (Yes, I made this work on FreeBSD as well.)
> +
> +* Next, build the firmware.
> +
> +  * Linux:
> +
> +  $ ./build
> +
> +  * FreeBSD:
> +
> +  edit the build script, change make to gmake, and then
> +
> +  $ ./build
> +
> +You will end up with two .fw files - one for the AR7010 and one for
> +the AR9271.
> +
> +
> +# Then what?
> +
> +You need to then copy this into the relevant location for your operating
> +system.  Yes, this means you need a driver.  No, there's no FreeBSD
> +driver yet for this particular chipset, sorry.
> +
> +
> +# Where do I file bugs?
> +
> +Please file bugs in github - http://github.com/qca/open-ath9k-htc-firmware/issues .
> +
> +
> +# Mailing lists?
> +
> +Here you go:
> +
> +http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
> +
> +And
> +
> +ath9k_htc_fw at lists.infradead.org
> +
> --
> 1.7.10.4
>


From adrian at freebsd.org  Wed Mar 27 14:40:28 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Wed, 27 Mar 2013 11:40:28 -0700
Subject: Now that it's open, what next?
Message-ID: <CAJ-Vmo=vpBYppd4pHqY1nuixaFaUtiQg4ZVtmHGVUdQJ3bWjTA@mail.gmail.com>

Hiya,

Now that things are open, done and dusted - what's next?

* Felix has some outstanding build infrastructure changes that convert
things over to cmake, rather than the currently glued together way;
* Eugene and others have some compile warning fixes;
* I'd like to fix up some of the compiler warning fixes too.

So, what I'm going to do over the next couple days:

* I'm going to write up a submission process wiki page - all the
submission process will be is "It requires a signed-off-by tag" -
http://ltsi.linuxfoundation.org/developers/signed-process;
* I'll write up a branching process, as I'd like to keep branches for
each release we cut off of master;
* I'll cut a 1.4 release based on the current tree and we can push
that into the repository;
* I'll cut a 1.4 branch, just so people can backport whatever fixes
they'd like to a stable firmware release (but I won't be doing
development on anything but master);
* Then I'll open things up for submission.

I'll chase up with Eugene and others to get some compile time warnings
fixed up and we can do some pre-releases with hose.

We'll also need to get ath9k_htc updated with a new version check.
Since the API won't change for now, I'm hoping we can require both 1.3
and 1.4 firmware.

I'll send out another followup announcement once I've completed the above.

Thanks for your patience!



Adrian


From mcgrof at do-not-panic.com  Thu Mar 28 21:15:39 2013
From: mcgrof at do-not-panic.com (Luis R. Rodriguez)
Date: Thu, 28 Mar 2013 18:15:39 -0700
Subject: [PATCH] ath9k_htc_firmware: rename README to README.md
Message-ID: <1364519739-5468-1-git-send-email-mcgrof@do-not-panic.com>

From: "Luis R. Rodriguez" <mcgrof at do-not-panic.com>

Use the github markup language. This allows README's
to have dynamic links and display on github.

I've done a bit of trimmng too.

Signed-off-by: Luis R. Rodriguez <mcgrof at do-not-panic.com>
---
 README => README.md |   83 +++++++++++++++++----------------------------------
 1 file changed, 28 insertions(+), 55 deletions(-)
 rename README => README.md (57%)

diff --git a/README b/README.md
similarity index 57%
rename from README
rename to README.md
index 18af41f..788c3a3 100644
--- a/README
+++ b/README.md
@@ -1,15 +1,12 @@
-This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
-802.11n NICs.
-
-What is this exactly?
----------------------
+ath9k_htc open firmare
+======================
 
-This is the firmware which resides in RAM on the AR7010/AR9271 NICs.
-It is used by ath9k (Linux) and athn (OpenBSD) to provide wireless
-services.
+This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB
+802.11n NICs. This is the firmware which resides in RAM on the
+AR7010/AR9271 NICs. It is used by ath9k (Linux) and athn (OpenBSD)
+to provide wireless services.
 
-What licence is this covered by?
---------------------------------
+## What licence is this covered by?
 
 The Qualcomm Atheros owned code is under the ClearBSD licence.
 
@@ -29,8 +26,7 @@ not bring the rest of the binary under the GPLv2.  Please read the
 ECOS caveats in more detail.
 
 
-Ok, what are those NICs?
-------------------------
+## Ok, what are those NICs?
 
 The AR7010 is a USB/PCIe SoC with onboard RAM, ROM and flash.
 It comes with an external wireless chip connected via PCIe - typically
@@ -40,61 +36,38 @@ The AR9271 is a USB/Wifi SoC with onboad RAM, ROM, flash and the
 actual wireless chip.  The wireless core is an off-shoot of the AR9285.
 It is a single-chip solution.
 
-How do I build it?
-------------------
-
-You're in for a treat.
-
-* You first have to build the toolchain.
-
-  * Linux:
-
-  $ make toolchain
-
-  * FreeBSD:
-
-  $ gmake toolchain
-
-  (Yes, I made this work on FreeBSD as well.)
+## How do I build it?
 
-* Next, build the firmware.
-
-  * Linux:
+You will end up with two .fw files - one for the AR7010 and one for
+the AR9271. You can build this on Linux and FreeBSD. You first
+have to buid the toolchain and then the firmware.
 
-  $ ./build
+### Linux
 
-  * FreeBSD:
+```bash 
+make toolchain
+./build
+```
 
-  edit the build script, change make to gmake, and then
+### FreeBSD
 
-  $ ./build
+Edit the build script, change make to gmake, and then
 
-You will end up with two .fw files - one for the AR7010 and one for
-the AR9271.
+```bash 
+gmake toolchain
+./build
+```
 
-
-Then what?
-----------
+## Install the firmware
 
 You need to then copy this into the relevant location for your operating
 system.  Yes, this means you need a driver.  No, there's no FreeBSD
 driver yet for this particular chipset, sorry.
 
+## Bug reports
 
-Where do I file bugs?
----------------------
-
-Please file bugs in github - http://github.com/qca/open-ath9k-htc-firmware/issues .
-
-
-Mailing lists?
---------------
-
-Here you go:
-
-http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
-
-And
+Please file [bugs in github](http://github.com/qca/open-ath9k-htc-firmware/issues) 
 
-ath9k_htc_fw at lists.infradead.org
+## Mailing lists
 
+  * [Mailing List for ath9k_htc](http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw) 
-- 
1.7.10.4



From linux at rempel-privat.de  Fri Mar 29 05:01:35 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:35 +0100
Subject: [PATCH 01/31] build fix: Magpie_Sys_Commands_Tbl used only if
 MAGPIE_ENABLE_WLAN == 0
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-2-git-send-email-linux@rempel-privat.de>

From: Oleksij Rempel <bug-track at fisher-privat.net>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/magpie_fw_dev/target/init/magpie.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target_firmware/magpie_fw_dev/target/init/magpie.c b/target_firmware/magpie_fw_dev/target/init/magpie.c
index 4039eae..ffa14b9 100755
--- a/target_firmware/magpie_fw_dev/target/init/magpie.c
+++ b/target_firmware/magpie_fw_dev/target/init/magpie.c
@@ -19,6 +19,7 @@ void htc_setup_comp(void)
 static void dispatch_magpie_sys_cmds(void *pContext, A_UINT16 Command,
 				     A_UINT16 SeqNo, A_UINT8 *buffer, int Length);
 
+#if MAGPIE_ENABLE_WLAN == 0
 static WMI_DISPATCH_ENTRY Magpie_Sys_DispatchEntries[] =
 {
 	{dispatch_magpie_sys_cmds,  WMI_ECHO_CMDID, 0},
@@ -26,6 +27,7 @@ static WMI_DISPATCH_ENTRY Magpie_Sys_DispatchEntries[] =
 };
 
 static WMI_DECLARE_DISPATCH_TABLE(Magpie_Sys_Commands_Tbl, Magpie_Sys_DispatchEntries);
+#endif
 
 htc_handle_t htc_handle;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:40 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:40 +0100
Subject: [PATCH 06/31] build fix: magpie..init.c remove unused variables
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-7-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/magpie_fw_dev/target/init/init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/target/init/init.c b/target_firmware/magpie_fw_dev/target/init/init.c
index 922cf6a..9efb014 100755
--- a/target_firmware/magpie_fw_dev/target/init/init.c
+++ b/target_firmware/magpie_fw_dev/target/init/init.c
@@ -52,7 +52,7 @@ void fatal_exception_func()
 void
 change_magpie_clk(void)
 {
-	volatile uint32_t i=0, rd_data;
+	volatile uint32_t rd_data;
 
 	HAL_WORD_REG_WRITE(0x00056004, 0x11);
 	rd_data = HAL_WORD_REG_READ(0x00056004) & 0x1;
@@ -184,7 +184,6 @@ void
 AR6002_fatal_exception_handler_patch(CPU_exception_frame_t *exc_frame)
 {
 	struct register_dump_s dump;
-	void (*reset_func)(void) = (void*)(RESET_VECTOR_ADDRESS);
 	uint32_t  exc_cause, exc_vaddr;
 	asm volatile("rsr %0,%1" : "=r" (exc_cause) : "n" (EXCCAUSE));
 	asm volatile("rsr %0,%1" : "=r" (exc_vaddr) : "n" (EXCVADDR));
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:41 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:41 +0100
Subject: [PATCH 07/31] build fix: ar5416_hw.c remove unused variables
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-8-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ar5416_hw.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/target_firmware/wlan/ar5416_hw.c b/target_firmware/wlan/ar5416_hw.c
index b512b44..1bbcfc9 100644
--- a/target_firmware/wlan/ar5416_hw.c
+++ b/target_firmware/wlan/ar5416_hw.c
@@ -936,11 +936,7 @@ void ar5416Set11nRateScenario_20(struct ath_hal *ah, struct ath_desc *ds,
 				 a_uint32_t flags)
 {
         struct ar5416_desc *ads = AR5416DESC(ds);
-        struct ar5416_desc_20 *ads_20 = AR5416DESC_20(ds);
         a_uint32_t ds_ctl0;
-        a_int16_t txpower;
-        a_uint32_t count;
-        struct ath_hal_private *ahpriv = AH_PRIVATE(ah);
 
         HALASSERT(nseries == 4);
         (void)nseries;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:03 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:03 +0100
Subject: [PATCH 29/31] build fix: fix wrong conversation of ath_vap_target to
 ieee80211vap_target
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-30-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 30923e5..5d10235 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -568,7 +568,7 @@ static void ath_tgt_send_beacon(struct ath_softc_tgt *sc, adf_nbuf_t bc_hdr,
 
 	vap_index = bhdr->vap_index;
 	adf_os_assert(vap_index < TARGET_VAP_MAX);
-	vap = &sc->sc_vap[vap_index];
+	vap = &sc->sc_vap[vap_index].av_vap;
 
 	wh = (struct ieee80211_frame *)adf_nbuf_pull_head(nbuf,
 						  sizeof(ath_beacon_hdr_t));
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:34 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:34 +0100
Subject: [PATCH 00/31] build fixes
Message-ID: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>

here are some build fixes and probably fixes for some nasty bugs.

Oleksij Rempel (31):
  build fix: Magpie_Sys_Commands_Tbl used only if MAGPIE_ENABLE_WLAN ==
    0
  build fix: remove unused *ahp
  build fix: src on memcpy is allways const
  build fix: remove byte order/swapping support
  build fix: fix array size
  build fix: magpie..init.c remove unused variables
  build fix: ar5416_hw.c remove unused variables
  build fix: adf_os_export_symbol is undefined
  build fix: if_llc.h: __packed__ is ignored if not after "}"
  build fix: predefine struct ath_tx_desc
  build fix: remove firts definition of ATH_NODE_TARGET
  build fix: ds_link should be compared with 0, not NULL
  build fix: remove unused variables from if_ath.c
  build fix: change return type of ath_detach_tgt
  build fix: remove unused dev_info in if_ath_pci.c
  build fix: remove unused variables from if_owl.c
  build fix: make use of ath_hal_getrtsaggrlimit
  build fix: replace struct with static
  build fix: use our internal memcpy, for now.
  build fix: change HAL_TXKEYIX_INVALID size
  build fix: use arch safe uint32_t instead of unsigned long
  build fix: use struct ath_tx_buf for ath_dma_map and ath_dma_unmap
  build fix: sc_rxdesc_held should be ath_rx_desc
  build fix: ah_setupRxDesc should use ath_rx_desc
  build fix: ah_procRxDescFast should use ath_rx_desc
  build fix: add type conversation for asf_tailq_next
  build fix: wmi_event and wmi_cmd_rsp should use void *buffer
  build fix: ath_beacon_setup works only with ath_tx_buf
  build fix: fix wrong conversation of ath_vap_target to
    ieee80211vap_target
  build fix: ath_tgt_tx_prepare should return ath_tx_buf
  buid fix: probably typo, ieee80211_node instead of
    ieee80211_node_target

 .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c  | 15 +++---
 .../magpie_fw_dev/target/adf/adf_os_mem_pvt.h      |  2 +-
 .../magpie_fw_dev/target/inc/adf_os_mem.h          |  2 +-
 target_firmware/magpie_fw_dev/target/init/init.c   |  3 +-
 target_firmware/magpie_fw_dev/target/init/magpie.c |  2 +
 target_firmware/wlan/ah.h                          | 12 ++---
 target_firmware/wlan/ah_desc.h                     |  2 +-
 target_firmware/wlan/ah_osdep.c                    |  2 +-
 target_firmware/wlan/ah_osdep.h                    | 31 +------------
 target_firmware/wlan/ar5416_hw.c                   |  6 ---
 target_firmware/wlan/ar5416_phy.c                  |  2 -
 target_firmware/wlan/ieee80211.h                   |  2 +-
 target_firmware/wlan/if_ath.c                      | 26 ++++-------
 target_firmware/wlan/if_ath_pci.c                  |  2 -
 target_firmware/wlan/if_athrate.h                  |  1 +
 target_firmware/wlan/if_athvar.h                   |  4 +-
 target_firmware/wlan/if_llc.h                      | 12 ++---
 target_firmware/wlan/if_owl.c                      | 54 ++++++----------------
 18 files changed, 54 insertions(+), 126 deletions(-)

-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:39 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:39 +0100
Subject: [PATCH 05/31] build fix: fix array size
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-6-git-send-email-linux@rempel-privat.de>

in target_firmware/wlan/ar5416_phy.c:
HAL_RATE_TABLE ar5416_11ng_table
last part of array was probably ignored by compiler.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target_firmware/wlan/ah.h b/target_firmware/wlan/ah.h
index c86d115..493dc88 100755
--- a/target_firmware/wlan/ah.h
+++ b/target_firmware/wlan/ah.h
@@ -240,7 +240,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[33];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -254,7 +254,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[33];
 } HAL_RATE_TABLE;
 
 typedef struct {
@@ -271,7 +271,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[33];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -282,7 +282,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[33];
 } HAL_RATE_TABLE;
 
 #define HAL_RATESERIES_RTS_CTS    0x0001  /* use rts/cts w/this series */
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:36 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:36 +0100
Subject: [PATCH 02/31] build fix: remove unused *ahp
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-3-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ar5416_hw.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target_firmware/wlan/ar5416_hw.c b/target_firmware/wlan/ar5416_hw.c
index 3045ab6..b512b44 100644
--- a/target_firmware/wlan/ar5416_hw.c
+++ b/target_firmware/wlan/ar5416_hw.c
@@ -731,7 +731,6 @@ HAL_BOOL ar5416SetupTxDesc_20(struct ath_hal *ah, struct ath_desc *ds,
 #define RTSCTS  (HAL_TXDESC_RTSENA|HAL_TXDESC_CTSENA)
 
         struct ar5416_desc *ads = AR5416DESC(ds);
-        struct ath_hal_5416 *ahp = AH5416(ah);
 
         (void) hdrLen;
 
@@ -902,7 +901,6 @@ void ar5416Set11nTxDesc_20(struct ath_hal *ah, struct ath_desc *ds,
 			   a_uint32_t flags)
 {
         struct ar5416_desc *ads = AR5416DESC(ds);
-        struct ath_hal_5416 *ahp = AH5416(ah);
 
         HALASSERT(isValidPktType(type));
         HALASSERT(isValidKeyType(keyType));
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:43 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:43 +0100
Subject: [PATCH 09/31] build fix: if_llc.h: __packed__ is ignored if not after
 "}"
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-10-git-send-email-linux@rempel-privat.de>

gcc ignores atribut __packed__ if it is not right after "}"

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ieee80211.h |  2 +-
 target_firmware/wlan/if_llc.h    | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/target_firmware/wlan/ieee80211.h b/target_firmware/wlan/ieee80211.h
index 8fc53ea..39418b1 100755
--- a/target_firmware/wlan/ieee80211.h
+++ b/target_firmware/wlan/ieee80211.h
@@ -1008,7 +1008,7 @@ struct ieee80211_country_ie {
 		a_uint8_t schan;			/* starting channel */
 		a_uint8_t nchan;			/* number channels */
 		a_uint8_t maxtxpwr;		/* tx power cap */
-	} band[4] adf_os_packed;			/* up to 4 sub bands */
+	} adf_os_packed band[4];			/* up to 4 sub bands */
 } adf_os_packed;
 
 #define IEEE80211_CHALLENGE_LEN		128
diff --git a/target_firmware/wlan/if_llc.h b/target_firmware/wlan/if_llc.h
index 4fc7ee3..f6d8e17 100755
--- a/target_firmware/wlan/if_llc.h
+++ b/target_firmware/wlan/if_llc.h
@@ -94,15 +94,15 @@ struct llc {
 		a_uint8_t format_id;
 		a_uint8_t class;
 		a_uint8_t window_x2;
-	    } type_u adf_os_packed;
+	    } adf_os_packed type_u;
 	    struct {
 		a_uint8_t num_snd_x2;
 		a_uint8_t num_rcv_x2;
-	    } type_i adf_os_packed;
+	    } adf_os_packed type_i;
 	    struct {
 		a_uint8_t control;
 		a_uint8_t num_rcv_x2;
-	    } type_s adf_os_packed;
+	    } adf_os_packed type_s;
 	    struct {
 	        a_uint8_t control;
 		/*
@@ -114,16 +114,16 @@ struct llc {
 		a_uint8_t frmr_control;
 		a_uint8_t frmr_control_ext;
 		a_uint8_t frmr_cause;
-	    } type_frmr adf_os_packed;
+	    } adf_os_packed type_frmr;
 	    struct {
 		a_uint8_t  control;
 		a_uint8_t  org_code[3];
 		a_uint16_t ether_type;
-	    } type_snap adf_os_packed;
+	    } adf_os_packed type_snap;
 	    struct {
 		a_uint8_t control;
 		a_uint8_t control_ext;
-	    } type_raw adf_os_packed;
+	    } adf_os_packed type_raw;
 	} llc_un /* XXX adf_os_packed ??? */;
 } adf_os_packed;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:44 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:44 +0100
Subject: [PATCH 10/31] build fix: predefine struct ath_tx_desc
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-11-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_athrate.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target_firmware/wlan/if_athrate.h b/target_firmware/wlan/if_athrate.h
index 1ca50b1..12088dd 100755
--- a/target_firmware/wlan/if_athrate.h
+++ b/target_firmware/wlan/if_athrate.h
@@ -46,6 +46,7 @@ struct ath_node_target;
 struct ath_desc;
 struct ieee80211vap;
 struct ieee80211com_target;
+struct ath_tx_desc;
 
 struct ath_ratectrl {
 	size_t	arc_space;	/* space required for per-node state */
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:46 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:46 +0100
Subject: [PATCH 12/31] build fix: ds_link should be compared with 0, not NULL
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-13-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 789725b..62727f4 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -345,7 +345,7 @@ static void ath_uapsd_processtriggers(struct ath_softc_tgt *sc)
 			break;
 		}
 
-		if (ds->ds_link == NULL) {
+		if (ds->ds_link == 0) {
 			break;
 		}
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:49 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:49 +0100
Subject: [PATCH 15/31] build fix: remove unused dev_info in if_ath_pci.c
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-16-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath_pci.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target_firmware/wlan/if_ath_pci.c b/target_firmware/wlan/if_ath_pci.c
index 8f37c08..d4499ff 100755
--- a/target_firmware/wlan/if_ath_pci.c
+++ b/target_firmware/wlan/if_ath_pci.c
@@ -176,8 +176,6 @@ ath_pci_resume(adf_drv_handle_t hdl)
 {
 }
 
-static char *dev_info = "ath_pci_tgt";
-
 void
 bus_read_cachesize(struct ath_softc *sc, a_uint8_t *csz)
 {
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:45 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:45 +0100
Subject: [PATCH 11/31] build fix: remove firts definition of ATH_NODE_TARGET
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-12-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_athvar.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target_firmware/wlan/if_athvar.h b/target_firmware/wlan/if_athvar.h
index b57c4e0..b28a3e8 100755
--- a/target_firmware/wlan/if_athvar.h
+++ b/target_firmware/wlan/if_athvar.h
@@ -89,8 +89,6 @@ typedef enum {
 #define TARGET_NODE_MAX ATH_NODE_MAX
 #define TARGET_VAP_MAX  ATH_VAP_MAX
 
-#define ATH_NODE_TARGET(_n) ((struct ath_node *)(_n))
-
 #define MAX_RATE_POWER               63
 #define ATH_COMP_PROC_NO_COMP_NO_CCS 3
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:42 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:42 +0100
Subject: [PATCH 08/31] build fix: adf_os_export_symbol is undefined
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-9-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ar5416_phy.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/target_firmware/wlan/ar5416_phy.c b/target_firmware/wlan/ar5416_phy.c
index fc7c042..d501db7 100755
--- a/target_firmware/wlan/ar5416_phy.c
+++ b/target_firmware/wlan/ar5416_phy.c
@@ -136,8 +136,6 @@ HAL_RATE_TABLE ar5416_11na_table = {
 	},
 };
 
-adf_os_export_symbol(ar5416_11na_table);
-
 #undef  OFDM
 #undef  CCK
 #undef  TURBO
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:48 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:48 +0100
Subject: [PATCH 14/31] build fix: change return type of ath_detach_tgt
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-15-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index effc191..294e79f 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -1613,7 +1613,7 @@ static void ath_setcurmode_tgt(void *Context, A_UINT16 Command,
 	wmi_cmd_rsp(sc->tgt_wmi_handle, Command, SeqNo, NULL, 0);
 }
 
-static a_uint32_t ath_detach_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo,
+static void ath_detach_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo,
 				 A_UINT8 *data, a_int32_t datalen)
 {
 	struct ath_softc_tgt *sc = (struct ath_softc_tgt *)Context;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:47 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:47 +0100
Subject: [PATCH 13/31] build fix: remove unused variables from if_ath.c
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-14-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 62727f4..effc191 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -450,7 +450,6 @@ static void ath_tgt_rx_tasklet(TQUEUE_ARG data)
 	struct ath_rx_buf *bf = NULL;
 	struct ath_hal *ah = sc->sc_ah;
 	struct rx_frame_header *rxhdr;
-	struct ieee80211_frame *wh;
 	struct ath_rx_status *rxstats;
 	adf_nbuf_t skb = ADF_NBUF_NULL;
 
@@ -484,7 +483,6 @@ static void ath_tgt_rx_tasklet(TQUEUE_ARG data)
 		HTC_SendMsg(sc->tgt_htc_handle, RX_ENDPOINT_ID, skb);
 		sc->sc_rx_stats.ast_rx_send++;
 
-	next_buf:
 		bf->bf_status &= ~ATH_BUFSTATUS_DONE;
 		asf_tailq_insert_tail(&sc->sc_rxbuf, bf, bf_list);
 
@@ -509,7 +507,7 @@ static void ath_beacon_setup(struct ath_softc_tgt *sc,
 	adf_nbuf_t skb = bf->bf_skb;
 	struct ath_hal *ah = sc->sc_ah;
 	struct ath_desc *ds;
-	a_int32_t flags, antenna;
+	a_int32_t flags;
 	const HAL_RATE_TABLE *rt;
 	a_uint8_t rix, rate;
 	HAL_11N_RATE_SERIES series[4] = {{ 0 }};
@@ -985,7 +983,6 @@ adf_os_irq_resp_t ath_intr(adf_drv_handle_t hdl)
 {
 	struct ath_softc_tgt *sc = (struct ath_softc_tgt *)hdl;
 	struct ath_hal *ah = sc->sc_ah;
-	struct ieee80211com_target *ic = &sc->sc_ic;
 	HAL_INT status;
 
 	if (sc->sc_invalid)
@@ -1607,7 +1604,6 @@ static void ath_setcurmode_tgt(void *Context, A_UINT16 Command,
 {
 	struct ath_softc_tgt *sc = (struct ath_softc_tgt *)Context;
 	a_uint16_t mode;
-	struct ath_hal *ah = sc->sc_ah;
 
 	mode= *((a_uint16_t *)data);
 	mode = adf_os_ntohs(mode);
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:54 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:54 +0100
Subject: [PATCH 20/31] build fix: change HAL_TXKEYIX_INVALID size
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-21-git-send-email-linux@rempel-privat.de>

HAL_(R)XKEYIX_INVALID is a_uint8_t so i assume
HAL_(T)XKEYIX_INVALID should have same size.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah_desc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/ah_desc.h b/target_firmware/wlan/ah_desc.h
index 0a4c673..26a448d 100755
--- a/target_firmware/wlan/ah_desc.h
+++ b/target_firmware/wlan/ah_desc.h
@@ -90,7 +90,7 @@ struct ath_rx_status {
 
 #define HAL_RXKEYIX_INVALID ((a_uint8_t) -1)
 
-#define HAL_TXKEYIX_INVALID ((a_uint32_t) -1)
+#define HAL_TXKEYIX_INVALID ((a_uint8_t) -1)
 
 /*
  * The following definitions are passed directly
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:38 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:38 +0100
Subject: [PATCH 04/31] build fix: remove byte order/swapping support
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-5-git-send-email-linux@rempel-privat.de>

currently AH_BYTE_ORDER is not defined. So this parst is unused any way.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah_osdep.h | 29 -----------------------------
 1 file changed, 29 deletions(-)

diff --git a/target_firmware/wlan/ah_osdep.h b/target_firmware/wlan/ah_osdep.h
index d62de3d..58a07ec 100755
--- a/target_firmware/wlan/ah_osdep.h
+++ b/target_firmware/wlan/ah_osdep.h
@@ -141,41 +141,12 @@ struct ath_hal;
 extern  a_uint32_t __ahdecl ath_hal_getuptime(struct ath_hal *);
 #define OS_GETUPTIME(_ah)   ath_hal_getuptime(_ah)
 
-/*
- * Byte order/swapping support.
- */
-#define AH_LITTLE_ENDIAN    1234
-#define AH_BIG_ENDIAN       4321
-
-#if AH_BYTE_ORDER == AH_BIG_ENDIAN
-/*
- * This could be optimized but since we only use it for
- * a few registers there's little reason to do so.
- */
-#ifndef __bswap32
-static inline a_uint32_t
-__bswap32(a_uint32_t _x)
-{
-    return ((a_uint32_t)(
-          (((const a_uint8_t *)(&_x))[0]    ) |
-          (((const a_uint8_t *)(&_x))[1]<< 8) |
-          (((const a_uint8_t *)(&_x))[2]<<16) |
-          (((const a_uint8_t *)(&_x))[3]<<24))
-    );
-}
-#endif
-#ifndef __bswap16
-#define __bswap16(_x) ( (a_uint16_t)( (((const a_uint8_t *)(&_x))[0] ) |\
-                         ( ( (const a_uint8_t *)( &_x ) )[1]<< 8) ) )
-#endif
-#else
 #ifndef __bswap32
 #define __bswap32(_x)	(_x)
 #endif
 #ifndef __bswap16
 #define __bswap16(_x)	(_x)
 #endif
-#endif
 
 #define OS_REG_WRITE(_ah, _reg, _val)   ath_hal_reg_write_target(_ah, _reg, _val)
 #define OS_REG_READ(_ah, _reg)      ath_hal_reg_read_target(_ah, _reg)
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:37 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:37 +0100
Subject: [PATCH 03/31] build fix: src on memcpy is allways const
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-4-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h | 2 +-
 target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h     | 2 +-
 target_firmware/wlan/ah_osdep.c                           | 2 +-
 target_firmware/wlan/ah_osdep.h                           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h b/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
index cf8dadd..d5d8684 100755
--- a/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
+++ b/target_firmware/magpie_fw_dev/target/adf/adf_os_mem_pvt.h
@@ -17,7 +17,7 @@ static inline void 		__adf_os_mem_free(void *buf)
 }
 
 /* move a memory buffer */
-static inline void 		__adf_os_mem_copy(void *dst, void *src, adf_os_size_t size)
+static inline void 		__adf_os_mem_copy(void *dst, const void *src, adf_os_size_t size)
 {
     A_MEMCPY(dst,src,size);    
 }
diff --git a/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h b/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
index 3b42e95..a07d2e6 100755
--- a/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
+++ b/target_firmware/magpie_fw_dev/target/inc/adf_os_mem.h
@@ -42,7 +42,7 @@ adf_os_mem_free(void *buf)
  * @param[in] size    buffer size
  */
 static inline void
-adf_os_mem_copy(void *dst, void *src, adf_os_size_t size)
+adf_os_mem_copy(void *dst, const void *src, adf_os_size_t size)
 {
     __adf_os_mem_copy(dst, src, size);
 }
diff --git a/target_firmware/wlan/ah_osdep.c b/target_firmware/wlan/ah_osdep.c
index bfcc608..6d2b407 100755
--- a/target_firmware/wlan/ah_osdep.c
+++ b/target_firmware/wlan/ah_osdep.c
@@ -107,7 +107,7 @@ ath_hal_memzero(void *dst, adf_os_size_t n)
 }
 
 void * __ahdecl
-ath_hal_memcpy(void *dst, void *src, adf_os_size_t n)
+ath_hal_memcpy(void *dst, const void *src, adf_os_size_t n)
 {
 	adf_os_mem_copy(dst, src, n);
 	return 0;
diff --git a/target_firmware/wlan/ah_osdep.h b/target_firmware/wlan/ah_osdep.h
index 54b2a9b..d62de3d 100755
--- a/target_firmware/wlan/ah_osdep.h
+++ b/target_firmware/wlan/ah_osdep.h
@@ -131,7 +131,7 @@ extern  void* __ahdecl ath_hal_ioremap(a_uint32_t addr, a_uint32_t len);
 #define OS_MEMZERO(_a, _n)  ath_hal_memzero((_a), (_n))
 extern void __ahdecl ath_hal_memzero(void *, size_t);
 #define OS_MEMCPY(_d, _s, _n)   ath_hal_memcpy(_d,_s,_n)
-extern void * __ahdecl ath_hal_memcpy(void *, void *, size_t);
+extern void * __ahdecl ath_hal_memcpy(void *, const void *, size_t);
 
 #ifndef abs
 #define abs(_a)     __builtin_abs(_a)
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:52 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:52 +0100
Subject: [PATCH 18/31] build fix: replace struct with static
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-19-git-send-email-linux@rempel-privat.de>

replace struct with static, it probably was typo.
It is already struct by type deffinition.

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index b856df8..ee3054d 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -507,7 +507,7 @@ void ath_tx_status_clear(struct ath_softc_tgt *sc)
 	}
 }
 
-struct WMI_TXSTATUS_EVENT* ath_tx_status_get(struct ath_softc_tgt *sc)
+static WMI_TXSTATUS_EVENT *ath_tx_status_get(struct ath_softc_tgt *sc)
 {
 	WMI_TXSTATUS_EVENT *txs = NULL;
 	int i;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:59 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:59 +0100
Subject: [PATCH 25/31] build fix: ah_procRxDescFast should use ath_rx_desc
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-26-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/ah.h b/target_firmware/wlan/ah.h
index 5ab9cfc..303b042 100755
--- a/target_firmware/wlan/ah.h
+++ b/target_firmware/wlan/ah.h
@@ -426,7 +426,7 @@ struct ath_hal
 	HAL_STATUS __ahdecl(*ah_procRxDesc)(struct ath_hal *, struct ath_desc *,
 					    a_uint32_t phyAddr, struct ath_desc *next, u_int64_t tsf);
 	HAL_STATUS __ahdecl(*ah_procRxDescFast)(struct ath_hal *ah, 
-						struct ath_desc *ds, a_uint32_t pa, 
+						struct ath_rx_desc *ds, a_uint32_t pa,
 						struct ath_desc *nds, 
 						struct ath_rx_status *rx_stats);
 	HAL_BOOL  __ahdecl(*ah_stopDmaReceive)(struct ath_hal*);
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:01 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:01 +0100
Subject: [PATCH 27/31] build fix: wmi_event and wmi_cmd_rsp should use void
 *buffer
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-28-git-send-email-linux@rempel-privat.de>

we pass different buffer types to this functions.
It makes no sense to define some concrect type here

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 022f195..6c5c9e1 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -35,10 +35,8 @@ uint32_t *init_htc_handle = 0;
 #define UAPSDQ_NUM   9
 #define CABQ_NUM     8
 
-void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id, A_UINT8 *buffer, a_int32_t Length);
 void owl_tgt_tx_tasklet(TQUEUE_ARG data);
 static void ath_tgt_send_beacon(struct ath_softc_tgt *sc,adf_nbuf_t bc_hdr,adf_nbuf_t nbuf,HTC_ENDPOINT_ID EndPt);
-void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16 SeqNo, A_UINT8 *buffer, a_int32_t Length);
 static void ath_hal_reg_write_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo, A_UINT8 *data, a_int32_t datalen);
 extern struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt *sc, adf_nbuf_t skb, ath_data_hdr_t *dh);
 extern void  ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t mgt_hdr, adf_nbuf_t skb,HTC_ENDPOINT_ID EndPt);
@@ -125,7 +123,7 @@ static void ath_setcurmode(struct ath_softc_tgt *sc,
 }
 
 void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id,
-	       A_UINT8 *buffer, a_int32_t Length)
+	       void *buffer, a_int32_t Length)
 {
 	adf_nbuf_t netbuf = ADF_NBUF_NULL;
 	a_uint8_t *pData;
@@ -147,7 +145,7 @@ void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id,
 }
 
 void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16 SeqNo,
-		 A_UINT8 *buffer, a_int32_t Length)
+		 void *buffer, a_int32_t Length)
 {
 	adf_nbuf_t netbuf = ADF_NBUF_NULL;
 	A_UINT8 *pData;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:58 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:58 +0100
Subject: [PATCH 24/31] build fix: ah_setupRxDesc should use ath_rx_desc
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-25-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/ah.h b/target_firmware/wlan/ah.h
index 493dc88..5ab9cfc 100755
--- a/target_firmware/wlan/ah.h
+++ b/target_firmware/wlan/ah.h
@@ -421,7 +421,7 @@ struct ath_hal
 	/* Target receive Functions */
 	a_uint32_t __ahdecl(*ah_getRxDP)(struct ath_hal*);
 	void	   __ahdecl(*ah_setRxDP)(struct ath_hal*, a_uint32_t rxdp);
-	HAL_BOOL  __ahdecl(*ah_setupRxDesc)(struct ath_hal *, struct ath_desc *,
+	HAL_BOOL  __ahdecl(*ah_setupRxDesc)(struct ath_hal *, struct ath_rx_desc *,
 					    a_uint32_t size, a_uint32_t flags);
 	HAL_STATUS __ahdecl(*ah_procRxDesc)(struct ath_hal *, struct ath_desc *,
 					    a_uint32_t phyAddr, struct ath_desc *next, u_int64_t tsf);
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:05 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:05 +0100
Subject: [PATCH 31/31] buid fix: probably typo,
 ieee80211_node instead of ieee80211_node_target
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-32-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index f02f363..2e94672 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -845,7 +845,7 @@ static void ath_descdma_cleanup(struct ath_softc_tgt *sc,
 				ath_bufhead *head, a_int32_t dir)
 {
 	struct ath_tx_buf *bf;
-	struct ieee80211_node *ni;
+	struct ieee80211_node_target *ni;
 
 	asf_tailq_foreach(bf, head, bf_list) {
 		if (adf_nbuf_queue_len(&bf->bf_skbhead) != 0) {
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:00 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:00 +0100
Subject: [PATCH 26/31] build fix: add type conversation for asf_tailq_next
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-27-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 294e79f..022f195 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -411,7 +411,7 @@ static void ath_uapsd_processtriggers(struct ath_softc_tgt *sc)
 
 			bf->bf_status |= ATH_BUFSTATUS_DONE;
 
-			bf = asf_tailq_next(bf, bf_list);
+			bf = (struct ath_rx_buf *)asf_tailq_next(bf, bf_list);
 		}
 		else {
 			ds = asf_tailq_next(ds, ds_list);
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:02 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:02 +0100
Subject: [PATCH 28/31] build fix: ath_beacon_setup works only with ath_tx_buf
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-29-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 6c5c9e1..30923e5 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -499,7 +499,7 @@ static void ath_tgt_rx_tasklet(TQUEUE_ARG data)
  * FIXME: Short Preamble.
  */
 static void ath_beacon_setup(struct ath_softc_tgt *sc,
-			     struct ath_buf *bf,
+			     struct ath_tx_buf *bf,
 			     struct ath_vap_target *avp)
 {
 	adf_nbuf_t skb = bf->bf_skb;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:02:04 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:02:04 +0100
Subject: [PATCH 30/31] build fix: ath_tgt_tx_prepare should return ath_tx_buf
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-31-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_ath.c | 2 +-
 target_firmware/wlan/if_owl.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
index 5d10235..f02f363 100755
--- a/target_firmware/wlan/if_ath.c
+++ b/target_firmware/wlan/if_ath.c
@@ -38,7 +38,7 @@ uint32_t *init_htc_handle = 0;
 void owl_tgt_tx_tasklet(TQUEUE_ARG data);
 static void ath_tgt_send_beacon(struct ath_softc_tgt *sc,adf_nbuf_t bc_hdr,adf_nbuf_t nbuf,HTC_ENDPOINT_ID EndPt);
 static void ath_hal_reg_write_tgt(void *Context, A_UINT16 Command, A_UINT16 SeqNo, A_UINT8 *data, a_int32_t datalen);
-extern struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt *sc, adf_nbuf_t skb, ath_data_hdr_t *dh);
+extern struct ath_tx_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc, adf_nbuf_t skb, ath_data_hdr_t *dh);
 extern void  ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t mgt_hdr, adf_nbuf_t skb,HTC_ENDPOINT_ID EndPt);
 extern HAL_BOOL ath_hal_wait(struct ath_hal *ah, a_uint32_t reg, a_uint32_t mask, a_uint32_t val);
 extern void owltgt_tx_processq(struct ath_softc_tgt *sc, struct ath_txq *txq,  owl_txq_state_t txqstate);
diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index 764572f..7101bfa 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -75,8 +75,6 @@ static void ath_update_stats(struct ath_softc_tgt *sc, struct ath_buf *bf);
 void adf_print_buf(adf_nbuf_t buf);
 static void ath_tgt_tx_enqueue(struct ath_txq *txq, struct ath_atx_tid  *tid);
 
-struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt *sc,
-				    adf_nbuf_t skb, ath_data_hdr_t *dh);
 void ath_tgt_tx_comp_aggr(struct ath_softc_tgt *sc, struct ath_tx_buf *bf);
 struct ieee80211_frame *ATH_SKB_2_WH(adf_nbuf_t skb);
 
@@ -750,7 +748,7 @@ static struct ath_buf* ath_buf_alloc(struct ath_softc_tgt *sc)
 	return  bf;
 }
 
-struct ath_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc,
+struct ath_tx_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc,
 				   adf_nbuf_t skb, ath_data_hdr_t *dh)
 {
 	struct ath_tx_buf *bf;
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:57 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:57 +0100
Subject: [PATCH 23/31] build fix: sc_rxdesc_held should be ath_rx_desc
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-24-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_athvar.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_athvar.h b/target_firmware/wlan/if_athvar.h
index b28a3e8..161bb88 100755
--- a/target_firmware/wlan/if_athvar.h
+++ b/target_firmware/wlan/if_athvar.h
@@ -348,7 +348,7 @@ struct ath_softc_tgt
 
 	ath_deschead       sc_rxdesc_idle;
 	ath_deschead	   sc_rxdesc;
-	struct ath_desc    *sc_rxdesc_held;
+	struct ath_rx_desc    *sc_rxdesc_held;
 
    	struct ath_buf    *sc_txbuf_held;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:53 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:53 +0100
Subject: [PATCH 19/31] build fix: use our internal memcpy, for now.
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-20-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index ee3054d..e80d240 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -945,14 +945,14 @@ ath_tgt_tx_send_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 		ath_tgt_rate_findrate(sc, an, shortPreamble,
 				      0, 0, 0, 0, 0,
 				      rcs, &isProbe);
-		memcpy(bf->bf_rcs, rcs, sizeof(rcs));
+		ath_hal_memcpy(bf->bf_rcs, rcs, sizeof(rcs));
 	} else {
 		mrcs[1].tries = mrcs[2].tries = mrcs[3].tries = 0;
 		mrcs[1].rix = mrcs[2].rix = mrcs[3].rix = 0;
 		mrcs[0].rix   = 0;
 		mrcs[0].tries = 1;
 		mrcs[0].flags = 0;
-		memcpy(bf->bf_rcs, mrcs, sizeof(mrcs));
+		ath_hal_memcpy(bf->bf_rcs, mrcs, sizeof(mrcs));
 	}
 
 	ath_buf_set_rate(sc, bf);
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:51 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:51 +0100
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-18-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index e42e6be..b856df8 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -367,7 +367,9 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 	    }
     }
 
-    ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts);
+    if (ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts)) {
+	adf_os_print("ath_hal_getrtsaggrlimit failed\n");
+    }
 
     if (bf->bf_isaggr && aggr_limit_with_rts &&
 	bf->bf_al > aggr_limit_with_rts) {
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:50 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:50 +0100
Subject: [PATCH 16/31] build fix: remove unused variables from if_owl.c
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-17-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 36 ++++--------------------------------
 1 file changed, 4 insertions(+), 32 deletions(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index e7f4e28..e42e6be 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -85,9 +85,6 @@ void ath_tgt_tx_send_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf);
 static void ath_tgt_tx_sched_normal(struct ath_softc_tgt *sc, ath_atx_tid_t *tid);
 static void ath_tgt_tx_sched_aggr(struct ath_softc_tgt *sc, ath_atx_tid_t *tid);
 
-static struct ath_node_target * owltarget_findnode(struct  tx_frame_heade *dh,
-						   struct ath_softc_tgt *sc,
-						   struct adf_nbuf_t *skb);
 extern a_int32_t ath_chainmask_sel_logic(void *);
 static a_int32_t ath_get_pktlen(struct ath_buf *bf, a_int32_t hdrlen);
 static void ath_tgt_txq_schedule(struct ath_softc *sc, struct ath_txq *txq);
@@ -234,10 +231,7 @@ static void ath_filltxdesc(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 
 static void ath_tx_tgt_setds(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
-	struct ath_desc *ds0, *ds = bf->bf_desc;
-	adf_nbuf_t skb;
-	adf_nbuf_queue_t skbhead;
-	a_int32_t i, dscnt = 0;
+	struct ath_desc *ds = bf->bf_desc;
 
 	switch (bf->bf_protmode) {
     	case IEEE80211_PROT_RTSCTS:
@@ -486,7 +480,7 @@ static void owl_tgt_tid_cleanup(struct ath_softc_tgt *sc,
 void owl_tgt_node_init(struct ath_node_target * an)
 {
 	struct ath_atx_tid *tid;
-	int tidno, i;
+	int tidno;
 
 	for (tidno = 0, tid = &an->tid[tidno]; tidno < WME_NUM_TID;tidno++, tid++) {
 		tid->tidno = tidno;
@@ -608,9 +602,7 @@ void owl_tgt_tx_tasklet(TQUEUE_ARG data)
 {
 	struct ath_softc_tgt *sc = (struct ath_softc_tgt *)data;
 	a_int32_t i;
-	a_uint32_t qcumask = ((1 << HAL_NUM_TX_QUEUES) - 1);
 	struct ath_txq *txq;
-	ath_data_hdr_t *dh;
 
 	ath_tx_status_clear(sc);
 
@@ -706,7 +698,6 @@ static void ath_tgt_tx_comp_normal(struct ath_softc_tgt *sc,
 				   struct ath_tx_buf *bf)
 {
 	struct ath_node_target *an = ATH_NODE_TARGET(bf->bf_node);
-	struct ath_desc *ds = bf->bf_lastds;
 	ath_atx_tid_t *tid = ATH_AN_2_TID(an, bf->bf_tidno);
 
 	if (tid->flag & TID_CLEANUP_INPROGRES) {
@@ -724,7 +715,6 @@ static struct ieee80211_node_target * ath_tgt_find_node(struct ath_softc_tgt *sc
 							a_int32_t node_index)
 {
 	struct ath_node_target *an;
-	a_int32_t i;
 	struct ieee80211_node_target *ni;
 
 	if (node_index > TARGET_NODE_MAX)
@@ -762,9 +752,7 @@ struct ath_buf* ath_tgt_tx_prepare(struct ath_softc_tgt *sc,
 				   adf_nbuf_t skb, ath_data_hdr_t *dh)
 {
 	struct ath_tx_buf *bf;
-	struct ath_txq *txq;
 	struct ieee80211_node_target *ni;
-	a_uint32_t flags = adf_os_ntohl(dh->flags);
 	struct ath_atx_tid *tid;
 
 	ni = ath_tgt_find_node(sc, dh->ni_index);
@@ -833,8 +821,6 @@ static a_int32_t ath_key_setup(struct ieee80211_node_target *ni,
 			       struct ath_tx_buf *bf)
 {
 	struct ieee80211_frame *wh = ATH_SKB_2_WH(bf->bf_skb);
-	const struct ieee80211_cipher *cip;
-	struct ieee80211_key *k;
 
 	if (!(wh->i_fc[1] & IEEE80211_FC1_WEP)) {
 		bf->bf_keytype = HAL_KEY_TYPE_CLEAR;
@@ -867,9 +853,7 @@ static void ath_tgt_txq_add_ucast(struct ath_softc_tgt *sc, struct ath_tx_buf *b
 {
 	struct ath_hal *ah = sc->sc_ah;
 	struct ath_txq *txq;
-	struct ath_node_target *an;
 	HAL_STATUS status;
-	static a_int32_t count = 0,i;
 	volatile a_int32_t txe_val;
 
 	adf_os_assert(bf);
@@ -1013,11 +997,8 @@ ath_tx_uc_comp(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 static void
 ath_update_stats(struct ath_softc_tgt *sc, struct ath_buf *bf)
 {
-	struct ieee80211_node_target *ni = bf->bf_node;
 	struct ath_tx_desc *ds = bf->bf_desc;
-	struct ath_node_target *an = ATH_NODE_TARGET(ni);
 	u_int32_t sr, lr;
-	struct ieee80211_cb *cb;
 
 	if (ds->ds_txstat.ts_status == 0) {
 		if (ds->ds_txstat.ts_rate & HAL_TXSTAT_ALTRATE)
@@ -1047,9 +1028,9 @@ ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t hdr_buf, adf_nbuf_t skb,
 	struct ath_vap_target *avp;
 	struct ath_hal *ah = sc->sc_ah;
 	a_uint8_t rix, txrate, ctsrate, cix = 0xff, *data;
-	a_uint32_t ivlen = 0, icvlen = 0, subtype, flags, ctsduration, fval;
+	a_uint32_t ivlen = 0, icvlen = 0, subtype, flags, ctsduration;
 	a_int32_t i, iswep, ismcast, hdrlen, pktlen, try0, len;
-	struct ath_desc *ds=NULL, *ds0=NULL;
+	struct ath_desc *ds=NULL;
 	struct ath_txq *txq=NULL;
 	struct ath_tx_buf *bf;
 	HAL_PKT_TYPE atype;
@@ -1059,7 +1040,6 @@ ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t hdr_buf, adf_nbuf_t skb,
 	struct ath_rc_series rcs[4];
 	HAL_11N_RATE_SERIES series[4];
 	ath_mgt_hdr_t *mh;
-	struct ieee80211com_target *ic = &sc->sc_ic;
 	a_int8_t keyix;
 
 	if (!hdr_buf) {
@@ -1262,9 +1242,6 @@ void ath_tgt_handle_normal(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
 	ath_atx_tid_t *tid;
 	struct ath_node_target *an;
-	struct ath_desc *ds;
-	struct ath_txq *txq = bf->bf_txq;
-	a_bool_t queue_frame;
 
 	an = (struct ath_node_target *)bf->bf_node;
 	adf_os_assert(an);
@@ -1295,10 +1272,6 @@ ath_tgt_txq_schedule(struct ath_softc *sc, struct ath_txq *txq)
 {
 	struct ath_atx_tid  *tid;
 	u_int8_t bdone;
-	HAL_STATUS status;
-	u_int8_t smps_mode;
-	struct ieee80211_node *ieee_node;
-	u_int32_t aggr_limit_with_rts;
 
 	bdone = AH_FALSE;
 
@@ -1332,7 +1305,6 @@ ath_tgt_handle_aggr(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
 	ath_atx_tid_t *tid;
 	struct ath_node_target *an;
-	struct ath_desc *ds;
 	struct ath_txq *txq = bf->bf_txq;
 	a_bool_t queue_frame, within_baw;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:55 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:55 +0100
Subject: [PATCH 21/31] build fix: use arch safe uint32_t instead of unsigned
 long
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-22-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c         | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
index 6fd2541..3702bba 100755
--- a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
+++ b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
@@ -1,11 +1,12 @@
 #include <stdio.h>
 #include <string.h>
+#include <stdint.h>
 
 #define MAX_READ_SIZE	80
 
-unsigned long checksum = 0;
+uint32_t checksum = 0;
 
-void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char *endian, unsigned char nl)
+void write_file(FILE *out, unsigned char *buf, uint32_t size, unsigned char *endian, unsigned char nl)
 {
 	int i=0;
 	unsigned char tmp_buf[4];
@@ -23,7 +24,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
         	    tmp_buf[2] = buf[i+2];
         	    tmp_buf[3] = buf[i+3];
 
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08X, ", *((uint32_t *)(&tmp_buf[0])));
 
         } else {
             
@@ -34,9 +35,9 @@ void write_file(FILE *out, unsigned char *buf, unsigned long size, unsigned char
 			tmp_buf[1] = buf[i+2];
 			tmp_buf[2] = buf[i+1];
 			tmp_buf[3] = buf[i+0];
-			fprintf(out, "0x%08X, ", *((unsigned long *)(&tmp_buf[0])));
+			fprintf(out, "0x%08X, ", *((uint32_t *)(&tmp_buf[0])));
 		}
-        checksum = checksum ^ *((unsigned long *)(&tmp_buf[0]));
+        checksum = checksum ^ *((uint32_t *)(&tmp_buf[0]));
 	}
 }
 
@@ -109,7 +110,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 			}
 
 			fprintf(out, "};\n");
-			fprintf(out, "\nconst unsigned long zcFwImageSize=%ld;\n", file_size);
+			fprintf(out, "\nconst uint32_t zcFwImageSize=%ld;\n", file_size);
 
 			goto ERR_DONE;
 		}
@@ -125,7 +126,7 @@ void write_array(FILE *out, FILE *in, unsigned char hif)
 
 			file_size += 4;
 			fprintf(out, "};\n");
-			fprintf(out, "\nconst unsigned long zcFwImageSize=%ld;\n", file_size);
+			fprintf(out, "\nconst uint32_t zcFwImageSize=%ld;\n", file_size);
 
 			goto ERR_DONE;
 		}
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 05:01:56 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 10:01:56 +0100
Subject: [PATCH 22/31] build fix: use struct ath_tx_buf for ath_dma_map and
 ath_dma_unmap
In-Reply-To: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
Message-ID: <1364547725-19750-23-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index e80d240..764572f 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -187,7 +187,7 @@ static a_uint32_t ath_pkt_duration(struct ath_softc_tgt *sc,
 	return duration;
 }
 
-static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_buf *bf)
+static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
 	adf_nbuf_t skb = bf->bf_skb;
 
@@ -195,7 +195,7 @@ static void ath_dma_map(struct ath_softc_tgt *sc, struct ath_buf *bf)
 	adf_nbuf_map(sc->sc_dev, bf->bf_dmamap, skb, ADF_OS_DMA_TO_DEVICE);
 }
 
-static void ath_dma_unmap(struct ath_softc_tgt *sc, struct ath_buf *bf)
+static void ath_dma_unmap(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 {
 	adf_nbuf_t skb = bf->bf_skb;
 
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 11:45:46 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 16:45:46 +0100
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
 <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
Message-ID: <5155B72A.5000906@rempel-privat.de>

Am 29.03.2013 16:21, schrieb Adrian Chadd:
> Hi,
>
> Why are you doing a printf() here? Are you just trying to use the
> command line argument?

I used Eugens suggestion here.
Currently this call do nothing. It is possible to use it for debuging or 
just removed. What is your suggestion?

> Adrian
>
>
> On 29 March 2013 02:01, Oleksij Rempel <linux at rempel-privat.de
> <mailto:linux at rempel-privat.de>> wrote:
>
>     Signed-off-by: Oleksij Rempel <linux at rempel-privat.de
>     <mailto:linux at rempel-privat.de>>
>     ---
>       target_firmware/wlan/if_owl.c | 4 +++-
>       1 file changed, 3 insertions(+), 1 deletion(-)
>
>     diff --git a/target_firmware/wlan/if_owl.c
>     b/target_firmware/wlan/if_owl.c
>     index e42e6be..b856df8 100755
>     --- a/target_firmware/wlan/if_owl.c
>     +++ b/target_firmware/wlan/if_owl.c
>     @@ -367,7 +367,9 @@ static void ath_buf_set_rate(struct
>     ath_softc_tgt *sc, struct ath_tx_buf *bf)
>                  }
>           }
>
>     -    ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts);
>     +    if (ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts)) {
>     +       adf_os_print("ath_hal_getrtsaggrlimit failed\n");
>     +    }
>
>           if (bf->bf_isaggr && aggr_limit_with_rts &&
>              bf->bf_al > aggr_limit_with_rts) {
>     --
>     1.8.1.2
>
>


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Fri Mar 29 11:52:36 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 16:52:36 +0100
Subject: [PATCH 27/31] build fix: wmi_event and wmi_cmd_rsp should use
 void *buffer
In-Reply-To: <CAJ-VmokgAdNE-nzLGpGDcW3icG94QAQ4402wviKwH=vd+nHO+w@mail.gmail.com>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-28-git-send-email-linux@rempel-privat.de>
 <CAJ-VmokgAdNE-nzLGpGDcW3icG94QAQ4402wviKwH=vd+nHO+w@mail.gmail.com>
Message-ID: <5155B8C4.2080708@rempel-privat.de>

Am 29.03.2013 16:22, schrieb Adrian Chadd:
> The only reason they'd use UINT8_t here is so you can byte-offset
> address buffer.
>
> Is buffer being used for anything except as a copy source/destination
> pointer?
>

*buffer passed directly to adf_os_mem_copy without doing extra work on 
it. I do not see any reason to use UINT8_t here.

>
> Adrian
>
>
> On 29 March 2013 02:02, Oleksij Rempel <linux at rempel-privat.de
> <mailto:linux at rempel-privat.de>> wrote:
>
>     we pass different buffer types to this functions.
>     It makes no sense to define some concrect type here
>
>     Signed-off-by: Oleksij Rempel <linux at rempel-privat.de
>     <mailto:linux at rempel-privat.de>>
>     ---
>       target_firmware/wlan/if_ath.c | 6 ++----
>       1 file changed, 2 insertions(+), 4 deletions(-)
>
>     diff --git a/target_firmware/wlan/if_ath.c
>     b/target_firmware/wlan/if_ath.c
>     index 022f195..6c5c9e1 100755
>     --- a/target_firmware/wlan/if_ath.c
>     +++ b/target_firmware/wlan/if_ath.c
>     @@ -35,10 +35,8 @@ uint32_t *init_htc_handle = 0;
>       #define UAPSDQ_NUM   9
>       #define CABQ_NUM     8
>
>     -void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id, A_UINT8
>     *buffer, a_int32_t Length);
>       void owl_tgt_tx_tasklet(TQUEUE_ARG data);
>       static void ath_tgt_send_beacon(struct ath_softc_tgt
>     *sc,adf_nbuf_t bc_hdr,adf_nbuf_t nbuf,HTC_ENDPOINT_ID EndPt);
>     -void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16
>     SeqNo, A_UINT8 *buffer, a_int32_t Length);
>       static void ath_hal_reg_write_tgt(void *Context, A_UINT16 Command,
>     A_UINT16 SeqNo, A_UINT8 *data, a_int32_t datalen);
>       extern struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt
>     *sc, adf_nbuf_t skb, ath_data_hdr_t *dh);
>       extern void  ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t
>     mgt_hdr, adf_nbuf_t skb,HTC_ENDPOINT_ID EndPt);
>     @@ -125,7 +123,7 @@ static void ath_setcurmode(struct ath_softc_tgt *sc,
>       }
>
>       void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id,
>     -              A_UINT8 *buffer, a_int32_t Length)
>     +              void *buffer, a_int32_t Length)
>       {
>              adf_nbuf_t netbuf = ADF_NBUF_NULL;
>              a_uint8_t *pData;
>     @@ -147,7 +145,7 @@ void wmi_event(wmi_handle_t handle, WMI_EVENT_ID
>     evt_id,
>       }
>
>       void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16
>     SeqNo,
>     -                A_UINT8 *buffer, a_int32_t Length)
>     +                void *buffer, a_int32_t Length)
>       {
>              adf_nbuf_t netbuf = ADF_NBUF_NULL;
>              A_UINT8 *pData;
>     --
>     1.8.1.2
>
>


-- 
Regards,
Oleksij


From linux at rempel-privat.de  Fri Mar 29 12:35:07 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 17:35:07 +0100
Subject: [PATCH 05/31 v2] build fix: fix array size
In-Reply-To: <CAJ-VmomfZs4_h_pey5jP=VptAU7RF8Wa27RBC=__yG5QwSJSdA@mail.gmail.com>
References: <CAJ-VmomfZs4_h_pey5jP=VptAU7RF8Wa27RBC=__yG5QwSJSdA@mail.gmail.com>
Message-ID: <1364574907-10283-1-git-send-email-linux@rempel-privat.de>

v2 - use #define..

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/ah.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/target_firmware/wlan/ah.h b/target_firmware/wlan/ah.h
index c86d115..d0cd40e 100755
--- a/target_firmware/wlan/ah.h
+++ b/target_firmware/wlan/ah.h
@@ -9,6 +9,7 @@
 #endif
 
 #define AR5416_DEVID_PCIE   0x0024  /* AR5416 PCI-E (XB) (Owl) */
+#define HAL_RATE_TABLE_SIZE 33
 
 typedef enum {
 	HAL_OK           = 0,    /* No error */
@@ -240,7 +241,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[HAL_RATE_TABLE_SIZE];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -254,7 +255,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[HAL_RATE_TABLE_SIZE];
 } HAL_RATE_TABLE;
 
 typedef struct {
@@ -271,7 +272,7 @@ typedef struct {
 
 typedef struct {
 	a_int32_t    rateCount;
-	a_uint8_t    rateCodeToIndex[32];
+	a_uint8_t    rateCodeToIndex[HAL_RATE_TABLE_SIZE];
 	struct {
 		a_uint8_t    valid;
 		a_uint8_t    phy;
@@ -282,7 +283,7 @@ typedef struct {
 		a_uint8_t    controlRate;
 		a_uint16_t   lpAckDuration;
 		a_uint16_t   spAckDuration;
-	} info[32];
+	} info[HAL_RATE_TABLE_SIZE];
 } HAL_RATE_TABLE;
 
 #define HAL_RATESERIES_RTS_CTS    0x0001  /* use rts/cts w/this series */
-- 
1.8.1.2



From linux at rempel-privat.de  Fri Mar 29 14:10:25 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 19:10:25 +0100
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <CAJ-Vmo=2r7d+sHpPviJ_JT7DyCi51DtrDzUpdwO-QikT+Ofsiw@mail.gmail.com>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
 <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
 <5155B72A.5000906@rempel-privat.de>
 <CAJ-Vmo=2r7d+sHpPviJ_JT7DyCi51DtrDzUpdwO-QikT+Ofsiw@mail.gmail.com>
Message-ID: <5155D911.1000009@rempel-privat.de>

Am 29.03.2013 18:37, schrieb Adrian Chadd:
> On 29 March 2013 08:45, Oleksij Rempel <linux at rempel-privat.de
> <mailto:linux at rempel-privat.de>> wrote:
>
>     Am 29.03.2013 16:21, schrieb Adrian Chadd:
>
>         Hi,
>
>         Why are you doing a printf() here? Are you just trying to use the
>         command line argument?
>
>
>     I used Eugens suggestion here.
>     Currently this call do nothing. It is possible to use it for
>     debuging or just removed. What is your suggestion?
>
>
> The printf, or the call to ath_hal_getrtsaggrlimit() ?

ath_hal_getrtsaggrlimit(). It make no sense to call it and not check result.

-- 
Regards,
Oleksij


From linux at rempel-privat.de  Fri Mar 29 17:49:39 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Fri, 29 Mar 2013 22:49:39 +0100
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
 <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
 <5155B72A.5000906@rempel-privat.de>
 <CAJ-Vmo=2r7d+sHpPviJ_JT7DyCi51DtrDzUpdwO-QikT+Ofsiw@mail.gmail.com>
 <5155D911.1000009@rempel-privat.de>
 <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
Message-ID: <51560C73.5000101@rempel-privat.de>

Am 29.03.2013 19:53, schrieb Adrian Chadd:
> On 29 March 2013 11:10, Oleksij Rempel <linux at rempel-privat.de
> <mailto:linux at rempel-privat.de>> wrote:
>
>         ?
>         The printf, or the call to ath_hal_getrtsaggrlimit() ?
>
>
>     ath_hal_getrtsaggrlimit(). It make no sense to call it and not check
>     result.
>
>
> Oh, i see what's going on.
>
> In short, we can kill it, as long as we never see AR5416 + AR7010 combo
> NICs.
>
> In long, you have to trace the code. ath_hal_getrtsaggrlimit() is a HAL
> capability call, to fetch the RTS aggrgate limit value. If it actually
> succeeds, it returns HAL_OK and sets the value in  aggr_limit_with_rts
> which is passed in by pointer value. But that capability isn't actually
> processed anywhere. So it doesn't necessarily matter that we don't check
> the return value of the capability call, the point here is
> aggr_limit_with_rts is potentially changed by that call. So it _could_
> in theory be used. :-)
>
> So, for now, just set aggr_limit_with_rts to 0 in ath_buf_set_rate(),
> verify that aggregation still works, and we'll remove this whole check
> later. Setting it to 0 in the definition should quieten the compiler
> warning there.
>
> The reason for the check? AR5416/AR5418 doesn't work with RTS +
> aggregates longer than 8KiB, so the driver has to either limit aggregate
> sizes to 8KiB or less, or disable RTS on longer aggregates. This was
> fixed in subsequent chips.

I'm confused. Aren't AR5416/AR5418 old MACs with draft-n? Two chip 
solutions with PCI/PCIe interface? I think it is unprobable that some 
one will produce AR7010+AR5416+AR2122 or some thing like this. Or i 
misunderstood some thing?

-- 
Regards,
Oleksij


From linux at rempel-privat.de  Sat Mar 30 04:15:43 2013
From: linux at rempel-privat.de (Oleksij Rempel)
Date: Sat, 30 Mar 2013 09:15:43 +0100
Subject: [PATCH 17/31 v2] build fix: ath_hal_getrtsaggrlimit can be removed
 here
In-Reply-To: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
References: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
Message-ID: <1364631343-13841-1-git-send-email-linux@rempel-privat.de>

reason for this part of code:
"AR5416/AR5418 doesn't work with RTS + aggregates longer than 8KiB,
so the driver has to either limit aggregate sizes to 8KiB or less,
or disable RTS on longer aggregates. This was fixed in subsequent chips."
  Adrian Chadd

Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
---
 target_firmware/wlan/if_owl.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
index e42e6be..4ab16c7 100755
--- a/target_firmware/wlan/if_owl.c
+++ b/target_firmware/wlan/if_owl.c
@@ -339,7 +339,7 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
     HAL_11N_RATE_SERIES series[4];
     a_int32_t i, flags;
     a_uint8_t rix, cix, rtsctsrate;
-    a_uint32_t aggr_limit_with_rts;
+    a_uint32_t aggr_limit_with_rts = 0;
     a_uint32_t ctsduration = 0;
     a_int32_t prot_mode = AH_FALSE;
 
@@ -367,8 +367,10 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc, struct ath_tx_buf *bf)
 	    }
     }
 
-    ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts);
-
+    /* TODO: this code is artifact from old chipsets
+     * AR5416/AR5418, for now we will disable it with aggr_limit_with_rts=0
+     * If some body will complain - we will need to take closer look.
+     * If not, remove it. (30.03.2013) */
     if (bf->bf_isaggr && aggr_limit_with_rts &&
 	bf->bf_al > aggr_limit_with_rts) {
 	    flags &= ~(HAL_TXDESC_RTSENA);
-- 
1.8.1.2



From adrian.chadd at gmail.com  Fri Mar 29 18:49:20 2013
From: adrian.chadd at gmail.com (Adrian Chadd)
Date: Fri, 29 Mar 2013 18:49:20 -0400
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <51560C73.5000101@rempel-privat.de>
Message-ID: <51561a7d.27b9ec0a.2a5b.ffffd40e@mx.google.com>

Yup. But this code originated from our madwifi carrier code.

Hence why it has this in it :)



Sent from my Palm Pre on AT&amp;T
On Mar 29, 2013 5:49 PM, Oleksij Rempel &lt;linux at rempel-privat.de&gt; wrote: 

Am 29.03.2013 19:53, schrieb Adrian Chadd:

&gt; On 29 March 2013 11:10, Oleksij Rempel &lt;linux at rempel-privat.de

&gt; &lt;mailto:linux at rempel-privat.de&gt;&gt; wrote:

&gt;

&gt;         ?

&gt;         The printf, or the call to ath_hal_getrtsaggrlimit() ?

&gt;

&gt;

&gt;     ath_hal_getrtsaggrlimit(). It make no sense to call it and not check

&gt;     result.

&gt;

&gt;

&gt; Oh, i see what's going on.

&gt;

&gt; In short, we can kill it, as long as we never see AR5416 + AR7010 combo

&gt; NICs.

&gt;

&gt; In long, you have to trace the code. ath_hal_getrtsaggrlimit() is a HAL

&gt; capability call, to fetch the RTS aggrgate limit value. If it actually

&gt; succeeds, it returns HAL_OK and sets the value in  aggr_limit_with_rts

&gt; which is passed in by pointer value. But that capability isn't actually

&gt; processed anywhere. So it doesn't necessarily matter that we don't check

&gt; the return value of the capability call, the point here is

&gt; aggr_limit_with_rts is potentially changed by that call. So it _could_

&gt; in theory be used. :-)

&gt;

&gt; So, for now, just set aggr_limit_with_rts to 0 in ath_buf_set_rate(),

&gt; verify that aggregation still works, and we'll remove this whole check

&gt; later. Setting it to 0 in the definition should quieten the compiler

&gt; warning there.

&gt;

&gt; The reason for the check? AR5416/AR5418 doesn't work with RTS +

&gt; aggregates longer than 8KiB, so the driver has to either limit aggregate

&gt; sizes to 8KiB or less, or disable RTS on longer aggregates. This was

&gt; fixed in subsequent chips.



I'm confused. Aren't AR5416/AR5418 old MACs with draft-n? Two chip 

solutions with PCI/PCIe interface? I think it is unprobable that some 

one will produce AR7010+AR5416+AR2122 or some thing like this. Or i 

misunderstood some thing?



-- 

Regards,

Oleksij


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/6a0566aa/attachment.html>

From k.eugene.e at gmail.com  Sun Mar 17 13:00:12 2013
From: k.eugene.e at gmail.com (Eugene Krasnikov)
Date: Sun, 17 Mar 2013 17:00:12 -0000
Subject: build warnings
In-Reply-To: <5145E6CA.5050408@rempel-privat.de>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
 <5145E6CA.5050408@rempel-privat.de>
Message-ID: <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>

Hi Adrian,

Shell we break fixing warnings in little pieces/patches?
There is also a patch in attachment  that fixes warnings with proprietary
toolchain. May be we can reuse it...

2013/3/17 Oleksij Rempel <linux at rempel-privat.de>

> Should i remove AH_BYTE_ORDER and big endian optimisation in
> ./target_firmware/wlan/ah_osdep.h?
>
>
> Am 17.03.2013 16:04, schrieb Adrian Chadd:
>
>  Nope! Go for it.
>>
>>
>>
>> Adrian
>>
>> On 17 March 2013 05:29, Oleksij Rempel <linux at rempel-privat.de> wrote:
>>
>>> Hallo all,
>>>
>>> are there any one working on build warnings? I can start with it.
>>> --
>>> Regards,
>>> Oleksij
>>>
>>> _______________________________________________
>>> Ath9k_htc_fw mailing list
>>> Ath9k_htc_fw at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>>>
>>
>
> --
> Regards,
> Oleksij
>
> _______________________________________________
> Ath9k_htc_fw mailing list
> Ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>



-- 
Best regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130317/eeee8e13/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-build-warnings-for-AR7010-and-AR9271.patch
Type: application/octet-stream
Size: 59848 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130317/eeee8e13/attachment-0001.obj>

From k.eugene.e at gmail.com  Sun Mar 17 14:15:00 2013
From: k.eugene.e at gmail.com (Eugene Krasnikov)
Date: Sun, 17 Mar 2013 18:15:00 -0000
Subject: build warnings
In-Reply-To: <51460555.2060806@rempel-privat.de>
References: <5145B712.20409@rempel-privat.de>
 <CAJ-Vmo=UP8EXVcpAo0WKowuAEeHRMKFbYK_hjKm1nihH=G=Sfw@mail.gmail.com>
 <5145E6CA.5050408@rempel-privat.de>
 <CAFSJ42Y7kim_gqP2N=OVKYhzUjVYeqQR9yMaxqCnWsHUpmyc=Q@mail.gmail.com>
 <51460555.2060806@rempel-privat.de>
Message-ID: <CAFSJ42Y+Xf2GOPHNg6OTOQ19VXCtXp=f58QFA0OoKzwsxVziow@mail.gmail.com>

My patch is obsolete since it was created based on old toolchain. I
attached it just in case you wanna reuse some of the parts. suggestion is
to go for yours.

How much did you fix already? May be we can split our work some how? Let's
say you take common part and ar7010 and i fix ar9271 specific warnings?


2013/3/17 Oleksij Rempel <linux at rempel-privat.de>

> it should definitely be splitted. If you introduce
> some regression, it should be bisectable.
>
> hmm... what do we do now with patches? Some of my patches will conflict
> with yours and in some situations for same warning we did different
> decision.
>
> Am 17.03.2013 18:00, schrieb Eugene Krasnikov:
>
>> Hi Adrian,
>>
>> Shell we break fixing warnings in little pieces/patches?
>> There is also a patch in attachment  that fixes warnings with
>> proprietary toolchain. May be we can reuse it...
>>
>> 2013/3/17 Oleksij Rempel <linux at rempel-privat.de
>> <mailto:linux at rempel-privat.de>>
>>
>>
>>     Should i remove AH_BYTE_ORDER and big endian optimisation in
>>     ./target_firmware/wlan/ah_osdep.h?
>>
>>
>>     Am 17.03.2013 16:04, schrieb Adrian Chadd:
>>
>>         Nope! Go for it.
>>
>>
>>
>>         Adrian
>>
>>         On 17 March 2013 05:29, Oleksij Rempel <linux at rempel-privat.de
>>         <mailto:linux at rempel-privat.de>> wrote:
>>
>>             Hallo all,
>>
>>             are there any one working on build warnings? I can start
>>             with it.
>>             --
>>             Regards,
>>             Oleksij
>>
>>             _______________________________________________
>>             Ath9k_htc_fw mailing list
>>             Ath9k_htc_fw at lists.infradead.org
>>             <mailto:Ath9k_htc_fw at lists.infradead.org>
>>
>>             http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>>
>>
>>
>>     --
>>     Regards,
>>     Oleksij
>>
>>     _______________________________________________
>>     Ath9k_htc_fw mailing list
>>     Ath9k_htc_fw at lists.infradead.org
>>     <mailto:Ath9k_htc_fw at lists.infradead.org>
>>
>>     http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>>
>>
>>
>>
>> --
>> Best regards,
>> Eugene
>>
>
>
> --
> Regards,
> Oleksij
>



-- 
Best regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130317/9d25c3ab/attachment.html>

From k.eugene.e at gmail.com  Mon Mar 18 06:08:39 2013
From: k.eugene.e at gmail.com (Eugene Krasnikov)
Date: Mon, 18 Mar 2013 11:08:39 +0100
Subject: [PATCH 1/6] build fix: unsigned long = %lX
In-Reply-To: <1363544070-17350-2-git-send-email-linux@rempel-privat.de>
References: <1363544070-17350-1-git-send-email-linux@rempel-privat.de>
 <1363544070-17350-2-git-send-email-linux@rempel-privat.de>
Message-ID: <CAFSJ42bwHjNPw9cexHPUkeQqXUxPynL8BP0YpwXcM7X0rEWbhw@mail.gmail.com>

For some reason 'make build' fails after applying this patch with a
following error:

target_firmware/magpie_fw_dev/build/magpie_1_1/image/magpie_ram/../../../..//build/magpie_1_1/image/magpie_ram/fwu.c:4:1:
warning: large integer implicitly truncated to unsigned type [-Woverflow]

Do you have the same error?

2013/3/17 Oleksij Rempel <linux at rempel-privat.de>

> From: Oleksij Rempel <bug-track at fisher-privat.net>
>
> Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
> ---
>  .../magpie_fw_dev/build/utility/bin2hex/bin2hex.c            | 12
> ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
> b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
> index 6fd2541..5d3b14c 100755
> --- a/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
> +++ b/target_firmware/magpie_fw_dev/build/utility/bin2hex/bin2hex.c
> @@ -23,7 +23,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned
> long size, unsigned char
>                     tmp_buf[2] = buf[i+2];
>                     tmp_buf[3] = buf[i+3];
>
> -                       fprintf(out, "0x%08X, ", *((unsigned long
> *)(&tmp_buf[0])));
> +                       fprintf(out, "0x%08lX, ", *((unsigned long
> *)(&tmp_buf[0])));
>
>          } else {
>
> @@ -34,7 +34,7 @@ void write_file(FILE *out, unsigned char *buf, unsigned
> long size, unsigned char
>                         tmp_buf[1] = buf[i+2];
>                         tmp_buf[2] = buf[i+1];
>                         tmp_buf[3] = buf[i+0];
> -                       fprintf(out, "0x%08X, ", *((unsigned long
> *)(&tmp_buf[0])));
> +                       fprintf(out, "0x%08lX, ", *((unsigned long
> *)(&tmp_buf[0])));
>                 }
>          checksum = checksum ^ *((unsigned long *)(&tmp_buf[0]));
>         }
> @@ -58,7 +58,7 @@ void write_rom(FILE *out, FILE *in)
>                 if( size == 0 )
>                 {
>                         if (multiple)
> -                               fprintf(out, "%08X\n", checksum);
> +                               fprintf(out, "%08lX\n", checksum);
>
>                         goto ERR_DONE;
>                 }
> @@ -66,7 +66,7 @@ void write_rom(FILE *out, FILE *in)
>                 {
>                     multiple = 0;
>                         write_file(out, buffer, size, NULL, 1);
> -                       fprintf(out, "%08X\n", checksum);
> +                       fprintf(out, "%08lX\n", checksum);
>                         goto ERR_DONE;
>                 }
>                 else if (size==MAX_READ_SIZE)
> @@ -104,7 +104,7 @@ void write_array(FILE *out, FILE *in, unsigned char
> hif)
>                 {
>                         if (multiple)
>                         {
> -                               fprintf(out, "0x%08X\n", checksum);
> +                               fprintf(out, "0x%08lX\n", checksum);
>                                 file_size += 4;
>                         }
>
> @@ -118,7 +118,7 @@ void write_array(FILE *out, FILE *in, unsigned char
> hif)
>                         multiple = 0;
>
>                         write_file(out, buffer, size, NULL, hif);
> -                       fprintf(out, "0x%08X\n", checksum);
> +                       fprintf(out, "0x%08lX\n", checksum);
>
>                         if( (size%4)!=0 )
>                             file_size += (4-(size%4));
> --
> 1.8.1.2
>
>
> _______________________________________________
> Ath9k_htc_fw mailing list
> Ath9k_htc_fw at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/ath9k_htc_fw
>



-- 
Best regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130318/20ee3f53/attachment.html>

From k.eugene.e at gmail.com  Mon Mar 18 06:29:52 2013
From: k.eugene.e at gmail.com (Eugene Krasnikov)
Date: Mon, 18 Mar 2013 11:29:52 +0100
Subject: Fwd: Your message to Ath9k_htc_fw awaits moderator approval
In-Reply-To: <mailman.2151.1363601322.1201.ath9k_htc_fw@lists.infradead.org>
References: <mailman.2151.1363601322.1201.ath9k_htc_fw@lists.infradead.org>
Message-ID: <CAFSJ42YepbiyyE0rgdmxn_Y7soeJWrqR170hdepTi8UmZQDr0Q@mail.gmail.com>

Hi Adrian and All,

Each time when i send an email to a lists.infradead.org mailgroup i receive
a response with error "Message has a suspicious header"(see email bellow).
Do you see the same behavior? I guess mailgroup must be configured somehow.

Your mail to 'Ath9k_htc_fw' with the subject

    Re: [PATCH 1/6] build fix: unsigned long = %lX

Is being held until the list moderator can review it for approval.

The reason it is being held:

    Message has a suspicious header

Either the message will get posted to the list, or you will receive
notification of the moderator's decision.  If you would like to cancel
this posting, please visit the following URL:


http://lists.infradead.org/mailman/confirm/ath9k_htc_fw/50f66585359d6cee2b25eb8223e7e8d051126af9




-- 
Best regards,
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130318/ed4a5520/attachment-0001.html>

From rodrigue at qca.qualcomm.com  Thu Mar 28 21:15:59 2013
From: rodrigue at qca.qualcomm.com (Luis R. Rodriguez)
Date: Thu, 28 Mar 2013 18:15:59 -0700
Subject: [PATCH 2/3] ath9k_htc_firmware: rename README to README.md
In-Reply-To: <CAJ-Vmomgbk0JeX1uAoesCD1BjAC6QDmGin+KdJS2pQk=6yceMw@mail.gmail.com>
References: <1363118683-2965-1-git-send-email-mcgrof@do-not-panic.com>
 <1363118683-2965-3-git-send-email-mcgrof@do-not-panic.com>
 <CAJ-Vmomgbk0JeX1uAoesCD1BjAC6QDmGin+KdJS2pQk=6yceMw@mail.gmail.com>
Message-ID: <20130329011559.GP448@pogo>

On Wed, Mar 27, 2013 at 11:35:26AM -0700, Adrian Chadd wrote:
> Hiya,
> 
> Would you mind resubmitting this against the current contents of README?
> 

Sure thing, sent!

  Luis


From adrian at freebsd.org  Fri Mar 29 11:21:45 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 08:21:45 -0700
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
Message-ID: <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>

Hi,

Why are you doing a printf() here? Are you just trying to use the command
line argument?



Adrian


On 29 March 2013 02:01, Oleksij Rempel <linux at rempel-privat.de> wrote:

> Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
> ---
>  target_firmware/wlan/if_owl.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
> index e42e6be..b856df8 100755
> --- a/target_firmware/wlan/if_owl.c
> +++ b/target_firmware/wlan/if_owl.c
> @@ -367,7 +367,9 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc,
> struct ath_tx_buf *bf)
>             }
>      }
>
> -    ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts);
> +    if (ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts)) {
> +       adf_os_print("ath_hal_getrtsaggrlimit failed\n");
> +    }
>
>      if (bf->bf_isaggr && aggr_limit_with_rts &&
>         bf->bf_al > aggr_limit_with_rts) {
> --
> 1.8.1.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/7abd7dbe/attachment-0001.html>

From adrian at freebsd.org  Fri Mar 29 11:22:51 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 08:22:51 -0700
Subject: [PATCH 27/31] build fix: wmi_event and wmi_cmd_rsp should use
 void *buffer
In-Reply-To: <1364547725-19750-28-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-28-git-send-email-linux@rempel-privat.de>
Message-ID: <CAJ-VmokgAdNE-nzLGpGDcW3icG94QAQ4402wviKwH=vd+nHO+w@mail.gmail.com>

The only reason they'd use UINT8_t here is so you can byte-offset address
buffer.

Is buffer being used for anything except as a copy source/destination
pointer?



Adrian


On 29 March 2013 02:02, Oleksij Rempel <linux at rempel-privat.de> wrote:

> we pass different buffer types to this functions.
> It makes no sense to define some concrect type here
>
> Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
> ---
>  target_firmware/wlan/if_ath.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/target_firmware/wlan/if_ath.c b/target_firmware/wlan/if_ath.c
> index 022f195..6c5c9e1 100755
> --- a/target_firmware/wlan/if_ath.c
> +++ b/target_firmware/wlan/if_ath.c
> @@ -35,10 +35,8 @@ uint32_t *init_htc_handle = 0;
>  #define UAPSDQ_NUM   9
>  #define CABQ_NUM     8
>
> -void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id, A_UINT8 *buffer,
> a_int32_t Length);
>  void owl_tgt_tx_tasklet(TQUEUE_ARG data);
>  static void ath_tgt_send_beacon(struct ath_softc_tgt *sc,adf_nbuf_t
> bc_hdr,adf_nbuf_t nbuf,HTC_ENDPOINT_ID EndPt);
> -void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16 SeqNo,
> A_UINT8 *buffer, a_int32_t Length);
>  static void ath_hal_reg_write_tgt(void *Context, A_UINT16 Command,
> A_UINT16 SeqNo, A_UINT8 *data, a_int32_t datalen);
>  extern struct ath_buf * ath_tgt_tx_prepare(struct ath_softc_tgt *sc,
> adf_nbuf_t skb, ath_data_hdr_t *dh);
>  extern void  ath_tgt_send_mgt(struct ath_softc_tgt *sc,adf_nbuf_t
> mgt_hdr, adf_nbuf_t skb,HTC_ENDPOINT_ID EndPt);
> @@ -125,7 +123,7 @@ static void ath_setcurmode(struct ath_softc_tgt *sc,
>  }
>
>  void wmi_event(wmi_handle_t handle, WMI_EVENT_ID evt_id,
> -              A_UINT8 *buffer, a_int32_t Length)
> +              void *buffer, a_int32_t Length)
>  {
>         adf_nbuf_t netbuf = ADF_NBUF_NULL;
>         a_uint8_t *pData;
> @@ -147,7 +145,7 @@ void wmi_event(wmi_handle_t handle, WMI_EVENT_ID
> evt_id,
>  }
>
>  void wmi_cmd_rsp(void *pContext, WMI_COMMAND_ID cmd_id, A_UINT16 SeqNo,
> -                A_UINT8 *buffer, a_int32_t Length)
> +                void *buffer, a_int32_t Length)
>  {
>         adf_nbuf_t netbuf = ADF_NBUF_NULL;
>         A_UINT8 *pData;
> --
> 1.8.1.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/f4090940/attachment-0001.html>

From adrian at freebsd.org  Fri Mar 29 12:08:55 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 09:08:55 -0700
Subject: [PATCH 27/31] build fix: wmi_event and wmi_cmd_rsp should use
 void *buffer
In-Reply-To: <5155B8C4.2080708@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-28-git-send-email-linux@rempel-privat.de>
 <CAJ-VmokgAdNE-nzLGpGDcW3icG94QAQ4402wviKwH=vd+nHO+w@mail.gmail.com>
 <5155B8C4.2080708@rempel-privat.de>
Message-ID: <CAJ-Vmonx5L4W8VJfJC68sA2YK4UDxZo9tjVhY9kb1-UzeHGwSQ@mail.gmail.com>

On 29 March 2013 08:52, Oleksij Rempel <linux at rempel-privat.de> wrote:

> Am 29.03.2013 16:22, schrieb Adrian Chadd:
>
>  The only reason they'd use UINT8_t here is so you can byte-offset
>> address buffer.
>>
>> Is buffer being used for anything except as a copy source/destination
>> pointer?
>>
>>
> *buffer passed directly to adf_os_mem_copy without doing extra work on it.
> I do not see any reason to use UINT8_t here.
>

Ok. In that case, it should be fine.

I just wonder whether we should use void * for buffers, or char * for
buffers (hence the UINT8_T type there.)



ADrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/8a17f1c3/attachment-0001.html>

From adrian at freebsd.org  Fri Mar 29 12:17:50 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 09:17:50 -0700
Subject: [PATCH 05/31] build fix: fix array size
In-Reply-To: <1364547725-19750-6-git-send-email-linux@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-6-git-send-email-linux@rempel-privat.de>
Message-ID: <CAJ-VmomfZs4_h_pey5jP=VptAU7RF8Wa27RBC=__yG5QwSJSdA@mail.gmail.com>

On 29 March 2013 02:01, Oleksij Rempel <linux at rempel-privat.de> wrote:


> +       a_uint8_t    rateCodeToIndex[33];
>

This is fine; but once we've tidied this up and verified everything works,
we should replace this '33' with a table size #define.



Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/854db38a/attachment-0001.html>

From adrian at freebsd.org  Fri Mar 29 13:37:23 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 10:37:23 -0700
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <5155B72A.5000906@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
 <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
 <5155B72A.5000906@rempel-privat.de>
Message-ID: <CAJ-Vmo=2r7d+sHpPviJ_JT7DyCi51DtrDzUpdwO-QikT+Ofsiw@mail.gmail.com>

On 29 March 2013 08:45, Oleksij Rempel <linux at rempel-privat.de> wrote:

> Am 29.03.2013 16:21, schrieb Adrian Chadd:
>
>  Hi,
>>
>> Why are you doing a printf() here? Are you just trying to use the
>> command line argument?
>>
>
> I used Eugens suggestion here.
> Currently this call do nothing. It is possible to use it for debuging or
> just removed. What is your suggestion?
>

The printf, or the call to ath_hal_getrtsaggrlimit() ?



Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/a49148e7/attachment-0001.html>

From adrian at freebsd.org  Fri Mar 29 14:53:01 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Fri, 29 Mar 2013 11:53:01 -0700
Subject: [PATCH 17/31] build fix: make use of ath_hal_getrtsaggrlimit
In-Reply-To: <5155D911.1000009@rempel-privat.de>
References: <1364547725-19750-1-git-send-email-linux@rempel-privat.de>
 <1364547725-19750-18-git-send-email-linux@rempel-privat.de>
 <CAJ-VmonOcbdnbsQp_-rgurD_q_caHD9MVgtCC6VuABBbXTrh_w@mail.gmail.com>
 <5155B72A.5000906@rempel-privat.de>
 <CAJ-Vmo=2r7d+sHpPviJ_JT7DyCi51DtrDzUpdwO-QikT+Ofsiw@mail.gmail.com>
 <5155D911.1000009@rempel-privat.de>
Message-ID: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>

On 29 March 2013 11:10, Oleksij Rempel <linux at rempel-privat.de> wrote:

> ?
>> The printf, or the call to ath_hal_getrtsaggrlimit() ?
>>
>
> ath_hal_getrtsaggrlimit(). It make no sense to call it and not check
> result.


Oh, i see what's going on.

In short, we can kill it, as long as we never see AR5416 + AR7010 combo
NICs.

In long, you have to trace the code. ath_hal_getrtsaggrlimit() is a HAL
capability call, to fetch the RTS aggrgate limit value. If it actually
succeeds, it returns HAL_OK and sets the value in  aggr_limit_with_rts
which is passed in by pointer value. But that capability isn't actually
processed anywhere. So it doesn't necessarily matter that we don't check
the return value of the capability call, the point here is
aggr_limit_with_rts is potentially changed by that call. So it _could_ in
theory be used. :-)

So, for now, just set aggr_limit_with_rts to 0 in ath_buf_set_rate(),
verify that aggregation still works, and we'll remove this whole check
later. Setting it to 0 in the definition should quieten the compiler
warning there.

The reason for the check? AR5416/AR5418 doesn't work with RTS + aggregates
longer than 8KiB, so the driver has to either limit aggregate sizes to 8KiB
or less, or disable RTS on longer aggregates. This was fixed in subsequent
chips.



Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130329/76955462/attachment.html>

From adrian at freebsd.org  Sat Mar 30 09:34:42 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Sat, 30 Mar 2013 06:34:42 -0700
Subject: [PATCH 17/31 v2] build fix: ath_hal_getrtsaggrlimit can be
 removed here
In-Reply-To: <1364631343-13841-1-git-send-email-linux@rempel-privat.de>
References: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
 <1364631343-13841-1-git-send-email-linux@rempel-privat.de>
Message-ID: <CAJ-VmokDFQ3Mqu29GXUhng1jYUA25UWPGPoZqSh5xSv4v=Fxug@mail.gmail.com>

Cool, thanks.

We'll eventually cut this code out. I don't think anyone shipped an
AR7010+AR5418.





Adrian

On 30 March 2013 01:15, Oleksij Rempel <linux at rempel-privat.de> wrote:

> reason for this part of code:
> "AR5416/AR5418 doesn't work with RTS + aggregates longer than 8KiB,
> so the driver has to either limit aggregate sizes to 8KiB or less,
> or disable RTS on longer aggregates. This was fixed in subsequent chips."
>   Adrian Chadd
>
> Signed-off-by: Oleksij Rempel <linux at rempel-privat.de>
> ---
>  target_firmware/wlan/if_owl.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/target_firmware/wlan/if_owl.c b/target_firmware/wlan/if_owl.c
> index e42e6be..4ab16c7 100755
> --- a/target_firmware/wlan/if_owl.c
> +++ b/target_firmware/wlan/if_owl.c
> @@ -339,7 +339,7 @@ static void ath_buf_set_rate(struct ath_softc_tgt *sc,
> struct ath_tx_buf *bf)
>      HAL_11N_RATE_SERIES series[4];
>      a_int32_t i, flags;
>      a_uint8_t rix, cix, rtsctsrate;
> -    a_uint32_t aggr_limit_with_rts;
> +    a_uint32_t aggr_limit_with_rts = 0;
>      a_uint32_t ctsduration = 0;
>      a_int32_t prot_mode = AH_FALSE;
>
> @@ -367,8 +367,10 @@ static void ath_buf_set_rate(struct ath_softc_tgt
> *sc, struct ath_tx_buf *bf)
>             }
>      }
>
> -    ath_hal_getrtsaggrlimit(sc->sc_ah, &aggr_limit_with_rts);
> -
> +    /* TODO: this code is artifact from old chipsets
> +     * AR5416/AR5418, for now we will disable it with
> aggr_limit_with_rts=0
> +     * If some body will complain - we will need to take closer look.
> +     * If not, remove it. (30.03.2013) */
>      if (bf->bf_isaggr && aggr_limit_with_rts &&
>         bf->bf_al > aggr_limit_with_rts) {
>             flags &= ~(HAL_TXDESC_RTSENA);
> --
> 1.8.1.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130330/8f90fadc/attachment.html>

From adrian at freebsd.org  Sat Mar 30 09:37:55 2013
From: adrian at freebsd.org (Adrian Chadd)
Date: Sat, 30 Mar 2013 06:37:55 -0700
Subject: [PATCH 17/31 v2] build fix: ath_hal_getrtsaggrlimit can be
 removed here
In-Reply-To: <CAJ-VmokDFQ3Mqu29GXUhng1jYUA25UWPGPoZqSh5xSv4v=Fxug@mail.gmail.com>
References: <CAJ-VmokYMkqnmw_jqYZ9g9jJN0GG3K+Hdh3Wfc_Xypy7FY9L7Q@mail.gmail.com>
 <1364631343-13841-1-git-send-email-linux@rempel-privat.de>
 <CAJ-VmokDFQ3Mqu29GXUhng1jYUA25UWPGPoZqSh5xSv4v=Fxug@mail.gmail.com>
Message-ID: <CAJ-Vmo=pTeK2dp=YF-tFucBTXh2B6n3KFwT4j9ngdita4djgxg@mail.gmail.com>

On 30 March 2013 06:34, Adrian Chadd <adrian at freebsd.org> wrote:

> Cool, thanks.
>
> We'll eventually cut this code out. I don't think anyone shipped an
> AR7010+AR5418.
>
>
Oh, and the other thing to keep in mind - this is part of the Atheros
"partial offload" architecture which we shipped for a few customers.

One AR7010 variant (AR7011? I think?) had an MII+ethernet interface rather
than USB interface. So you'd talk to the device over the MII+ethernet
interface direct from another master CPU.

So the master AP would have a CPU and wifi chip, and the slave/offload
(AR7010 or derivative) would do offloaded frame transmission/reception.

So it's quite possible that there's some carrier / enterprise solution
somewhere that uses the AR7010 as an offload CPU for an AR5418 device. But
I don't think we'll see it for USB offload.

(Yes, I'd eventually like us to support the ethernet offload mode - even if
it's just as a reference we can use internally at work when demo'ing stuff.)



Adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/ath9k_htc_fw/attachments/20130330/9df60e54/attachment.html>

