diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000..ea8112482a --- /dev/null +++ b/COPYING @@ -0,0 +1,12 @@ +OpenWrt is provided under: + + SPDX-License-Identifier: GPL-2.0-only + +Being under the terms of the GNU General Public License version 2 only, +according with: + + LICENSES/GPL-2.0 + +In addition, other licenses may also apply. + +All contributions to OpenWrt are subject to this COPYING file. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index f288702d2f..0000000000 --- a/LICENSE +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/LICENSES/BSD-2-Clause b/LICENSES/BSD-2-Clause new file mode 100644 index 0000000000..da366e2ce5 --- /dev/null +++ b/LICENSES/BSD-2-Clause @@ -0,0 +1,32 @@ +Valid-License-Identifier: BSD-2-Clause +SPDX-URL: https://spdx.org/licenses/BSD-2-Clause.html +Usage-Guide: + To use the BSD 2-clause "Simplified" License put the following SPDX + tag/value pair into a comment according to the placement guidelines in + the licensing rules documentation: + SPDX-License-Identifier: BSD-2-Clause +License-Text: + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/BSD-3-Clause b/LICENSES/BSD-3-Clause new file mode 100644 index 0000000000..34c7f057c8 --- /dev/null +++ b/LICENSES/BSD-3-Clause @@ -0,0 +1,36 @@ +Valid-License-Identifier: BSD-3-Clause +SPDX-URL: https://spdx.org/licenses/BSD-3-Clause.html +Usage-Guide: + To use the BSD 3-clause "New" or "Revised" License put the following SPDX + tag/value pair into a comment according to the placement guidelines in + the licensing rules documentation: + SPDX-License-Identifier: BSD-3-Clause +License-Text: + +Copyright (c) . All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/LICENSES/GPL-1.0 b/LICENSES/GPL-1.0 new file mode 100644 index 0000000000..1c50e3b839 --- /dev/null +++ b/LICENSES/GPL-1.0 @@ -0,0 +1,261 @@ +Valid-License-Identifier: GPL-1.0-or-later +Valid-License-Identifier: GPL-1.0+ +SPDX-URL: https://spdx.org/licenses/GPL-1.0.html +Usage-Guide: + The GNU General Public License (GPL) version 1 should not be used in new + code. For existing kernel code the 'or any later version' option is + required to be compatible with the general license of the project: GPLv2. + To use the license in source code, put the following SPDX tag/value pair + into a comment according to the placement guidelines in the licensing + rules documentation: + SPDX-License-Identifier: GPL-1.0-or-later +License-Text: + + GNU GENERAL PUBLIC LICENSE + Version 1, February 1989 + + Copyright (C) 1989 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The license agreements of most software companies try to keep users +at the mercy of those companies. By contrast, our General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. The +General Public License applies to the Free Software Foundation's +software and to any other program whose authors commit to using it. +You can use it for your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Specifically, the General Public License is designed to make +sure that you have the freedom to give away or sell copies of free +software, that you receive source code or can get it if you want it, +that you can change the software or use pieces of it in new free +programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of a such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any program or other work which +contains a notice placed by the copyright holder saying it may be +distributed under the terms of this General Public License. The +"Program", below, refers to any such program or work, and a "work based +on the Program" means either the Program or any work containing the +Program or a portion of it, either verbatim or with modifications. Each +licensee is addressed as "you". + + 1. You may copy and distribute verbatim copies of the Program's source +code as you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this +General Public License and to the absence of any warranty; and give any +other recipients of the Program a copy of this General Public License +along with the Program. You may charge a fee for the physical act of +transferring a copy. + + 2. You may modify your copy or copies of the Program or any portion of +it, and copy and distribute such modifications under the terms of Paragraph +1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating that + you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, that + in whole or in part contains the Program or any part thereof, either + with or without modifications, to be licensed at no charge to all + third parties under the terms of this General Public License (except + that you may choose to grant warranty protection to some or all + third parties, at your option). + + c) If the modified program normally reads commands interactively when + run, you must cause it, when started running for such interactive use + in the simplest and most usual way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this General + Public License. + + d) You may charge a fee for the physical act of transferring a + copy, and you may at your option offer warranty protection in + exchange for a fee. + +Mere aggregation of another independent work with the Program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other work under the scope of these terms. + + 3. You may copy and distribute the Program (or a portion or derivative of +it, under Paragraph 2) in object code or executable form under the terms of +Paragraphs 1 and 2 above provided that you also do one of the following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal charge + for the cost of distribution) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +Source code for a work means the preferred form of the work for making +modifications to it. For an executable file, complete source code means +all the source code for all modules it contains; but, as a special +exception, it need not include source code for modules which are standard +libraries that accompany the operating system on which the executable +file runs, or for standard header files or definitions files that +accompany that operating system. + + 4. You may not copy, modify, sublicense, distribute or transfer the +Program except as expressly provided under this General Public License. +Any attempt otherwise to copy, modify, sublicense, distribute or transfer +the Program is void, and will automatically terminate your rights to use +the Program under this License. However, parties who have received +copies, or rights to use copies, from you under this General Public +License will not have their licenses terminated so long as such parties +remain in full compliance. + + 5. By copying, distributing or modifying the Program (or any work based +on the Program) you indicate your acceptance of this license to do so, +and all its terms and conditions. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the original +licensor to copy, distribute or modify the Program subject to these +terms and conditions. You may not impose any further restrictions on the +recipients' exercise of the rights granted herein. + + 7. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of the license which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +the license, you may choose any version ever published by the Free Software +Foundation. + + 8. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to humanity, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + + To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively convey +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19xx name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the +appropriate parts of the General Public License. Of course, the +commands you use may be called something other than `show w' and `show +c'; they could even be mouse-clicks or menu items--whatever suits your +program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (a program to direct compilers to make passes + at assemblers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/LICENSES/GPL-2.0 b/LICENSES/GPL-2.0 new file mode 100644 index 0000000000..607adfc6b2 --- /dev/null +++ b/LICENSES/GPL-2.0 @@ -0,0 +1,419 @@ +Valid-License-Identifier: GPL-2.0-only +Valid-License-Identifier: GPL-2.0 +Valid-License-Identifier: GPL-2.0-or-later +Valid-License-Identifier: GPL-2.0+ +SPDX-URL: https://spdx.org/licenses/GPL-2.0.html +Usage-Guide: + To use this license in source code, put one of the following SPDX + tag/value pairs into a comment according to the placement + guidelines in the licensing rules documentation. + For 'GNU General Public License (GPL) version 2 only' use: + SPDX-License-Identifier: GPL-2.0-only + For 'GNU General Public License (GPL) version 2 or any later version' use: + SPDX-License-Identifier: GPL-2.0-or-later +License-Text: + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/LICENSES/ISC b/LICENSES/ISC new file mode 100644 index 0000000000..8953c31420 --- /dev/null +++ b/LICENSES/ISC @@ -0,0 +1,24 @@ +Valid-License-Identifier: ISC +SPDX-URL: https://spdx.org/licenses/ISC.html +Usage-Guide: + To use the ISC License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: ISC +License-Text: + +ISC License + +Copyright (c) + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSES/Linux-syscall-note b/LICENSES/Linux-syscall-note new file mode 100644 index 0000000000..eb170681ba --- /dev/null +++ b/LICENSES/Linux-syscall-note @@ -0,0 +1,25 @@ +SPDX-Exception-Identifier: Linux-syscall-note +SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html +SPDX-Licenses: GPL-2.0-only, GPL-2.0, GPL-2.0-or-later, GPL-2.0+, GPL-1.0-or-later, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+ +Usage-Guide: + This exception is used together with one of the above SPDX-Licenses + to mark user space API (uapi) header files so they can be included + into non GPL compliant user space application code. + To use this exception add it with the keyword WITH to one of the + identifiers in the SPDX-Licenses tag: + SPDX-License-Identifier: WITH Linux-syscall-note +License-Text: + + NOTE! This copyright does *not* cover user programs that use kernel + services by normal system calls - this is merely considered normal use + of the kernel, and does *not* fall under the heading of "derived work". + Also note that the GPL below is copyrighted by the Free Software + Foundation, but the instance of code that it refers to (the Linux + kernel) is copyrighted by me and others who actually wrote it. + + Also note that the only valid version of the GPL as far as the kernel + is concerned is _this_ particular version of the license (ie v2, not + v2.2 or v3.x or whatever), unless explicitly otherwise stated. + + Linus Torvalds + diff --git a/LICENSES/MIT b/LICENSES/MIT new file mode 100644 index 0000000000..f33a68ceb3 --- /dev/null +++ b/LICENSES/MIT @@ -0,0 +1,30 @@ +Valid-License-Identifier: MIT +SPDX-URL: https://spdx.org/licenses/MIT.html +Usage-Guide: + To use the MIT License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT +License-Text: + +MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/include/feeds.mk b/include/feeds.mk index ef5fef7f4b..5676cc4a8f 100644 --- a/include/feeds.mk +++ b/include/feeds.mk @@ -43,5 +43,5 @@ endef # 1: package name define GetABISuffix -$(if $(filter-out kmod-%,$(1)),$(if $(Package/$(1)/abiversion),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(Package/$(1)/abiversion))) +$(if $(filter-out kmod-%,$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))) endef diff --git a/include/kernel-version.mk b/include/kernel-version.mk index 5d05c3c5ac..b01280508f 100644 --- a/include/kernel-version.mk +++ b/include/kernel-version.mk @@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER) endif -LINUX_VERSION-5.4 = .96 +LINUX_VERSION-5.4 = .98 -LINUX_KERNEL_HASH-5.4.96 = f728de695ec5eb17efa15acaecc48fcd7a6c4a912b51704ed137cccf93f9f5e0 +LINUX_KERNEL_HASH-5.4.98 = 83a248d6fbe388f133769d736f36b754767abc9d66f1c034b537ad778fbd46b1 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) diff --git a/include/package-dumpinfo.mk b/include/package-dumpinfo.mk index 30b0187f11..597452e4b9 100644 --- a/include/package-dumpinfo.mk +++ b/include/package-dumpinfo.mk @@ -21,8 +21,7 @@ $(if $(MENU),Menu: $(MENU) )$(if $(DEFAULT),Default: $(DEFAULT) )$(if $(findstring $(PREREQ_CHECK),1),Prereq-Check: 1 )Version: $(VERSION) -$(if $(ABI_VERSION),ABIVersion: $(ABI_VERSION) -)Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) +Depends: $(call PKG_FIXUP_DEPENDS,$(1),$(DEPENDS)) Conflicts: $(CONFLICTS) Menu-Depends: $(MDEPENDS) Provides: $(PROVIDES) diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk index ead4b5742c..e89276ed1a 100644 --- a/include/package-ipkg.mk +++ b/include/package-ipkg.mk @@ -99,7 +99,7 @@ _endef=endef ifeq ($(DUMP),) define BuildTarget/ipkg - ABIV_$(1):=$(call GetABISuffix,$(1)) + ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION)) PDIR_$(1):=$(call FeedPackageDir,$(1)) IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1) @@ -152,11 +152,17 @@ ifeq ($(DUMP),) mkdir -p $(PKG_BUILD_DIR)/.pkgdir/$(1) $(call Package/$(1)/install,$(PKG_BUILD_DIR)/.pkgdir/$(1)) $(call Package/$(1)/install_lib,$(PKG_BUILD_DIR)/.pkgdir/$(1)) + $(if $(PKG_ABI_VERSION),$(SET_ABI_VERSION) "$(PKG_ABI_VERSION)" "$(PKG_BUILD_DIR)/.pkgdir/$(1)" "$(STAGING_DIR)/packages/$(STAGING_FILES_LIST)") touch $$@ $(STAGING_DIR_ROOT)/stamp/.$(1)_installed: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed mkdir -p $(STAGING_DIR_ROOT)/stamp - $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version) + $(if $(ABI_VERSION),echo '$(ABI_VERSION)' | cmp -s - $(PKG_INFO_DIR)/$(1).version || \ + echo '$(ABI_VERSION)' > $(PKG_INFO_DIR)/$(1).version \ + $(foreach pkg,$(filter-out $(1),$(PROVIDES)),; \ + cp $(PKG_INFO_DIR)/$(1).version $(PKG_INFO_DIR)/$(pkg).version \ + ) \ + ) $(call locked,$(CP) $(PKG_BUILD_DIR)/.pkgdir/$(1)/. $(STAGING_DIR_ROOT)/,root-copy) touch $$@ @@ -191,11 +197,15 @@ $(_endef) $$(IPKG_$(1)) : export DESCRIPTION=$$(Package/$(1)/description) $$(IPKG_$(1)) : export PATH=$$(TARGET_PATH_PKG) $$(IPKG_$(1)) : export PKG_SOURCE_DATE_EPOCH:=$(PKG_SOURCE_DATE_EPOCH) + ifdef Build/InstallDev + $$(IPKG_$(1)): $(STAMP_INSTALLED) + endif $(PKG_INFO_DIR)/$(1).provides $$(IPKG_$(1)): $(STAMP_BUILT) $(INCLUDE_DIR)/package-ipkg.mk @rm -rf $$(IDIR_$(1)); \ $$(call remove_ipkg_files,$(1),$$(call opkg_package_files,$(call gen_ipkg_wildcard,$(1)))) mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/CONTROL $(PKG_INFO_DIR) $(call Package/$(1)/install,$$(IDIR_$(1))) + $(if $(PKG_ABI_VERSION),$(SET_ABI_VERSION) "$(PKG_ABI_VERSION)" "$$(IDIR_$(1))" "$(STAGING_DIR)/packages/$(STAGING_FILES_LIST)") $(if $(Package/$(1)/install-overlay),mkdir -p $(PACKAGE_DIR) $$(IDIR_$(1))/rootfs-overlay) $(call Package/$(1)/install-overlay,$$(IDIR_$(1))/rootfs-overlay) -find $$(IDIR_$(1)) -name 'CVS' -o -name '.svn' -o -name '.#*' -o -name '*~'| $(XARGS) rm -rf diff --git a/include/package.mk b/include/package.mk index dc1f69a710..0f1dd5cc50 100644 --- a/include/package.mk +++ b/include/package.mk @@ -73,7 +73,7 @@ find_library_dependencies = \ $(Package/$(dep3)/depends) $(dep3) \ )), \ $(Package/$(dep4)/depends) $(dep4) \ - )), \ + )) \ )) @@ -178,6 +178,7 @@ Build/Exports=$(Build/Exports/Default) define Build/CoreTargets STAMP_PREPARED:=$$(STAMP_PREPARED) STAMP_CONFIGURED:=$$(STAMP_CONFIGURED) + PKG_ABI_VERSION:=$$(PKG_ABI_VERSION) $(if $(QUILT),$(Build/Quilt)) $(call Build/Autoclean) @@ -236,6 +237,7 @@ define Build/CoreTargets "$(STAGING_DIR)/packages/$(STAGING_FILES_LIST)" \ "$(STAGING_DIR)"; \ fi + $(if $(PKG_ABI_VERSION),$(SET_ABI_VERSION) "$(PKG_ABI_VERSION)" $(TMP_DIR)/stage-$(PKG_DIR_NAME)) if [ -d $(TMP_DIR)/stage-$(PKG_DIR_NAME) ]; then \ (cd $(TMP_DIR)/stage-$(PKG_DIR_NAME); find ./ > $(TMP_DIR)/stage-$(PKG_DIR_NAME).files); \ $(call locked, \ diff --git a/include/trusted-firmware-a.mk b/include/trusted-firmware-a.mk index 9f38cfd664..dd740c45f2 100644 --- a/include/trusted-firmware-a.mk +++ b/include/trusted-firmware-a.mk @@ -74,7 +74,7 @@ define Build/Compile/Trusted-Firmware-A CROSS_COMPILE=$(TARGET_CROSS) \ OPENSSL_DIR=$(STAGING_DIR_HOST) \ PLAT=$(PLAT) \ - BUILD_STRING="OpenWRT v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \ + BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \ $(TFA_MAKE_FLAGS) endef diff --git a/package/base-files/files/etc/init.d/system b/package/base-files/files/etc/init.d/system index 0e33c522b4..08cf86b97f 100755 --- a/package/base-files/files/etc/init.d/system +++ b/package/base-files/files/etc/init.d/system @@ -27,7 +27,7 @@ system_config() { ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ # apply timezone to kernel - busybox date -k + hwclock -u --systz } reload_service() { diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile index 41ab0aeea1..eebe500224 100644 --- a/package/boot/arm-trusted-firmware-mediatek/Makefile +++ b/package/boot/arm-trusted-firmware-mediatek/Makefile @@ -40,7 +40,9 @@ define Package/arm-trusted-firmware-mt7622/Default SECTION:=boot CATEGORY:=Boot Loaders TITLE:=ARM Trusted Firmware for MT7622 - DEPENDS:=@TARGET_mediatek_mt7622 + DEPENDS:=@TARGET_mediatek_mt7622 @BROKEN +# wait until bromimage gets replace by static build +# libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by tools/mediatek/bromimage/bromimage) endef define Package/arm-trusted-firmware-mt7622-nor diff --git a/package/boot/arm-trusted-firmware-tools/Makefile b/package/boot/arm-trusted-firmware-tools/Makefile index af9957c3a9..a7112724c0 100644 --- a/package/boot/arm-trusted-firmware-tools/Makefile +++ b/package/boot/arm-trusted-firmware-tools/Makefile @@ -29,39 +29,26 @@ define Package/arm-trusted-firmware-tools BUILDONLY:=1 endef -HOST_CFLAGS += -Wall -Werror -pedantic -std=c99 define Host/Compile - $(MAKE) -C \ - $(HOST_BUILD_DIR)/tools/cert_create \ - CFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" - $(MAKE) -C \ - $(HOST_BUILD_DIR)/tools/encrypt_fw \ - CFLAGS="$(HOST_CFLAGS)" \ - LDFLAGS="$(HOST_LDFLAGS)" $(MAKE) -C \ $(HOST_BUILD_DIR)/tools/fiptool \ - CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" $(MAKE) -C \ $(HOST_BUILD_DIR)/tools/sptool \ - CFLAGS="$(HOST_CFLAGS)" \ + CPPFLAGS="$(HOST_CFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" endef define Host/Install $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/fiptool/fiptool $(STAGING_DIR_HOST)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/cert_create/cert_create $(STAGING_DIR_HOST)/bin/ - $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/encrypt_fw/encrypt_fw $(STAGING_DIR_HOST)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sptool $(STAGING_DIR_HOST)/bin/ $(INSTALL_BIN) $(HOST_BUILD_DIR)/tools/sptool/sp_mk_generator.py $(STAGING_DIR_HOST)/bin/ endef define Host/Clean rm -f $(STAGING_DIR_HOST)/bin/fiptool - rm -f $(STAGING_DIR_HOST)/bin/cert_create - rm -f $(STAGING_DIR_HOST)/bin/encrypt_fw rm -f $(STAGING_DIR_HOST)/bin/sptool rm -f $(STAGING_DIR_HOST)/bin/sp_mk_generator.py endef diff --git a/package/boot/arm-trusted-firmware-tools/patches/001-respect-LDFLAGS.patch b/package/boot/arm-trusted-firmware-tools/patches/001-respect-LDFLAGS.patch new file mode 100644 index 0000000000..0b7989163e --- /dev/null +++ b/package/boot/arm-trusted-firmware-tools/patches/001-respect-LDFLAGS.patch @@ -0,0 +1,11 @@ +--- a/tools/fiptool/Makefile ++++ b/tools/fiptool/Makefile +@@ -38,7 +38,7 @@ + + ${PROJECT}: ${OBJECTS} Makefile + @echo " HOSTLD $@" +- ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} ++ ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} $(LDFLAGS) + @${ECHO_BLANK_LINE} + @echo "Built $@ successfully" + @${ECHO_BLANK_LINE} diff --git a/package/kernel/ath10k-ct/patches/300-mac80211-5.10.patch b/package/kernel/ath10k-ct/patches/300-mac80211-5.10.patch new file mode 100644 index 0000000000..52d639291b --- /dev/null +++ b/package/kernel/ath10k-ct/patches/300-mac80211-5.10.patch @@ -0,0 +1,24 @@ +--- a/ath10k-5.8/wmi.c ++++ b/ath10k-5.8/wmi.c +@@ -4254,7 +4254,7 @@ void ath10k_wmi_event_host_swba(struct a + * actual channel switch is done + */ + if (arvif->vif->csa_active && +- ieee80211_csa_is_complete(arvif->vif)) { ++ ieee80211_beacon_cntdwn_is_complete(arvif->vif)) { + ieee80211_csa_finish(arvif->vif); + continue; + } +--- a/ath10k-5.8/mac.c ++++ b/ath10k-5.8/mac.c +@@ -2295,8 +2295,8 @@ static void ath10k_mac_vif_ap_csa_count_ + if (!arvif->is_up) + return; + +- if (!ieee80211_csa_is_complete(vif)) { +- ieee80211_csa_update_counter(vif); ++ if (!ieee80211_beacon_cntdwn_is_complete(vif)) { ++ ieee80211_beacon_update_cntdwn(vif); + + ret = ath10k_mac_setup_bcn_tmpl(arvif); + if (ret) diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile index 8f4db69411..d7c2a7aa61 100644 --- a/package/kernel/lantiq/ltq-ptm/Makefile +++ b/package/kernel/lantiq/ltq-ptm/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ltq-ptm -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_MAINTAINER:=John Crispin PKG_LICENSE:=GPL-2.0+ diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vdsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vdsl.h index e3571976a5..b965378350 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vdsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vdsl.h @@ -79,7 +79,18 @@ struct wan_tx_mib_table { #if defined(__BIG_ENDIAN) - struct fw_ver_id { + struct fw_ver_id_new { // @2000 + /* 0 - 3h */ + unsigned int family :4; + unsigned int package :4; + unsigned int major :8; + unsigned int middle :8; + unsigned int minor :8; + /* 4 - 7h */ + unsigned int features :32; + }; + + struct fw_ver_id { // @2001 unsigned int family :4; unsigned int fwtype :4; unsigned int interface :4; diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vr9.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vr9.h index a640cfba4d..4737874d9f 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vr9.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_regs_vr9.h @@ -31,6 +31,7 @@ /* * Host-PPE Communication Data Address Mapping */ +#define FW_VER_ID_NEW ((volatile struct fw_ver_id_new *) SB_BUFFER(0x2000)) #define FW_VER_ID ((volatile struct fw_ver_id *) SB_BUFFER(0x2001)) #define CFG_STD_DATA_LEN ((volatile struct cfg_std_data_len *) SB_BUFFER(0x2011)) #define TX_QOS_CFG ((volatile struct tx_qos_cfg *) SB_BUFFER(0x2012)) diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_vr9.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_vr9.h index b895ee8f49..3aa9f1851f 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_vr9.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_fw_vr9.h @@ -3,40 +3,38 @@ /****************************************************************************** +** FILE NAME : ppa_datapath_fw_vr9_e1.h +** PROJECT : PPA +** PLATFORM : VR9 +** MODULES : E1 ** -** FILE NAME : ifxmips_ptm_fw_vr9.h -** PROJECT : UEIP -** MODULES : PTM (VDSL) -** -** DATE : 22 OCT 2007 -** AUTHOR : Xu Liang -** DESCRIPTION : PTM Driver (PP32 Firmware) -** COPYRIGHT : Copyright (c) 2006 -** Infineon Technologies AG -** Am Campeon 1-12, 85579 Neubiberg, Germany +** DATE : 01/08/2014 +** AUTHOR : Lantiq PPE FW Team +** DESCRIPTION : VR9 E1 PPE Firmware Binary +** COPYRIGHT : Copyright (c) 2014 +** Lantiq Deutschland GmbH ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation; either version 2 of the License, or ** (at your option) any later version. ** +** FW VERSION [31:0] : 0x73021000 +** FW FEATURE [31:0] : 0xB0000000 +** MERCURIAL TAG : PTM_FW_PPA_2.16_Pre_Rel_04@default@ptm_fw +** ** HISTORY -** $Date $Author $Comment -** 22 OCT 2007 Xu Liang Initiate Version, v00.01 +** $Date $Author $Comment +** 01/08/2014 Lantiq PPE FW Team VR9 E1 PPE Firmware Binary *******************************************************************************/ - -#define PTM_FW_VER_MAJOR 0 -#define PTM_FW_VER_MINOR 30 - - static unsigned int firmware_binary_code[] = { 0x80000980, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8000ffe0, 0x00000000, 0x00000000, 0x00000000, 0x94000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xc1c20002, 0xd9cc00f8, 0xc0006950, 0xcbc000f8, 0xc0004024, 0xc8c000f8, 0xc0006950, 0x5bfc0002, - 0xcfc000f8, 0xa4c252a2, 0x00000000, 0x00000000, 0x800007a0, 0x00000000, 0x00000000, 0x00000000, + 0xa9446c0a, 0xcfc000f8, 0x00000000, 0xa4c26a1a, 0x00000000, 0x00000000, 0x80000790, 0x00000000, 0x94000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x94000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, @@ -69,199 +67,272 @@ static unsigned int firmware_binary_code[] = { 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xc0e1fffe, 0x58cdfffe, 0xc1e1fffa, 0x59ddfffe, 0x94000001, 0x00000000, 0x00000000, 0x00000000, 0xc0e1fffe, 0x58cdfffe, 0xc1e1fffa, 0x59ddfffe, 0x900009a1, 0x00000000, 0x00000000, 0x00000000, - 0x90cc0941, 0x00000000, 0x00000000, 0x00000000, 0xc3e0e2a2, 0x5bfc003c, 0xc0004002, 0xcfc000f8, - 0xc3c00000, 0xc0004024, 0xcbc20078, 0x00000000, 0x00000000, 0xc1c00000, 0xd9c400f9, 0xdbc40078, - 0xc1c00006, 0xd9c400f9, 0xc3c0fc10, 0xc0006952, 0xcfc000f8, 0xc3c00000, 0xc3400000, 0xc3000040, - 0xc2c00080, 0x6ff8a000, 0x5bb87d00, 0x5838001c, 0xcf4000f8, 0x5838001e, 0xcec000f8, 0x58380020, - 0xcf4000f8, 0x58380022, 0xcf0000f8, 0x5bfc0002, 0x5ebc0004, 0x8400ffa0, 0x00000000, 0xc1e1fffe, - 0x59ddfffa, 0x141c0000, 0xc1c00000, 0xc000691c, 0xcdc000f8, 0xab64002a, 0xc3c00000, 0xab66001a, - 0xc3c00002, 0x80001130, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x6ff8a000, 0x5bb87d00, 0x58380004, - 0xcb4000f8, 0xc2800000, 0x58380000, 0xca820008, 0xc000e824, 0xc3000000, 0xcb3c0070, 0x6f5c8000, - 0x41f4e000, 0x431d8000, 0x5b304000, 0xc000e828, 0xc1c00000, 0xc9fc0070, 0x00000000, 0xc0004000, - 0x41f4e000, 0x401c0000, 0xcac000f8, 0x5de80004, 0x84000880, 0xa6c607ea, 0x00000000, 0x6fe42000, - 0xc6e4a000, 0x6e60a000, 0x5a207b00, 0xc1800000, 0x58200000, 0xc9800000, 0xc2800000, 0xc6e80010, - 0x5dd80000, 0x8400003a, 0x5de80008, 0xc6a82012, 0xc1c00004, 0x45e8e000, 0x88000030, 0x80000558, - 0x5de80004, 0xc6a8010a, 0x5de80008, 0x84000538, 0x58380000, 0xc1c00002, 0xcdc00000, 0x58200000, - 0xc1c00002, 0xcdc00000, 0x5de80002, 0xcdc00002, 0xc000ea14, 0xc1e20000, 0xcdfe3100, 0xc000fb60, - 0xc1c00002, 0xcdfc0000, 0xc0006940, 0xc9c000f8, 0x403c0000, 0x00000000, 0x59dc0002, 0xcdc000f8, - 0xc1c00004, 0x45e8e000, 0x880000fa, 0x58200020, 0xc9c000f8, 0xc0c00018, 0xc1000000, 0xa5c0002a, - 0xc1400080, 0x5de80000, 0xc6ccf930, 0xc54c1932, 0x5de80000, 0xc1c0000a, 0xc5cc1230, 0xc5cc3202, - 0x58200022, 0xc9c000f8, 0xc74c0b30, 0xc7cc0008, 0xc5cc0528, 0xc1800000, 0xc6982000, 0xc1c00000, - 0xc69c0000, 0x71d8e000, 0xc5cc0400, 0x98404c78, 0xc5d00000, 0x7d80e000, 0xc5d00100, 0x5dd80002, - 0x84000388, 0xc1c00000, 0xc6ddc030, 0x59dc0006, 0xc5ec0e30, 0xc0c00018, 0xc1000004, 0x59dc0002, - 0xc5cc1230, 0xc74c0b30, 0xc7cc0008, 0xc0000088, 0x441ce000, 0xc5cc1930, 0xa6cc02b0, 0xc1c80002, - 0x70dc6000, 0xc1400000, 0xc6d5c030, 0x5d540002, 0x6d5c4010, 0x431c0000, 0xc88000f8, 0xc1c00000, - 0xc55c0008, 0xc0000006, 0x441ce000, 0x6ddc6000, 0x689c4010, 0xc1c001fe, 0x749c4000, 0x59540002, - 0xc1c000fe, 0x749c4000, 0x5c880020, 0xc48c1930, 0x4148c000, 0x59980002, 0x5dd80088, 0x8800002a, - 0x58200000, 0xc1c00000, 0xcdc00000, 0x800000c8, 0xc1400000, 0x6d9c4010, 0x431c0000, 0xc94000f8, - 0xc1c00000, 0xc59c0008, 0xc0000006, 0x441ce000, 0x6ddc6000, 0x695ca010, 0xc1c001fe, 0x755ca000, - 0x00000000, 0x00000000, 0x5dd40000, 0x84000018, 0x59980002, 0x8000ff48, 0x59980002, 0xc0800002, - 0x5dd400a0, 0xc4902100, 0xc4ac2602, 0x4588c002, 0xdbc800f9, 0xda4800f8, 0xda1000f9, 0x90404391, - 0x58200020, 0xc9c000f8, 0x58200022, 0xc94000f8, 0x5ddc0002, 0xc1c00000, 0xc5cc1932, 0xc6ddc030, - 0x59dc0002, 0x98404c78, 0xc5cc1230, 0xc54c0528, 0xc4d08000, 0xa5020072, 0xc1c00002, 0xc5d00100, - 0xc5ac0e30, 0xa6ccfdc2, 0xc1c00000, 0xc5cc0400, 0xc1c00086, 0x45d8e000, 0xc5cc1930, 0x8000ff28, - 0x00000000, 0x00000000, 0x00000000, 0x80000070, 0xdbc800f9, 0xda4800f8, 0xda1000f9, 0x90404391, - 0x58200022, 0xc98000f8, 0x58200020, 0xc9c000f8, 0x00000000, 0x98404c78, 0x5ddc0002, 0xc58c0528, - 0xc5cc1932, 0x80000200, 0xc1400000, 0xc000403e, 0xc9400000, 0xc1800000, 0x58200000, 0xc9800000, - 0x5dd40002, 0x84000020, 0x5dd80002, 0x84000010, 0x80000110, 0x5de80006, 0x84000088, 0x58380000, - 0xc1c00002, 0xcdc00000, 0xc000ea14, 0xc1e20000, 0xcdfe3100, 0xc000fb60, 0xc1c20002, 0xcdfc2100, - 0xc0006944, 0xc9c000f8, 0x403c0000, 0x00000000, 0x59dc0002, 0xcdc000f8, 0x800000f0, 0x5de8000a, - 0x84000070, 0x58380000, 0xc1c00000, 0xcdc00000, 0xc000ea14, 0xc1e20002, 0xcdfe3100, 0xc000fb60, - 0xc1c20002, 0xcdfc2100, 0xc000facc, 0xc1c00002, 0xcdfc0000, 0x80000078, 0xa6ca0040, 0xc000facc, - 0xc1ca0002, 0xcdfca500, 0xc000fb64, 0xc1c60002, 0xcdfc6300, 0x80000038, 0xc000facc, 0xc1c80002, - 0xcdfc8400, 0xc000fb64, 0xc1c40002, 0xcdfc4200, 0xc0c00010, 0x98404c78, 0xc7cc0008, 0xc74c0b30, - 0xc1000004, 0x80000808, 0xc1c00002, 0x58380008, 0xcdc000f8, 0x58380000, 0xc1e00006, 0xcdc21008, - 0xc000facc, 0xc1c80002, 0xcdfc8400, 0xc000fb64, 0xc1c40002, 0xcdfc4200, 0xc0c00010, 0x98404c78, - 0xc7cc0008, 0xc74c0b30, 0xc1000004, 0x80000778, 0x5de80006, 0x84000170, 0xa6c60032, 0x00000000, - 0x58380000, 0xc1e00004, 0xcdc21008, 0x8000f760, 0x58380008, 0xca8000f8, 0xc2400000, 0x58380002, - 0xca420078, 0x00000000, 0x5aa80002, 0x58380008, 0xce8000f8, 0x46a4e000, 0x8800008a, 0x58380000, - 0xc1e00002, 0xcdc21008, 0x58380000, 0xc1c00000, 0xcdc00000, 0xc000facc, 0xc1c20002, 0xcdfc2100, - 0xc1e1e1a2, 0xc000ea1c, 0xcdfc00f8, 0xc000ea14, 0xc1e20002, 0xcdfe3100, 0x80000038, 0xc000facc, - 0xc1c80002, 0xcdfc8400, 0xc000fb64, 0xc1c40002, 0xcdfc4200, 0xc0c00010, 0x98404c78, 0xc7cc0008, - 0xc74c0b30, 0xc1000004, 0x80000600, 0x5de80002, 0x84000150, 0xa6c6004a, 0x00000000, 0x58380000, - 0xc1e00004, 0xcdc21008, 0xc1f8001e, 0xc000ea1c, 0xcdfc00f8, 0x8000f5d0, 0x58380008, 0xca8000f8, - 0xc2400000, 0x58380002, 0xca400078, 0xc000facc, 0xc1c20002, 0xcdfc2100, 0x5aa80002, 0x58380008, - 0xce8000f8, 0x46a4e000, 0x88000072, 0x58380000, 0xc1e00000, 0xcdc21008, 0xc1c00000, 0x58380006, - 0xcdc000f8, 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc000e820, 0xc1c00000, 0xcdfc0000, 0x80000300, - 0xc0c00010, 0x98404c78, 0xc7cc0008, 0xc74c0b30, 0xc1000004, 0x800004a8, 0x5838001c, 0xca8000f8, - 0x5838001e, 0xca4000f8, 0x5aa80002, 0x5838001c, 0xce8000f8, 0x4668e000, 0x88000098, 0x58380022, - 0xca4000f8, 0x58380020, 0xca0000f8, 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc000e810, 0xce7c0030, - 0xc2800000, 0x5838001c, 0xce8000f8, 0x5a200002, 0x58380020, 0xce0000f8, 0xc000e82c, 0xc1dc0002, - 0xcdfdce00, 0x58380006, 0xc8c000f8, 0x5830001c, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, - 0x5dcc0006, 0x88000028, 0x58cc0002, 0x58380006, 0xccc000f8, 0x80000250, 0x5838000a, 0xc8c000f9, - 0xc90000f9, 0xc1400000, 0xc9400001, 0x74e86000, 0x75248000, 0x7560a000, 0x58380010, 0xca8000f9, - 0xca4000f9, 0xc2000000, 0xca000001, 0x98404de8, 0x74e86000, 0x75248000, 0x7560a000, 0x5dc800a0, - 0x840001ba, 0x58380016, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x98404de8, 0x74e86000, - 0x75248000, 0x7560a000, 0x5dc800a0, 0x84000162, 0x58380000, 0xc1e00004, 0xcdc21008, 0x5838001c, - 0xc1c00000, 0xcdc000f8, 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc1f8001e, 0xc000ea1c, 0xcdfc00f8, - 0xc000e820, 0xc1c00002, 0xcdfc0000, 0xc1c00082, 0x45c8e000, 0xc000e810, 0xcdfc0030, 0xc2400000, - 0xc000e82c, 0xca7c0038, 0xc000e83c, 0xc2800000, 0xcabc0038, 0xc0c00010, 0x98404c78, 0xc7cc0008, - 0xc74c0b30, 0xc1000004, 0x5b740002, 0x4674e000, 0xc1c00000, 0xc5f400fe, 0x5ea80002, 0x8400ffb0, - 0xc000e83c, 0xc1c00000, 0xcdfc0038, 0xc000e82c, 0xc1dc0002, 0xcdfdce00, 0x80000178, 0x58380010, - 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x58380016, 0xce8000f9, 0xce4000f9, 0xce000001, - 0x5838000a, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x58380010, 0xce8000f9, 0xce4000f9, - 0xce000001, 0x5830001c, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x5838000a, 0xce8000f9, - 0xce4000f9, 0xce000001, 0xc000facc, 0xc1c20002, 0xcdfc2100, 0xc0c00010, 0x98404c78, 0xc7cc0008, - 0xc74c0b30, 0xc1000004, 0xc000e83c, 0xc1d00002, 0xcdfd0800, 0xc0c00000, 0xc000e82c, 0xc8fc0038, - 0x5b740002, 0x00000000, 0x44f4e000, 0xc1c00000, 0xc5f400fe, 0x58380004, 0xcf4000f8, 0x98404ec0, - 0x00000000, 0x00000000, 0x00000000, 0xc0006914, 0xcbc000f8, 0xc2800000, 0xc2400000, 0x5bfc4b00, - 0xc7c000f8, 0xcb0000f8, 0x58000002, 0xcac000f8, 0xc0004026, 0xca800078, 0xc0004026, 0xca420078, - 0xc3400000, 0xc7366018, 0xa73e0172, 0x00000000, 0xc777e300, 0xc000694c, 0xc9c000f8, 0x00000000, - 0x00000000, 0x59dc0002, 0xcdc000f8, 0x6f5c6000, 0x58dcb640, 0x580c0000, 0xc90000f8, 0x580c0002, - 0xc94000f8, 0x59100002, 0x580c0000, 0xcd0000f8, 0xc1c00000, 0xc71c0078, 0x415ca000, 0x580c0002, - 0xcd4000f8, 0x98402008, 0x5834fc10, 0xc8c000f8, 0xc1000000, 0x5dc80000, 0x84000070, 0x6f402000, - 0x58005fe0, 0xc3800000, 0x58000000, 0xcb800078, 0xc1c00000, 0x58000002, 0xc9c00078, 0x984022c0, - 0x00000000, 0x439dc000, 0x00000000, 0x80000028, 0x98402098, 0xc48c00f8, 0x00000000, 0x00000000, - 0xc0006916, 0xcbc000f8, 0xc3400000, 0x00000000, 0x5bfc7a00, 0xc7c000f8, 0xcb0000f8, 0x58000002, - 0xcac000f8, 0xc7366018, 0xa73e0900, 0x00000000, 0xc777e300, 0xc000694e, 0xc9c000f8, 0x00000000, - 0x00000000, 0x59dc0002, 0xcdc000f8, 0x6f5c6000, 0x58dcb640, 0x580c0000, 0xc90000f8, 0x580c0002, - 0xc94000f8, 0x59100002, 0x580c0000, 0xcd0000f8, 0xc1c00000, 0xc71c0078, 0x415ca000, 0x580c0002, - 0xcd4000f8, 0x98402008, 0x5834fc10, 0xc8c000f8, 0xc1000000, 0x5dc80000, 0x84000070, 0x6f402000, - 0x58005fe0, 0xc3800000, 0x58000000, 0xcb800078, 0xc1c00000, 0x58000002, 0xc9c00078, 0x984025d0, - 0x00000000, 0x439dc000, 0x00000000, 0x800007b8, 0x984021c0, 0xc48c00f8, 0x00000000, 0x00000000, - 0x80000790, 0xc7100078, 0xc0800000, 0x6f402000, 0x58005fe0, 0xc1400000, 0x58000000, 0xc9420038, - 0x4690e000, 0x88000030, 0x454ca000, 0x9c400000, 0x4564e000, 0xc1c00004, 0xc5c800fe, 0x9c400000, - 0x454ce000, 0xc1c00002, 0xc5c800fe, 0xc0006914, 0xc90000f8, 0xc1400000, 0xc0004022, 0xc9400078, - 0x583c0000, 0xc1fc0000, 0xcdc3de00, 0x583c0000, 0xcd400078, 0x583c0000, 0xc1fe0002, 0xcdc3ff00, - 0x59100004, 0xc1c00100, 0x45d0e000, 0xc1c00000, 0xc5d000fe, 0xc0006914, 0xcd0000f8, 0x6f546000, - 0x5954b640, 0x5dcc0002, 0x84000038, 0x5814000c, 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, - 0xcdc000f8, 0x5814000e, 0xc9c000f8, 0x00000000, 0x9c400000, 0x59dc0002, 0xcdc000f8, 0x00000000, - 0xc0006916, 0xc90000f8, 0x583c0000, 0xc1fc0000, 0xcdc3de00, 0x583c0000, 0xc1fe0000, 0xcdc3ff00, - 0x59100004, 0xc1c00100, 0x45d0e000, 0xc1c00000, 0xc5d000fe, 0xc0006916, 0xcd0000f8, 0x6f546000, - 0x5954b640, 0x5dcc0002, 0x84000038, 0x58140008, 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, - 0xcdc000f8, 0x5814000a, 0xc9c000f8, 0x00000000, 0x9c400000, 0x59dc0002, 0xcdc000f8, 0x00000000, - 0x58380002, 0xc90000f8, 0x5c000002, 0xc8c000f8, 0xa53e0178, 0xc0006918, 0xca0000f8, 0x00000000, - 0x00000000, 0x5a205d00, 0xc60000f8, 0xc94000f8, 0x58000002, 0xc98000f8, 0xa57e006a, 0xc1c00000, - 0xc0c00004, 0xc71c0078, 0xc46000f8, 0x98402098, 0x45e8e000, 0xc1c00002, 0xc5cc00fe, 0x9e000000, - 0xc1e00002, 0xc000e408, 0xcdc21000, 0xc55c00f8, 0xc4d400f8, 0xc5cc00f8, 0xc59c00f8, 0xc51800f8, - 0xc5d000f8, 0xc1c00000, 0xc5d41f00, 0xc5d3ff00, 0x58200002, 0xcd8000f8, 0x5c000002, 0xcd4000f8, - 0x5e205d00, 0x5a200004, 0xc1c00100, 0x45e0e000, 0xc1c00000, 0xc5e000fe, 0xc0006918, 0xce0000f8, - 0xc1e00002, 0xc000e408, 0xcdc21000, 0xc6dc00f8, 0xc52c00f8, 0xc5d000f8, 0xc71c00f8, 0xc4f000f8, - 0xc5cc00f8, 0xc0004022, 0xcb000078, 0xc1c00002, 0xc5cc1f00, 0xc5f01f00, 0xc5f3fe00, 0x58380002, - 0xcd0000f8, 0x5c000002, 0xccc000f8, 0x6f402000, 0x58005fe0, 0xc1c00000, 0xc9c20138, 0xc2000000, - 0x58000002, 0xca000078, 0x00000000, 0x00000000, 0x5a200004, 0x45e0e000, 0xc1c00000, 0xc5e000fe, - 0xce000078, 0x5e3c4b00, 0x5a200004, 0xc1c00100, 0x45e0e000, 0xc1c00000, 0xc5e000fe, 0xc0006914, - 0xce0000f8, 0xc1c00002, 0x69f4e000, 0xc5dc0838, 0xd9f000f8, 0x583c0002, 0xcec000f8, 0x5c000002, - 0xcf0000f8, 0x9c400000, 0x58380002, 0xc90000f8, 0x5c000002, 0xc8c000f8, 0xc6dc00f8, 0xc52c00f8, - 0xc5d000f8, 0xc71c00f8, 0xc4f000f8, 0xc5cc00f8, 0xc1c00002, 0xc5cc1f00, 0xc1c00000, 0xc5f01f00, + 0x90cc0941, 0x00000000, 0x00000000, 0x00000000, 0xc0004010, 0xd14000f8, 0xc000400c, 0xc8c000f8, + 0xc1c1fffe, 0xd9d7e700, 0x45cce000, 0xc1c00002, 0xd9d40704, 0xc3e0e604, 0x5bfc2000, 0xc0004000, + 0xcfc000f8, 0xc3e16000, 0x5bfc0000, 0xc0004002, 0xcfc000f8, 0xc0008fde, 0xc1c00000, 0xcdc000f8, + 0xc0007e22, 0xc9c000f8, 0x00000000, 0x00000000, 0x5ddc0000, 0x84000022, 0xc0008fde, 0xc1c00002, + 0xcdc000f8, 0xc3c00000, 0xc0004024, 0xcbc20078, 0x00000000, 0x00000000, 0xc1c00000, 0xd9c400f9, + 0xdbc40078, 0xc1c00006, 0xd9c400f9, 0xc000403c, 0xcfc000f8, 0xc3c0fc10, 0xc0006952, 0xcfc000f8, + 0xc3c00000, 0xc3400000, 0xc3000040, 0xc2c00080, 0x6ff8a000, 0x5bb87d00, 0x5838001c, 0xcf4000f8, + 0x5838001e, 0xcec000f8, 0x58380020, 0xcf4000f8, 0x58380022, 0xcf0000f8, 0x5bfc0002, 0x5ebc0004, + 0x8400ffa0, 0x00000000, 0xc1e1fffe, 0x59ddfffa, 0x141c0000, 0xc0004010, 0xd14000f8, 0xc000400c, + 0xc8c000f8, 0xc1c1fffe, 0xd9d7e700, 0x45cce000, 0xc1c00002, 0xd9d40704, 0xc1c00000, 0xc000691c, + 0xcdc000f8, 0xab64002a, 0xc3c00000, 0xab66001a, 0xc3c00002, 0x80001248, 0xc1c00002, 0xc000691c, + 0xcdc000f8, 0x6ff8a000, 0x5bb87d00, 0x58380004, 0xcb4000f8, 0xc2800000, 0x58380000, 0xca820008, + 0xc000e824, 0xc3000000, 0xcb3c0070, 0x6f5c8000, 0x41f4e000, 0x431d8000, 0x5b304000, 0xc000e828, + 0xc1c00000, 0xc9fc0070, 0x00000000, 0xc0004000, 0x41f4e000, 0x401c0000, 0xcac000f8, 0x5de80004, + 0x84000988, 0xa6c608f2, 0x00000000, 0x6fe42000, 0xc6e4a000, 0x6e60a000, 0x5a207b00, 0xc1800000, + 0x58200000, 0xc9800000, 0xc2800000, 0xc6e80010, 0x5dd80000, 0x8400003a, 0x5de80008, 0xc6a82012, + 0xc1c00004, 0x45e8e000, 0x88000030, 0x80000650, 0x5de80004, 0xc6a8010a, 0x5de80008, 0x84000630, + 0x58380000, 0xc1c00002, 0xcdc00000, 0x58200000, 0xc1c00002, 0xcdc00000, 0x5de80002, 0xcdc00002, + 0xc000ea14, 0xc1e20000, 0xcdfe3100, 0xc000fb60, 0xc1c00002, 0xcdfc0000, 0xc0006940, 0xc9c000f8, + 0x403c0000, 0x00000000, 0x59dc0002, 0xcdc000f8, 0xc1c00004, 0x45e8e000, 0x880000fa, 0x58200020, + 0xc9c000f8, 0xc0c00018, 0xc1000000, 0xa5c0002a, 0xc1400080, 0x5de80000, 0xc6ccf930, 0xc54c1932, + 0x5de80000, 0xc1c0000a, 0xc5cc1230, 0xc5cc3202, 0x58200022, 0xc9c000f8, 0xc74c0b30, 0xc7cc0008, + 0xc5cc0528, 0xc1800000, 0xc6982000, 0xc1c00000, 0xc69c0000, 0x71d8e000, 0xc5cc0400, 0x98406308, + 0xc5d00000, 0x7d80e000, 0xc5d00100, 0x5dd80002, 0x84000480, 0xc1c00000, 0xc6ddc030, 0x59dc0006, + 0xc5ec0e30, 0xc0c00018, 0xc1000004, 0x59dc0002, 0xc5cc1230, 0xc74c0b30, 0xc7cc0008, 0xc0000088, + 0x441ce000, 0xc5cc1930, 0xa6cc03a8, 0x583cfac0, 0xc94000f8, 0xc1c80002, 0x70dc6000, 0xa55000c2, + 0x58380024, 0xc94000f8, 0x00000000, 0x00000000, 0x59540002, 0x58380024, 0xcd4000f8, 0xc0c00010, + 0x98406308, 0xc74c0b30, 0xc7cc0008, 0xc1000004, 0x58200000, 0xc1c00000, 0xcdc00000, 0x58380026, + 0xc94000f8, 0x00000000, 0x00000000, 0x59540002, 0x58380026, 0xcd4000f8, 0x800002c0, 0xc1400000, + 0xc6d5c030, 0x5d540002, 0x6d5c4010, 0x431c0000, 0xc88000f8, 0xc1c00000, 0xc55c0008, 0xc0000006, + 0x441ce000, 0x6ddc6000, 0x689c4010, 0xc1c001fe, 0x749c4000, 0x59540002, 0xc1c000fe, 0x749c4000, + 0x5c880020, 0xc48c1930, 0x5dc80002, 0x8800fee2, 0xc1c0007c, 0x45c8e000, 0x8800feca, 0x4148c000, + 0x59980002, 0x5dd80088, 0x8800002a, 0x58200000, 0xc1c00000, 0xcdc00000, 0x800000c8, 0xc1400000, + 0x6d9c4010, 0x431c0000, 0xc94000f8, 0xc1c00000, 0xc59c0008, 0xc0000006, 0x441ce000, 0x6ddc6000, + 0x695ca010, 0xc1c001fe, 0x755ca000, 0x00000000, 0x00000000, 0x5dd40000, 0x84000018, 0x59980002, + 0x8000ff48, 0x59980002, 0xc0800002, 0x5dd400a0, 0xc4902100, 0xc4ac2602, 0x4588c002, 0xdbc800f9, + 0xda4800f8, 0xda1000f9, 0x90405849, 0x58200020, 0xc9c000f8, 0x58200022, 0xc94000f8, 0x5ddc0002, + 0xc1c00000, 0xc5cc1932, 0xc6ddc030, 0x59dc0002, 0x98406308, 0xc5cc1230, 0xc54c0528, 0xc4d08000, + 0xa5020072, 0xc1c00002, 0xc5d00100, 0xc5ac0e30, 0xa6ccfd9a, 0xc1c00000, 0xc5cc0400, 0xc1c00086, + 0x45d8e000, 0xc5cc1930, 0x8000ff28, 0x00000000, 0x00000000, 0x00000000, 0x80000070, 0xdbc800f9, + 0xda4800f8, 0xda1000f9, 0x90405849, 0x58200022, 0xc98000f8, 0x58200020, 0xc9c000f8, 0x00000000, + 0x98406308, 0x5ddc0002, 0xc58c0528, 0xc5cc1932, 0x80000210, 0xc1400000, 0xc000403e, 0xc9400000, + 0xc1800000, 0x58200000, 0xc9800000, 0x5dd40002, 0x84000020, 0x5dd80002, 0x84000010, 0x80000120, + 0x5de80006, 0x84000088, 0x58380000, 0xc1c00002, 0xcdc00000, 0xc000ea14, 0xc1e20000, 0xcdfe3100, + 0xc000fb60, 0xc1c20002, 0xcdfc2100, 0xc0006944, 0xc9c000f8, 0x403c0000, 0x00000000, 0x59dc0002, + 0xcdc000f8, 0x80000100, 0x5de8000a, 0x84000080, 0x58380000, 0xc1c00000, 0xcdc00000, 0xc000ea14, + 0xc1c00000, 0xdd5c5100, 0x7dc0e000, 0xcdfe3100, 0xc000fb60, 0xc1c20002, 0xcdfc2100, 0xc000facc, + 0xc1c00002, 0xcdfc0000, 0x80000078, 0xa6ca0040, 0xc000facc, 0xc1ca0002, 0xcdfca500, 0xc000fb64, + 0xc1c60002, 0xcdfc6300, 0x80000038, 0xc000facc, 0xc1c80002, 0xcdfc8400, 0xc000fb64, 0xc1c40002, + 0xcdfc4200, 0xc0c00010, 0x98406308, 0xc7cc0008, 0xc74c0b30, 0xc1000004, 0x80000818, 0xc1c00002, + 0x58380008, 0xcdc000f8, 0x58380000, 0xc1e00006, 0xcdc21008, 0xc000facc, 0xc1c80002, 0xcdfc8400, + 0xc000fb64, 0xc1c40002, 0xcdfc4200, 0xc0c00010, 0x98406308, 0xc7cc0008, 0xc74c0b30, 0xc1000004, + 0x80000788, 0x5de80006, 0x84000180, 0xa6c60032, 0x00000000, 0x58380000, 0xc1e00004, 0xcdc21008, + 0x8000f658, 0x58380008, 0xca8000f8, 0xc2400000, 0x58380002, 0xca420078, 0x00000000, 0x5aa80002, + 0x58380008, 0xce8000f8, 0x46a4e000, 0x8800009a, 0x58380000, 0xc1e00002, 0xcdc21008, 0x58380000, + 0xc1c00000, 0xcdc00000, 0xc000facc, 0xc1c20002, 0xcdfc2100, 0xc1e1e1a2, 0xc000ea1c, 0xcdfc00f8, + 0xc000ea14, 0xc1c00000, 0xdd5c5100, 0x7dc0e000, 0xcdfe3100, 0x80000038, 0xc000facc, 0xc1c80002, + 0xcdfc8400, 0xc000fb64, 0xc1c40002, 0xcdfc4200, 0xc0c00010, 0x98406308, 0xc7cc0008, 0xc74c0b30, + 0xc1000004, 0x80000600, 0x5de80002, 0x84000150, 0xa6c6004a, 0x00000000, 0x58380000, 0xc1e00004, + 0xcdc21008, 0xc1f8001e, 0xc000ea1c, 0xcdfc00f8, 0x8000f4b8, 0x58380008, 0xca8000f8, 0xc2400000, + 0x58380002, 0xca400078, 0xc000facc, 0xc1c20002, 0xcdfc2100, 0x5aa80002, 0x58380008, 0xce8000f8, + 0x46a4e000, 0x88000072, 0x58380000, 0xc1e00000, 0xcdc21008, 0xc1c00000, 0x58380006, 0xcdc000f8, + 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc000e820, 0xc1c00000, 0xcdfc0000, 0x80000300, 0xc0c00010, + 0x98406308, 0xc7cc0008, 0xc74c0b30, 0xc1000004, 0x800004a8, 0x5838001c, 0xca8000f8, 0x5838001e, + 0xca4000f8, 0x5aa80002, 0x5838001c, 0xce8000f8, 0x4668e000, 0x88000098, 0x58380022, 0xca4000f8, + 0x58380020, 0xca0000f8, 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc000e810, 0xce7c0030, 0xc2800000, + 0x5838001c, 0xce8000f8, 0x5a200002, 0x58380020, 0xce0000f8, 0xc000e82c, 0xc1dc0002, 0xcdfdce00, + 0x58380006, 0xc8c000f8, 0x5830001c, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x5dcc0006, + 0x88000028, 0x58cc0002, 0x58380006, 0xccc000f8, 0x80000250, 0x5838000a, 0xc8c000f9, 0xc90000f9, + 0xc1400000, 0xc9400001, 0x74e86000, 0x75248000, 0x7560a000, 0x58380010, 0xca8000f9, 0xca4000f9, + 0xc2000000, 0xca000001, 0x984064d8, 0x74e86000, 0x75248000, 0x7560a000, 0x5dc800a0, 0x840001ba, + 0x58380016, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x984064d8, 0x74e86000, 0x75248000, + 0x7560a000, 0x5dc800a0, 0x84000162, 0x58380000, 0xc1e00004, 0xcdc21008, 0x5838001c, 0xc1c00000, + 0xcdc000f8, 0xc000e82c, 0xc1c00000, 0xcdfdce00, 0xc1f8001e, 0xc000ea1c, 0xcdfc00f8, 0xc000e820, + 0xc1c00002, 0xcdfc0000, 0xc1c00082, 0x45c8e000, 0xc000e810, 0xcdfc0030, 0xc2400000, 0xc000e82c, + 0xca7c0038, 0xc000e83c, 0xc2800000, 0xcabc0038, 0xc0c00010, 0x98406308, 0xc7cc0008, 0xc74c0b30, + 0xc1000004, 0x5b740002, 0x4674e000, 0xc1c00000, 0xc5f400fe, 0x5ea80002, 0x8400ffb0, 0xc000e83c, + 0xc1c00000, 0xcdfc0038, 0xc000e82c, 0xc1dc0002, 0xcdfdce00, 0x80000178, 0x58380010, 0xca8000f9, + 0xca4000f9, 0xc2000000, 0xca000001, 0x58380016, 0xce8000f9, 0xce4000f9, 0xce000001, 0x5838000a, + 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x58380010, 0xce8000f9, 0xce4000f9, 0xce000001, + 0x5830001c, 0xca8000f9, 0xca4000f9, 0xc2000000, 0xca000001, 0x5838000a, 0xce8000f9, 0xce4000f9, + 0xce000001, 0xc000facc, 0xc1c20002, 0xcdfc2100, 0xc0c00010, 0x98406308, 0xc7cc0008, 0xc74c0b30, + 0xc1000004, 0xc000e83c, 0xc1d00002, 0xcdfd0800, 0xc0c00000, 0xc000e82c, 0xc8fc0038, 0x5b740002, + 0x00000000, 0x44f4e000, 0xc1c00000, 0xc5f400fe, 0x58380004, 0xcf4000f8, 0x984065b0, 0x00000000, + 0x00000000, 0x00000000, 0xc000400c, 0xcbc000f8, 0xc000400e, 0xcb8000f8, 0xc0007d00, 0xcac000f8, + 0x73f8e000, 0x8400034a, 0x58000040, 0xca8000f8, 0xc0006960, 0x4b000058, 0xc1e00002, 0x7dc0e000, + 0x76dd6000, 0x769d4000, 0xc2620002, 0x5a640002, 0xc3400000, 0xc2000006, 0x46e4e000, 0xc634000a, + 0x46a4e000, 0xc634020a, 0xc000fb80, 0xcac000f8, 0xc000fba0, 0xca8000f8, 0xc2400000, 0xc2000000, + 0xc6e40000, 0xc6e40100, 0xc6a40200, 0xc6a40300, 0xc6e02000, 0xc6e02100, 0xc6a02200, 0xc6a02300, + 0x7765a000, 0x7761a000, 0xc6740818, 0x7b716000, 0x84000232, 0xc0006960, 0xcf4000f8, 0xc0800000, + 0xc1c1fffe, 0x45fce000, 0x88000022, 0xa9420018, 0x00000000, 0xc0800008, 0x58fc0008, 0x59380008, + 0xc1c1fffe, 0x45fce000, 0x88000018, 0x58fc0020, 0x59380020, 0x776d4000, 0x840000ca, 0x6e950010, + 0x5dd40000, 0x84000052, 0xc000f41a, 0xcfc000f8, 0xc1c00000, 0xc7dc4050, 0x581cc000, 0x5dfdfffe, + 0xc7c000fe, 0x6948a000, 0xcd4000f8, 0xc1c001fe, 0x769d4000, 0x84000052, 0xc000f41a, 0xccc000f8, + 0xc1c00000, 0xc4dc4050, 0x581cc000, 0x5dcdfffe, 0xc4c000fe, 0x6a894000, 0xce8000f8, 0x7f41a000, + 0x776d2000, 0x840000ca, 0x6e550010, 0x5dd40000, 0x84000052, 0xc000f41a, 0xcf8000f8, 0xc1c00000, + 0xc79c4050, 0x581cc000, 0x5df9fffe, 0xc78000fe, 0x6948a000, 0xcd4000f8, 0xc1c001fe, 0x765d2000, + 0x84000052, 0xc000f41a, 0xcd0000f8, 0xc1c00000, 0xc51c4050, 0x581cc000, 0x5dd1fffe, 0xc50000fe, + 0x6a492000, 0xce4000f8, 0xa9440180, 0xc000a340, 0xcbc000f8, 0xa9420168, 0xc000a34a, 0xcb8000f8, + 0xc000f414, 0xcb4000f8, 0x5dfc0002, 0x84000048, 0xc000a346, 0x984063f0, 0xc8c000f9, 0xc90000f8, + 0xc3c00004, 0xc000a340, 0xcfc000f8, 0x80000058, 0x5dfc0004, 0x84000048, 0xc1c40002, 0x75f4e000, + 0x84000032, 0xc000f414, 0xcdc000f8, 0xc3c00006, 0xc000a340, 0xcfc000f8, 0x5df80002, 0x84000048, + 0xc000a350, 0x98406308, 0xc8c000f9, 0xc90000f8, 0xc3800004, 0xc000a34a, 0xcf8000f8, 0x80000058, + 0x5df80004, 0x84000048, 0xc1c20002, 0x75f4e000, 0x84000032, 0xc000f414, 0xcdc000f8, 0xc3800006, + 0xc000a34a, 0xcf8000f8, 0xa9440ca2, 0xc0008fde, 0xc9c000f8, 0x00000000, 0xc0007e3e, 0xcdc000f8, + 0xc0006914, 0xcbc000f8, 0xc2800000, 0xc2400000, 0x5bfc4b00, 0xc7c000f8, 0xcb0000f8, 0x58000002, + 0xcac000f8, 0xc0004026, 0xca800078, 0xc0004026, 0xca420078, 0xc3400000, 0xc7366018, 0xa73e01da, + 0x00000000, 0x00000000, 0xc0007e20, 0xc9c000f8, 0x00000000, 0x00000000, 0xa5c20040, 0x00000000, + 0x00000000, 0x00000000, 0x984027d8, 0x5c3c4b00, 0x6c002010, 0x5800a100, 0xc777e300, 0xc000694c, + 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, 0xcdc000f8, 0x6f5c6000, 0x58dcb640, 0x580c0000, + 0xc90000f8, 0x580c0002, 0xc94000f8, 0x59100002, 0x580c0000, 0xcd0000f8, 0xc1c00000, 0xc71c0078, + 0x415ca000, 0x580c0002, 0xcd4000f8, 0x98402828, 0x5834fc10, 0xc8c000f8, 0xc1000000, 0x5dc80000, + 0x84000070, 0x6f402000, 0x58005fe0, 0xc3800000, 0x58000000, 0xcb800078, 0xc1c00000, 0x58000002, + 0xc9c00078, 0x98402b10, 0x00000000, 0x439dc000, 0x00000000, 0x80000028, 0x984028b8, 0xc48c00f8, + 0x00000000, 0x00000000, 0xc0006916, 0xcbc000f8, 0xc3400000, 0x00000000, 0x5bfc7a00, 0xc7c000f8, + 0xcb0000f8, 0x58000002, 0xcac000f8, 0xc7366018, 0xa73e0998, 0x00000000, 0xc777e300, 0xc000694e, + 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, 0xcdc000f8, 0x6f5c6000, 0x58dcb640, 0x580c0000, + 0xc90000f8, 0x580c0002, 0xc94000f8, 0x59100002, 0x580c0000, 0xcd0000f8, 0xc1c00000, 0xc71c0078, + 0x415ca000, 0x580c0002, 0xcd4000f8, 0x98402828, 0x5834fc10, 0xc8c000f8, 0xc1000000, 0x5dc80000, + 0x84000070, 0x6f402000, 0x58005fe0, 0xc3800000, 0x58000000, 0xcb800078, 0xc1c00000, 0x58000002, + 0xc9c00078, 0x98402e38, 0x00000000, 0x439dc000, 0x00000000, 0x80000850, 0x984029f8, 0xc48c00f8, + 0x00000000, 0x00000000, 0x80000828, 0xc8c000f8, 0x00000000, 0x00000000, 0xa4feffe8, 0xc1c00000, + 0xcdc000f8, 0x9c400000, 0xc3400000, 0xc1d00002, 0xc4f40018, 0xc7100078, 0xc0800000, 0x6f402000, + 0x58005fe0, 0xc1400000, 0x58000000, 0xc9420038, 0x4690e000, 0x88000030, 0x454ca000, 0x9c400000, + 0x4564e000, 0xc1c00004, 0xc5c800fe, 0x9c400000, 0x454ce000, 0xc1c00002, 0xc5c800fe, 0xc0006914, + 0xc90000f8, 0xc1400000, 0xc0004022, 0xc9400078, 0x583c0000, 0xc1fc0000, 0xcdc3de00, 0x583c0000, + 0xcd400078, 0x583c0000, 0xc1fe0002, 0xcdc3ff00, 0x59100004, 0xc1c00100, 0x45d0e000, 0xc1c00000, + 0xc5d000fe, 0xc0006914, 0xcd0000f8, 0x6f546000, 0x5954b640, 0x5dcc0002, 0x84000038, 0x5814000c, + 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, 0xcdc000f8, 0xc1c00002, 0xc000691c, 0xcdc000f8, + 0x5814000e, 0xc9c000f8, 0x00000000, 0x9c400000, 0x59dc0002, 0xcdc000f8, 0x00000000, 0xc0006916, + 0xc90000f8, 0x583c0000, 0xc1fc0000, 0xcdc3de00, 0x583c0000, 0xc1fe0000, 0xcdc3ff00, 0x59100004, + 0xc1c00100, 0x45d0e000, 0xc1c00000, 0xc5d000fe, 0xc0006916, 0xcd0000f8, 0x6f546000, 0x5954b640, + 0x5dcc0002, 0x84000038, 0x58140008, 0xc9c000f8, 0x00000000, 0x00000000, 0x59dc0002, 0xcdc000f8, + 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x5814000a, 0xc9c000f8, 0x00000000, 0x9c400000, 0x59dc0002, + 0xcdc000f8, 0x00000000, 0xc78000f8, 0xc8c000f8, 0x58000002, 0xc90000f8, 0xa4e00178, 0xc0006918, + 0xca0000f8, 0x00000000, 0x00000000, 0x5a205d00, 0xc60000f8, 0xc94000f8, 0x58000002, 0xc98000f8, + 0xa57e006a, 0xc1c00000, 0xc0c00004, 0xc71c0078, 0xc46000f8, 0x984028b8, 0x45e8e000, 0xc1c00002, + 0xc5cc00fe, 0x9e000000, 0xc1e00002, 0xc000e408, 0xcdc21000, 0xc55c00f8, 0xc4d400f8, 0xc5cc00f8, + 0xc59c00f8, 0xc51800f8, 0xc5d000f8, 0xc1c00000, 0xc5d41f00, 0xc5cff000, 0x58200002, 0xcd8000f8, + 0x5c000002, 0xcd4000f8, 0x5e205d00, 0x5a200004, 0xc1c00080, 0x45e0e000, 0xc1c00000, 0xc5e000fe, + 0xc0006918, 0xce0000f8, 0xc1e00002, 0xc000e408, 0xcdc21000, 0xc6dc00f8, 0xc52c00f8, 0xc5d000f8, + 0xc71c00f8, 0xc4f000f8, 0xc5cc00f8, 0xc0004022, 0xcb000078, 0xc1c00002, 0xc5cc1f00, 0xc5f01f00, 0xc5f3fe00, 0x58380002, 0xcd0000f8, 0x5c000002, 0xccc000f8, 0x6f402000, 0x58005fe0, 0xc1c00000, 0xc9c20138, 0xc2000000, 0x58000002, 0xca000078, 0x00000000, 0x00000000, 0x5a200004, 0x45e0e000, - 0xc1c00000, 0xc5e000fe, 0xce000078, 0x5e3c7a00, 0x5a200004, 0xc1c00100, 0x45e0e000, 0xc1c00000, - 0xc5e000fe, 0xc0006916, 0xce0000f8, 0xc1c00002, 0x69f4e000, 0xc5dc0838, 0xd9f000f8, 0x583c0002, - 0xcec000f8, 0x5c000002, 0xcf0000f8, 0xc1e20002, 0xc000e408, 0xcdc23100, 0x9c400000, 0x00000000, - 0x00000000, 0x00000000, 0xc3c00000, 0x6ff8a000, 0x5bb87d80, 0x583cfb50, 0xc2800000, 0xca80c030, - 0xc2400000, 0x58380000, 0xca400078, 0x58380006, 0xca0000f8, 0x583cea28, 0xc9c000f8, 0xc0c00000, - 0x00000000, 0xc5cc0038, 0x420c8000, 0x4268a000, 0x4514e000, 0x880000aa, 0x58380004, 0xca4000f8, - 0xc000ea28, 0x6e1d2000, 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0xc0006948, 0xc9c000f8, - 0x403c0000, 0x00000000, 0x41e0e000, 0xcdc000f8, 0x46612000, 0x58380004, 0xce4000f8, 0x58380006, - 0xc1c00000, 0xcdc000f8, 0x58380004, 0xca4000f8, 0x583cea28, 0xc9c000f8, 0xc0c00000, 0x00000000, - 0xc5cc0038, 0xc1400000, 0x58380000, 0xc9420078, 0x424d0000, 0x00000000, 0x42948000, 0x4520e000, - 0x8800163a, 0xc000fa40, 0xc9bc00f8, 0x6ff42000, 0xc3000000, 0xc5b4e000, 0xc2c07c00, 0x6f5ca000, - 0x42dd6000, 0x582c0022, 0xc98000f8, 0x00000000, 0x00000000, 0x5dd80000, 0x840003c2, 0x582c0026, - 0xca8000f8, 0x5838000a, 0xc98000f8, 0xc000ea10, 0xc2400000, 0xca7c0070, 0x6d9c8000, 0x41d8e000, - 0x425d2000, 0x5a644000, 0x582c002e, 0xc98000f8, 0x582c0030, 0xc94000f8, 0x00000000, 0x00000000, - 0x4194e000, 0xd9f800f8, 0x5ddc0080, 0x880000a2, 0x00000000, 0xa7400018, 0xc180001e, 0xc180015e, - 0xc1400000, 0x6d5c4010, 0x425c0000, 0xc1c00006, 0x755c8000, 0x5dd00000, 0xcd80183a, 0x5dd00002, - 0xcd80103a, 0x5dd00004, 0xcd80083a, 0x5dd00006, 0xcd80003a, 0x5b300008, 0x80000278, 0x58240002, - 0xc1800000, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, + 0xc1c00000, 0xc5e000fe, 0xce000078, 0x5e3c4b00, 0x5a200004, 0xc1c00100, 0x45e0e000, 0xc1c00000, + 0xc5e000fe, 0xc0006914, 0xce0000f8, 0xc1c00002, 0x69f4e000, 0xc5dc0838, 0xd9f000f8, 0x583c0002, + 0xcec000f8, 0x5c000002, 0xcf0000f8, 0x9c400000, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x58380002, + 0xc90000f8, 0x5c000002, 0xc8c000f8, 0xc6dc00f8, 0xc52c00f8, 0xc5d000f8, 0xc71c00f8, 0xc4f000f8, + 0xc5cc00f8, 0xc1c00002, 0xc5cc1f00, 0xc1c00000, 0xc5f01f00, 0xc5f3fe00, 0x58380002, 0xcd0000f8, + 0x5c000002, 0xccc000f8, 0x6f402000, 0x58005fe0, 0xc1c00000, 0xc9c20138, 0xc2000000, 0x58000002, + 0xca000078, 0x00000000, 0x00000000, 0x5a200004, 0x45e0e000, 0xc1c00000, 0xc5e000fe, 0xce000078, + 0x5e3c7a00, 0x5a200004, 0xc1c00100, 0x45e0e000, 0xc1c00000, 0xc5e000fe, 0xc0006916, 0xce0000f8, + 0xc1c00002, 0x69f4e000, 0xc5dc0838, 0xd9f000f8, 0x583c0002, 0xcec000f8, 0x5c000002, 0xcf0000f8, + 0xc1e20002, 0xc000e408, 0xcdc23100, 0x9c400000, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0xc0007e3e, + 0xc9c000f8, 0x00000000, 0x00000000, 0x5ddc0002, 0xcdc000f8, 0x8800f398, 0xc0004010, 0xc9c000f8, + 0xc0007e24, 0xc8c000f8, 0xa5c200e2, 0x00000000, 0xc0007e22, 0xc9c000f8, 0x00000000, 0x00000000, + 0x5ddc0000, 0x840000aa, 0xc000f41a, 0xcdc000f8, 0x580ca100, 0xc90000f8, 0x580cc100, 0x00000000, + 0xa53e0070, 0x00000000, 0xcd0000f8, 0xc1c00000, 0x580ca100, 0xcdc000f8, 0x58cc0002, 0xc1c00080, + 0x45cce000, 0xc1c00000, 0xc5cc00fe, 0xc0007e24, 0xccc000f8, 0x8000ff78, 0xc3c00000, 0x6ff8a000, + 0x5bb87d80, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x583cfb50, 0xc2800000, 0xca80c030, 0xc2400000, + 0x58380000, 0xca400078, 0x58380006, 0xca0000f8, 0x583cea28, 0xc9c000f8, 0xc0c00000, 0x00000000, + 0xc5cc0038, 0x420c8000, 0x4268a000, 0x4514e000, 0x8800012a, 0x58380004, 0xca4000f8, 0x5de00080, + 0x8800007a, 0xc000ea28, 0xc1d2007e, 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x5de0007e, + 0xc000ea28, 0x6ddd2000, 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x80000038, 0xc000ea28, + 0x6e1d2000, 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x583c6948, 0xc9c000f8, 0x00000000, + 0x00000000, 0x41e0e000, 0xcdc000f8, 0x46612000, 0x58380004, 0xce4000f8, 0x58380006, 0xc1c00000, + 0xcdc000f8, 0x58380004, 0xca4000f8, 0x583cea28, 0xc9c000f8, 0xc0c00000, 0x00000000, 0xc5cc0038, + 0xc1400000, 0x58380000, 0xc9420078, 0x424d0000, 0x00000000, 0x42948000, 0x4520e000, 0x880020ba, + 0xc000fa40, 0xc9bc00f8, 0x6ff42000, 0xc3000000, 0xc5b4e000, 0xc2c07c00, 0x6f5ca000, 0x42dd6000, + 0x582c0022, 0xc98000f8, 0x00000000, 0x00000000, 0x5dd80000, 0x840003d2, 0x582c0026, 0xca8000f8, + 0x5838000a, 0xc98000f8, 0xc000ea10, 0xc2400000, 0xca7c0070, 0x6d9c8000, 0x41d8e000, 0x425d2000, + 0x5a644000, 0x582c0032, 0xc9c000f8, 0x582c002e, 0xc98000f8, 0x582c0030, 0xc94000f8, 0x00000000, + 0x41d8e000, 0x41d4e000, 0xd9f800f8, 0x5ddc0080, 0x880000a2, 0x00000000, 0xa7400018, 0xc180001e, + 0xc180015e, 0xc1400000, 0x6d5c4010, 0x425c0000, 0xc1c00006, 0x755c8000, 0x5dd00000, 0xcd80183a, + 0x5dd00002, 0xcd80103a, 0x5dd00004, 0xcd80083a, 0x5dd00006, 0xcd80003a, 0x5b300008, 0x80000278, + 0x58240002, 0xc1800000, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, - 0xcd8000f9, 0xa7400018, 0xc18001e0, 0xc18001ea, 0xc1400000, 0x6d5c4010, 0x425c0000, 0xc90000f8, - 0xc1c00000, 0xc55c0308, 0x691c8008, 0xc5901838, 0x691c8018, 0xcd0000f8, 0x6d5c4010, 0x425c0000, - 0xc1c00006, 0x755c8000, 0x5dd00000, 0xcd80183a, 0x5dd00002, 0xcd80103a, 0x5dd00004, 0xcd80083a, - 0x5dd00006, 0xcd80003a, 0x5b300008, 0xdf9400f8, 0xc1008fe0, 0x6d5c4010, 0x411c0000, 0xc98000f8, - 0xc1c00000, 0xc55c0308, 0x699cc000, 0x6d9b0010, 0x6f1c4010, 0x425c0000, 0xc94000f8, 0xc1c00000, - 0xc71c0308, 0x695ca008, 0xc5941838, 0x695ca018, 0xcd4000f8, 0x6f1c4010, 0x425c0000, 0xc1c00006, - 0x771ca000, 0x5dd40000, 0xcd80183a, 0x5dd40002, 0xcd80103a, 0x5dd40004, 0xcd80083a, 0x5dd40006, - 0xcd80003a, 0x5b300002, 0x582c0022, 0xc1c00000, 0xcdc000f8, 0x80000e18, 0xdb8800f9, 0xdb4800f8, - 0xc2400000, 0xdf240038, 0xc0004024, 0xcb8000f8, 0x00000000, 0xc3400000, 0xc7b50038, 0xc2800000, - 0xc7a88018, 0xc000fa40, 0xc8fc00f8, 0xc2800000, 0x582c0004, 0xca800038, 0xa4ce0042, 0x58ec0040, - 0xc1c00000, 0x580c0004, 0xc9c00038, 0x00000000, 0x00000000, 0x729d4000, 0x7e412000, 0x76692000, - 0xc0400000, 0xc7840008, 0xc000a0ae, 0x5de40000, 0x84000070, 0xc0c00000, 0xc8c000f8, 0x5dc40000, - 0xdcb800fb, 0xdcb400fa, 0x84000ffa, 0x5dcc0000, 0xdcb800fb, 0xdcb400fa, 0x84000fda, 0xc0c00000, - 0xccc000f8, 0x800001b8, 0xc0c00002, 0xccc000f8, 0xc65000f8, 0x61010028, 0x5dc40000, 0x84000018, - 0x62410008, 0x800002e8, 0x6e144000, 0x59544d08, 0xc0400000, 0x58140004, 0xc84000b8, 0xa78200d0, - 0xc0800000, 0xc1c00000, 0x6e1c2000, 0x59dc5fe0, 0x581c0002, 0xc8820078, 0x581c0000, 0xc9c00078, - 0xc1800000, 0x58140006, 0xc9800078, 0x409ce000, 0xc0800000, 0x581c0000, 0xc8800078, 0x00000000, - 0x00000000, 0x40b44000, 0x4588e000, 0x88000030, 0xc1c00002, 0x69e0e000, 0x7dc0e000, 0x765d2000, - 0x80000038, 0xa7800030, 0x5dc40000, 0x84000022, 0xc1ee0002, 0x75c4e000, 0xc4cc2002, 0x61010028, - 0xa60afed0, 0x00000000, 0x5de40000, 0xdcb800fb, 0xdcb400fa, 0x84000e22, 0x5dcc0000, 0x840000ba, - 0xa78000b0, 0x62810028, 0x840000a2, 0x6e0c4000, 0x58cc4d08, 0xc1000000, 0x580c0004, 0xc90000b8, - 0x580c0000, 0xc98000b8, 0x7d00a000, 0xc1f00002, 0x5ddc0002, 0x755ca000, 0x59540002, 0xc1ee0002, - 0x75d0e000, 0xc5d400fa, 0x45948000, 0x580c0004, 0xcd0000b8, 0x8000ff60, 0x5de40000, 0xdcb800fb, - 0xdcb400fa, 0x84000d42, 0x62410008, 0xa7800098, 0x00000000, 0xc0c00000, 0xc65000f8, 0x6100a028, - 0x6d584000, 0x59984d08, 0xc0400000, 0x58180004, 0xc84000b8, 0x00000000, 0x00000000, 0xa46e002a, - 0x44c4e000, 0x88000018, 0xc56000f8, 0xc44c00f8, 0x6100a028, 0xa54aff98, 0x6e184000, 0x59984d08, - 0xc0400000, 0xc0800000, 0x6e1c2000, 0x59dc5fe0, 0x581c0002, 0xc8420078, 0x581c0000, 0xc8800078, - 0xc1400000, 0x58180006, 0xc9400078, 0x40484000, 0xc0c00000, 0x58080000, 0xc8c00078, 0x00000000, - 0xa7820038, 0x40f42000, 0x5dd5fffe, 0x84000022, 0x4544a000, 0x58180006, 0xcd400078, 0xa7800088, - 0xc0400000, 0x58180000, 0xc84000b8, 0xc1000000, 0x58180004, 0xc90000b8, 0x5dc40000, 0x8400004a, - 0xc1ee0002, 0x5ddc0002, 0x445ce000, 0x8400002a, 0x450c8000, 0x45348000, 0x58180004, 0xcd0000b8, - 0x6e106000, 0x5910b640, 0x58100006, 0xc98000f8, 0x58100004, 0xc94000f8, 0x418cc000, 0x58100006, - 0xcd8000f8, 0x59540002, 0x58100004, 0xcd4000f8, 0x6e242000, 0x5a645fe0, 0xc0c00000, 0x58240002, - 0xc8c20078, 0xc1000000, 0x58240000, 0xc9020038, 0x582c002a, 0xcc8000f8, 0x582c002c, 0xce0000f8, - 0x6d102000, 0x58cc0004, 0x450ce000, 0xc1c00000, 0xc5cc00fe, 0x58240002, 0x6cde0000, 0xcdc21078, - 0xc0e00002, 0x68e06000, 0xd8f000f8, 0xdcb800f9, 0xdcb400f8, 0xc0006910, 0xc8c000f9, 0xc90000f8, + 0xcd8000f9, 0xcd8000f9, 0xa7400018, 0xc18001e0, 0xc18001ea, 0xc1400000, 0x6d5c4010, 0x425c0000, + 0xc90000f8, 0xc1c00000, 0xc55c0308, 0x691c8008, 0xc5901838, 0x691c8018, 0xcd0000f8, 0x6d5c4010, + 0x425c0000, 0xc1c00006, 0x755c8000, 0x5dd00000, 0xcd80183a, 0x5dd00002, 0xcd80103a, 0x5dd00004, + 0xcd80083a, 0x5dd00006, 0xcd80003a, 0x5b300008, 0xdf9400f8, 0xc1008fe0, 0x6d5c4010, 0x411c0000, + 0xc98000f8, 0xc1c00000, 0xc55c0308, 0x699cc000, 0x6d9b0010, 0x6f1c4010, 0x425c0000, 0xc94000f8, + 0xc1c00000, 0xc71c0308, 0x695ca008, 0xc5941838, 0x695ca018, 0xcd4000f8, 0x6f1c4010, 0x425c0000, + 0xc1c00006, 0x771ca000, 0x5dd40000, 0xcd80183a, 0x5dd40002, 0xcd80103a, 0x5dd40004, 0xcd80083a, + 0x5dd40006, 0xcd80003a, 0x5b300002, 0x582c0022, 0xc1c00000, 0xcdc000f8, 0x80001610, 0x00000000, + 0xa9440328, 0xc000e444, 0xc90000f8, 0xc0006956, 0xc8c000f8, 0xc000e442, 0xcd0000f8, 0x70d06000, + 0xc0006956, 0xccc000f8, 0xc1c00002, 0x69f4e000, 0xc0006960, 0xc88000f8, 0x74dc6000, 0x84001b0a, + 0x749c4000, 0x80000008, 0xc000401a, 0xc9c000f8, 0x00000000, 0xc000f41a, 0xcdc000f8, 0xc0c00000, + 0xc0004054, 0xc8c00078, 0xc0006958, 0xc93400f8, 0x6f5ca000, 0x40dc6000, 0x40d06000, 0xc4c000f8, + 0xc94000f8, 0x00000000, 0x00000000, 0xa57e01a0, 0xc0004054, 0xc9820078, 0x6d1c2010, 0x59100004, + 0x419cc000, 0x6f5c8000, 0x419cc000, 0xc1c00040, 0x45d0e000, 0xc1c00000, 0xc5d000fe, 0xc0006958, + 0xcd3400f8, 0x5dc80000, 0x8400016a, 0x580c0002, 0xc90000f8, 0x582c0032, 0xc1c00000, 0xcdc000f8, + 0x582c002a, 0xccc000f8, 0x582c0034, 0xcd4000f8, 0x582c0036, 0xcd0000f8, 0xa9460042, 0xc58000f8, + 0xc90000f8, 0x582c0032, 0xc1c00004, 0xcdc000f8, 0x582c0038, 0xcd0000f8, 0xc1c00000, 0xc55e6018, + 0x582c002c, 0xcdc000f8, 0x582c003a, 0xc8c000f8, 0x582c003c, 0xc9c000f8, 0xc1800000, 0xc5580078, + 0x58cc0002, 0x41d8e000, 0x582c003a, 0xccc000f8, 0x582c003c, 0xcdc000f8, 0x80000070, 0xc0006956, + 0xc8c000f8, 0xc1c00002, 0x69f4e000, 0x7dc0e000, 0x74dc6000, 0xccc000f8, 0x80001890, 0xc4c000f8, + 0xc1c00000, 0xc5d41f00, 0xcd4000f8, 0x80001868, 0x80000b48, 0xdb8800f9, 0xdb4800f8, 0xdb1000f9, + 0xc2400000, 0xdf240038, 0xc0004024, 0xcb8000f8, 0xdcb400f8, 0x6f404000, 0x58004d48, 0x58000006, + 0xcb000078, 0xc3400000, 0xc7b50038, 0xc2800000, 0xc7a88018, 0xc000fa40, 0xc8fc00f8, 0xc2800000, + 0x582c0004, 0xca800038, 0xa4ce0042, 0x58ec0040, 0xc1c00000, 0x580c0004, 0xc9c00038, 0x00000000, + 0x00000000, 0x729d4000, 0x7e412000, 0x76692000, 0xc0400000, 0xc7840008, 0xc000a0ae, 0x5de40000, + 0x84000060, 0xc0c00000, 0xc8c000f8, 0x5dc40000, 0xdcb800fb, 0xdcb400fa, 0xdd3000fb, 0x8400170a, + 0x80000360, 0xc0c00000, 0xccc000f8, 0x80000348, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0xc0c00002, + 0xccc000f8, 0xc65000f8, 0x61010028, 0x5dc40000, 0x84000018, 0x62410008, 0x800005a0, 0xc0007e26, + 0xc94000f8, 0xc0400000, 0x00000000, 0x6140c028, 0x00000000, 0x00000000, 0x8400009a, 0xcd4000f8, + 0x6d804000, 0x5800b7c0, 0x58000000, 0x484000b8, 0x00000000, 0x00000000, 0x58000004, 0xcc4000b8, + 0x5dc40000, 0x8400ff70, 0xc0007e28, 0xc84000f8, 0xc1c00002, 0x69d8e000, 0x705c2000, 0xcc4000f8, + 0x8000ff38, 0xc2000000, 0xc0c00000, 0x580c7e2a, 0xc90000f8, 0x00000000, 0x00000000, 0xc50400f8, + 0x75248000, 0x61010028, 0x58205fb0, 0xc9c000f8, 0x00000000, 0xc1800000, 0x581c0006, 0xc9800078, + 0xa7820108, 0xc0800000, 0xc1c00000, 0x6e1c2000, 0x59dc5fe0, 0x581c0002, 0xc8820078, 0x581c0000, + 0xc9c00078, 0x00000000, 0x00000000, 0x409ce000, 0xc0800000, 0x581c0000, 0xc8800078, 0x00000000, + 0x00000000, 0x40b44000, 0x4588e000, 0x88000070, 0xc0007e3c, 0xc9c000f8, 0x00000000, 0x00000000, + 0xa5c00028, 0x00000000, 0x7c40e000, 0x765d2000, 0x80000068, 0xc1c00002, 0x69e0e000, 0x7dc0e000, + 0x765d2000, 0xc0007e3c, 0xc9c000f8, 0x61010028, 0x8400002a, 0x00000000, 0xa5c0fed2, 0x00000000, + 0x8000fe90, 0x58cc0002, 0x5dcc0012, 0x8800fe42, 0x5de40000, 0xdcb800fb, 0xdcb400fa, 0xdd3000fb, + 0x840013c2, 0x80000018, 0x5dcc0000, 0x8400018a, 0xa7800180, 0xc2000000, 0xc0400000, 0x58047e2a, + 0xc88000f8, 0xc0007e28, 0xc9c000f8, 0x00000000, 0x00000000, 0x74a44000, 0x75c8e000, 0x45c8e000, + 0x84000108, 0x74a84000, 0x60810028, 0x840000f2, 0x6e0c4000, 0x58ccb7c0, 0xc1000000, 0x580c0004, + 0xc90000b8, 0xc1800000, 0x580c0000, 0xc98000b8, 0x7d00a000, 0xc1f00002, 0x5ddc0002, 0x755ca000, + 0x59540002, 0xc1ee0002, 0x75d0e000, 0xc5d400fa, 0x45948000, 0x580c0004, 0xcd0000b8, 0x5dd00000, + 0x8400ff52, 0xc0007e28, 0xc90000f8, 0xc1c00002, 0x69e0e000, 0x7dc0e000, 0x751c8000, 0xcd0000f8, + 0x8000ff10, 0x58440002, 0x5dc40012, 0x8800fea2, 0x5de40000, 0xdcb800fb, 0xdcb400fa, 0xdd3000fb, + 0x84001202, 0x62410008, 0xa7800100, 0x00000000, 0xa7820068, 0x00000000, 0xa7860058, 0xc0004022, + 0xc0c00000, 0xc8c00078, 0x00000000, 0x00000000, 0x470ce000, 0xdcb800fd, 0xdcb400fc, 0xdd3000fd, + 0x88001182, 0xc0c00000, 0xc65000f8, 0x6100a028, 0x6d584000, 0x5998b7c0, 0xc0400000, 0x58180004, + 0xc84000b8, 0x00000000, 0x00000000, 0xa46e002a, 0x44c4e000, 0x88000018, 0xc56000f8, 0xc44c00f8, + 0x6100a028, 0xa54aff98, 0x6e184000, 0x5998b7c0, 0xc0400000, 0xc0800000, 0x6e1c2000, 0x59dc5fe0, + 0x581c0002, 0xc8420078, 0x581c0000, 0xc8800078, 0x58205fb0, 0xc9c000f8, 0x00000000, 0xc1400000, + 0x581c0006, 0xc9400078, 0x40484000, 0xc0c00000, 0x58080000, 0xc8c00078, 0x00000000, 0xa78200c0, + 0x40f42000, 0x4704e000, 0xdcb800fd, 0xdcb400fc, 0xdd3000fd, 0x8800101a, 0x5dd5fffe, 0x84000042, + 0x4544a000, 0x58205fb0, 0xc9c000f8, 0x00000000, 0x00000000, 0x581c0006, 0xcd400078, 0x5df1fffe, + 0x8400003a, 0x47058000, 0xdcb400f8, 0x6f404000, 0x58004d48, 0x58000006, 0xcf000078, 0xa78000d0, + 0xc0400000, 0x58180000, 0xc84000b8, 0xc1000000, 0x58180004, 0xc90000b8, 0x5dc40000, 0x84000092, + 0xc1ee0002, 0x5ddc0002, 0x445ce000, 0x84000072, 0x450c8000, 0x45348000, 0x58180004, 0xcd0000b8, + 0x5dd00000, 0x84000012, 0xa52e0038, 0xc0007e28, 0xc84000f8, 0xc1c00002, 0x69e0e000, 0x705c2000, + 0xcc4000f8, 0x6e106000, 0x5910b640, 0x58100006, 0xc98000f8, 0x58100004, 0xc94000f8, 0x418cc000, + 0x58100006, 0xcd8000f8, 0x59540002, 0x58100004, 0xcd4000f8, 0x6e242000, 0x5a645fe0, 0xc0c00000, + 0x58240002, 0xc8c20078, 0xc1000000, 0x58240000, 0xc9020038, 0x582c002a, 0xcc8000f8, 0x582c002c, + 0xce0000f8, 0xc48000f8, 0xc94000f8, 0x58080002, 0xc98000f8, 0x582c0034, 0xcd4000f8, 0x582c0036, + 0xcd8000f8, 0x582c0038, 0xc1c00000, 0xcdc000f8, 0x582c0032, 0xc1c00000, 0xcdc000f8, 0x6d102000, + 0x58cc0004, 0x450ce000, 0xc1c00000, 0xc5cc00fe, 0x58240002, 0x6cde0000, 0xcdc21078, 0xc0e00002, + 0x68e06000, 0xd8f000f8, 0xdcb800f9, 0xdcb400f8, 0xdd3000f9, 0xc0006910, 0xc8c000f9, 0xc90000f8, 0xc1c00000, 0xc1400040, 0x60c04000, 0x7494e000, 0x8400007a, 0xc1400080, 0x61004000, 0x58880040, - 0x7494e000, 0x84000052, 0x00000000, 0xab6c0002, 0x00000000, 0x00000000, 0x984047e8, 0xc0006902, + 0x7494e000, 0x84000052, 0x00000000, 0xab6c0002, 0x00000000, 0x00000000, 0x98405d98, 0xc0006902, 0xc8c000f8, 0xc3c00000, 0x8000ff58, 0xc0006910, 0xc1c00000, 0xc49ca000, 0x401c0000, 0xc8c000f8, 0xc1000002, 0xc1400000, 0xc4940020, 0x6914e000, 0x70dc6000, 0xccc000f8, 0x582c0020, 0xcc8000f8, 0xc1c00002, 0x582c0022, 0xcdc000f8, 0xc2409c00, 0x6c9c6000, 0x425d2000, 0xc2807600, 0x6c9c6000, 0x429d4000, 0x582c002c, 0xc98000f8, 0x582c0026, 0xce8000f8, 0x582c0028, 0xce4000f8, 0x58240008, 0xcd8000f8, 0x5838000a, 0xc98000f8, 0xc000ea10, 0xc2000000, 0xca3c0070, 0x6d9c8000, 0x41d8e000, - 0x421d0000, 0x5a204000, 0x582c002a, 0xc98000f8, 0xc1400000, 0xc1000000, 0x58180000, 0xc942e020, - 0x58180002, 0xc90000e0, 0x5828000e, 0xcd8000f8, 0x58280002, 0xc1c00000, 0xcdc00078, 0x41148000, - 0x58280004, 0xcd0000e0, 0x58a40000, 0x586c0008, 0xc44000f8, 0xc8c000f9, 0xc90000f9, 0xc94000f8, - 0xc48000f8, 0xccc000f9, 0xcd0000f9, 0xcd4000f9, 0x5df00000, 0x84000138, 0x58200000, 0xc1800000, + 0x421d0000, 0x5a204000, 0x582c002a, 0xc98000f8, 0xc1400000, 0xc1000000, 0xc58000f8, 0xc9c000f8, + 0x5824000a, 0xcd8000f8, 0x5824000c, 0xcdc000f8, 0x59ac0034, 0x58180000, 0xc942e020, 0x58180002, + 0xc90000e0, 0xc000401e, 0xc98000f8, 0x58280002, 0xc1c00000, 0xcdc00078, 0x41148000, 0xc1400000, + 0xc5941078, 0x7d40a000, 0x75148000, 0xc1400000, 0xc5961078, 0x71148000, 0x58280004, 0xcd0000e0, + 0x58a40000, 0x586c0008, 0xc44000f8, 0xc8c000f9, 0xc90000f9, 0xc94000f8, 0xc48000f8, 0xccc000f9, + 0xcd0000f9, 0xcd4000f9, 0x5df00000, 0x84000138, 0x58200000, 0xc1800000, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, - 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, - 0xcd8000f9, 0xc18001ea, 0xc1c00002, 0x75f4e000, 0xc1c001e0, 0xc5d800fa, 0xc1400000, 0x6d5c4010, - 0x421c0000, 0xc1c00006, 0x755c8000, 0x5dd00000, 0xcd80183a, 0x5dd00002, 0xcd80103a, 0x5dd00004, - 0xcd80083a, 0x5dd00006, 0xcd80003a, 0x5b300008, 0xc000fa40, 0xc93c00f8, 0xc1400000, 0x582c0002, - 0xc9428018, 0xc0400000, 0xc0800080, 0x44944000, 0xc45800f8, 0xc1c00200, 0x75d0e000, 0xc49c00f8, - 0xc5d800fa, 0x582c0030, 0xcd4000f8, 0xd97800f8, 0x5828000e, 0xc9c000f8, 0xc0c00000, 0x582c0002, - 0xc8c10038, 0xc1000000, 0x581c0000, 0xc9000078, 0x00000000, 0x00000000, 0xc50800f8, 0x4518e000, - 0xc59c00f8, 0xc5c800fc, 0xc4d400f8, 0x44c8e000, 0xc49c00f8, 0xc5d400fc, 0x582c002e, 0xcd4000f8, - 0xdf9000f8, 0x4150e000, 0xd9f800f8, 0x41f0e000, 0x5ddc0086, 0x88000082, 0xc18000a0, 0x6f1c4010, + 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xcd8000f9, 0xc18001ea, + 0xc1c00002, 0x75f4e000, 0xc1c001e0, 0xc5d800fa, 0xc1400000, 0x6d5c4010, 0x421c0000, 0xc1c00006, + 0x755c8000, 0x5dd00000, 0xcd80183a, 0x5dd00002, 0xcd80103a, 0x5dd00004, 0xcd80083a, 0x5dd00006, + 0xcd80003a, 0x5b300008, 0xc000fa40, 0xc93c00f8, 0xc1400000, 0x582c0002, 0xc9428018, 0xc0400000, + 0xc0800080, 0x44944000, 0xc45800f8, 0xc1c00200, 0x75d0e000, 0xc49c00f8, 0xc5d800fa, 0x582c0030, + 0xcd4000f8, 0xd97800f8, 0x59ec0034, 0xc0c00000, 0x582c0002, 0xc8c10038, 0xc1000000, 0x581c0000, + 0xc9000078, 0x00000000, 0x00000000, 0xc50800f8, 0x4518e000, 0xc59c00f8, 0xc5c800fc, 0xc4d400f8, + 0x44c8e000, 0xc49c00f8, 0xc5d400fc, 0x582c002e, 0xcd4000f8, 0x582c0032, 0xc88000f8, 0xdf9000f8, + 0x4150e000, 0x41c8e000, 0xd9f800f8, 0x41f0e000, 0x5ddc0086, 0x88000082, 0xc18000a0, 0x6f1c4010, 0x421c0000, 0xc1c00006, 0x771ca000, 0x5dd40000, 0xcd80183a, 0x5dd40002, 0xcd80103a, 0x5dd40004, 0xcd80083a, 0x5dd40006, 0xcd80003a, 0x5b300002, 0x80000158, 0x00000000, 0x00000000, 0x00000000, 0xdf9400f8, 0xc1008fe0, 0x6d5c4010, 0x411c0000, 0xc98000f8, 0xc1c00000, 0xc55c0308, 0x699cc000, @@ -269,109 +340,136 @@ static unsigned int firmware_binary_code[] = { 0xcd80103a, 0x5dcc0004, 0xcd80083a, 0x5dcc0006, 0xcd80003a, 0x5b300002, 0xc18000a0, 0x6f1c4010, 0x421c0000, 0xc1c00006, 0x771ca000, 0x5dd40000, 0xcd80183a, 0x5dd40002, 0xcd80103a, 0x5dd40004, 0xcd80083a, 0x5dd40006, 0xcd80003a, 0x5b300002, 0x582c0022, 0xc1c00000, 0xcdc000f8, 0x00000000, - 0x00000000, 0x5df00088, 0x880002f8, 0x582c0020, 0xc98000f8, 0xc2800000, 0xc2400000, 0xc5a80528, - 0x582c002e, 0xc98000f8, 0xc1000088, 0x45308000, 0xc51400f8, 0x4590e000, 0xc59c00f8, 0xc5d400fc, - 0xc5681930, 0x5838000a, 0xc90000f8, 0xc7281230, 0xc7e80008, 0xc5280b30, 0xd93800f8, 0xc1c00002, - 0xc5e80400, 0x4594e000, 0x8400001a, 0xc1c00000, 0xc5e80400, 0x5dd80000, 0x8400002a, 0xc1c00002, - 0xc5e80300, 0xc1c00002, 0xc5e80200, 0x582c0022, 0xc94000f8, 0xc7640e08, 0x00000000, 0x5d540002, - 0x8400001a, 0xc1c00002, 0xc5e40d00, 0xc0c00000, 0xc68f2030, 0x430c8000, 0xc5241838, 0xc0800088, - 0x44904000, 0xc1c00000, 0xc5c800fc, 0x582c0030, 0xc94000f8, 0xc0400000, 0x582c0002, 0xc8420018, - 0xc49000f8, 0x4548e000, 0xc55c00f8, 0xc5d000fc, 0xc5241418, 0x44546000, 0xc4e41018, 0x4550a000, - 0x582c0030, 0xcd4000f8, 0xc0c00000, 0xc68f2030, 0x458cc000, 0x582c002e, 0xcd8000f8, 0x43118000, - 0x430d8000, 0xdf9800f8, 0xc000ea10, 0xc1400000, 0xc97c0070, 0x6d9c8000, 0x41d8e000, 0x415ca000, - 0x59544000, 0x00000000, 0xc1000000, 0xc0000000, 0xc9140038, 0x00000000, 0x00000000, 0x59100002, - 0xcd140038, 0x98404d30, 0xc68c00f8, 0xc65000f8, 0x00000000, 0x5df00088, 0x8800ef02, 0x00000000, - 0x80000008, 0x5df00000, 0x840000ba, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x5838000a, 0xc94000f8, - 0xc1000000, 0xc000ea14, 0xc93c0038, 0x59540002, 0x00000000, 0x4514e000, 0xc1c00000, 0xc5d400fe, - 0x5838000a, 0xcd4000f8, 0x58380004, 0xc94000f8, 0x00000000, 0x00000000, 0x59540002, 0x58380004, - 0xcd4000f8, 0x5df00000, 0x84000058, 0xa7400020, 0x00000000, 0x6ff42000, 0x8000ea00, 0x5bfc0002, - 0x5dfc0002, 0x8400e812, 0x00000000, 0x00000000, 0x00000000, 0xab6c0052, 0x984047e8, 0xc0006902, - 0xc8c000f8, 0xc3c00000, 0xab6c002a, 0x984047e8, 0xc0006902, 0xc8c000f8, 0xc3c00000, 0xc0004032, - 0xcbc000f8, 0xc0004038, 0xcb8000f8, 0xc000691a, 0xcb0000f8, 0xc000403a, 0xcb4000f8, 0xc72c00f8, - 0xa7800058, 0xc2800000, 0x00000000, 0x984041b8, 0xc0c07c80, 0xc0007c00, 0x00000000, 0x98404220, - 0xc0006952, 0xc80000f8, 0xc1000000, 0xa7900058, 0xc2800002, 0x00000000, 0x984041b8, 0xc0c07c80, - 0xc0007c00, 0x00000000, 0x98404220, 0xc0006952, 0xc80000f8, 0xc1000000, 0x472ce000, 0x8400023a, - 0xc0c00000, 0xc78e0020, 0xc1c00002, 0x69cc8000, 0xc78f0020, 0x69cce000, 0x711c8000, 0xc000f41a, - 0xcfc000f8, 0xc1c00000, 0xc7dc4050, 0x581cc000, 0xcb0000f8, 0x00000000, 0x00000000, 0x76d16000, - 0x7d008000, 0x77118000, 0x732d8000, 0xcf0000f8, 0xc000691a, 0xcec000f8, 0x80000180, 0x5ea80000, - 0xc40c00fa, 0xc2400000, 0x580c0004, 0xca400038, 0x58cc0040, 0xc1c00000, 0x580c0004, 0xc9c00038, - 0x9c400000, 0x00000000, 0x00000000, 0x725d2000, 0x62406028, 0x84000032, 0xc9cc00f8, 0x00000000, - 0x00000000, 0x411c8000, 0x8000ffd0, 0xc1400000, 0xc7970020, 0x6f4e0010, 0x5de80000, 0xc74c00fa, - 0xc7960022, 0xc1c00000, 0xc4dd0038, 0x45d0e000, 0x88000048, 0xc1c00000, 0xc4dc0038, 0x451ce000, - 0x88000050, 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0xc1c00002, 0x9c400000, 0x69d4e000, - 0x7dc0e000, 0x76dd6000, 0x9c400000, 0xc1c00002, 0x69d4e000, 0x72dd6000, 0xc0004028, 0xcbc000f8, - 0xc000691c, 0xcb8000f8, 0xa7c0c780, 0x00000000, 0x5df80000, 0x8400c768, 0xc1c00002, 0xc000e070, - 0xcdc00000, 0x8000c748, 0xdcbc00f9, 0xdcb800f8, 0xdd3400f9, 0xc2400040, 0xc000690c, 0xc8c000f9, - 0xc90000f8, 0xc1c00000, 0x60c18000, 0x7724e000, 0x84000052, 0x61018000, 0x7724e000, 0x84000032, - 0x98404ec0, 0x00000000, 0x00000000, 0x00000000, 0x8000ff90, 0x5b300040, 0xc2c09400, 0x6f1c6000, - 0x42dd6000, 0xc2809800, 0x429d4000, 0x58340022, 0xcf0000f8, 0x582c0008, 0xcf8000f8, 0xc000690c, - 0xc1c00000, 0xc71ca000, 0x401c0000, 0xc8c000f8, 0xc2000002, 0x6a30e000, 0x70dc6000, 0xccc000f8, - 0x58340008, 0xc8c000f9, 0xc90000f9, 0xc94000f9, 0x582c0000, 0xccc000f9, 0xcd0000f9, 0xcd4000f9, - 0x58340010, 0xc9c000f9, 0xc8c000f9, 0xc90000f9, 0xc94000f9, 0xc98000f9, 0xc84000f9, 0xc88000f9, - 0x58280000, 0xcdc000f9, 0xccc000f9, 0xcd0000f9, 0xcd4000f9, 0xcd8000f9, 0xcc4000f9, 0xcc8000f9, - 0xc1c00000, 0x5828000e, 0xc9c3e000, 0x00000000, 0x00000000, 0x5ddc0002, 0x840001ba, 0xc0006908, - 0xc8c000f8, 0xc0004c00, 0xc1000000, 0x400c0000, 0x58000000, 0xc903e000, 0x00000000, 0x00000000, - 0x5dd00002, 0x840000e8, 0xc1000000, 0x58000002, 0xc90000e0, 0xc1c00000, 0xc0004022, 0xc9c20008, - 0x5828000e, 0xcd0000e0, 0x411ce000, 0x58280004, 0xcdc000e0, 0x5828000e, 0xc1fe0002, 0xcdc3ff00, - 0x5828000e, 0xc1fc0000, 0xcdc3de00, 0x58340020, 0xc1c00000, 0xcdc000f8, 0x58cc0004, 0xc1c00100, - 0x45cce000, 0xc1c00000, 0xc5cc00fe, 0xc0006908, 0xccc000f8, 0x800000f8, 0xc0c0b600, 0x6f9c6000, - 0x40dc6000, 0x580c0004, 0xc90000f8, 0x5828000e, 0xc1fc0002, 0xcdc3de00, 0x58340020, 0xc1c00002, - 0xcdc000f8, 0x59100002, 0x580c0004, 0xcd0000f8, 0x80000080, 0xc0c00000, 0xc0004022, 0xc8c20008, - 0xc1000000, 0x5828000e, 0xc90000e0, 0x5828000e, 0xc1fc0000, 0xcdc3de00, 0x58340020, 0xc1c00000, - 0xcdc000f8, 0x410ce000, 0x58280004, 0xcdc000e0, 0x94000000, 0xc1c00002, 0xc000691c, 0xcdc000f8, - 0xd87800f8, 0xc3800000, 0x580c7400, 0xca4000f9, 0xca0000f8, 0xc3400000, 0xc67c0008, 0xc639c008, - 0xc674a028, 0xc0c00000, 0xc64d6030, 0xc000ea10, 0xc3000000, 0xcb3c0070, 0x6cdc8000, 0x41cce000, - 0x431d8000, 0x5b304000, 0x6faca000, 0x5aec7c00, 0xc0c00000, 0xc0000000, 0xc8f00038, 0x6f686000, - 0x5aa89c00, 0x5ccc0002, 0xccf00038, 0xc1000000, 0xc6128018, 0x5dd00000, 0x840000f2, 0xc1800000, - 0xc0800000, 0xc61a0018, 0xc60b0038, 0xc1c40002, 0x419cc000, 0x6d9c4010, 0x429c0000, 0xc94000f8, - 0xc1c00000, 0xc59c0308, 0x695ca000, 0x6d570010, 0x59980002, 0x6c9c4010, 0x431c0000, 0xc1c00006, - 0x749c2000, 0x5dc40000, 0xcd40183a, 0x5dc40002, 0xcd40103a, 0x5dc40004, 0xcd40083a, 0x5dc40006, - 0xcd40003a, 0x58880002, 0x5d100002, 0x8400ff50, 0xa61a00a0, 0x582c002a, 0xc90000f8, 0xc0000000, - 0xc1c00000, 0xcdd3ff00, 0xc1000002, 0x58280008, 0xc94000f8, 0x5df40040, 0xc0006912, 0x44100004, - 0xc98000f8, 0x6934e000, 0x7dc0e000, 0x759cc000, 0xcd8000f8, 0xc1b00002, 0x6994c000, 0xd9b000f8, - 0x5ccc0000, 0x84000160, 0x6fcca000, 0x58cc7d80, 0x580c0006, 0xc90000f8, 0xc1400000, 0xc615a000, - 0x59100002, 0x580c0006, 0xcd0000f8, 0xc1c00000, 0x7d40a000, 0xc55c0000, 0x582c0024, 0xcdc000f8, - 0xa61a00e8, 0x7f80e000, 0xc5f80000, 0x6faca000, 0x5aec7c00, 0x582c0024, 0xc94000f8, 0x580c0004, - 0xc98000f8, 0x5dd40002, 0x8400009a, 0xc000ea28, 0x6d1d2000, 0xcdfd2928, 0xc000ea28, 0xc1d00002, - 0xcdfd0800, 0xc0006948, 0xc9c000f8, 0x403c0000, 0x00000000, 0x41d0e000, 0xcdc000f8, 0x4590c000, - 0x580c0004, 0xcd8000f8, 0x580c0006, 0xc1c00000, 0xcdc000f8, 0xc0006902, 0xc8c000f8, 0x00000000, - 0x00000000, 0x58cc0004, 0xc1c00200, 0x45cce000, 0xc1c00000, 0xc5cc00fe, 0xccc000f8, 0xc000f01e, - 0xc1d00002, 0xcdc10800, 0xdf8400f8, 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0xc0006904, - 0xc94000f8, 0xab68008a, 0x00000000, 0x58147200, 0xccc000f9, 0xcd0000f9, 0xc000f016, 0xc1d00002, + 0x5df00088, 0x88000578, 0x582c0032, 0xca0000f8, 0x582c0038, 0xc8c000f8, 0x5de00000, 0x8400004a, + 0x582c0020, 0xc98000f8, 0x98405130, 0xc2840002, 0xc5a80528, 0xc2400000, 0x5df00088, 0x88000508, + 0x582c0020, 0xc98000f8, 0xc2800000, 0xc2400000, 0xc5a80528, 0x582c002e, 0xc98000f8, 0xc1000088, + 0x45308000, 0xc51400f8, 0x4590e000, 0xc59c00f8, 0xc5d400fc, 0xc5681930, 0x5838000a, 0xc90000f8, + 0xc7281230, 0xc7e80008, 0xc5280b30, 0xd93800f8, 0xc1c00002, 0xc5e80400, 0x4594e000, 0x8400001a, + 0xc1c00000, 0xc5e80400, 0x5dd80000, 0x8400002a, 0xc1c00002, 0xc5e80300, 0xc1c00002, 0xc5e80200, + 0x582c0022, 0xc94000f8, 0xc7640e08, 0x00000000, 0x5d540002, 0x8400001a, 0xc1c00002, 0xc5e40d00, + 0xc0c00000, 0xc68f2030, 0x430c8000, 0xc5241838, 0xc0800088, 0x44904000, 0xc1c00000, 0xc5c800fc, + 0x582c0030, 0xc94000f8, 0xc0400000, 0x582c0002, 0xc8420018, 0xc49000f8, 0x4548e000, 0xc55c00f8, + 0xc5d000fc, 0xc5241418, 0x44546000, 0xc4e41018, 0x4550a000, 0x582c0030, 0xcd4000f8, 0xc0c00000, + 0xc68f2030, 0x458cc000, 0x582c002e, 0xcd8000f8, 0x43118000, 0x430d8000, 0xdf9800f8, 0xc000ea10, + 0xc1400000, 0xc97c0070, 0x6d9c8000, 0x41d8e000, 0x415ca000, 0x59544000, 0x00000000, 0xc1000000, + 0xc0000000, 0xc9140038, 0x00000000, 0x00000000, 0x59100002, 0xcd140038, 0x984063f0, 0xc68c00f8, + 0xc65000f8, 0x00000000, 0x5df00088, 0x8800e6a2, 0x00000000, 0x80000218, 0xd87800f8, 0xc1000088, + 0x45308000, 0xc51400f8, 0x4610e000, 0xc61c00f8, 0xc5d400fc, 0xc5681930, 0x46150000, 0x582c0032, + 0xce0000f8, 0xc56000f8, 0x5838000a, 0xc94000f8, 0xc7281230, 0xc7e80008, 0xc5680b30, 0xc000ea10, + 0xc1000000, 0xc93c0070, 0x6d5c8000, 0x41d4e000, 0x411c8000, 0x59104000, 0x6f1c4010, 0x411c0000, + 0xc94000f8, 0xc1c00000, 0xc71c0308, 0x695ca008, 0xc4d71838, 0x695ca018, 0xcd4000f8, 0x5b300002, + 0x5e200002, 0x84000062, 0x6ccd0000, 0x6f1c4010, 0x411c0000, 0xc94000f8, 0xc1c00000, 0xc71c0308, + 0x695ca008, 0xc4d71838, 0x695ca018, 0xcd4000f8, 0x5b300002, 0x6ccd0000, 0x582c0038, 0xccc000f8, + 0xc1400000, 0xc0000000, 0xc9500038, 0x00000000, 0x00000000, 0x59540002, 0xcd500038, 0xdfa000f8, + 0x984063f0, 0xc68c00f8, 0xc65000f8, 0x00000000, 0x9e000000, 0x00000000, 0x00000000, 0x00000000, + 0x5df00000, 0x840000ba, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x5838000a, 0xc94000f8, 0xc1000000, + 0xc000ea14, 0xc93c0038, 0x59540002, 0x00000000, 0x4514e000, 0xc1c00000, 0xc5d400fe, 0x5838000a, + 0xcd4000f8, 0x58380004, 0xc94000f8, 0x00000000, 0x00000000, 0x59540002, 0x58380004, 0xcd4000f8, + 0x5df00000, 0x84000058, 0xa7400020, 0x00000000, 0x6ff42000, 0x8000df80, 0x5bfc0002, 0x5dfc0002, + 0x8400dcfa, 0x00000000, 0x00000000, 0x00000000, 0xab6c0052, 0x98405d98, 0xc0006902, 0xc8c000f8, + 0xc3c00000, 0xab6c002a, 0x98405d98, 0xc0006902, 0xc8c000f8, 0xc3c00000, 0xc0004032, 0xcbc000f8, + 0xc0004038, 0xcb8000f8, 0xc000691a, 0xcb0000f8, 0xc000403a, 0xcb4000f8, 0xc72c00f8, 0xa7800058, + 0xc2800000, 0x00000000, 0x98405670, 0xc0c07c80, 0xc0007c00, 0x00000000, 0x984056d8, 0xc0006952, + 0xc80000f8, 0xc1000000, 0xa7900058, 0xc2800002, 0x00000000, 0x98405670, 0xc0c07c80, 0xc0007c00, + 0x00000000, 0x984056d8, 0xc0006952, 0xc80000f8, 0xc1000000, 0x472ce000, 0x8400023a, 0xc0c00000, + 0xc78e0020, 0xc1c00002, 0x69cc8000, 0xc78f0020, 0x69cce000, 0x711c8000, 0xc000f41a, 0xcfc000f8, + 0xc1c00000, 0xc7dc4050, 0x581cc000, 0xcb0000f8, 0x00000000, 0x00000000, 0x76d16000, 0x7d008000, + 0x77118000, 0x732d8000, 0xcf0000f8, 0xc000691a, 0xcec000f8, 0x80000180, 0x5ea80000, 0xc40c00fa, + 0xc2400000, 0x580c0004, 0xca400038, 0x58cc0040, 0xc1c00000, 0x580c0004, 0xc9c00038, 0x9c400000, + 0x00000000, 0x00000000, 0x725d2000, 0x62406028, 0x84000032, 0xc9cc00f8, 0x00000000, 0x00000000, + 0x411c8000, 0x8000ffd0, 0xc1400000, 0xc7970020, 0x6f4e0010, 0x5de80000, 0xc74c00fa, 0xc7960022, + 0xc1c00000, 0xc4dd0038, 0x45d0e000, 0x88000048, 0xc1c00000, 0xc4dc0038, 0x451ce000, 0x88000050, + 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0xc1c00002, 0x9c400000, 0x69d4e000, 0x7dc0e000, + 0x76dd6000, 0x9c400000, 0xc1c00002, 0x69d4e000, 0x72dd6000, 0xc0004028, 0xcbc000f8, 0xc000691c, + 0xcb8000f8, 0xa7c0b3a0, 0x00000000, 0x5df80000, 0x8400b388, 0xc1c00002, 0xc000e070, 0xcdc00000, + 0x8000b368, 0xdcbc00f9, 0xdcb800f8, 0xdd3400f9, 0xc2400040, 0xc000401e, 0xd08000f8, 0xc000690c, + 0xc8c000f9, 0xc90000f8, 0xc1c00000, 0x60c18000, 0x7724e000, 0x84000052, 0x61018000, 0x7724e000, + 0x84000032, 0x984065b0, 0x00000000, 0x00000000, 0x00000000, 0x8000ff90, 0x5b300040, 0xc2c09400, + 0x6f1c6000, 0x42dd6000, 0xc2809800, 0x429d4000, 0x58340022, 0xcf0000f8, 0x582c0008, 0xcf8000f8, + 0xc000690c, 0xc1c00000, 0xc71ca000, 0x401c0000, 0xc8c000f8, 0xc2000002, 0x6a30e000, 0x70dc6000, + 0xccc000f8, 0x58340008, 0xc8c000f9, 0xc90000f9, 0xc94000f9, 0x582c0000, 0xccc000f9, 0xcd0000f9, + 0xcd4000f9, 0x58340010, 0xc9c000f9, 0xc8c000f9, 0xc90000f9, 0xc94000f9, 0xc98000f9, 0xc84000f9, + 0xc88000f9, 0x58280000, 0xcdc000f9, 0xccc000f9, 0xcd0000f9, 0xcd4000f9, 0xcd8000f9, 0xcc4000f9, + 0xcc8000f9, 0xc1c00000, 0x5828000e, 0xc9c3e000, 0x00000000, 0x00000000, 0x5ddc0002, 0x8400026a, + 0xc000401a, 0xc9c000f8, 0x00000000, 0xc000f41a, 0xcdc000f8, 0xc000691e, 0xc88000f8, 0xc0006908, + 0xc8c000f8, 0xc1804c00, 0xc1000100, 0xa9440028, 0xc0004056, 0xc9800078, 0x6d102010, 0x00000000, + 0x6d1c2010, 0x5ddc0004, 0x449ce000, 0x88000150, 0x418c0000, 0x58000000, 0xc943e000, 0x58cc0004, + 0x450ce000, 0xc1c00000, 0xc5cc00fe, 0xa5400110, 0xc1000000, 0x58000002, 0xc90000e0, 0xc1c00000, + 0xc0004022, 0xc9c20008, 0x5828000e, 0xcd0000e0, 0x411ce000, 0xc1400000, 0xdc941078, 0x7d40a000, + 0x75d4e000, 0xc1400000, 0xdc961078, 0x71d4e000, 0x58280004, 0xcdc000e0, 0x5828000e, 0xc1fe0002, + 0xcdc3ff00, 0x5828000e, 0xc1fc0000, 0xcdc3de00, 0x58340020, 0xc1c00000, 0xcdc000f8, 0xc0006908, + 0xccc000f8, 0x58880002, 0xc000691e, 0xcc8000f8, 0x80000130, 0xc0c0b600, 0x6f9c6000, 0x40dc6000, + 0x580c0004, 0xc90000f8, 0x5828000e, 0xc1fc0002, 0xcdc3de00, 0x58340020, 0xc1c00002, 0xcdc000f8, + 0x59100002, 0x580c0004, 0xcd0000f8, 0x800000b8, 0xc0c00000, 0xc0004022, 0xc8c20008, 0xc1000000, + 0x5828000e, 0xc90000e0, 0x5828000e, 0xc1fc0000, 0xcdc3de00, 0x58340020, 0xc1c00000, 0xcdc000f8, + 0x410ce000, 0xc1400000, 0xdc941078, 0x7d40a000, 0x75d4e000, 0xc1400000, 0xdc961078, 0x71d4e000, + 0x58280004, 0xcdc000e0, 0x94000000, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0xd87800f8, 0xc3800000, + 0x580c7400, 0xca4000f9, 0xca0000f8, 0xc3400000, 0xc3c00000, 0xc67c0008, 0x5dfc0004, 0x88000480, + 0xc639c008, 0xc674a028, 0xc0c00000, 0xc64d6030, 0xc000ea10, 0xc3000000, 0xcb3c0070, 0x6cdc8000, + 0x41cce000, 0x431d8000, 0x5b304000, 0x6faca000, 0x5aec7c00, 0xc0c00000, 0xc0000000, 0xc8f00038, + 0x6f686000, 0x5aa89c00, 0x5ccc0002, 0xccf00038, 0xc1000000, 0xc6128018, 0x5dd00000, 0x840000f2, + 0xc1800000, 0xc0800000, 0xc61a0018, 0xc60b0038, 0xc1c40002, 0x419cc000, 0x6d9c4010, 0x429c0000, + 0xc94000f8, 0xc1c00000, 0xc59c0308, 0x695ca000, 0x6d570010, 0x59980002, 0x6c9c4010, 0x431c0000, + 0xc1c00006, 0x749c2000, 0x5dc40000, 0xcd40183a, 0x5dc40002, 0xcd40103a, 0x5dc40004, 0xcd40083a, + 0x5dc40006, 0xcd40003a, 0x58880002, 0x5d100002, 0x8400ff50, 0xa61a00e8, 0xc000401a, 0xc9c000f8, + 0x00000000, 0xc000f41a, 0xcdc000f8, 0x5828000a, 0xc90000f8, 0x5828000c, 0xc94000f8, 0xc0000000, + 0xc1c00000, 0xc5d41f00, 0xcd5000f8, 0xc1000002, 0x58280008, 0xc94000f8, 0x5df40040, 0xc0006912, + 0x44100004, 0xc98000f8, 0x6934e000, 0x7dc0e000, 0x759cc000, 0xcd8000f8, 0xa9440022, 0xc1b00002, + 0x6994c000, 0xd9b000f8, 0x5ccc0000, 0x840001e0, 0x6fcca000, 0x58cc7d80, 0x580c0006, 0xc90000f8, + 0xc1400000, 0xc615a000, 0x59100002, 0x580c0006, 0xcd0000f8, 0xc1c00000, 0x7d40a000, 0xc55c0000, + 0x582c0024, 0xcdc000f8, 0xa61a0168, 0x7f80e000, 0xc5f80000, 0x6faca000, 0x5aec7c00, 0x582c0024, + 0xc94000f8, 0x580c0004, 0xc98000f8, 0x5dd40002, 0x8400011a, 0x5dd00080, 0x8800007a, 0xc000ea28, + 0xc1d2007e, 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x5dd0007e, 0xc000ea28, 0x6ddd2000, + 0xcdfd2928, 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x80000038, 0xc000ea28, 0x6d1d2000, 0xcdfd2928, + 0xc000ea28, 0xc1d00002, 0xcdfd0800, 0x583c6948, 0xc9c000f8, 0x00000000, 0x00000000, 0x41d0e000, + 0xcdc000f8, 0x4590c000, 0x580c0004, 0xcd8000f8, 0x580c0006, 0xc1c00000, 0xcdc000f8, 0xc0006902, + 0xc8c000f8, 0x00000000, 0x00000000, 0x58cc0004, 0xc1c00200, 0x45cce000, 0xc1c00000, 0xc5cc00fe, + 0xccc000f8, 0xc000f01e, 0xc1d00002, 0xcdc10800, 0xdf8400f8, 0x9c400000, 0x00000000, 0x00000000, + 0x00000000, 0xc0006904, 0xc94000f8, 0xc000fe08, 0x49c00040, 0x00000000, 0x00000000, 0x5ddc0100, + 0x8800ffd8, 0xab68008a, 0x00000000, 0x58147200, 0xccc000f9, 0xcd0000f9, 0xc000f016, 0xc1d00002, 0xcdc10800, 0x59540004, 0xc1c00200, 0x45d4e000, 0xc1c00000, 0xc5d400fe, 0x9c400000, 0xc0006904, - 0xcd4000f8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8000ff60, 0xc0006906, 0xc94000f8, - 0xab6a008a, 0x00000000, 0x58147400, 0xccc000f9, 0xcd0000f9, 0xc000f404, 0xc1d00002, 0xcdc10800, - 0x59540004, 0xc1c00200, 0x45d4e000, 0xc1c00000, 0xc5d400fe, 0x9c400000, 0xc0006906, 0xcd4000f8, - 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8000ff60, 0xc08000a0, 0x74d0c000, 0x84000090, - 0x78d0c000, 0x8400006a, 0x61800018, 0x6180e008, 0x441cc000, 0x84000060, 0x5d940000, 0x84000050, - 0x60c04008, 0xa48a0040, 0x9c400000, 0x61004008, 0x58880040, 0x00000000, 0xa5400018, 0x00000000, - 0xc0800080, 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0xc000f412, 0xc9c000f8, 0xc1800000, 0xc0800000, 0xa5c004e8, 0xc5d82028, 0x6d886000, 0x59089800, - 0x5810000e, 0xc9c3c000, 0x59489400, 0xd9b800f8, 0xa5c0044a, 0x58140008, 0xc98000f8, 0xc0c07b00, - 0xc0800000, 0x6d9ca000, 0x40dc6000, 0xd9b800f8, 0x580c0002, 0xc8808000, 0x00000000, 0x00000000, - 0xa480004a, 0x580c0004, 0xc98000f8, 0x58140002, 0xc88000f8, 0x00000000, 0x00000000, 0x4498e000, - 0x84000110, 0xc1c00000, 0x580c0002, 0xc9c04000, 0x00000000, 0x00000000, 0xa5c0004a, 0x580c0006, - 0xc98000f8, 0x58140004, 0xc88000f8, 0x00000000, 0x00000000, 0x4498e000, 0x840000a0, 0xc0800000, - 0x58100002, 0xc8800078, 0x580c001e, 0xc94000f8, 0xc1800000, 0x580c0002, 0xc9810038, 0x40944000, - 0xa4be0052, 0xc1400000, 0x4498e000, 0x88000118, 0x580c0002, 0xc940e000, 0x00000000, 0x00000000, - 0xa54000ca, 0xc1c00000, 0x00000000, 0x00000000, 0x00000000, 0xdf9400f8, 0x00000000, 0x00000000, - 0xc1800000, 0xc5582000, 0xa5400042, 0xc000fb64, 0xc1c00002, 0xcdd80000, 0xc000facc, 0xc1c40002, - 0xcdd84200, 0x80000220, 0xc000fb64, 0xc1c20002, 0xcdd82100, 0xc000facc, 0xc1c60002, 0xcdd86300, - 0x800001e8, 0x580c0002, 0xc9c10038, 0x00000000, 0x00000000, 0x589c0000, 0xc000690a, 0xc94000f8, - 0xc1c00000, 0x5810000e, 0xc9c000e0, 0x59944c00, 0x58180000, 0xcc800078, 0x58180002, 0xcdc000e0, - 0x58180000, 0xc1fa0002, 0xcdc3bd00, 0x58180000, 0xc1f80002, 0xcdc39c00, 0x58180000, 0xc1fe0000, - 0xcdc3ff00, 0x59540004, 0xc1c00100, 0x45d4e000, 0xc1c00000, 0xc5d400fe, 0xc000690a, 0xcd4000f8, - 0xc000e408, 0xc1c00002, 0xcdc000f8, 0x5810000e, 0xc1fe0000, 0xcdc3ff00, 0xdf9400f8, 0xc1800000, - 0x58100002, 0xc9800078, 0x6d486000, 0x5888b600, 0x58080006, 0xc9c000f8, 0x00000000, 0x00000000, - 0x419cc000, 0x58080006, 0xcd8000f8, 0xc1800000, 0xc5582000, 0xa540002a, 0xc000fb60, 0xc1c40002, - 0xcdd84200, 0x80000020, 0xc000fb60, 0xc1c60002, 0xcdd86300, 0xdf9400f8, 0xc1800002, 0x00000000, - 0x00000000, 0x5dd40040, 0xc000690e, 0x44180004, 0xc88000f8, 0x6994e000, 0x7dc0e000, 0x749c4000, - 0xcc8000f8, 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0xc3c00000, 0xc4fc8018, 0xc3800000, - 0x6fb44000, 0x5b744d08, 0xc3000000, 0x58340006, 0xcb020038, 0xc2c00000, 0xc2800000, 0x5f300002, + 0xcd4000f8, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8000ff30, 0xc0006906, 0xc94000f8, + 0xc000fe0a, 0x49c00040, 0x00000000, 0x00000000, 0x5ddc0100, 0x8800ffd8, 0xab6a008a, 0x00000000, + 0x58147400, 0xccc000f9, 0xcd0000f9, 0xc000f404, 0xc1d00002, 0xcdc10800, 0x59540004, 0xc1c00200, + 0x45d4e000, 0xc1c00000, 0xc5d400fe, 0x9c400000, 0xc0006906, 0xcd4000f8, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x8000ff30, 0xc08000a0, 0x74d0c000, 0x84000090, 0x78d0c000, 0x8400006a, + 0x61800018, 0x6180e008, 0x441cc000, 0x84000060, 0x5d940000, 0x84000050, 0x60c04008, 0xa48a0040, + 0x9c400000, 0x61004008, 0x58880040, 0x00000000, 0xa5400018, 0x00000000, 0xc0800080, 0x9c400000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xc000f412, 0xc9c000f8, + 0xc1800000, 0xc0800000, 0xa5c00580, 0xc5d82028, 0xc1c00002, 0xc000691c, 0xcdc000f8, 0x6d886000, + 0x59089800, 0x5810000e, 0xc9c3c000, 0x59489400, 0xd9b800f8, 0xa5c004ca, 0x58140008, 0xc98000f8, + 0xc0c07b00, 0xc0800000, 0x6d9ca000, 0x40dc6000, 0xd9b800f8, 0x580c0002, 0xc8808000, 0x00000000, + 0x00000000, 0xa480004a, 0x580c0004, 0xc98000f8, 0x58140002, 0xc88000f8, 0x00000000, 0x00000000, + 0x4498e000, 0x84000110, 0xc1c00000, 0x580c0002, 0xc9c04000, 0x00000000, 0x00000000, 0xa5c0004a, + 0x580c0006, 0xc98000f8, 0x58140004, 0xc88000f8, 0x00000000, 0x00000000, 0x4498e000, 0x840000a0, + 0xc0800000, 0x58100002, 0xc8800078, 0x580c001e, 0xc94000f8, 0xc1800000, 0x580c0002, 0xc9810038, + 0x40944000, 0xa4be0052, 0xc1400000, 0x4498e000, 0x88000118, 0x580c0002, 0xc940e000, 0x00000000, + 0x00000000, 0xa54000ca, 0xc1c00000, 0x00000000, 0x00000000, 0x00000000, 0xdf9400f8, 0x00000000, + 0x00000000, 0xc1800000, 0xc5582000, 0xa5400042, 0xc000fb64, 0xc1c00002, 0xcdd80000, 0xc000facc, + 0xc1c40002, 0xcdd84200, 0x800002a0, 0xc000fb64, 0xc1c20002, 0xcdd82100, 0xc000facc, 0xc1c60002, + 0xcdd86300, 0x80000268, 0x580c0002, 0xc9c10038, 0x00000000, 0x00000000, 0x589c0000, 0xc000401a, + 0xc9c000f8, 0x00000000, 0xc000f41a, 0xcdc000f8, 0xc000690a, 0xc94000f8, 0xc0c04c00, 0xc1800100, + 0xa9440028, 0xc0004056, 0xc8c00078, 0x6d982010, 0x00000000, 0x40d46000, 0x59540004, 0x4594e000, + 0xc1c00000, 0xc5d400fe, 0xc000690a, 0xcd4000f8, 0xc1400000, 0x5810000e, 0xc94000e0, 0xa9440022, + 0xc1800000, 0xc4c000f8, 0xc98000f8, 0x580c0002, 0xcd4000e0, 0xc4980078, 0xdf9400f8, 0xc1f80006, + 0xc5db9c18, 0x00000000, 0xc5581508, 0xc4c000f8, 0xcd8000f8, 0xc000e408, 0xc1c00002, 0xcdc000f8, + 0xc000691e, 0xc98000f8, 0x5810000e, 0xc1fe0000, 0xcdc3ff00, 0x5d980002, 0xc000691e, 0xcd8000f8, + 0xc1800000, 0x58100002, 0xc9800078, 0x6d486000, 0x5888b600, 0x58080006, 0xc9c000f8, 0x00000000, + 0x00000000, 0x419cc000, 0x58080006, 0xcd8000f8, 0xc1800000, 0xc5582000, 0xa540002a, 0xc000fb60, + 0xc1c40002, 0xcdd84200, 0x80000020, 0xc000fb60, 0xc1c60002, 0xcdd86300, 0xdf9400f8, 0xc1800002, + 0x00000000, 0x00000000, 0x5dd40040, 0xc000690e, 0x44180004, 0xc88000f8, 0x6994e000, 0x7dc0e000, + 0x749c4000, 0xcc8000f8, 0x9c400000, 0x00000000, 0x00000000, 0x00000000, 0xc000403c, 0xc90000f8, + 0xc1400000, 0xc4d60078, 0x4550e000, 0x8400003a, 0xcd4000f8, 0xc1c00000, 0xd9c400f9, 0xd9440078, + 0xc1c00006, 0xd9c400f9, 0xc3c00000, 0xc4fc8018, 0x5bfc0002, 0xc1000000, 0xc140b7b8, 0xc3800000, + 0x6fb44000, 0x4355a000, 0xc3000000, 0x58340006, 0xcb020038, 0xc2c00000, 0xc2800000, 0x5f300002, 0x84000080, 0x58340006, 0xcac00078, 0x58340002, 0xca800078, 0xc2000000, 0x58340002, 0xca020078, 0x42e92000, 0x00000000, 0x4624e000, 0xc62400fc, 0x58340000, 0xcb030038, 0x58340006, 0xce400078, - 0x58340006, 0x6f1e0000, 0xcdc21038, 0x5bb80002, 0x47bce000, 0x8800ff1a, 0x8000b410, 0x00000000, - 0x00000000, 0x00000000,}; + 0x58340006, 0x6f1e0000, 0xcdc21038, 0x5bb80002, 0x47bce000, 0x8800ff1a, 0xa500003a, 0x00000000, + 0xc1000002, 0xc3800000, 0xc3c00008, 0xc1404d48, 0x8000fee0, 0x80009bd8, 0x00000000, 0x00000000, + 0x00000000, 0xa94e9bb8, 0xc0006954, 0xcbc000f8, 0xc3800000, 0xdd790038, 0x5ffc0002, 0xc7bc00fc, + 0xc0006954, 0xcfc000f8, 0x88009b70, 0xc0004044, 0xcbc000f8, 0xc0004014, 0xcb8000f8, 0x5dfc0000, + 0x84009b42, 0x6f9d0010, 0x739da000, 0x6f9e0010, 0x735da000, 0x6f9f0010, 0x735da000, 0xc1c0001e, + 0x775da000, 0xc000e440, 0xcf4000f8, 0x80009ae8, 0x00000000, 0x00000000, 0x00000000,}; static unsigned int firmware_binary_data[] = { }; diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_common.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_common.h index 63a5a3741a..8b8e310aef 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_common.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_ppe_common.h @@ -306,6 +306,12 @@ #define DREG_B0_LADR PPE_REG_ADDR(0x0DA8) #define DREG_B1_LADR PPE_REG_ADDR(0x0DA9) +static inline int +ifx_drv_ver(char *buf, char *module, int major, int mid, int minor) +{ + return sprintf(buf, "Lantiq %s driver, version %d.%d.%d, (c) 2001-2013 Lantiq Deutschland GmbH\n", + module, major, mid, minor); +} #endif // IFXMIPS_PTM_PPE_COMMON_H diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index f77f475656..44d805049b 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -621,12 +621,15 @@ static void do_swap_desc_tasklet(unsigned long arg) static inline int ifx_ptm_version(char *buf) { int len = 0; - unsigned int major, minor; + unsigned int major, mid, minor; - ifx_ptm_get_fw_ver(&major, &minor); + ifx_ptm_get_fw_ver(&major, &mid, &minor); - len += sprintf(buf + len, "PTM %d.%d.%d", IFX_PTM_VER_MAJOR, IFX_PTM_VER_MID, IFX_PTM_VER_MINOR); - len += sprintf(buf + len, " PTM (E1) firmware version %d.%d\n", major, minor); + len += ifx_drv_ver(buf + len, "PTM", IFX_PTM_VER_MAJOR, IFX_PTM_VER_MID, IFX_PTM_VER_MINOR); + if ( mid == ~0 ) + len += sprintf(buf + len, " PTM (E1) firmware version %u.%u\n", major, minor); + else + len += sprintf(buf + len, " PTM (E1) firmware version %u.%u.%u\n", major, mid, minor); return len; } @@ -963,7 +966,7 @@ static int ltq_ptm_probe(struct platform_device *pdev) { int ret; int i; - char ver_str[128]; + char ver_str[256]; struct port_cell_info port_cell = {0}; ret = init_priv_data(); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h index c0318805c5..b12c354fe0 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.h @@ -111,7 +111,7 @@ struct ptm_priv_data { extern unsigned int ifx_ptm_dbg_enable; -extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor); +extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *mid, unsigned int *minor); extern void ifx_ptm_init_chip(struct platform_device *pdev); extern void ifx_ptm_uninit_chip(void); diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c index bf93437fb0..b1660274d0 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vr9.c @@ -246,13 +246,21 @@ static inline int pp32_download_code(int pp32, u32 *code_src, unsigned int code_ * #################################### */ -extern void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *minor) +void ifx_ptm_get_fw_ver(unsigned int *major, unsigned int *mid, unsigned int *minor) { ASSERT(major != NULL, "pointer is NULL"); ASSERT(minor != NULL, "pointer is NULL"); - *major = FW_VER_ID->major; - *minor = FW_VER_ID->minor; + if ( *(volatile unsigned int *)FW_VER_ID_NEW == 0 ) { + *major = FW_VER_ID->major; + *mid = ~0; + *minor = FW_VER_ID->minor; + } + else { + *major = FW_VER_ID_NEW->major; + *mid = FW_VER_ID_NEW->middle; + *minor = FW_VER_ID_NEW->minor; + } } void ifx_ptm_init_chip(struct platform_device *pdev) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index 096225754c..06fe948fa2 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=5.8.18-1 -PKG_RELEASE:=5 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.8.18/ -PKG_HASH:=f04a8172423c6a945fc7d9844b04f33fda9ae574e552f8f18ee3bdfcfb494563 +PKG_VERSION:=5.10-rc6-1 +PKG_RELEASE:=1 +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.10-rc6/ +PKG_HASH:=24c1e84dc1e7bb52d4f67ce481c242f29212a4ceb7833af30e3c279a3f710832 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) diff --git a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch index de6f9d9bb0..55d48daa79 100644 --- a/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch +++ b/package/kernel/mac80211/patches/ath/080-ath10k_thermal_config.patch @@ -37,7 +37,7 @@ void ath10k_thermal_event_temperature(struct ath10k *ar, int temperature); --- a/local-symbols +++ b/local-symbols -@@ -142,6 +142,7 @@ ATH10K_SNOC= +@@ -143,6 +143,7 @@ ATH10K_SNOC= ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= diff --git a/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch b/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch index 5f265b84c2..d3248f958b 100644 --- a/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch +++ b/package/kernel/mac80211/patches/ath/351-ath9k_hw-issue-external-reset-for-QCA955x.patch @@ -29,21 +29,6 @@ Signed-off-by: Felix Fietkau - npend = ath9k_hw_numtxpending(ah, i); - if (npend) - break; -- } -- -- if (ah->external_reset && -- (npend || type == ATH9K_RESET_COLD)) { -- int reset_err = 0; -- -- ath_dbg(ath9k_hw_common(ah), RESET, -- "reset MAC via external reset\n"); -- -- reset_err = ah->external_reset(); -- if (reset_err) { -- ath_err(ath9k_hw_common(ah), -- "External reset failed, err=%d\n", -- reset_err); -- return false; + if (type == ATH9K_RESET_COLD) + return true; + @@ -59,35 +44,47 @@ Signed-off-by: Felix Fietkau + for (i = 0; i < AR_NUM_QCU; i++) { + if (ath9k_hw_numtxpending(ah, i)) + return true; - } -+ } -+ ++ } + } + +- if (ah->external_reset && +- (npend || type == ATH9K_RESET_COLD)) { +- int reset_err = 0; + return false; +} -+ + +- ath_dbg(ath9k_hw_common(ah), RESET, +- "reset MAC via external reset\n"); +static bool ath9k_hw_external_reset(struct ath_hw *ah, int type) +{ + int err; -+ + +- reset_err = ah->external_reset(); +- if (reset_err) { +- ath_err(ath9k_hw_common(ah), +- "External reset failed, err=%d\n", +- reset_err); +- return false; +- } + if (!ah->external_reset || !ath9k_hw_need_external_reset(ah, type)) + return true; -+ -+ ath_dbg(ath9k_hw_common(ah), RESET, -+ "reset MAC via external reset\n"); - REG_WRITE(ah, AR_RTC_RESET, 1); ++ ath_dbg(ath9k_hw_common(ah), RESET, ++ "reset MAC via external reset\n"); ++ + err = ah->external_reset(); + if (err) { + ath_err(ath9k_hw_common(ah), + "External reset failed, err=%d\n", err); + return false; - } - ++ } ++ + if (AR_SREV_9550(ah)) { + REG_WRITE(ah, AR_RTC_RESET, 0); + udelay(10); -+ } -+ + } + + REG_WRITE(ah, AR_RTC_RESET, 1); + udelay(10); + diff --git a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch index bf87d3551a..3c9180b113 100644 --- a/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch +++ b/package/kernel/mac80211/patches/ath/402-ath_regd_optional.patch @@ -82,7 +82,7 @@ help --- a/local-symbols +++ b/local-symbols -@@ -85,6 +85,7 @@ ADM8211= +@@ -86,6 +86,7 @@ ADM8211= ATH_COMMON= WLAN_VENDOR_ATH= ATH_DEBUG= diff --git a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch index 020e2bbab5..c6dc184e28 100644 --- a/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch +++ b/package/kernel/mac80211/patches/ath/404-regd_no_assoc_hints.patch @@ -1,6 +1,6 @@ --- a/net/wireless/reg.c +++ b/net/wireless/reg.c -@@ -3045,6 +3045,8 @@ void regulatory_hint_country_ie(struct w +@@ -3252,6 +3252,8 @@ void regulatory_hint_country_ie(struct w enum environment_cap env = ENVIRON_ANY; struct regulatory_request *request = NULL, *lr; @@ -9,7 +9,7 @@ /* IE len must be evenly divisible by 2 */ if (country_ie_len & 0x01) return; -@@ -3296,6 +3298,7 @@ static bool is_wiphy_all_set_reg_flag(en +@@ -3503,6 +3505,7 @@ static bool is_wiphy_all_set_reg_flag(en void regulatory_hint_disconnect(void) { diff --git a/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch index bdf784968f..17dd8f6597 100644 --- a/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/ath/410-ath9k_allow_adhoc_and_ap.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -831,6 +831,7 @@ static const struct ieee80211_iface_limi +@@ -830,6 +830,7 @@ static const struct ieee80211_iface_limi BIT(NL80211_IFTYPE_AP) }, { .max = 1, .types = BIT(NL80211_IFTYPE_P2P_CLIENT) | BIT(NL80211_IFTYPE_P2P_GO) }, diff --git a/package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch b/package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch index 57d3363274..92fb90c165 100644 --- a/package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch +++ b/package/kernel/mac80211/patches/ath/440-ath5k_channel_bw_debugfs.patch @@ -11,7 +11,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++ --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c -@@ -822,6 +822,97 @@ static const struct file_operations fops +@@ -803,6 +803,97 @@ static const struct file_operations fops .llseek = default_llseek, }; @@ -109,7 +109,7 @@ drivers/net/wireless/ath/ath5k/debug.c | 86 ++++++++++++++++++++++++++++++++ /* debugfs: queues etc */ -@@ -1016,6 +1107,8 @@ ath5k_debug_init_device(struct ath5k_hw +@@ -997,6 +1088,8 @@ ath5k_debug_init_device(struct ath5k_hw debugfs_create_file("queue", 0600, phydir, ah, &fops_queue); debugfs_create_bool("32khz_clock", 0600, phydir, &ah->ah_use_32khz_clock); diff --git a/package/kernel/mac80211/patches/ath/450-ath9k-enabled-MFP-capability-unconditionally.patch b/package/kernel/mac80211/patches/ath/450-ath9k-enabled-MFP-capability-unconditionally.patch index c75d6c7982..ea94b52385 100644 --- a/package/kernel/mac80211/patches/ath/450-ath9k-enabled-MFP-capability-unconditionally.patch +++ b/package/kernel/mac80211/patches/ath/450-ath9k-enabled-MFP-capability-unconditionally.patch @@ -14,7 +14,7 @@ Signed-off-by: David Bauer --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -928,6 +928,7 @@ static void ath9k_set_hw_capab(struct at +@@ -927,6 +927,7 @@ static void ath9k_set_hw_capab(struct at ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING); ieee80211_hw_set(hw, SUPPORT_FAST_XMIT); ieee80211_hw_set(hw, SUPPORTS_CLONED_SKBS); @@ -22,7 +22,7 @@ Signed-off-by: David Bauer if (ath9k_ps_enable) ieee80211_hw_set(hw, SUPPORTS_PS); -@@ -940,9 +941,6 @@ static void ath9k_set_hw_capab(struct at +@@ -939,9 +940,6 @@ static void ath9k_set_hw_capab(struct at IEEE80211_RADIOTAP_MCS_HAVE_STBC; } diff --git a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch index 1f19483064..30b6bdc78e 100644 --- a/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/ath/530-ath9k_extra_leds.patch @@ -103,7 +103,8 @@ + GFP_KERNEL); + if (!led) + return -ENOMEM; -+ + +- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); + led->gpio = gpio = (struct gpio_led *) (led + 1); + _name = (char *) (led->gpio + 1); + @@ -116,8 +117,7 @@ + ret = ath_add_led(sc, led); + if (unlikely(ret < 0)) + kfree(led); - -- ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val); ++ + return ret; } @@ -125,11 +125,11 @@ { - if (!sc->led_registered) - return; -+ struct ath_led *led; - +- - ath_led_brightness(&sc->led_cdev, LED_OFF); - led_classdev_unregister(&sc->led_cdev); -- ++ struct ath_led *led; + - ath9k_hw_gpio_free(sc->sc_ah, sc->sc_ah->led_pin); + while (!list_empty(&sc->leds)) { + led = list_first_entry(&sc->leds, struct ath_led, list); diff --git a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch index 5220157de6..76cb63a5c8 100644 --- a/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch +++ b/package/kernel/mac80211/patches/ath/542-ath9k_debugfs_diag.patch @@ -125,7 +125,7 @@ REG_SET_BIT(ah, AR_BTCOEX_WL_LNADIV, AR_BTCOEX_WL_LNADIV_FORCE_ON); --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c -@@ -528,6 +528,11 @@ irqreturn_t ath_isr(int irq, void *dev) +@@ -531,6 +531,11 @@ irqreturn_t ath_isr(int irq, void *dev) if (test_bit(ATH_OP_HW_RESET, &common->op_flags)) return IRQ_HANDLED; diff --git a/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch b/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch index f59654e414..0d938a3730 100644 --- a/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch +++ b/package/kernel/mac80211/patches/ath/543-ath9k_entropy_from_adc.patch @@ -55,7 +55,7 @@ ops->spectral_scan_config = ar9003_hw_spectral_scan_config; --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -819,7 +819,8 @@ static void ath9k_init_txpower_limits(st +@@ -818,7 +818,8 @@ static void ath9k_init_txpower_limits(st if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) ath9k_init_band_txpower(sc, NL80211_BAND_5GHZ); @@ -66,7 +66,7 @@ static const struct ieee80211_iface_limit if_limits[] = { @@ -1015,6 +1016,18 @@ static void ath9k_set_hw_capab(struct at - NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS); + wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CAN_REPLACE_PTK0); } +static void ath_get_initial_entropy(struct ath_softc *sc) @@ -110,7 +110,7 @@ static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -1320,9 +1320,30 @@ void ar5008_hw_init_rate_txpower(struct +@@ -1349,9 +1349,30 @@ void ar5008_hw_init_rate_txpower(struct } } @@ -141,7 +141,7 @@ static const u32 ar5416_cca_regs[6] = { AR_PHY_CCA, AR_PHY_CH1_CCA, -@@ -1337,6 +1358,8 @@ int ar5008_hw_attach_phy_ops(struct ath_ +@@ -1366,6 +1387,8 @@ int ar5008_hw_attach_phy_ops(struct ath_ if (ret) return ret; diff --git a/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch b/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch index 48cc171134..466767adb9 100644 --- a/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch +++ b/package/kernel/mac80211/patches/ath/545-ath9k_ani_ws_detect.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c -@@ -949,55 +949,6 @@ static bool ar5008_hw_ani_control_new(st +@@ -978,55 +978,6 @@ static bool ar5008_hw_ani_control_new(st * on == 0 means more noise imm */ u32 on = param ? 1 : 0; diff --git a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch index bc5c1ab4ef..96187be3d5 100644 --- a/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch +++ b/package/kernel/mac80211/patches/ath/551-ath9k_ubnt_uap_plus_hsr.patch @@ -337,9 +337,9 @@ #include "btcoex.h" +#include "hsr.h" - u8 ath9k_parse_mpdudensity(u8 mpdudensity) - { -@@ -649,6 +650,7 @@ void ath_reset_work(struct work_struct * + static void ath9k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + u32 queues, bool drop); +@@ -652,6 +653,7 @@ void ath_reset_work(struct work_struct * static int ath9k_start(struct ieee80211_hw *hw) { struct ath_softc *sc = hw->priv; @@ -347,7 +347,7 @@ struct ath_hw *ah = sc->sc_ah; struct ath_common *common = ath9k_hw_common(ah); struct ieee80211_channel *curchan = sc->cur_chan->chandef.chan; -@@ -727,6 +729,11 @@ static int ath9k_start(struct ieee80211_ +@@ -730,6 +732,11 @@ static int ath9k_start(struct ieee80211_ AR_GPIO_OUTPUT_MUX_AS_OUTPUT); } @@ -371,7 +371,7 @@ --- a/local-symbols +++ b/local-symbols -@@ -112,6 +112,7 @@ ATH9K_WOW= +@@ -113,6 +113,7 @@ ATH9K_WOW= ATH9K_RFKILL= ATH9K_CHANNEL_CONTEXT= ATH9K_PCOEM= diff --git a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch index 72b99050c4..8e0041e3ef 100644 --- a/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch +++ b/package/kernel/mac80211/patches/ath/553-ath9k_of_gpio_mask.patch @@ -13,7 +13,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, const struct ath_bus_ops *bus_ops) { -@@ -758,6 +764,9 @@ static int ath9k_init_softc(u16 devid, s +@@ -757,6 +763,9 @@ static int ath9k_init_softc(u16 devid, s if (ret) goto err_hw; diff --git a/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch b/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch new file mode 100644 index 0000000000..68f3a31548 --- /dev/null +++ b/package/kernel/mac80211/patches/ath/560-ath9k-fix-transmitting-to-stations-in-dynamic-SMPS-m.patch @@ -0,0 +1,49 @@ +From: Felix Fietkau +Date: Sun, 14 Feb 2021 19:45:50 +0100 +Subject: [PATCH] ath9k: fix transmitting to stations in dynamic SMPS mode + +When transmitting to a receiver in dynamic SMPS mode, all transmissions that +use multiple spatial streams need to be sent using CTS-to-self or RTS/CTS to +give the receiver's extra chains some time to wake up. +This fixes the tx rate getting stuck at <= MCS7 for some clients, especially +Intel ones, which make aggressive use of SMPS. + +Cc: stable@vger.kernel.org +Reported-by: Martin Kennedy +Signed-off-by: Felix Fietkau +--- + +--- a/drivers/net/wireless/ath/ath9k/ath9k.h ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h +@@ -179,7 +179,8 @@ struct ath_frame_info { + s8 txq; + u8 keyix; + u8 rtscts_rate; +- u8 retries : 7; ++ u8 retries : 6; ++ u8 dyn_smps : 1; + u8 baw_tracked : 1; + u8 tx_power; + enum ath9k_key_type keytype:2; +--- a/drivers/net/wireless/ath/ath9k/xmit.c ++++ b/drivers/net/wireless/ath/ath9k/xmit.c +@@ -1271,6 +1271,11 @@ static void ath_buf_set_rate(struct ath_ + is_40, is_sgi, is_sp); + if (rix < 8 && (tx_info->flags & IEEE80211_TX_CTL_STBC)) + info->rates[i].RateFlags |= ATH9K_RATESERIES_STBC; ++ if (rix >= 8 && fi->dyn_smps) { ++ info->rates[i].RateFlags |= ++ ATH9K_RATESERIES_RTS_CTS; ++ info->flags |= ATH9K_TXDESC_CTSENA; ++ } + + info->txpower[i] = ath_get_rate_txpower(sc, bf, rix, + is_40, false); +@@ -2114,6 +2119,7 @@ static void setup_frame_info(struct ieee + fi->keyix = an->ps_key; + else + fi->keyix = ATH9K_TXKEYIX_INVALID; ++ fi->dyn_smps = sta && sta->smps_mode == IEEE80211_SMPS_DYNAMIC; + fi->keytype = keytype; + fi->framelen = framelen; + fi->tx_power = txpower; diff --git a/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch b/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch index 4e59bb00e9..e004acc340 100644 --- a/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch +++ b/package/kernel/mac80211/patches/ath/921-ath10k_init_devices_synchronously.patch @@ -14,7 +14,7 @@ Signed-off-by: Sven Eckelmann --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c -@@ -3172,6 +3172,16 @@ int ath10k_core_register(struct ath10k * +@@ -3189,6 +3189,16 @@ int ath10k_core_register(struct ath10k * queue_work(ar->workqueue, &ar->register_work); diff --git a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch index 2b36a559d6..1fedd337ac 100644 --- a/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch +++ b/package/kernel/mac80211/patches/ath/930-ath10k_add_tpt_led_trigger.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -9053,6 +9053,21 @@ static int ath10k_mac_init_rd(struct ath +@@ -9713,6 +9713,21 @@ static int ath10k_mac_init_rd(struct ath return 0; } @@ -22,7 +22,7 @@ int ath10k_mac_register(struct ath10k *ar) { static const u32 cipher_suites[] = { -@@ -9380,6 +9395,12 @@ int ath10k_mac_register(struct ath10k *a +@@ -10062,6 +10077,12 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; diff --git a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch index 74a3028a8a..511cf59222 100644 --- a/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch +++ b/package/kernel/mac80211/patches/ath/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch @@ -114,7 +114,7 @@ v13: ath10k_core-$(CONFIG_DEV_COREDUMP) += coredump.o --- a/local-symbols +++ b/local-symbols -@@ -145,6 +145,7 @@ ATH10K_DEBUG= +@@ -146,6 +146,7 @@ ATH10K_DEBUG= ATH10K_DEBUGFS= ATH10K_SPECTRAL= ATH10K_THERMAL= @@ -140,7 +140,7 @@ v13: .patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -131,6 +133,7 @@ static const struct ath10k_hw_params ath +@@ -130,6 +132,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9887_1_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9887 hw1.0", @@ -148,7 +148,7 @@ v13: .patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL, -@@ -340,6 +343,7 @@ static const struct ath10k_hw_params ath +@@ -335,6 +338,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA99X0_2_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca99x0 hw2.0", @@ -156,7 +156,7 @@ v13: .patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .otp_exe_param = 0x00000700, -@@ -381,6 +385,7 @@ static const struct ath10k_hw_params ath +@@ -375,6 +379,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9984_1_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9984/qca9994 hw1.0", @@ -164,7 +164,7 @@ v13: .patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -429,6 +434,7 @@ static const struct ath10k_hw_params ath +@@ -422,6 +427,7 @@ static const struct ath10k_hw_params ath .dev_id = QCA9888_2_0_DEVICE_ID, .bus = ATH10K_BUS_PCI, .name = "qca9888 hw2.0", @@ -172,7 +172,7 @@ v13: .patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR, .uart_pin = 7, .cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH, -@@ -2887,6 +2893,10 @@ int ath10k_core_start(struct ath10k *ar, +@@ -2904,6 +2910,10 @@ int ath10k_core_start(struct ath10k *ar, goto err_hif_stop; } @@ -183,7 +183,7 @@ v13: return 0; err_hif_stop: -@@ -3145,9 +3155,18 @@ static void ath10k_core_register_work(st +@@ -3162,9 +3172,18 @@ static void ath10k_core_register_work(st goto err_spectral_destroy; } @@ -202,7 +202,7 @@ v13: err_spectral_destroy: ath10k_spectral_destroy(ar); err_debug_destroy: -@@ -3193,6 +3212,8 @@ void ath10k_core_unregister(struct ath10 +@@ -3210,6 +3229,8 @@ void ath10k_core_unregister(struct ath10 if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags)) return; @@ -221,7 +221,7 @@ v13: #include "htt.h" #include "htc.h" -@@ -1216,6 +1217,13 @@ struct ath10k { +@@ -1237,6 +1238,13 @@ struct ath10k { } testmode; struct { @@ -407,10 +407,10 @@ v13: /* Rates */ --- a/drivers/net/wireless/ath/ath10k/wmi-ops.h +++ b/drivers/net/wireless/ath/ath10k/wmi-ops.h -@@ -224,7 +224,10 @@ struct wmi_ops { - struct sk_buff *(*gen_bb_timing) - (struct ath10k *ar, +@@ -226,7 +226,10 @@ struct wmi_ops { const struct wmi_bb_timing_cfg_arg *arg); + struct sk_buff *(*gen_per_peer_per_tid_cfg)(struct ath10k *ar, + const struct wmi_per_peer_per_tid_cfg_arg *arg); + struct sk_buff *(*gen_gpio_config)(struct ath10k *ar, u32 gpio_num, + u32 input, u32 pull_type, u32 intr_mode); @@ -418,7 +418,7 @@ v13: }; int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id); -@@ -1120,6 +1123,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * +@@ -1122,6 +1125,35 @@ ath10k_wmi_force_fw_hang(struct ath10k * return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid); } @@ -467,7 +467,7 @@ v13: static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = { --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c -@@ -7471,6 +7471,49 @@ ath10k_wmi_op_gen_peer_set_param(struct +@@ -7463,6 +7463,49 @@ ath10k_wmi_op_gen_peer_set_param(struct return skb; } @@ -517,7 +517,7 @@ v13: static struct sk_buff * ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id, enum wmi_sta_ps_mode psmode) -@@ -9129,6 +9172,9 @@ static const struct wmi_ops wmi_ops = { +@@ -9151,6 +9194,9 @@ static const struct wmi_ops wmi_ops = { .fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -527,7 +527,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9199,6 +9245,8 @@ static const struct wmi_ops wmi_10_1_ops +@@ -9221,6 +9267,8 @@ static const struct wmi_ops wmi_10_1_ops .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, .gen_echo = ath10k_wmi_op_gen_echo, @@ -536,7 +536,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9271,6 +9319,8 @@ static const struct wmi_ops wmi_10_2_ops +@@ -9293,6 +9341,8 @@ static const struct wmi_ops wmi_10_2_ops .gen_delba_send = ath10k_wmi_op_gen_delba_send, .fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill, .get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype, @@ -545,7 +545,7 @@ v13: /* .gen_pdev_enable_adaptive_cca not implemented */ }; -@@ -9342,6 +9392,8 @@ static const struct wmi_ops wmi_10_2_4_o +@@ -9364,6 +9414,8 @@ static const struct wmi_ops wmi_10_2_4_o ath10k_wmi_op_gen_pdev_enable_adaptive_cca, .get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype, .gen_bb_timing = ath10k_wmi_10_2_4_op_gen_bb_timing, @@ -554,7 +554,7 @@ v13: /* .gen_bcn_tmpl not implemented */ /* .gen_prb_tmpl not implemented */ /* .gen_p2p_go_bcn_ie not implemented */ -@@ -9422,6 +9474,8 @@ static const struct wmi_ops wmi_10_4_ops +@@ -9445,6 +9497,8 @@ static const struct wmi_ops wmi_10_4_ops .gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info, .gen_echo = ath10k_wmi_op_gen_echo, .gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config, @@ -565,7 +565,7 @@ v13: int ath10k_wmi_attach(struct ath10k *ar) --- a/drivers/net/wireless/ath/ath10k/wmi.h +++ b/drivers/net/wireless/ath/ath10k/wmi.h -@@ -3016,6 +3016,41 @@ enum wmi_10_4_feature_mask { +@@ -3027,6 +3027,41 @@ enum wmi_10_4_feature_mask { }; diff --git a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch index db9a88e000..f7569df33c 100644 --- a/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch +++ b/package/kernel/mac80211/patches/ath/975-ath10k-use-tpt-trigger-by-default.patch @@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h -@@ -1269,6 +1269,10 @@ struct ath10k { +@@ -1290,6 +1290,10 @@ struct ath10k { bool coex_support; int coex_gpio_pin; @@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin if (ret) --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -9397,7 +9397,7 @@ int ath10k_mac_register(struct ath10k *a +@@ -10079,7 +10079,7 @@ int ath10k_mac_register(struct ath10k *a ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER; #ifdef CPTCFG_MAC80211_LEDS diff --git a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch b/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch index 9498e02462..e951e011e6 100644 --- a/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch +++ b/package/kernel/mac80211/patches/ath/980-ath10k-fix-max-antenna-gain-unit.patch @@ -20,7 +20,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1043,7 +1043,7 @@ static int ath10k_monitor_vdev_start(str +@@ -1038,7 +1038,7 @@ static int ath10k_monitor_vdev_start(str arg.channel.min_power = 0; arg.channel.max_power = channel->max_power * 2; arg.channel.max_reg_power = channel->max_reg_power * 2; @@ -29,7 +29,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ reinit_completion(&ar->vdev_setup_done); reinit_completion(&ar->vdev_delete_done); -@@ -1489,7 +1489,7 @@ static int ath10k_vdev_start_restart(str +@@ -1484,7 +1484,7 @@ static int ath10k_vdev_start_restart(str arg.channel.min_power = 0; arg.channel.max_power = chandef->chan->max_power * 2; arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; @@ -38,7 +38,7 @@ Forwarded: https://patchwork.kernel.org/patch/10986723/ if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { arg.ssid = arvif->u.ap.ssid; -@@ -3194,7 +3194,7 @@ static int ath10k_update_channel_list(st +@@ -3255,7 +3255,7 @@ static int ath10k_update_channel_list(st ch->min_power = 0; ch->max_power = channel->max_power * 2; ch->max_reg_power = channel->max_reg_power * 2; diff --git a/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch b/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch index fbb6fad660..a149ce1216 100644 --- a/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch +++ b/package/kernel/mac80211/patches/ath/981-ath10k-adjust-tx-power-reduction-for-US-regulatory-d.patch @@ -28,7 +28,7 @@ Forwarded: no --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c -@@ -1011,6 +1011,40 @@ static inline int ath10k_vdev_setup_sync +@@ -1006,6 +1006,40 @@ static inline int ath10k_vdev_setup_sync return ar->last_wmi_vdev_start_status; } @@ -69,7 +69,7 @@ Forwarded: no static int ath10k_monitor_vdev_start(struct ath10k *ar, int vdev_id) { struct cfg80211_chan_def *chandef = NULL; -@@ -1043,7 +1077,8 @@ static int ath10k_monitor_vdev_start(str +@@ -1038,7 +1072,8 @@ static int ath10k_monitor_vdev_start(str arg.channel.min_power = 0; arg.channel.max_power = channel->max_power * 2; arg.channel.max_reg_power = channel->max_reg_power * 2; @@ -79,7 +79,7 @@ Forwarded: no reinit_completion(&ar->vdev_setup_done); reinit_completion(&ar->vdev_delete_done); -@@ -1489,7 +1524,8 @@ static int ath10k_vdev_start_restart(str +@@ -1484,7 +1519,8 @@ static int ath10k_vdev_start_restart(str arg.channel.min_power = 0; arg.channel.max_power = chandef->chan->max_power * 2; arg.channel.max_reg_power = chandef->chan->max_reg_power * 2; @@ -89,7 +89,7 @@ Forwarded: no if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { arg.ssid = arvif->u.ap.ssid; -@@ -3194,7 +3230,8 @@ static int ath10k_update_channel_list(st +@@ -3255,7 +3291,8 @@ static int ath10k_update_channel_list(st ch->min_power = 0; ch->max_power = channel->max_power * 2; ch->max_reg_power = channel->max_reg_power * 2; diff --git a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch index b3f30943ab..09ef50526f 100644 --- a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch +++ b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch @@ -22,7 +22,7 @@ static int modparam_bad_frames_preempt; module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444); MODULE_PARM_DESC(bad_frames_preempt, -@@ -2867,10 +2872,10 @@ static int b43_gpio_init(struct b43_wlde +@@ -2869,10 +2874,10 @@ static int b43_gpio_init(struct b43_wlde u32 mask, set; b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0); diff --git a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch index a8dbefb5d9..e395d48202 100644 --- a/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch +++ b/package/kernel/mac80211/patches/brcm/811-b43_no_pio.patch @@ -11,7 +11,7 @@ b43-$(CPTCFG_B43_LEDS) += leds.o --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2000,10 +2000,12 @@ static void b43_do_interrupt_thread(stru +@@ -2001,10 +2001,12 @@ static void b43_do_interrupt_thread(stru dma_reason[0], dma_reason[1], dma_reason[2], dma_reason[3], dma_reason[4], dma_reason[5]); diff --git a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch index cd7b7583c9..52ae7a8eba 100644 --- a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch +++ b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -1642,7 +1642,7 @@ static void b43_write_beacon_template(st +@@ -1643,7 +1643,7 @@ static void b43_write_beacon_template(st len, ram_offset, shm_size_offset, rate); /* Write the PHY TX control parameters. */ @@ -9,7 +9,7 @@ antenna = b43_antenna_to_phyctl(antenna); ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL); /* We can't send beacons with short preamble. Would get PHY errors. */ -@@ -3282,8 +3282,8 @@ static int b43_chip_init(struct b43_wlde +@@ -3284,8 +3284,8 @@ static int b43_chip_init(struct b43_wlde /* Select the antennae */ if (phy->ops->set_rx_antenna) @@ -20,7 +20,7 @@ if (phy->type == B43_PHYTYPE_B) { value16 = b43_read16(dev, 0x005E); -@@ -3983,7 +3983,6 @@ static int b43_op_config(struct ieee8021 +@@ -3985,7 +3985,6 @@ static int b43_op_config(struct ieee8021 struct b43_wldev *dev = wl->current_dev; struct b43_phy *phy = &dev->phy; struct ieee80211_conf *conf = &hw->conf; @@ -28,7 +28,7 @@ int err = 0; mutex_lock(&wl->mutex); -@@ -4026,11 +4025,9 @@ static int b43_op_config(struct ieee8021 +@@ -4028,11 +4027,9 @@ static int b43_op_config(struct ieee8021 } /* Antennas for RX and management frame TX. */ @@ -42,7 +42,7 @@ if (wl->radio_enabled != phy->radio_on) { if (wl->radio_enabled) { -@@ -5174,6 +5171,47 @@ static int b43_op_get_survey(struct ieee +@@ -5176,6 +5173,47 @@ static int b43_op_get_survey(struct ieee return 0; } @@ -90,7 +90,7 @@ static const struct ieee80211_ops b43_hw_ops = { .tx = b43_op_tx, .conf_tx = b43_op_conf_tx, -@@ -5195,6 +5233,8 @@ static const struct ieee80211_ops b43_hw +@@ -5197,6 +5235,8 @@ static const struct ieee80211_ops b43_hw .sw_scan_complete = b43_op_sw_scan_complete_notifier, .get_survey = b43_op_get_survey, .rfkill_poll = b43_rfkill_poll, @@ -99,7 +99,7 @@ }; /* Hard-reset the chip. Do not call this directly. -@@ -5496,6 +5536,8 @@ static int b43_one_core_attach(struct b4 +@@ -5498,6 +5538,8 @@ static int b43_one_core_attach(struct b4 if (!wldev) goto out; @@ -108,7 +108,7 @@ wldev->use_pio = b43_modparam_pio; wldev->dev = dev; wldev->wl = wl; -@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init( +@@ -5592,6 +5634,9 @@ static struct b43_wl *b43_wireless_init( wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST); diff --git a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch index 2aa7612878..9cb0a32fd4 100644 --- a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch +++ b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2884,6 +2884,14 @@ static int b43_gpio_init(struct b43_wlde +@@ -2886,6 +2886,14 @@ static int b43_gpio_init(struct b43_wlde } else if (dev->dev->chip_id == 0x5354) { /* Don't allow overtaking buttons GPIOs */ set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */ diff --git a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch index 1b965087d3..dc2295db1b 100644 --- a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch +++ b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch @@ -13,7 +13,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1551,6 +1551,7 @@ int __init brcmf_core_init(void) +@@ -1557,6 +1557,7 @@ int __init brcmf_core_init(void) { if (!schedule_work(&brcmf_driver_work)) return -EBUSY; diff --git a/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch b/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch index 4e79111377..7b4cb250f9 100644 --- a/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch +++ b/package/kernel/mac80211/patches/brcm/861-brcmfmac-workaround-bug-with-some-inconsistent-BSSes.patch @@ -10,7 +10,7 @@ Signed-off-by: Rafał Miłecki --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -714,8 +714,36 @@ static struct wireless_dev *brcmf_cfg802 +@@ -715,8 +715,36 @@ static struct wireless_dev *brcmf_cfg802 struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_pub *drvr = cfg->pub; struct wireless_dev *wdev; diff --git a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch index 91bf464ede..b5112bd682 100644 --- a/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch +++ b/package/kernel/mac80211/patches/brcm/862-brcmfmac-Disable-power-management.patch @@ -14,7 +14,7 @@ Signed-off-by: Phil Elwell --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2955,6 +2955,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip +@@ -2957,6 +2957,10 @@ brcmf_cfg80211_set_power_mgmt(struct wip * preference in cfg struct to apply this to * FW later while initializing the dongle */ diff --git a/package/kernel/mac80211/patches/brcm/863-brcmfmac-add-in-driver-tables-with-country-codes.patch b/package/kernel/mac80211/patches/brcm/863-brcmfmac-add-in-driver-tables-with-country-codes.patch index 2613171a86..9658bda1c1 100644 --- a/package/kernel/mac80211/patches/brcm/863-brcmfmac-add-in-driver-tables-with-country-codes.patch +++ b/package/kernel/mac80211/patches/brcm/863-brcmfmac-add-in-driver-tables-with-country-codes.patch @@ -49,7 +49,7 @@ Signed-off-by: Rafał Miłecki void brcmf_of_probe(struct device *dev, enum brcmf_bus_type bus_type, struct brcmf_mp_device *settings) { -@@ -30,6 +60,8 @@ void brcmf_of_probe(struct device *dev, +@@ -43,6 +73,8 @@ void brcmf_of_probe(struct device *dev, of_node_put(root); } diff --git a/package/kernel/mac80211/patches/brcm/998-survey.patch b/package/kernel/mac80211/patches/brcm/998-survey.patch index 7feca97e9f..cf70644e1d 100644 --- a/package/kernel/mac80211/patches/brcm/998-survey.patch +++ b/package/kernel/mac80211/patches/brcm/998-survey.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c -@@ -2907,6 +2907,63 @@ done: +@@ -2909,6 +2909,63 @@ done: } static int @@ -64,7 +64,7 @@ brcmf_cfg80211_dump_station(struct wiphy *wiphy, struct net_device *ndev, int idx, u8 *mac, struct station_info *sinfo) { -@@ -3002,6 +3059,7 @@ static s32 brcmf_inform_single_bss(struc +@@ -3004,6 +3061,7 @@ static s32 brcmf_inform_single_bss(struc struct brcmu_chan ch; u16 channel; u32 freq; @@ -72,7 +72,7 @@ u16 notify_capability; u16 notify_interval; u8 *notify_ie; -@@ -3026,6 +3084,17 @@ static s32 brcmf_inform_single_bss(struc +@@ -3028,6 +3086,17 @@ static s32 brcmf_inform_single_bss(struc band = NL80211_BAND_5GHZ; freq = ieee80211_channel_to_frequency(channel, band); @@ -90,7 +90,7 @@ bss_data.chan = ieee80211_get_channel(wiphy, freq); bss_data.scan_width = NL80211_BSS_CHAN_WIDTH_20; bss_data.boottime_ns = ktime_to_ns(ktime_get_boottime()); -@@ -5478,6 +5547,7 @@ static struct cfg80211_ops brcmf_cfg8021 +@@ -5514,6 +5583,7 @@ static struct cfg80211_ops brcmf_cfg8021 .leave_ibss = brcmf_cfg80211_leave_ibss, .get_station = brcmf_cfg80211_get_station, .dump_station = brcmf_cfg80211_dump_station, @@ -100,7 +100,7 @@ .add_key = brcmf_cfg80211_add_key, --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -1349,6 +1349,8 @@ int brcmf_attach(struct device *dev) +@@ -1356,6 +1356,8 @@ int brcmf_attach(struct device *dev) /* Link to bus module */ drvr->hdrlen = 0; @@ -109,7 +109,7 @@ /* Attach and link in the protocol */ ret = brcmf_proto_attach(drvr); -@@ -1431,6 +1433,12 @@ void brcmf_detach(struct device *dev) +@@ -1438,6 +1440,12 @@ void brcmf_detach(struct device *dev) if (drvr == NULL) return; diff --git a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch index c00ab7c786..ff2ce2071f 100644 --- a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch +++ b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -424,43 +424,6 @@ USB_SIERRA_NET= +@@ -437,43 +437,6 @@ USB_SIERRA_NET= USB_VL600= USB_NET_CH9200= USB_NET_AQC111= @@ -90,7 +90,7 @@ config B43_PHY_G --- a/drivers/net/wireless/broadcom/b43/main.c +++ b/drivers/net/wireless/broadcom/b43/main.c -@@ -2851,7 +2851,7 @@ static struct ssb_device *b43_ssb_gpio_d +@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_d { struct ssb_bus *bus = dev->dev->sdev->bus; @@ -99,7 +99,7 @@ return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev); #else return bus->chipco.dev; -@@ -4868,7 +4868,7 @@ static int b43_wireless_core_init(struct +@@ -4870,7 +4870,7 @@ static int b43_wireless_core_init(struct } if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW) hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */ @@ -140,7 +140,7 @@ # LED support --- a/drivers/net/wireless/broadcom/b43legacy/main.c +++ b/drivers/net/wireless/broadcom/b43legacy/main.c -@@ -1906,7 +1906,7 @@ static int b43legacy_gpio_init(struct b4 +@@ -1907,7 +1907,7 @@ static int b43legacy_gpio_init(struct b4 if (dev->dev->id.revision >= 2) mask |= 0x0010; /* FIXME: This is redundant. */ @@ -149,7 +149,7 @@ pcidev = bus->pcicore.dev; #endif gpiodev = bus->chipco.dev ? : pcidev; -@@ -1925,7 +1925,7 @@ static void b43legacy_gpio_cleanup(struc +@@ -1926,7 +1926,7 @@ static void b43legacy_gpio_cleanup(struc struct ssb_bus *bus = dev->dev->bus; struct ssb_device *gpiodev, *pcidev = NULL; @@ -160,8 +160,8 @@ gpiodev = bus->chipco.dev ? : pcidev; --- a/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h +++ b/drivers/net/wireless/broadcom/brcm80211/brcmsmac/led.h -@@ -22,7 +22,7 @@ struct brcms_led { - bool active_low; +@@ -24,7 +24,7 @@ struct brcms_led { + struct gpio_desc *gpiod; }; -#ifdef CPTCFG_BCMA_DRIVER_GPIO @@ -192,7 +192,7 @@ select BRCMUTIL --- a/Kconfig.local +++ b/Kconfig.local -@@ -1276,117 +1276,6 @@ config BACKPORTED_USB_NET_CH9200 +@@ -1315,117 +1315,6 @@ config BACKPORTED_USB_NET_CH9200 config BACKPORTED_USB_NET_AQC111 tristate default USB_NET_AQC111 diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch index da76b34fab..1c52132da6 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -321,6 +321,7 @@ RT2X00_LIB_FIRMWARE= +@@ -333,6 +333,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= @@ -127,7 +127,7 @@ DECLARE_KFIFO_PTR(txstatus_fifo, u32); --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1407,6 +1407,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de +@@ -1406,6 +1406,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep); @@ -138,7 +138,7 @@ /* * Let the driver probe the device to detect the capabilities. */ -@@ -1550,6 +1554,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ +@@ -1549,6 +1553,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ * Free the driver data. */ kfree(rt2x00dev->drv_data); diff --git a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch index 15f46fc98a..88d6dd559b 100644 --- a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch +++ b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1345,7 +1345,7 @@ static inline void rt2x00lib_set_if_comb +@@ -1344,7 +1344,7 @@ static inline void rt2x00lib_set_if_comb */ if_limit = &rt2x00dev->if_limits_ap; if_limit->max = rt2x00dev->ops->max_ap_intf; diff --git a/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch index 70f8d06e24..fca1fb2cd4 100644 --- a/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch +++ b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch @@ -31,7 +31,7 @@ Tested-by: Christoph Krapp static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) { struct hw_mode_spec *spec = &rt2x00dev->spec; -@@ -1211,6 +1224,10 @@ static int rt2x00lib_probe_hw(struct rt2 +@@ -1210,6 +1223,10 @@ static int rt2x00lib_probe_hw(struct rt2 #undef RT2X00_TASKLET_INIT diff --git a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch index 3de00b2267..c82258c2b6 100644 --- a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch +++ b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch @@ -22,16 +22,15 @@ - rfcsr = rt2800_rfcsr_read(rt2x00dev, 16); - rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80); - rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); -- -- rfcsr = rt2800_rfcsr_read(rt2x00dev, 21); -- rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1); -- rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); + if (rt2800_hw_get_chipver(rt2x00dev) > 1) { + /* Default: XO=20MHz , SDM mode */ + rfcsr = rt2800_rfcsr_read(rt2x00dev, 16); + rt2x00_set_field8(&rfcsr, RFCSR16_SDM_MODE_MT7620, 0x80); + rt2800_rfcsr_write(rt2x00dev, 16, rfcsr); -+ + +- rfcsr = rt2800_rfcsr_read(rt2x00dev, 21); +- rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1); +- rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); + rfcsr = rt2800_rfcsr_read(rt2x00dev, 21); + rt2x00_set_field8(&rfcsr, RFCSR21_BIT8, 1); + rt2800_rfcsr_write(rt2x00dev, 21, rfcsr); @@ -217,10 +216,6 @@ - rt2800_rfcsr_write(rt2x00dev, 28, 0x61); - rt2800_rfcsr_write(rt2x00dev, 29, 0xB5); - rt2800_rfcsr_write(rt2x00dev, 43, 0x02); -- -- rt2800_rfcsr_write(rt2x00dev, 28, 0x62); -- rt2800_rfcsr_write(rt2x00dev, 29, 0xAD); -- rt2800_rfcsr_write(rt2x00dev, 39, 0x80); + if (rt2800_hw_get_chipver(rt2x00dev) > 1) { + rt2800_rfcsr_write(rt2x00dev, 11, 0x21); + if (rt2800_clk_is_20mhz(rt2x00dev)) @@ -244,7 +239,10 @@ + rt2800_rfcsr_write(rt2x00dev, 29, 0xB5); + rt2800_rfcsr_write(rt2x00dev, 43, 0x02); + } -+ + +- rt2800_rfcsr_write(rt2x00dev, 28, 0x62); +- rt2800_rfcsr_write(rt2x00dev, 29, 0xAD); +- rt2800_rfcsr_write(rt2x00dev, 39, 0x80); + if (rt2800_hw_get_chipver(rt2x00dev) > 1 && + rt2800_hw_get_chipeco(rt2x00dev) >= 2) { + rt2800_rfcsr_write(rt2x00dev, 28, 0x62); @@ -288,33 +286,6 @@ - rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); - rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7); - rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09); -- -- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); -- -- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); -- -- /* Initialize RF channel register for DRQFN */ -- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02); -- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7); + if (rt2800_hw_get_chipver(rt2x00dev) > 1) { + rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x47); + rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x71); @@ -347,7 +318,16 @@ + rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xF7); + rt2800_rfcsr_write_chanreg(rt2x00dev, 61, 0x09); + } -+ + +- rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x06); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 19, 0xA7); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 28, 0x2C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x64); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 8, 0x51); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); + if (rt2800_hw_get_chipver(rt2x00dev) > 1 && + rt2800_hw_get_chipeco(rt2x00dev) >= 2) { + rt2800_rfcsr_write_chanreg(rt2x00dev, 10, 0x51); @@ -359,7 +339,13 @@ + rt2800_rfcsr_write_chanreg(rt2x00dev, 9, 0x36); + rt2800_rfcsr_write_chanreg(rt2x00dev, 11, 0x53); + rt2800_rfcsr_write_chanreg(rt2x00dev, 14, 0x16); -+ + +- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 54, 0x27); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); + rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x6C); + rt2800_rfcsr_write_chanreg(rt2x00dev, 48, 0xFC); + rt2800_rfcsr_write_chanreg(rt2x00dev, 49, 0x1F); @@ -367,7 +353,16 @@ + rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x66); + rt2800_rfcsr_write_chanreg(rt2x00dev, 59, 0x6B); + } -+ + +- /* Initialize RF channel register for DRQFN */ +- rt2800_rfcsr_write_chanreg(rt2x00dev, 43, 0xD3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 44, 0xE3); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 45, 0xE5); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 47, 0x28); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 55, 0x68); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 56, 0xF7); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 58, 0x02); +- rt2800_rfcsr_write_chanreg(rt2x00dev, 60, 0xC7); + if (rt2800_hw_get_chippkg(rt2x00dev) == 0 && + rt2800_hw_get_chipver(rt2x00dev) == 1) { + /* Initialize RF channel register for DRQFN */ diff --git a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch b/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch index 31a7baeee7..205c10b641 100644 --- a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch +++ b/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch @@ -53,22 +53,20 @@ - idle = rt2800_register_read(rt2x00dev, CH_IDLE_STA); - busy = rt2800_register_read(rt2x00dev, CH_BUSY_STA); - busy_ext = rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC); -- ++ survey->channel = &rt2x00dev->bands[band].channels[idx]; + - if (idle || busy) { - survey->filled = SURVEY_INFO_TIME | - SURVEY_INFO_TIME_BUSY | - SURVEY_INFO_TIME_EXT_BUSY; -- ++ survey->filled = SURVEY_INFO_TIME | ++ SURVEY_INFO_TIME_BUSY | ++ SURVEY_INFO_TIME_EXT_BUSY; + - survey->time = (idle + busy) / 1000; - survey->time_busy = busy / 1000; - survey->time_ext_busy = busy_ext / 1000; - } -+ survey->channel = &rt2x00dev->bands[band].channels[idx]; -+ -+ survey->filled = SURVEY_INFO_TIME | -+ SURVEY_INFO_TIME_BUSY | -+ SURVEY_INFO_TIME_EXT_BUSY; -+ + survey->time = div_u64(chan_survey->time_idle + chan_survey->time_busy, 1000); + survey->time_busy = div_u64(chan_survey->time_busy, 1000); + survey->time_ext_busy = div_u64(chan_survey->time_ext_busy, 1000); diff --git a/package/kernel/mac80211/patches/subsys/070-backports-add-netif_receive_skb_list.patch b/package/kernel/mac80211/patches/subsys/070-backports-add-netif_receive_skb_list.patch deleted file mode 100644 index b26a6bc389..0000000000 --- a/package/kernel/mac80211/patches/subsys/070-backports-add-netif_receive_skb_list.patch +++ /dev/null @@ -1,30 +0,0 @@ -From: Felix Fietkau -Date: Fri, 14 Aug 2020 16:13:45 +0200 -Subject: [PATCH] backports: add netif_receive_skb_list - -It will be needed by pending mac80211 changes - -Signed-off-by: Felix Fietkau ---- - ---- a/backport-include/linux/netdevice.h -+++ b/backport-include/linux/netdevice.h -@@ -372,6 +372,18 @@ static inline int _bp_netdev_upper_dev_l - macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__) - #endif - -+#if LINUX_VERSION_IS_LESS(4,19,0) -+static inline void netif_receive_skb_list(struct list_head *head) -+{ -+ struct sk_buff *skb, *next; -+ -+ list_for_each_entry_safe(skb, next, head, list) { -+ skb_list_del_init(skb); -+ netif_receive_skb(skb); -+ } -+} -+#endif -+ - #if LINUX_VERSION_IS_LESS(5,0,0) - static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_ack *extack) - { diff --git a/package/kernel/mac80211/patches/subsys/071-backports-add-skb_list_del_init.patch b/package/kernel/mac80211/patches/subsys/071-backports-add-skb_list_del_init.patch deleted file mode 100644 index ee7e63498a..0000000000 --- a/package/kernel/mac80211/patches/subsys/071-backports-add-skb_list_del_init.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Felix Fietkau -Date: Fri, 14 Aug 2020 16:13:55 +0200 -Subject: [PATCH] backports: add skb_list_del_init - -It will be needed by pending mac80211 changes - -Signed-off-by: Felix Fietkau ---- - ---- a/backport-include/linux/skbuff.h -+++ b/backport-include/linux/skbuff.h -@@ -384,6 +384,12 @@ static inline void skb_mark_not_on_list( - { - skb->next = NULL; - } -+ -+static inline void skb_list_del_init(struct sk_buff *skb) -+{ -+ __list_del_entry(&skb->list); -+ skb_mark_not_on_list(skb); -+} - #endif /* 4.19.10 <= x < 4.20 */ - #endif - diff --git a/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch b/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch deleted file mode 100644 index 9b266ffcb3..0000000000 --- a/package/kernel/mac80211/patches/subsys/072-backports-add-sched_set_fifo_low.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Felix Fietkau -Date: Mon, 28 Sep 2020 08:35:28 +0200 -Subject: [PATCH] backports: add sched_set_fifo_low - -It is needed for mt76 - -Signed-off-by: Felix Fietkau ---- - create mode 100644 backport/backport-include/linux/sched.h - ---- /dev/null -+++ b/backport-include/linux/sched.h -@@ -0,0 +1,19 @@ -+#ifndef __BACKPORT_LINUX_SCHED_H -+#define __BACKPORT_LINUX_SCHED_H -+ -+#include_next -+#include -+ -+#if LINUX_VERSION_IS_LESS(5,9,0) -+#include -+ -+static inline void sched_set_fifo_low(struct task_struct *p) -+{ -+ struct sched_param sparam = {.sched_priority = 1}; -+ -+ sched_setscheduler(p, SCHED_FIFO, &sparam); -+} -+ -+#endif -+ -+#endif diff --git a/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch b/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch deleted file mode 100644 index 486d10ea58..0000000000 --- a/package/kernel/mac80211/patches/subsys/073-backports-backport-tasklet_setup-from_tasklet.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Felix Fietkau -Date: Wed, 11 Nov 2020 13:34:26 +0100 -Subject: [PATCH] backports: backport tasklet_setup, from_tasklet - -Backport the new tasklet API - -Signed-off-by: Felix Fietkau ---- - ---- a/backport-include/linux/interrupt.h -+++ b/backport-include/linux/interrupt.h -@@ -31,6 +31,23 @@ static inline void backport_hrtimer_star - hrtimer_start(timer, _time, mode); - } - #define hrtimer_start LINUX_BACKPORT(hrtimer_start) -+ -+#endif -+ -+#if LINUX_VERSION_IS_LESS(5,9,0) -+ -+static inline void -+tasklet_setup(struct tasklet_struct *t, -+ void (*callback)(struct tasklet_struct *)) -+{ -+ void (*cb)(unsigned long data) = (void *)callback; -+ -+ tasklet_init(t, cb, (unsigned long)t); -+} -+ -+#define from_tasklet(var, callback_tasklet, tasklet_fieldname) \ -+ container_of(callback_tasklet, typeof(*var), tasklet_fieldname) -+ - #endif - - #endif /* _BP_LINUX_INTERRUPT_H */ diff --git a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch index a94f9d8fdb..ac78e62ccc 100644 --- a/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch +++ b/package/kernel/mac80211/patches/subsys/100-remove-cryptoapi-dependencies.patch @@ -8,7 +8,7 @@ wpa.o \ scan.o offchannel.o \ ht.o agg-tx.o agg-rx.o \ -@@ -18,8 +17,8 @@ mac80211-y := \ +@@ -19,8 +18,8 @@ mac80211-y := \ rate.o \ michael.o \ tkip.o \ @@ -64,7 +64,7 @@ - aead_request_set_ad(aead_req, sg[0].length); - - crypto_aead_encrypt(aead_req); -- kzfree(aead_req); +- kfree_sensitive(aead_req); - - return 0; -} @@ -99,7 +99,7 @@ - aead_request_set_ad(aead_req, sg[0].length); - - err = crypto_aead_decrypt(aead_req); -- kzfree(aead_req); +- kfree_sensitive(aead_req); - - return err; -} @@ -166,8 +166,7 @@ #define AES_CCM_H -#include "aead_api.h" -+#include - +- -#define CCM_AAD_LEN 32 - -static inline struct crypto_aead * @@ -195,7 +194,8 @@ - be16_to_cpup((__be16 *)aad), - data, data_len, mic); -} -- ++#include + -static inline void ieee80211_aes_key_free(struct crypto_aead *tfm) -{ - return aead_key_free(tfm); @@ -331,10 +331,10 @@ #define AES_GCM_H -#include "aead_api.h" +- +-#define GCM_AAD_LEN 32 +#include --#define GCM_AAD_LEN 32 -- -static inline int ieee80211_aes_gcm_encrypt(struct crypto_aead *tfm, - u8 *j_0, u8 *aad, u8 *data, - size_t data_len, u8 *mic) diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index 2333ca2dad..665231a040 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -2,7 +2,7 @@ Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1198,7 +1198,6 @@ static int ieee80211_stop_ap(struct wiph +@@ -1288,7 +1288,6 @@ static int ieee80211_stop_ap(struct wiph sdata->vif.bss_conf.ftmr_params = NULL; __sta_info_flush(sdata, true); diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index fccb1ebffa..80f995737b 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2346,7 +2346,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2442,7 +2442,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch b/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch deleted file mode 100644 index cb70670e52..0000000000 --- a/package/kernel/mac80211/patches/subsys/300-mac80211-optimize-skb-resizing.patch +++ /dev/null @@ -1,201 +0,0 @@ -From: Felix Fietkau -Date: Sun, 17 Mar 2019 18:11:30 +0100 -Subject: [PATCH] mac80211: optimize skb resizing - -When forwarding unicast packets from ethernet to batman-adv over 802.11s -(with forwarding disabled), the typical required headroom to transmit -encrypted packets on mt76 is 32 (802.11) + 6 (802.11s) + 8 (CCMP) + -2 (padding) + 6 (LLC) + 18 (batman-adv) - 14 (old ethernet header) = 58 bytes. - -On systems where NET_SKB_PAD is 64 this leads to a call to pskb_expand_head -for every packet, since mac80211 also tries to allocate 16 bytes status -headroom for radiotap headers. - -This patch fixes these unnecessary reallocations by only requiring the extra -status headroom in ieee80211_tx_monitor() -If however a reallocation happens before that call, the status headroom gets -added there as well, in order to avoid double reallocation. - -The patch also cleans up the code by moving the headroom calculation to -ieee80211_skb_resize. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -1809,6 +1809,9 @@ int ieee80211_tx_control_port(struct wip - u64 *cookie); - int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev, - const u8 *buf, size_t len); -+int ieee80211_skb_resize(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb, int hdrlen, int hdr_add); - - /* HT */ - void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata, ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -846,6 +846,11 @@ void ieee80211_tx_monitor(struct ieee802 - struct net_device *prev_dev = NULL; - int rtap_len; - -+ if (ieee80211_skb_resize(local, NULL, skb, 0, 0)) { -+ dev_kfree_skb(skb); -+ return; -+ } -+ - /* send frame to monitor interfaces now */ - rtap_len = ieee80211_tx_radiotap_len(info, status); - if (WARN_ON_ONCE(skb_headroom(skb) < rtap_len)) { ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -1937,37 +1937,53 @@ static bool ieee80211_tx(struct ieee8021 - } - - /* device xmit handlers */ -- --static int ieee80211_skb_resize(struct ieee80211_sub_if_data *sdata, -- struct sk_buff *skb, -- int head_need, bool may_encrypt) -+int ieee80211_skb_resize(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct sk_buff *skb, int hdr_len, int hdr_extra) - { -- struct ieee80211_local *local = sdata->local; -+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr; -- bool enc_tailroom; -- int tail_need = 0; -- -- hdr = (struct ieee80211_hdr *) skb->data; -- enc_tailroom = may_encrypt && -- (sdata->crypto_tx_tailroom_needed_cnt || -- ieee80211_is_mgmt(hdr->frame_control)); -- -- if (enc_tailroom) { -- tail_need = IEEE80211_ENCRYPT_TAILROOM; -- tail_need -= skb_tailroom(skb); -- tail_need = max_t(int, tail_need, 0); -+ int head_need, head_max; -+ int tail_need, tail_max; -+ bool enc_tailroom = false; -+ -+ if (sdata && !hdr_len && -+ !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT)) { -+ hdr = (struct ieee80211_hdr *) skb->data; -+ enc_tailroom = (sdata->crypto_tx_tailroom_needed_cnt || -+ ieee80211_is_mgmt(hdr->frame_control)); -+ hdr_len += sdata->encrypt_headroom; -+ } -+ -+ head_need = head_max = hdr_len; -+ tail_need = tail_max = 0; -+ if (!sdata) { -+ head_need = head_max = local->tx_headroom; -+ } else { -+ head_max += hdr_extra; -+ head_max += max_t(int, local->tx_headroom, -+ local->hw.extra_tx_headroom); -+ head_need += local->hw.extra_tx_headroom; -+ -+ tail_max = IEEE80211_ENCRYPT_TAILROOM; -+ if (enc_tailroom) -+ tail_need = tail_max; - } - - if (skb_cloned(skb) && - (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || - !skb_clone_writable(skb, ETH_HLEN) || enc_tailroom)) - I802_DEBUG_INC(local->tx_expand_skb_head_cloned); -- else if (head_need || tail_need) -+ else if (head_need > skb_headroom(skb) || -+ tail_need > skb_tailroom(skb)) - I802_DEBUG_INC(local->tx_expand_skb_head); - else - return 0; - -- if (pskb_expand_head(skb, head_need, tail_need, GFP_ATOMIC)) { -+ head_max = max_t(int, 0, head_max - skb_headroom(skb)); -+ tail_max = max_t(int, 0, tail_max - skb_tailroom(skb)); -+ -+ if (pskb_expand_head(skb, head_max, tail_max, GFP_ATOMIC)) { - wiphy_debug(local->hw.wiphy, - "failed to reallocate TX buffer\n"); - return -ENOMEM; -@@ -1983,18 +1999,8 @@ void ieee80211_xmit(struct ieee80211_sub - struct ieee80211_local *local = sdata->local; - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_hdr *hdr; -- int headroom; -- bool may_encrypt; -- -- may_encrypt = !(info->flags & IEEE80211_TX_INTFL_DONT_ENCRYPT); - -- headroom = local->tx_headroom; -- if (may_encrypt) -- headroom += sdata->encrypt_headroom; -- headroom -= skb_headroom(skb); -- headroom = max_t(int, 0, headroom); -- -- if (ieee80211_skb_resize(sdata, skb, headroom, may_encrypt)) { -+ if (ieee80211_skb_resize(local, sdata, skb, 0, 0)) { - ieee80211_free_txskb(&local->hw, skb); - return; - } -@@ -2809,29 +2815,13 @@ static struct sk_buff *ieee80211_build_h - } - - skb_pull(skb, skip_header_bytes); -- head_need = hdrlen + encaps_len + meshhdrlen - skb_headroom(skb); -+ head_need = hdrlen + encaps_len + meshhdrlen; - -- /* -- * So we need to modify the skb header and hence need a copy of -- * that. The head_need variable above doesn't, so far, include -- * the needed header space that we don't need right away. If we -- * can, then we don't reallocate right now but only after the -- * frame arrives at the master device (if it does...) -- * -- * If we cannot, however, then we will reallocate to include all -- * the ever needed space. Also, if we need to reallocate it anyway, -- * make it big enough for everything we may ever need. -- */ -- -- if (head_need > 0 || skb_cloned(skb)) { -- head_need += sdata->encrypt_headroom; -- head_need += local->tx_headroom; -- head_need = max_t(int, 0, head_need); -- if (ieee80211_skb_resize(sdata, skb, head_need, true)) { -- ieee80211_free_txskb(&local->hw, skb); -- skb = NULL; -- return ERR_PTR(-ENOMEM); -- } -+ if (ieee80211_skb_resize(local, sdata, skb, head_need, -+ sdata->encrypt_headroom)) { -+ ieee80211_free_txskb(&local->hw, skb); -+ skb = NULL; -+ return ERR_PTR(-ENOMEM); - } - - if (encaps_data) -@@ -3446,7 +3436,6 @@ static bool ieee80211_xmit_fast(struct i - struct ieee80211_local *local = sdata->local; - u16 ethertype = (skb->data[12] << 8) | skb->data[13]; - int extra_head = fast_tx->hdr_len - (ETH_HLEN - 2); -- int hw_headroom = sdata->local->hw.extra_tx_headroom; - struct ethhdr eth; - struct ieee80211_tx_info *info; - struct ieee80211_hdr *hdr = (void *)fast_tx->hdr; -@@ -3498,10 +3487,7 @@ static bool ieee80211_xmit_fast(struct i - * as the may-encrypt argument for the resize to not account for - * more room than we already have in 'extra_head' - */ -- if (unlikely(ieee80211_skb_resize(sdata, skb, -- max_t(int, extra_head + hw_headroom - -- skb_headroom(skb), 0), -- false))) { -+ if (unlikely(ieee80211_skb_resize(local, sdata, skb, extra_head, 0))) { - kfree_skb(skb); - return true; - } diff --git a/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch b/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch index 10d8ad8d71..d09d70725e 100644 --- a/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch +++ b/package/kernel/mac80211/patches/subsys/304-mac80211-sta-randomize-BA-session-dialog-token-alloc.patch @@ -28,7 +28,7 @@ Signed-off-by: Johannes Berg --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c -@@ -339,6 +339,7 @@ struct sta_info *sta_info_alloc(struct i +@@ -357,6 +357,7 @@ struct sta_info *sta_info_alloc(struct i INIT_WORK(&sta->drv_deliver_wk, sta_deliver_ps_frames); INIT_WORK(&sta->ampdu_mlme.work, ieee80211_ba_session_work); mutex_init(&sta->ampdu_mlme.mtx); diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-improve-AQL-tx-airtime-estimation.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-improve-AQL-tx-airtime-estimation.patch deleted file mode 100644 index bee43a60fa..0000000000 --- a/package/kernel/mac80211/patches/subsys/305-mac80211-improve-AQL-tx-airtime-estimation.patch +++ /dev/null @@ -1,81 +0,0 @@ -From: Felix Fietkau -Date: Fri, 24 Jul 2020 20:25:07 +0200 -Subject: [PATCH] mac80211: improve AQL tx airtime estimation - -AQL does not take into account that most HT/VHT/HE traffic is A-MPDU aggregated. -Because of that, the per-packet airtime overhead is vastly overestimated. -Improve it by assuming an average aggregation length of 16 for non-legacy -traffic if not using the VO AC queue. -This should improve performance with high data rates, especially with multiple -stations - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -551,7 +551,7 @@ EXPORT_SYMBOL_GPL(ieee80211_calc_tx_airt - u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *pubsta, -- int len) -+ int len, bool ampdu) - { - struct ieee80211_supported_band *sband; - struct ieee80211_chanctx_conf *conf; -@@ -572,10 +572,26 @@ u32 ieee80211_calc_expected_tx_airtime(s - if (pubsta) { - struct sta_info *sta = container_of(pubsta, struct sta_info, - sta); -+ struct ieee80211_tx_rate *rate = &sta->tx_stats.last_rate; -+ u32 airtime; - -- return ieee80211_calc_tx_airtime_rate(hw, -- &sta->tx_stats.last_rate, -- band, len); -+ if (!(rate->flags & (IEEE80211_TX_RC_VHT_MCS | -+ IEEE80211_TX_RC_MCS))) -+ ampdu = false; -+ -+ /* -+ * Assume that HT/VHT transmission on any AC except VO will -+ * use aggregation. Since we don't have reliable reporting -+ * of aggregation length, assume an average of 16. -+ * This will not be very accurate, but much better than simply -+ * assuming un-aggregated tx. -+ */ -+ airtime = ieee80211_calc_tx_airtime_rate(hw, rate, band, -+ ampdu ? len * 16 : len); -+ if (ampdu) -+ airtime /= 16; -+ -+ return airtime; - } - - if (!conf) ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -2294,7 +2294,7 @@ extern const struct ethtool_ops ieee8021 - u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *pubsta, -- int len); -+ int len, bool ampdu); - #ifdef CPTCFG_MAC80211_NOINLINE - #define debug_noinline noinline - #else ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3707,10 +3707,11 @@ encap_out: - - if (vif && - wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) { -+ bool ampdu = txq->ac != IEEE80211_AC_VO; - u32 airtime; - - airtime = ieee80211_calc_expected_tx_airtime(hw, vif, txq->sta, -- skb->len); -+ skb->len, ampdu); - if (airtime) { - airtime = ieee80211_info_set_tx_time_est(info, airtime); - ieee80211_sta_update_pending_airtime(local, tx.sta, diff --git a/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch b/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch deleted file mode 100644 index 802d57497c..0000000000 --- a/package/kernel/mac80211/patches/subsys/307-mac80211-add-a-function-for-running-rx-without-passi.patch +++ /dev/null @@ -1,186 +0,0 @@ -From: Felix Fietkau -Date: Sat, 25 Jul 2020 20:53:23 +0200 -Subject: [PATCH] mac80211: add a function for running rx without passing skbs - to the stack - -This can be used to run mac80211 rx processing on a batch of frames in NAPI -poll before passing them to the network stack in a large batch. -This can improve icache footprint, or it can be used to pass frames via -netif_receive_skb_list. - -Signed-off-by: Felix Fietkau ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -4358,6 +4358,31 @@ void ieee80211_free_hw(struct ieee80211_ - void ieee80211_restart_hw(struct ieee80211_hw *hw); - - /** -+ * ieee80211_rx_list - receive frame and store processed skbs in a list -+ * -+ * Use this function to hand received frames to mac80211. The receive -+ * buffer in @skb must start with an IEEE 802.11 header. In case of a -+ * paged @skb is used, the driver is recommended to put the ieee80211 -+ * header of the frame on the linear part of the @skb to avoid memory -+ * allocation and/or memcpy by the stack. -+ * -+ * This function may not be called in IRQ context. Calls to this function -+ * for a single hardware must be synchronized against each other. Calls to -+ * this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be -+ * mixed for a single hardware. Must not run concurrently with -+ * ieee80211_tx_status() or ieee80211_tx_status_ni(). -+ * -+ * This function must be called with BHs disabled and RCU read lock -+ * -+ * @hw: the hardware this frame came in on -+ * @sta: the station the frame was received from, or %NULL -+ * @skb: the buffer to receive, owned by mac80211 after this call -+ * @list: the destination list -+ */ -+void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta, -+ struct sk_buff *skb, struct list_head *list); -+ -+/** - * ieee80211_rx_napi - receive frame from NAPI context - * - * Use this function to hand received frames to mac80211. The receive ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -218,7 +218,7 @@ enum ieee80211_rx_flags { - }; - - struct ieee80211_rx_data { -- struct napi_struct *napi; -+ struct list_head *list; - struct sk_buff *skb; - struct ieee80211_local *local; - struct ieee80211_sub_if_data *sdata; ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -2579,8 +2579,8 @@ static void ieee80211_deliver_skb_to_loc - memset(skb->cb, 0, sizeof(skb->cb)); - - /* deliver to local stack */ -- if (rx->napi) -- napi_gro_receive(rx->napi, skb); -+ if (rx->list) -+ list_add_tail(&skb->list, rx->list); - else - netif_receive_skb(skb); - } -@@ -3870,7 +3870,6 @@ void ieee80211_release_reorder_timeout(s - /* This is OK -- must be QoS data frame */ - .security_idx = tid, - .seqno_idx = tid, -- .napi = NULL, /* must be NULL to not have races */ - }; - struct tid_ampdu_rx *tid_agg_rx; - -@@ -4480,8 +4479,8 @@ static bool ieee80211_invoke_fast_rx(str - /* deliver to local stack */ - skb->protocol = eth_type_trans(skb, fast_rx->dev); - memset(skb->cb, 0, sizeof(skb->cb)); -- if (rx->napi) -- napi_gro_receive(rx->napi, skb); -+ if (rx->list) -+ list_add_tail(&skb->list, rx->list); - else - netif_receive_skb(skb); - -@@ -4548,7 +4547,7 @@ static bool ieee80211_prepare_and_rx_han - static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, - struct ieee80211_sta *pubsta, - struct sk_buff *skb, -- struct napi_struct *napi) -+ struct list_head *list) - { - struct ieee80211_local *local = hw_to_local(hw); - struct ieee80211_sub_if_data *sdata; -@@ -4563,7 +4562,7 @@ static void __ieee80211_rx_handle_packet - memset(&rx, 0, sizeof(rx)); - rx.skb = skb; - rx.local = local; -- rx.napi = napi; -+ rx.list = list; - - if (ieee80211_is_data(fc) || ieee80211_is_mgmt(fc)) - I802_DEBUG_INC(local->dot11ReceivedFragmentCount); -@@ -4671,8 +4670,8 @@ static void __ieee80211_rx_handle_packet - * This is the receive path handler. It is called by a low level driver when an - * 802.11 MPDU is received from the hardware. - */ --void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, -- struct sk_buff *skb, struct napi_struct *napi) -+void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, -+ struct sk_buff *skb, struct list_head *list) - { - struct ieee80211_local *local = hw_to_local(hw); - struct ieee80211_rate *rate = NULL; -@@ -4764,36 +4763,53 @@ void ieee80211_rx_napi(struct ieee80211_ - status->rx_flags = 0; - - /* -- * key references and virtual interfaces are protected using RCU -- * and this requires that we are in a read-side RCU section during -- * receive processing -- */ -- rcu_read_lock(); -- -- /* - * Frames with failed FCS/PLCP checksum are not returned, - * all other frames are returned without radiotap header - * if it was previously present. - * Also, frames with less than 16 bytes are dropped. - */ - skb = ieee80211_rx_monitor(local, skb, rate); -- if (!skb) { -- rcu_read_unlock(); -+ if (!skb) - return; -- } - - ieee80211_tpt_led_trig_rx(local, - ((struct ieee80211_hdr *)skb->data)->frame_control, - skb->len); - -- __ieee80211_rx_handle_packet(hw, pubsta, skb, napi); -- -- rcu_read_unlock(); -+ __ieee80211_rx_handle_packet(hw, pubsta, skb, list); - - return; - drop: - kfree_skb(skb); - } -+EXPORT_SYMBOL(ieee80211_rx_list); -+ -+void ieee80211_rx_napi(struct ieee80211_hw *hw, struct ieee80211_sta *pubsta, -+ struct sk_buff *skb, struct napi_struct *napi) -+{ -+ struct sk_buff *tmp; -+ LIST_HEAD(list); -+ -+ -+ /* -+ * key references and virtual interfaces are protected using RCU -+ * and this requires that we are in a read-side RCU section during -+ * receive processing -+ */ -+ rcu_read_lock(); -+ ieee80211_rx_list(hw, pubsta, skb, &list); -+ rcu_read_unlock(); -+ -+ if (!napi) { -+ netif_receive_skb_list(&list); -+ return; -+ } -+ -+ list_for_each_entry_safe(skb, tmp, &list, list) { -+ skb_list_del_init(skb); -+ napi_gro_receive(napi, skb); -+ } -+} - EXPORT_SYMBOL(ieee80211_rx_napi); - - /* This is a version of the rx handler that can be called from hard irq diff --git a/package/kernel/mac80211/patches/subsys/308-net-fq_impl-use-skb_get_hash-instead-of-skb_get_hash.patch b/package/kernel/mac80211/patches/subsys/308-net-fq_impl-use-skb_get_hash-instead-of-skb_get_hash.patch deleted file mode 100644 index 77ecc82302..0000000000 --- a/package/kernel/mac80211/patches/subsys/308-net-fq_impl-use-skb_get_hash-instead-of-skb_get_hash.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Felix Fietkau -Date: Sun, 26 Jul 2020 14:37:02 +0200 -Subject: [PATCH] net/fq_impl: use skb_get_hash instead of - skb_get_hash_perturb - -This avoids unnecessary regenerating of the skb flow hash - -Signed-off-by: Felix Fietkau ---- - ---- a/include/net/fq.h -+++ b/include/net/fq.h -@@ -69,15 +69,6 @@ struct fq { - struct list_head backlogs; - spinlock_t lock; - u32 flows_cnt; --#if LINUX_VERSION_IS_GEQ(5,3,10) || \ -- LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ -- LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ -- LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ -- LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) -- siphash_key_t perturbation; --#else -- u32 perturbation; --#endif - u32 limit; - u32 memory_limit; - u32 memory_usage; ---- a/include/net/fq_impl.h -+++ b/include/net/fq_impl.h -@@ -108,15 +108,7 @@ begin: - - static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb) - { --#if LINUX_VERSION_IS_GEQ(5,3,10) || \ -- LINUX_VERSION_IN_RANGE(4,19,83, 4,20,0) || \ -- LINUX_VERSION_IN_RANGE(4,14,153, 4,15,0) || \ -- LINUX_VERSION_IN_RANGE(4,9,200, 4,10,0) || \ -- LINUX_VERSION_IN_RANGE(4,4,200, 4,5,0) -- u32 hash = skb_get_hash_perturb(skb, &fq->perturbation); --#else -- u32 hash = skb_get_hash_perturb(skb, fq->perturbation); --#endif -+ u32 hash = skb_get_hash(skb); - - return reciprocal_scale(hash, fq->flows_cnt); - } -@@ -316,7 +308,6 @@ static int fq_init(struct fq *fq, int fl - INIT_LIST_HEAD(&fq->backlogs); - spin_lock_init(&fq->lock); - fq->flows_cnt = max_t(u32, flows_cnt, 1); -- get_random_bytes(&fq->perturbation, sizeof(fq->perturbation)); - fq->quantum = 300; - fq->limit = 8192; - fq->memory_limit = 16 << 20; /* 16 MBytes */ diff --git a/package/kernel/mac80211/patches/subsys/309-mac80211-calculcate-skb-hash-early-when-using-itxq.patch b/package/kernel/mac80211/patches/subsys/309-mac80211-calculcate-skb-hash-early-when-using-itxq.patch deleted file mode 100644 index 92b136279a..0000000000 --- a/package/kernel/mac80211/patches/subsys/309-mac80211-calculcate-skb-hash-early-when-using-itxq.patch +++ /dev/null @@ -1,19 +0,0 @@ -From: Felix Fietkau -Date: Sun, 26 Jul 2020 14:42:58 +0200 -Subject: [PATCH] mac80211: calculcate skb hash early when using itxq - -This avoids flow separation issues when using software encryption - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -3937,6 +3937,7 @@ void __ieee80211_subif_start_xmit(struct - if (local->ops->wake_tx_queue) { - u16 queue = __ieee80211_select_queue(sdata, sta, skb); - skb_set_queue_mapping(skb, queue); -+ skb_get_hash(skb); - } - - if (sta) { diff --git a/package/kernel/mac80211/patches/subsys/310-net-fq_impl-bulk-free-packets-from-a-flow-on-overmem.patch b/package/kernel/mac80211/patches/subsys/310-net-fq_impl-bulk-free-packets-from-a-flow-on-overmem.patch new file mode 100644 index 0000000000..05a888006e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/310-net-fq_impl-bulk-free-packets-from-a-flow-on-overmem.patch @@ -0,0 +1,95 @@ +From: Felix Fietkau +Date: Wed, 25 Nov 2020 18:03:46 +0100 +Subject: [PATCH] net/fq_impl: bulk-free packets from a flow on overmemory + +This is similar to what sch_fq_codel does. It also amortizes the worst +case cost of a follow-up patch that changes the selection of the biggest +flow for dropping packets + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/fq_impl.h ++++ b/include/net/fq_impl.h +@@ -11,17 +11,25 @@ + + /* functions that are embedded into includer */ + ++ ++static void ++__fq_adjust_removal(struct fq *fq, struct fq_flow *flow, unsigned int packets, ++ unsigned int bytes, unsigned int truesize) ++{ ++ struct fq_tin *tin = flow->tin; ++ ++ tin->backlog_bytes -= bytes; ++ tin->backlog_packets -= packets; ++ flow->backlog -= bytes; ++ fq->backlog -= packets; ++ fq->memory_usage -= truesize; ++} ++ + static void fq_adjust_removal(struct fq *fq, + struct fq_flow *flow, + struct sk_buff *skb) + { +- struct fq_tin *tin = flow->tin; +- +- tin->backlog_bytes -= skb->len; +- tin->backlog_packets--; +- flow->backlog -= skb->len; +- fq->backlog--; +- fq->memory_usage -= skb->truesize; ++ __fq_adjust_removal(fq, flow, 1, skb->len, skb->truesize); + } + + static void fq_rejigger_backlog(struct fq *fq, struct fq_flow *flow) +@@ -59,6 +67,34 @@ static struct sk_buff *fq_flow_dequeue(s + return skb; + } + ++static int fq_flow_drop(struct fq *fq, struct fq_flow *flow, ++ fq_skb_free_t free_func) ++{ ++ unsigned int packets = 0, bytes = 0, truesize = 0; ++ struct fq_tin *tin = flow->tin; ++ struct sk_buff *skb; ++ int pending; ++ ++ lockdep_assert_held(&fq->lock); ++ ++ pending = min_t(int, 32, skb_queue_len(&flow->queue) / 2); ++ do { ++ skb = __skb_dequeue(&flow->queue); ++ if (!skb) ++ break; ++ ++ packets++; ++ bytes += skb->len; ++ truesize += skb->truesize; ++ free_func(fq, tin, flow, skb); ++ } while (packets < pending); ++ ++ __fq_adjust_removal(fq, flow, packets, bytes, truesize); ++ fq_rejigger_backlog(fq, flow); ++ ++ return packets; ++} ++ + static struct sk_buff *fq_tin_dequeue(struct fq *fq, + struct fq_tin *tin, + fq_tin_dequeue_t dequeue_func) +@@ -190,12 +226,9 @@ static void fq_tin_enqueue(struct fq *fq + if (!flow) + return; + +- skb = fq_flow_dequeue(fq, flow); +- if (!skb) ++ if (!fq_flow_drop(fq, flow, free_func)) + return; + +- free_func(fq, flow->tin, flow, skb); +- + flow->tin->overlimit++; + fq->overlimit++; + if (oom) { diff --git a/package/kernel/mac80211/patches/subsys/311-mac80211-use-rate-provided-via-status-rate-on-ieee80.patch b/package/kernel/mac80211/patches/subsys/311-mac80211-use-rate-provided-via-status-rate-on-ieee80.patch deleted file mode 100644 index ee1db716e0..0000000000 --- a/package/kernel/mac80211/patches/subsys/311-mac80211-use-rate-provided-via-status-rate-on-ieee80.patch +++ /dev/null @@ -1,151 +0,0 @@ -From: Felix Fietkau -Date: Wed, 12 Aug 2020 17:04:22 +0200 -Subject: [PATCH] mac80211: use rate provided via status->rate on - ieee80211_tx_status_ext for AQL - -Since ieee80211_tx_info does not have enough room to encode HE rates, HE -drivers use status->rate to provide rate info. -Store it in struct sta_info and use it for AQL. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -487,14 +487,61 @@ u32 ieee80211_calc_rx_airtime(struct iee - } - EXPORT_SYMBOL_GPL(ieee80211_calc_rx_airtime); - -+static bool ieee80211_fill_rate_info(struct ieee80211_hw *hw, -+ struct ieee80211_rx_status *stat, u8 band, -+ struct rate_info *ri) -+{ -+ struct ieee80211_supported_band *sband = hw->wiphy->bands[band]; -+ int i; -+ -+ if (!ri || !sband) -+ return false; -+ -+ stat->bw = ri->bw; -+ stat->nss = ri->nss; -+ stat->rate_idx = ri->mcs; -+ -+ if (ri->flags & RATE_INFO_FLAGS_HE_MCS) -+ stat->encoding = RX_ENC_HE; -+ else if (ri->flags & RATE_INFO_FLAGS_VHT_MCS) -+ stat->encoding = RX_ENC_VHT; -+ else if (ri->flags & RATE_INFO_FLAGS_MCS) -+ stat->encoding = RX_ENC_HT; -+ else -+ stat->encoding = RX_ENC_LEGACY; -+ -+ if (ri->flags & RATE_INFO_FLAGS_SHORT_GI) -+ stat->enc_flags |= RX_ENC_FLAG_SHORT_GI; -+ -+ stat->he_gi = ri->he_gi; -+ -+ if (stat->encoding != RX_ENC_LEGACY) -+ return true; -+ -+ stat->rate_idx = 0; -+ for (i = 0; i < sband->n_bitrates; i++) { -+ if (ri->legacy != sband->bitrates[i].bitrate) -+ continue; -+ -+ stat->rate_idx = i; -+ return true; -+ } -+ -+ return false; -+} -+ - static u32 ieee80211_calc_tx_airtime_rate(struct ieee80211_hw *hw, - struct ieee80211_tx_rate *rate, -+ struct rate_info *ri, - u8 band, int len) - { - struct ieee80211_rx_status stat = { - .band = band, - }; - -+ if (ieee80211_fill_rate_info(hw, &stat, band, ri)) -+ goto out; -+ - if (rate->idx < 0 || !rate->count) - return 0; - -@@ -522,6 +569,7 @@ static u32 ieee80211_calc_tx_airtime_rat - stat.encoding = RX_ENC_LEGACY; - } - -+out: - return ieee80211_calc_rx_airtime(hw, &stat, len); - } - -@@ -536,7 +584,7 @@ u32 ieee80211_calc_tx_airtime(struct iee - struct ieee80211_tx_rate *rate = &info->status.rates[i]; - u32 cur_duration; - -- cur_duration = ieee80211_calc_tx_airtime_rate(hw, rate, -+ cur_duration = ieee80211_calc_tx_airtime_rate(hw, rate, NULL, - info->band, len); - if (!cur_duration) - break; -@@ -573,6 +621,7 @@ u32 ieee80211_calc_expected_tx_airtime(s - struct sta_info *sta = container_of(pubsta, struct sta_info, - sta); - struct ieee80211_tx_rate *rate = &sta->tx_stats.last_rate; -+ struct rate_info *ri = &sta->tx_stats.last_rate_info; - u32 airtime; - - if (!(rate->flags & (IEEE80211_TX_RC_VHT_MCS | -@@ -586,7 +635,7 @@ u32 ieee80211_calc_expected_tx_airtime(s - * This will not be very accurate, but much better than simply - * assuming un-aggregated tx. - */ -- airtime = ieee80211_calc_tx_airtime_rate(hw, rate, band, -+ airtime = ieee80211_calc_tx_airtime_rate(hw, rate, ri, band, - ampdu ? len * 16 : len); - if (ampdu) - airtime /= 16; ---- a/net/mac80211/sta_info.h -+++ b/net/mac80211/sta_info.h -@@ -609,6 +609,7 @@ struct sta_info { - u64 packets[IEEE80211_NUM_ACS]; - u64 bytes[IEEE80211_NUM_ACS]; - struct ieee80211_tx_rate last_rate; -+ struct rate_info last_rate_info; - u64 msdu[IEEE80211_NUM_TIDS + 1]; - } tx_stats; - u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -1147,9 +1147,17 @@ void ieee80211_tx_status_ext(struct ieee - struct ieee80211_tx_info *info = status->info; - struct ieee80211_sta *pubsta = status->sta; - struct ieee80211_supported_band *sband; -+ struct sta_info *sta; - int retry_count; - bool acked, noack_success; - -+ if (pubsta) { -+ sta = container_of(pubsta, struct sta_info, sta); -+ -+ if (status->rate) -+ sta->tx_stats.last_rate_info = *status->rate; -+ } -+ - if (status->skb) - return __ieee80211_tx_status(hw, status); - -@@ -1164,10 +1172,6 @@ void ieee80211_tx_status_ext(struct ieee - noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); - - if (pubsta) { -- struct sta_info *sta; -- -- sta = container_of(pubsta, struct sta_info, sta); -- - if (!acked && !noack_success) - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; diff --git a/package/kernel/mac80211/patches/subsys/311-net-fq_impl-drop-get_default_func-move-default-flow-.patch b/package/kernel/mac80211/patches/subsys/311-net-fq_impl-drop-get_default_func-move-default-flow-.patch new file mode 100644 index 0000000000..de1f1bb7f5 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/311-net-fq_impl-drop-get_default_func-move-default-flow-.patch @@ -0,0 +1,144 @@ +From: Felix Fietkau +Date: Wed, 25 Nov 2020 18:09:10 +0100 +Subject: [PATCH] net/fq_impl: drop get_default_func, move default flow to + fq_tin + +Simplifies the code and prepares for a rework of scanning for flows on +overmemory drop. + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/fq.h ++++ b/include/net/fq.h +@@ -47,6 +47,7 @@ struct fq_flow { + struct fq_tin { + struct list_head new_flows; + struct list_head old_flows; ++ struct fq_flow default_flow; + u32 backlog_bytes; + u32 backlog_packets; + u32 overlimit; +--- a/include/net/fq_impl.h ++++ b/include/net/fq_impl.h +@@ -151,8 +151,7 @@ static u32 fq_flow_idx(struct fq *fq, st + + static struct fq_flow *fq_flow_classify(struct fq *fq, + struct fq_tin *tin, u32 idx, +- struct sk_buff *skb, +- fq_flow_get_default_t get_default_func) ++ struct sk_buff *skb) + { + struct fq_flow *flow; + +@@ -160,7 +159,7 @@ static struct fq_flow *fq_flow_classify( + + flow = &fq->flows[idx]; + if (flow->tin && flow->tin != tin) { +- flow = get_default_func(fq, tin, idx, skb); ++ flow = &tin->default_flow; + tin->collisions++; + fq->collisions++; + } +@@ -192,15 +191,14 @@ static void fq_recalc_backlog(struct fq + static void fq_tin_enqueue(struct fq *fq, + struct fq_tin *tin, u32 idx, + struct sk_buff *skb, +- fq_skb_free_t free_func, +- fq_flow_get_default_t get_default_func) ++ fq_skb_free_t free_func) + { + struct fq_flow *flow; + bool oom; + + lockdep_assert_held(&fq->lock); + +- flow = fq_flow_classify(fq, tin, idx, skb, get_default_func); ++ flow = fq_flow_classify(fq, tin, idx, skb); + + flow->tin = tin; + flow->backlog += skb->len; +@@ -331,6 +329,7 @@ static void fq_tin_init(struct fq_tin *t + { + INIT_LIST_HEAD(&tin->new_flows); + INIT_LIST_HEAD(&tin->old_flows); ++ fq_flow_init(&tin->default_flow); + } + + static int fq_init(struct fq *fq, int flows_cnt) +--- a/net/mac80211/ieee80211_i.h ++++ b/net/mac80211/ieee80211_i.h +@@ -855,7 +855,6 @@ enum txq_info_flags { + */ + struct txq_info { + struct fq_tin tin; +- struct fq_flow def_flow; + struct codel_vars def_cvars; + struct codel_stats cstats; + struct sk_buff_head frags; +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -1322,7 +1322,7 @@ static struct sk_buff *codel_dequeue_fun + fq = &local->fq; + + if (cvars == &txqi->def_cvars) +- flow = &txqi->def_flow; ++ flow = &txqi->tin.default_flow; + else + flow = &fq->flows[cvars - local->cvars]; + +@@ -1365,7 +1365,7 @@ static struct sk_buff *fq_tin_dequeue_fu + cparams = &local->cparams; + } + +- if (flow == &txqi->def_flow) ++ if (flow == &tin->default_flow) + cvars = &txqi->def_cvars; + else + cvars = &local->cvars[flow - fq->flows]; +@@ -1392,17 +1392,6 @@ static void fq_skb_free_func(struct fq * + ieee80211_free_txskb(&local->hw, skb); + } + +-static struct fq_flow *fq_flow_get_default_func(struct fq *fq, +- struct fq_tin *tin, +- int idx, +- struct sk_buff *skb) +-{ +- struct txq_info *txqi; +- +- txqi = container_of(tin, struct txq_info, tin); +- return &txqi->def_flow; +-} +- + static void ieee80211_txq_enqueue(struct ieee80211_local *local, + struct txq_info *txqi, + struct sk_buff *skb) +@@ -1415,8 +1404,7 @@ static void ieee80211_txq_enqueue(struct + + spin_lock_bh(&fq->lock); + fq_tin_enqueue(fq, tin, flow_idx, skb, +- fq_skb_free_func, +- fq_flow_get_default_func); ++ fq_skb_free_func); + spin_unlock_bh(&fq->lock); + } + +@@ -1459,7 +1447,6 @@ void ieee80211_txq_init(struct ieee80211 + struct txq_info *txqi, int tid) + { + fq_tin_init(&txqi->tin); +- fq_flow_init(&txqi->def_flow); + codel_vars_init(&txqi->def_cvars); + codel_stats_init(&txqi->cstats); + __skb_queue_head_init(&txqi->frags); +@@ -3310,8 +3297,7 @@ static bool ieee80211_amsdu_aggregate(st + */ + + tin = &txqi->tin; +- flow = fq_flow_classify(fq, tin, flow_idx, skb, +- fq_flow_get_default_func); ++ flow = fq_flow_classify(fq, tin, flow_idx, skb); + head = skb_peek_tail(&flow->queue); + if (!head || skb_is_gso(head)) + goto out; diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch b/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch deleted file mode 100644 index 06db852c30..0000000000 --- a/package/kernel/mac80211/patches/subsys/312-mac80211-factor-out-code-to-look-up-the-average-pack.patch +++ /dev/null @@ -1,187 +0,0 @@ -From: Felix Fietkau -Date: Wed, 12 Aug 2020 17:06:12 +0200 -Subject: [PATCH] mac80211: factor out code to look up the average packet - length duration for a rate - -This will be used to enhance AQL estimated aggregation length - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -405,18 +405,14 @@ ieee80211_calc_legacy_rate_duration(u16 - return duration; - } - --u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw, -- struct ieee80211_rx_status *status, -- int len) -+static u32 ieee80211_get_rate_duration(struct ieee80211_hw *hw, -+ struct ieee80211_rx_status *status, -+ u32 *overhead) - { -- struct ieee80211_supported_band *sband; -- const struct ieee80211_rate *rate; - bool sgi = status->enc_flags & RX_ENC_FLAG_SHORT_GI; -- bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE; - int bw, streams; - int group, idx; - u32 duration; -- bool cck; - - switch (status->bw) { - case RATE_INFO_BW_20: -@@ -437,20 +433,6 @@ u32 ieee80211_calc_rx_airtime(struct iee - } - - switch (status->encoding) { -- case RX_ENC_LEGACY: -- if (WARN_ON_ONCE(status->band > NL80211_BAND_5GHZ)) -- return 0; -- -- sband = hw->wiphy->bands[status->band]; -- if (!sband || status->rate_idx >= sband->n_bitrates) -- return 0; -- -- rate = &sband->bitrates[status->rate_idx]; -- cck = rate->flags & IEEE80211_RATE_MANDATORY_B; -- -- return ieee80211_calc_legacy_rate_duration(rate->bitrate, sp, -- cck, len); -- - case RX_ENC_VHT: - streams = status->nss; - idx = status->rate_idx; -@@ -477,13 +459,47 @@ u32 ieee80211_calc_rx_airtime(struct iee - - duration = airtime_mcs_groups[group].duration[idx]; - duration <<= airtime_mcs_groups[group].shift; -+ *overhead = 36 + (streams << 2); -+ -+ return duration; -+} -+ -+ -+u32 ieee80211_calc_rx_airtime(struct ieee80211_hw *hw, -+ struct ieee80211_rx_status *status, -+ int len) -+{ -+ struct ieee80211_supported_band *sband; -+ u32 duration, overhead = 0; -+ -+ if (status->encoding == RX_ENC_LEGACY) { -+ const struct ieee80211_rate *rate; -+ bool sp = status->enc_flags & RX_ENC_FLAG_SHORTPRE; -+ bool cck; -+ -+ if (WARN_ON_ONCE(status->band > NL80211_BAND_5GHZ)) -+ return 0; -+ -+ sband = hw->wiphy->bands[status->band]; -+ if (!sband || status->rate_idx >= sband->n_bitrates) -+ return 0; -+ -+ rate = &sband->bitrates[status->rate_idx]; -+ cck = rate->flags & IEEE80211_RATE_MANDATORY_B; -+ -+ return ieee80211_calc_legacy_rate_duration(rate->bitrate, sp, -+ cck, len); -+ } -+ -+ duration = ieee80211_get_rate_duration(hw, status, &overhead); -+ if (!duration) -+ return 0; -+ - duration *= len; - duration /= AVG_PKT_SIZE; - duration /= 1024; - -- duration += 36 + (streams << 2); -- -- return duration; -+ return duration + overhead; - } - EXPORT_SYMBOL_GPL(ieee80211_calc_rx_airtime); - -@@ -530,46 +546,57 @@ static bool ieee80211_fill_rate_info(str - return false; - } - --static u32 ieee80211_calc_tx_airtime_rate(struct ieee80211_hw *hw, -- struct ieee80211_tx_rate *rate, -- struct rate_info *ri, -- u8 band, int len) -+static int ieee80211_fill_rx_status(struct ieee80211_rx_status *stat, -+ struct ieee80211_hw *hw, -+ struct ieee80211_tx_rate *rate, -+ struct rate_info *ri, u8 band, int len) - { -- struct ieee80211_rx_status stat = { -- .band = band, -- }; -+ memset(stat, 0, sizeof(*stat)); -+ stat->band = band; - -- if (ieee80211_fill_rate_info(hw, &stat, band, ri)) -- goto out; -+ if (ieee80211_fill_rate_info(hw, stat, band, ri)) -+ return 0; - - if (rate->idx < 0 || !rate->count) -- return 0; -+ return -1; - - if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH) -- stat.bw = RATE_INFO_BW_80; -+ stat->bw = RATE_INFO_BW_80; - else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) -- stat.bw = RATE_INFO_BW_40; -+ stat->bw = RATE_INFO_BW_40; - else -- stat.bw = RATE_INFO_BW_20; -+ stat->bw = RATE_INFO_BW_20; - -- stat.enc_flags = 0; -+ stat->enc_flags = 0; - if (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE) -- stat.enc_flags |= RX_ENC_FLAG_SHORTPRE; -+ stat->enc_flags |= RX_ENC_FLAG_SHORTPRE; - if (rate->flags & IEEE80211_TX_RC_SHORT_GI) -- stat.enc_flags |= RX_ENC_FLAG_SHORT_GI; -+ stat->enc_flags |= RX_ENC_FLAG_SHORT_GI; - -- stat.rate_idx = rate->idx; -+ stat->rate_idx = rate->idx; - if (rate->flags & IEEE80211_TX_RC_VHT_MCS) { -- stat.encoding = RX_ENC_VHT; -- stat.rate_idx = ieee80211_rate_get_vht_mcs(rate); -- stat.nss = ieee80211_rate_get_vht_nss(rate); -+ stat->encoding = RX_ENC_VHT; -+ stat->rate_idx = ieee80211_rate_get_vht_mcs(rate); -+ stat->nss = ieee80211_rate_get_vht_nss(rate); - } else if (rate->flags & IEEE80211_TX_RC_MCS) { -- stat.encoding = RX_ENC_HT; -+ stat->encoding = RX_ENC_HT; - } else { -- stat.encoding = RX_ENC_LEGACY; -+ stat->encoding = RX_ENC_LEGACY; - } - --out: -+ return 0; -+} -+ -+static u32 ieee80211_calc_tx_airtime_rate(struct ieee80211_hw *hw, -+ struct ieee80211_tx_rate *rate, -+ struct rate_info *ri, -+ u8 band, int len) -+{ -+ struct ieee80211_rx_status stat; -+ -+ if (ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len)) -+ return 0; -+ - return ieee80211_calc_rx_airtime(hw, &stat, len); - } - diff --git a/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch b/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch new file mode 100644 index 0000000000..0e923991db --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/312-net-fq_impl-do-not-maintain-a-backlog-sorted-list-of.patch @@ -0,0 +1,314 @@ +From: Felix Fietkau +Date: Wed, 25 Nov 2020 18:10:34 +0100 +Subject: [PATCH] net/fq_impl: do not maintain a backlog-sorted list of + flows + +A sorted flow list is only needed to drop packets in the biggest flow when +hitting the overmemory condition. +By scanning flows only when needed, we can avoid paying the cost of +maintaining the list under normal conditions +In order to avoid scanning lots of empty flows and touching too many cold +cache lines, a bitmap of flows with backlog is maintained + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/fq.h ++++ b/include/net/fq.h +@@ -19,8 +19,6 @@ struct fq_tin; + * @flowchain: can be linked to fq_tin's new_flows or old_flows. Used for DRR++ + * (deficit round robin) based round robin queuing similar to the one + * found in net/sched/sch_fq_codel.c +- * @backlogchain: can be linked to other fq_flow and fq. Used to keep track of +- * fat flows and efficient head-dropping if packet limit is reached + * @queue: sk_buff queue to hold packets + * @backlog: number of bytes pending in the queue. The number of packets can be + * found in @queue.qlen +@@ -29,7 +27,6 @@ struct fq_tin; + struct fq_flow { + struct fq_tin *tin; + struct list_head flowchain; +- struct list_head backlogchain; + struct sk_buff_head queue; + u32 backlog; + int deficit; +@@ -47,6 +44,7 @@ struct fq_flow { + struct fq_tin { + struct list_head new_flows; + struct list_head old_flows; ++ struct list_head tin_list; + struct fq_flow default_flow; + u32 backlog_bytes; + u32 backlog_packets; +@@ -60,14 +58,14 @@ struct fq_tin { + /** + * struct fq - main container for fair queuing purposes + * +- * @backlogs: linked to fq_flows. Used to maintain fat flows for efficient +- * head-dropping when @backlog reaches @limit + * @limit: max number of packets that can be queued across all flows + * @backlog: number of packets queued across all flows + */ + struct fq { + struct fq_flow *flows; +- struct list_head backlogs; ++ unsigned long *flows_bitmap; ++ ++ struct list_head tin_backlog; + spinlock_t lock; + u32 flows_cnt; + u32 limit; +--- a/include/net/fq_impl.h ++++ b/include/net/fq_impl.h +@@ -17,12 +17,24 @@ __fq_adjust_removal(struct fq *fq, struc + unsigned int bytes, unsigned int truesize) + { + struct fq_tin *tin = flow->tin; ++ int idx; + + tin->backlog_bytes -= bytes; + tin->backlog_packets -= packets; + flow->backlog -= bytes; + fq->backlog -= packets; + fq->memory_usage -= truesize; ++ ++ if (flow->backlog) ++ return; ++ ++ if (flow == &tin->default_flow) { ++ list_del_init(&tin->tin_list); ++ return; ++ } ++ ++ idx = flow - fq->flows; ++ __clear_bit(idx, fq->flows_bitmap); + } + + static void fq_adjust_removal(struct fq *fq, +@@ -32,24 +44,6 @@ static void fq_adjust_removal(struct fq + __fq_adjust_removal(fq, flow, 1, skb->len, skb->truesize); + } + +-static void fq_rejigger_backlog(struct fq *fq, struct fq_flow *flow) +-{ +- struct fq_flow *i; +- +- if (flow->backlog == 0) { +- list_del_init(&flow->backlogchain); +- } else { +- i = flow; +- +- list_for_each_entry_continue(i, &fq->backlogs, backlogchain) +- if (i->backlog < flow->backlog) +- break; +- +- list_move_tail(&flow->backlogchain, +- &i->backlogchain); +- } +-} +- + static struct sk_buff *fq_flow_dequeue(struct fq *fq, + struct fq_flow *flow) + { +@@ -62,7 +56,6 @@ static struct sk_buff *fq_flow_dequeue(s + return NULL; + + fq_adjust_removal(fq, flow, skb); +- fq_rejigger_backlog(fq, flow); + + return skb; + } +@@ -90,7 +83,6 @@ static int fq_flow_drop(struct fq *fq, s + } while (packets < pending); + + __fq_adjust_removal(fq, flow, packets, bytes, truesize); +- fq_rejigger_backlog(fq, flow); + + return packets; + } +@@ -170,22 +162,36 @@ static struct fq_flow *fq_flow_classify( + return flow; + } + +-static void fq_recalc_backlog(struct fq *fq, +- struct fq_tin *tin, +- struct fq_flow *flow) ++static struct fq_flow *fq_find_fattest_flow(struct fq *fq) + { +- struct fq_flow *i; ++ struct fq_tin *tin; ++ struct fq_flow *flow = NULL; ++ u32 len = 0; ++ int i; + +- if (list_empty(&flow->backlogchain)) +- list_add_tail(&flow->backlogchain, &fq->backlogs); ++ for_each_set_bit(i, fq->flows_bitmap, fq->flows_cnt) { ++ struct fq_flow *cur = &fq->flows[i]; ++ unsigned int cur_len; + +- i = flow; +- list_for_each_entry_continue_reverse(i, &fq->backlogs, +- backlogchain) +- if (i->backlog > flow->backlog) +- break; ++ cur_len = cur->backlog; ++ if (cur_len <= len) ++ continue; + +- list_move(&flow->backlogchain, &i->backlogchain); ++ flow = cur; ++ len = cur_len; ++ } ++ ++ list_for_each_entry(tin, &fq->tin_backlog, tin_list) { ++ unsigned int cur_len = tin->default_flow.backlog; ++ ++ if (cur_len <= len) ++ continue; ++ ++ flow = &tin->default_flow; ++ len = cur_len; ++ } ++ ++ return flow; + } + + static void fq_tin_enqueue(struct fq *fq, +@@ -200,6 +206,13 @@ static void fq_tin_enqueue(struct fq *fq + + flow = fq_flow_classify(fq, tin, idx, skb); + ++ if (!flow->backlog) { ++ if (flow != &tin->default_flow) ++ __set_bit(idx, fq->flows_bitmap); ++ else if (list_empty(&tin->tin_list)) ++ list_add(&tin->tin_list, &fq->tin_backlog); ++ } ++ + flow->tin = tin; + flow->backlog += skb->len; + tin->backlog_bytes += skb->len; +@@ -207,8 +220,6 @@ static void fq_tin_enqueue(struct fq *fq + fq->memory_usage += skb->truesize; + fq->backlog++; + +- fq_recalc_backlog(fq, tin, flow); +- + if (list_empty(&flow->flowchain)) { + flow->deficit = fq->quantum; + list_add_tail(&flow->flowchain, +@@ -218,9 +229,7 @@ static void fq_tin_enqueue(struct fq *fq + __skb_queue_tail(&flow->queue, skb); + oom = (fq->memory_usage > fq->memory_limit); + while (fq->backlog > fq->limit || oom) { +- flow = list_first_entry_or_null(&fq->backlogs, +- struct fq_flow, +- backlogchain); ++ flow = fq_find_fattest_flow(fq); + if (!flow) + return; + +@@ -255,8 +264,6 @@ static void fq_flow_filter(struct fq *fq + fq_adjust_removal(fq, flow, skb); + free_func(fq, tin, flow, skb); + } +- +- fq_rejigger_backlog(fq, flow); + } + + static void fq_tin_filter(struct fq *fq, +@@ -279,16 +286,18 @@ static void fq_flow_reset(struct fq *fq, + struct fq_flow *flow, + fq_skb_free_t free_func) + { ++ struct fq_tin *tin = flow->tin; + struct sk_buff *skb; + + while ((skb = fq_flow_dequeue(fq, flow))) +- free_func(fq, flow->tin, flow, skb); ++ free_func(fq, tin, flow, skb); + +- if (!list_empty(&flow->flowchain)) ++ if (!list_empty(&flow->flowchain)) { + list_del_init(&flow->flowchain); +- +- if (!list_empty(&flow->backlogchain)) +- list_del_init(&flow->backlogchain); ++ if (list_empty(&tin->new_flows) && ++ list_empty(&tin->old_flows)) ++ list_del_init(&tin->tin_list); ++ } + + flow->tin = NULL; + +@@ -314,6 +323,7 @@ static void fq_tin_reset(struct fq *fq, + fq_flow_reset(fq, flow, free_func); + } + ++ WARN_ON_ONCE(!list_empty(&tin->tin_list)); + WARN_ON_ONCE(tin->backlog_bytes); + WARN_ON_ONCE(tin->backlog_packets); + } +@@ -321,7 +331,6 @@ static void fq_tin_reset(struct fq *fq, + static void fq_flow_init(struct fq_flow *flow) + { + INIT_LIST_HEAD(&flow->flowchain); +- INIT_LIST_HEAD(&flow->backlogchain); + __skb_queue_head_init(&flow->queue); + } + +@@ -329,6 +338,7 @@ static void fq_tin_init(struct fq_tin *t + { + INIT_LIST_HEAD(&tin->new_flows); + INIT_LIST_HEAD(&tin->old_flows); ++ INIT_LIST_HEAD(&tin->tin_list); + fq_flow_init(&tin->default_flow); + } + +@@ -337,8 +347,8 @@ static int fq_init(struct fq *fq, int fl + int i; + + memset(fq, 0, sizeof(fq[0])); +- INIT_LIST_HEAD(&fq->backlogs); + spin_lock_init(&fq->lock); ++ INIT_LIST_HEAD(&fq->tin_backlog); + fq->flows_cnt = max_t(u32, flows_cnt, 1); + fq->quantum = 300; + fq->limit = 8192; +@@ -348,6 +358,14 @@ static int fq_init(struct fq *fq, int fl + if (!fq->flows) + return -ENOMEM; + ++ fq->flows_bitmap = kcalloc(BITS_TO_LONGS(fq->flows_cnt), sizeof(long), ++ GFP_KERNEL); ++ if (!fq->flows_bitmap) { ++ kvfree(fq->flows); ++ fq->flows = NULL; ++ return -ENOMEM; ++ } ++ + for (i = 0; i < fq->flows_cnt; i++) + fq_flow_init(&fq->flows[i]); + +@@ -364,6 +382,9 @@ static void fq_reset(struct fq *fq, + + kvfree(fq->flows); + fq->flows = NULL; ++ ++ kfree(fq->flows_bitmap); ++ fq->flows_bitmap = NULL; + } + + #endif +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -3364,8 +3364,6 @@ out_recalc: + if (head->len != orig_len) { + flow->backlog += head->len - orig_len; + tin->backlog_bytes += head->len - orig_len; +- +- fq_recalc_backlog(fq, tin, flow); + } + out: + spin_unlock_bh(&fq->lock); diff --git a/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch b/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch new file mode 100644 index 0000000000..5ae9ca8b93 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/313-mac80211-fix-encryption-key-selection-for-802.3-xmit.patch @@ -0,0 +1,53 @@ +From: Felix Fietkau +Date: Wed, 16 Dec 2020 21:23:24 +0100 +Subject: [PATCH] mac80211: fix encryption key selection for 802.3 xmit + +When using WEP, the default unicast key needs to be selected, instead of +the STA PTK. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -4262,7 +4262,6 @@ netdev_tx_t ieee80211_subif_start_xmit_8 + struct ethhdr *ehdr = (struct ethhdr *)skb->data; + struct ieee80211_key *key; + struct sta_info *sta; +- bool offload = true; + + if (unlikely(skb->len < ETH_HLEN)) { + kfree_skb(skb); +@@ -4278,18 +4277,22 @@ netdev_tx_t ieee80211_subif_start_xmit_8 + + if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || + !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || +- sdata->control_port_protocol == ehdr->h_proto)) +- offload = false; +- else if ((key = rcu_dereference(sta->ptk[sta->ptk_idx])) && +- (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) || +- key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)) +- offload = false; ++ sdata->control_port_protocol == ehdr->h_proto)) ++ goto skip_offload; + +- if (offload) +- ieee80211_8023_xmit(sdata, dev, sta, key, skb); +- else +- ieee80211_subif_start_xmit(skb, dev); ++ key = rcu_dereference(sta->ptk[sta->ptk_idx]); ++ if (!key) ++ key = rcu_dereference(sdata->default_unicast_key); ++ ++ if (key && (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) || ++ key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)) ++ goto skip_offload; ++ ++ ieee80211_8023_xmit(sdata, dev, sta, key, skb); ++ goto out; + ++skip_offload: ++ ieee80211_subif_start_xmit(skb, dev); + out: + rcu_read_unlock(); + diff --git a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch b/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch deleted file mode 100644 index a5df07e58d..0000000000 --- a/package/kernel/mac80211/patches/subsys/313-mac80211-improve-AQL-aggregation-estimation-for-low-.patch +++ /dev/null @@ -1,67 +0,0 @@ -From: Felix Fietkau -Date: Wed, 12 Aug 2020 17:07:10 +0200 -Subject: [PATCH] mac80211: improve AQL aggregation estimation for low data - rates - -Links with low data rates use much smaller aggregates and are much more -sensitive to latency added by bufferbloat. -Tune the assumed aggregation length based on the tx rate duration. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -647,27 +647,41 @@ u32 ieee80211_calc_expected_tx_airtime(s - if (pubsta) { - struct sta_info *sta = container_of(pubsta, struct sta_info, - sta); -+ struct ieee80211_rx_status stat; - struct ieee80211_tx_rate *rate = &sta->tx_stats.last_rate; - struct rate_info *ri = &sta->tx_stats.last_rate_info; -- u32 airtime; -+ u32 duration, overhead; -+ u8 agg_shift; - -- if (!(rate->flags & (IEEE80211_TX_RC_VHT_MCS | -- IEEE80211_TX_RC_MCS))) -- ampdu = false; -+ if (ieee80211_fill_rx_status(&stat, hw, rate, ri, band, len)) -+ return 0; - -+ if (stat.encoding == RX_ENC_LEGACY || !ampdu) -+ return ieee80211_calc_rx_airtime(hw, &stat, len); -+ -+ duration = ieee80211_get_rate_duration(hw, &stat, &overhead); - /* - * Assume that HT/VHT transmission on any AC except VO will - * use aggregation. Since we don't have reliable reporting -- * of aggregation length, assume an average of 16. -+ * of aggregation length, assume an average size based on the -+ * tx rate. - * This will not be very accurate, but much better than simply -- * assuming un-aggregated tx. -+ * assuming un-aggregated tx in all cases. - */ -- airtime = ieee80211_calc_tx_airtime_rate(hw, rate, ri, band, -- ampdu ? len * 16 : len); -- if (ampdu) -- airtime /= 16; -+ if (duration > 400) /* <= VHT20 MCS2 1S */ -+ agg_shift = 1; -+ else if (duration > 250) /* <= VHT20 MCS3 1S or MCS1 2S */ -+ agg_shift = 2; -+ else if (duration > 150) /* <= VHT20 MCS5 1S or MCS3 2S */ -+ agg_shift = 3; -+ else -+ agg_shift = 4; -+ -+ duration *= len; -+ duration /= AVG_PKT_SIZE; -+ duration /= 1024; - -- return airtime; -+ return duration + (overhead >> agg_shift); - } - - if (!conf) diff --git a/package/kernel/mac80211/patches/subsys/314-mac80211-add-missing-queue-hash-initialization-to-80.patch b/package/kernel/mac80211/patches/subsys/314-mac80211-add-missing-queue-hash-initialization-to-80.patch deleted file mode 100644 index eb56a2cac5..0000000000 --- a/package/kernel/mac80211/patches/subsys/314-mac80211-add-missing-queue-hash-initialization-to-80.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:55:56 +0200 -Subject: [PATCH] mac80211: add missing queue/hash initialization to - 802.3 xmit - -Fixes AQL for encap-offloaded tx - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4200,6 +4200,12 @@ static void ieee80211_8023_xmit(struct i - if (is_zero_ether_addr(ra)) - goto out_free; - -+ if (local->ops->wake_tx_queue) { -+ u16 queue = __ieee80211_select_queue(sdata, sta, skb); -+ skb_set_queue_mapping(skb, queue); -+ skb_get_hash(skb); -+ } -+ - multicast = is_multicast_ether_addr(ra); - - if (sta) diff --git a/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch b/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch new file mode 100644 index 0000000000..679960b83c --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/314-mac80211-fix-fast-rx-encryption-check.patch @@ -0,0 +1,21 @@ +From: Felix Fietkau +Date: Wed, 16 Dec 2020 21:24:19 +0100 +Subject: [PATCH] mac80211: fix fast-rx encryption check + +When using WEP, the default unicast key needs to be selected, instead of +the STA PTK. + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -4195,6 +4195,8 @@ void ieee80211_check_fast_rx(struct sta_ + + rcu_read_lock(); + key = rcu_dereference(sta->ptk[sta->ptk_idx]); ++ if (!key) ++ key = rcu_dereference(sdata->default_unicast_key); + if (key) { + switch (key->conf.cipher) { + case WLAN_CIPHER_SUITE_TKIP: diff --git a/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch b/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch new file mode 100644 index 0000000000..6f7c7bd74a --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/315-mac80211-add-rx-decapsulation-offload-support.patch @@ -0,0 +1,570 @@ +From: Felix Fietkau +Date: Wed, 16 Dec 2020 21:34:03 +0100 +Subject: [PATCH] mac80211: add rx decapsulation offload support + +This allows drivers to pass 802.3 frames to mac80211, with some restrictions: + +- the skb must be passed with a valid sta +- fast-rx needs to be active for the sta +- monitor mode needs to be disabled + +mac80211 will tell the driver when it is safe to enable rx decap offload for +a particular station. + +In order to implement support, a driver must: + +- call ieee80211_hw_set(hw, SUPPORTS_RX_DECAP_OFFLOAD) +- implement ops->sta_set_decap_offload +- mark 802.3 frames with RX_FLAG_8023 + +If it doesn't want to enable offload for some vif types, it can mask out +IEEE80211_OFFLOAD_DECAP_ENABLED in vif->offload_flags from within the +.add_interface or .update_vif_offload driver ops + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/mac80211.h ++++ b/include/net/mac80211.h +@@ -1297,6 +1297,8 @@ ieee80211_tx_info_clear_status(struct ie + * the "0-length PSDU" field included there. The value for it is + * in &struct ieee80211_rx_status. Note that if this value isn't + * known the frame shouldn't be reported. ++ * @RX_FLAG_8023: the frame has an 802.3 header (decap offload performed by ++ * hardware or driver) + */ + enum mac80211_rx_flags { + RX_FLAG_MMIC_ERROR = BIT(0), +@@ -1329,6 +1331,7 @@ enum mac80211_rx_flags { + RX_FLAG_RADIOTAP_HE_MU = BIT(27), + RX_FLAG_RADIOTAP_LSIG = BIT(28), + RX_FLAG_NO_PSDU = BIT(29), ++ RX_FLAG_8023 = BIT(30), + }; + + /** +@@ -1650,11 +1653,15 @@ enum ieee80211_vif_flags { + * The driver supports sending frames passed as 802.3 frames by mac80211. + * It must also support sending 802.11 packets for the same interface. + * @IEEE80211_OFFLOAD_ENCAP_4ADDR: support 4-address mode encapsulation offload ++ * @IEEE80211_OFFLOAD_DECAP_ENABLED: rx encapsulation offload is enabled ++ * The driver supports passing received 802.11 frames as 802.3 frames to ++ * mac80211. + */ + + enum ieee80211_offload_flags { + IEEE80211_OFFLOAD_ENCAP_ENABLED = BIT(0), + IEEE80211_OFFLOAD_ENCAP_4ADDR = BIT(1), ++ IEEE80211_OFFLOAD_DECAP_ENABLED = BIT(2), + }; + + /** +@@ -2390,6 +2397,9 @@ struct ieee80211_txq { + * @IEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD: Hardware supports tx encapsulation + * offload + * ++ * @IEEE80211_HW_SUPPORTS_RX_DECAP_OFFLOAD: Hardware supports rx decapsulation ++ * offload ++ * + * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays + */ + enum ieee80211_hw_flags { +@@ -2443,6 +2453,7 @@ enum ieee80211_hw_flags { + IEEE80211_HW_SUPPORTS_ONLY_HE_MULTI_BSSID, + IEEE80211_HW_AMPDU_KEYBORDER_SUPPORT, + IEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD, ++ IEEE80211_HW_SUPPORTS_RX_DECAP_OFFLOAD, + + /* keep last, obviously */ + NUM_IEEE80211_HW_FLAGS +@@ -4196,6 +4207,9 @@ struct ieee80211_ops { + struct ieee80211_vif *vif); + void (*sta_set_4addr)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, + struct ieee80211_sta *sta, bool enabled); ++ void (*sta_set_decap_offload)(struct ieee80211_hw *hw, ++ struct ieee80211_vif *vif, ++ struct ieee80211_sta *sta, bool enabled); + }; + + /** +--- a/net/mac80211/debugfs.c ++++ b/net/mac80211/debugfs.c +@@ -409,6 +409,7 @@ static const char *hw_flag_names[] = { + FLAG(SUPPORTS_ONLY_HE_MULTI_BSSID), + FLAG(AMPDU_KEYBORDER_SUPPORT), + FLAG(SUPPORTS_TX_ENCAP_OFFLOAD), ++ FLAG(SUPPORTS_RX_DECAP_OFFLOAD), + #undef FLAG + }; + +--- a/net/mac80211/debugfs_sta.c ++++ b/net/mac80211/debugfs_sta.c +@@ -79,6 +79,7 @@ static const char * const sta_flag_names + FLAG(MPSP_RECIPIENT), + FLAG(PS_DELIVER), + FLAG(USES_ENCRYPTION), ++ FLAG(DECAP_OFFLOAD), + #undef FLAG + }; + +--- a/net/mac80211/driver-ops.h ++++ b/net/mac80211/driver-ops.h +@@ -1413,4 +1413,20 @@ static inline void drv_sta_set_4addr(str + trace_drv_return_void(local); + } + ++static inline void drv_sta_set_decap_offload(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta, ++ bool enabled) ++{ ++ sdata = get_bss_sdata(sdata); ++ if (!check_sdata_in_driver(sdata)) ++ return; ++ ++ trace_drv_sta_set_decap_offload(local, sdata, sta, enabled); ++ if (local->ops->sta_set_decap_offload) ++ local->ops->sta_set_decap_offload(&local->hw, &sdata->vif, sta, ++ enabled); ++ trace_drv_return_void(local); ++} ++ + #endif /* __MAC80211_DRIVER_OPS */ +--- a/net/mac80211/iface.c ++++ b/net/mac80211/iface.c +@@ -839,7 +839,7 @@ static const struct net_device_ops ieee8 + + }; + +-static bool ieee80211_iftype_supports_encap_offload(enum nl80211_iftype iftype) ++static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype) + { + switch (iftype) { + /* P2P GO and client are mapped to AP/STATION types */ +@@ -859,7 +859,7 @@ static bool ieee80211_set_sdata_offload_ + flags = sdata->vif.offload_flags; + + if (ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) && +- ieee80211_iftype_supports_encap_offload(sdata->vif.type)) { ++ ieee80211_iftype_supports_hdr_offload(sdata->vif.type)) { + flags |= IEEE80211_OFFLOAD_ENCAP_ENABLED; + + if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG) && +@@ -872,10 +872,21 @@ static bool ieee80211_set_sdata_offload_ + flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; + } + ++ if (ieee80211_hw_check(&local->hw, SUPPORTS_RX_DECAP_OFFLOAD) && ++ ieee80211_iftype_supports_hdr_offload(sdata->vif.type)) { ++ flags |= IEEE80211_OFFLOAD_DECAP_ENABLED; ++ ++ if (local->monitors) ++ flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED; ++ } else { ++ flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED; ++ } ++ + if (sdata->vif.offload_flags == flags) + return false; + + sdata->vif.offload_flags = flags; ++ ieee80211_check_fast_rx_iface(sdata); + return true; + } + +@@ -893,7 +904,7 @@ static void ieee80211_set_vif_encap_ops( + } + + if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) || +- !ieee80211_iftype_supports_encap_offload(bss->vif.type)) ++ !ieee80211_iftype_supports_hdr_offload(bss->vif.type)) + return; + + enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -4114,7 +4114,9 @@ void ieee80211_check_fast_rx(struct sta_ + .vif_type = sdata->vif.type, + .control_port_protocol = sdata->control_port_protocol, + }, *old, *new = NULL; ++ bool set_offload = false; + bool assign = false; ++ bool offload; + + /* use sparse to check that we don't return without updating */ + __acquire(check_fast_rx); +@@ -4227,6 +4229,17 @@ void ieee80211_check_fast_rx(struct sta_ + if (assign) + new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL); + ++ offload = assign && ++ (sdata->vif.offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED); ++ ++ if (offload) ++ set_offload = !test_and_set_sta_flag(sta, WLAN_STA_DECAP_OFFLOAD); ++ else ++ set_offload = test_and_clear_sta_flag(sta, WLAN_STA_DECAP_OFFLOAD); ++ ++ if (set_offload) ++ drv_sta_set_decap_offload(local, sdata, &sta->sta, assign); ++ + spin_lock_bh(&sta->lock); + old = rcu_dereference_protected(sta->fast_rx, true); + rcu_assign_pointer(sta->fast_rx, new); +@@ -4273,6 +4286,108 @@ void ieee80211_check_fast_rx_iface(struc + mutex_unlock(&local->sta_mtx); + } + ++static void ieee80211_rx_8023(struct ieee80211_rx_data *rx, ++ struct ieee80211_fast_rx *fast_rx, ++ int orig_len) ++{ ++ struct ieee80211_sta_rx_stats *stats; ++ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb); ++ struct sta_info *sta = rx->sta; ++ struct sk_buff *skb = rx->skb; ++ void *sa = skb->data + ETH_ALEN; ++ void *da = skb->data; ++ ++ stats = &sta->rx_stats; ++ if (fast_rx->uses_rss) ++ stats = this_cpu_ptr(sta->pcpu_rx_stats); ++ ++ /* statistics part of ieee80211_rx_h_sta_process() */ ++ if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) { ++ stats->last_signal = status->signal; ++ if (!fast_rx->uses_rss) ++ ewma_signal_add(&sta->rx_stats_avg.signal, ++ -status->signal); ++ } ++ ++ if (status->chains) { ++ int i; ++ ++ stats->chains = status->chains; ++ for (i = 0; i < ARRAY_SIZE(status->chain_signal); i++) { ++ int signal = status->chain_signal[i]; ++ ++ if (!(status->chains & BIT(i))) ++ continue; ++ ++ stats->chain_signal_last[i] = signal; ++ if (!fast_rx->uses_rss) ++ ewma_signal_add(&sta->rx_stats_avg.chain_signal[i], ++ -signal); ++ } ++ } ++ /* end of statistics */ ++ ++ stats->last_rx = jiffies; ++ stats->last_rate = sta_stats_encode_rate(status); ++ ++ stats->fragments++; ++ stats->packets++; ++ ++ skb->dev = fast_rx->dev; ++ ++ ieee80211_rx_stats(fast_rx->dev, skb->len); ++ ++ /* The seqno index has the same property as needed ++ * for the rx_msdu field, i.e. it is IEEE80211_NUM_TIDS ++ * for non-QoS-data frames. Here we know it's a data ++ * frame, so count MSDUs. ++ */ ++ u64_stats_update_begin(&stats->syncp); ++ stats->msdu[rx->seqno_idx]++; ++ stats->bytes += orig_len; ++ u64_stats_update_end(&stats->syncp); ++ ++ if (fast_rx->internal_forward) { ++ struct sk_buff *xmit_skb = NULL; ++ if (is_multicast_ether_addr(da)) { ++ xmit_skb = skb_copy(skb, GFP_ATOMIC); ++ } else if (!ether_addr_equal(da, sa) && ++ sta_info_get(rx->sdata, da)) { ++ xmit_skb = skb; ++ skb = NULL; ++ } ++ ++ if (xmit_skb) { ++ /* ++ * Send to wireless media and increase priority by 256 ++ * to keep the received priority instead of ++ * reclassifying the frame (see cfg80211_classify8021d). ++ */ ++ xmit_skb->priority += 256; ++ xmit_skb->protocol = htons(ETH_P_802_3); ++ skb_reset_network_header(xmit_skb); ++ skb_reset_mac_header(xmit_skb); ++ dev_queue_xmit(xmit_skb); ++ } ++ ++ if (!skb) ++ return; ++ } ++ ++ /* deliver to local stack */ ++ skb->protocol = eth_type_trans(skb, fast_rx->dev); ++ memset(skb->cb, 0, sizeof(skb->cb)); ++ if (rx->list) ++#if LINUX_VERSION_IS_GEQ(4,19,0) ++ list_add_tail(&skb->list, rx->list); ++#else ++ __skb_queue_tail(rx->list, skb); ++#endif ++ else ++ netif_receive_skb(skb); ++ ++} ++ + static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx, + struct ieee80211_fast_rx *fast_rx) + { +@@ -4293,9 +4408,6 @@ static bool ieee80211_invoke_fast_rx(str + } addrs __aligned(2); + struct ieee80211_sta_rx_stats *stats = &sta->rx_stats; + +- if (fast_rx->uses_rss) +- stats = this_cpu_ptr(sta->pcpu_rx_stats); +- + /* for parallel-rx, we need to have DUP_VALIDATED, otherwise we write + * to a common data structure; drivers can implement that per queue + * but we don't have that information in mac80211 +@@ -4369,32 +4481,6 @@ static bool ieee80211_invoke_fast_rx(str + pskb_trim(skb, skb->len - fast_rx->icv_len)) + goto drop; + +- /* statistics part of ieee80211_rx_h_sta_process() */ +- if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) { +- stats->last_signal = status->signal; +- if (!fast_rx->uses_rss) +- ewma_signal_add(&sta->rx_stats_avg.signal, +- -status->signal); +- } +- +- if (status->chains) { +- int i; +- +- stats->chains = status->chains; +- for (i = 0; i < ARRAY_SIZE(status->chain_signal); i++) { +- int signal = status->chain_signal[i]; +- +- if (!(status->chains & BIT(i))) +- continue; +- +- stats->chain_signal_last[i] = signal; +- if (!fast_rx->uses_rss) +- ewma_signal_add(&sta->rx_stats_avg.chain_signal[i], +- -signal); +- } +- } +- /* end of statistics */ +- + if (rx->key && !ieee80211_has_protected(hdr->frame_control)) + goto drop; + +@@ -4406,12 +4492,6 @@ static bool ieee80211_invoke_fast_rx(str + return true; + } + +- stats->last_rx = jiffies; +- stats->last_rate = sta_stats_encode_rate(status); +- +- stats->fragments++; +- stats->packets++; +- + /* do the header conversion - first grab the addresses */ + ether_addr_copy(addrs.da, skb->data + fast_rx->da_offs); + ether_addr_copy(addrs.sa, skb->data + fast_rx->sa_offs); +@@ -4420,62 +4500,14 @@ static bool ieee80211_invoke_fast_rx(str + /* push the addresses in front */ + memcpy(skb_push(skb, sizeof(addrs)), &addrs, sizeof(addrs)); + +- skb->dev = fast_rx->dev; +- +- ieee80211_rx_stats(fast_rx->dev, skb->len); +- +- /* The seqno index has the same property as needed +- * for the rx_msdu field, i.e. it is IEEE80211_NUM_TIDS +- * for non-QoS-data frames. Here we know it's a data +- * frame, so count MSDUs. +- */ +- u64_stats_update_begin(&stats->syncp); +- stats->msdu[rx->seqno_idx]++; +- stats->bytes += orig_len; +- u64_stats_update_end(&stats->syncp); +- +- if (fast_rx->internal_forward) { +- struct sk_buff *xmit_skb = NULL; +- if (is_multicast_ether_addr(addrs.da)) { +- xmit_skb = skb_copy(skb, GFP_ATOMIC); +- } else if (!ether_addr_equal(addrs.da, addrs.sa) && +- sta_info_get(rx->sdata, addrs.da)) { +- xmit_skb = skb; +- skb = NULL; +- } +- +- if (xmit_skb) { +- /* +- * Send to wireless media and increase priority by 256 +- * to keep the received priority instead of +- * reclassifying the frame (see cfg80211_classify8021d). +- */ +- xmit_skb->priority += 256; +- xmit_skb->protocol = htons(ETH_P_802_3); +- skb_reset_network_header(xmit_skb); +- skb_reset_mac_header(xmit_skb); +- dev_queue_xmit(xmit_skb); +- } +- +- if (!skb) +- return true; +- } +- +- /* deliver to local stack */ +- skb->protocol = eth_type_trans(skb, fast_rx->dev); +- memset(skb->cb, 0, sizeof(skb->cb)); +- if (rx->list) +-#if LINUX_VERSION_IS_GEQ(4,19,0) +- list_add_tail(&skb->list, rx->list); +-#else +- __skb_queue_tail(rx->list, skb); +-#endif +- else +- netif_receive_skb(skb); ++ ieee80211_rx_8023(rx, fast_rx, orig_len); + + return true; + drop: + dev_kfree_skb(skb); ++ if (fast_rx->uses_rss) ++ stats = this_cpu_ptr(sta->pcpu_rx_stats); ++ + stats->dropped++; + return true; + } +@@ -4529,6 +4561,47 @@ static bool ieee80211_prepare_and_rx_han + return true; + } + ++static void __ieee80211_rx_handle_8023(struct ieee80211_hw *hw, ++ struct ieee80211_sta *pubsta, ++ struct sk_buff *skb, ++#if LINUX_VERSION_IS_GEQ(4,19,0) ++ struct list_head *list) ++#else ++ struct sk_buff_head *list) ++#endif ++{ ++ struct ieee80211_local *local = hw_to_local(hw); ++ struct ieee80211_fast_rx *fast_rx; ++ struct ieee80211_rx_data rx; ++ ++ memset(&rx, 0, sizeof(rx)); ++ rx.skb = skb; ++ rx.local = local; ++ rx.list = list; ++ ++ I802_DEBUG_INC(local->dot11ReceivedFragmentCount); ++ ++ /* drop frame if too short for header */ ++ if (skb->len < sizeof(struct ethhdr)) ++ goto drop; ++ ++ if (!pubsta) ++ goto drop; ++ ++ rx.sta = container_of(pubsta, struct sta_info, sta); ++ rx.sdata = rx.sta->sdata; ++ ++ fast_rx = rcu_dereference(rx.sta->fast_rx); ++ if (!fast_rx) ++ goto drop; ++ ++ ieee80211_rx_8023(&rx, fast_rx, skb->len); ++ return; ++ ++drop: ++ dev_kfree_skb(skb); ++} ++ + /* + * This is the actual Rx frames handler. as it belongs to Rx path it must + * be called with rcu_read_lock protection. +@@ -4766,15 +4839,20 @@ void ieee80211_rx_list(struct ieee80211_ + * if it was previously present. + * Also, frames with less than 16 bytes are dropped. + */ +- skb = ieee80211_rx_monitor(local, skb, rate); +- if (!skb) +- return; ++ if (!(status->flag & RX_FLAG_8023)) { ++ skb = ieee80211_rx_monitor(local, skb, rate); ++ if (!skb) ++ return; ++ } + + ieee80211_tpt_led_trig_rx(local, + ((struct ieee80211_hdr *)skb->data)->frame_control, + skb->len); + +- __ieee80211_rx_handle_packet(hw, pubsta, skb, list); ++ if (status->flag & RX_FLAG_8023) ++ __ieee80211_rx_handle_8023(hw, pubsta, skb, list); ++ else ++ __ieee80211_rx_handle_packet(hw, pubsta, skb, list); + + return; + drop: +--- a/net/mac80211/sta_info.h ++++ b/net/mac80211/sta_info.h +@@ -71,6 +71,7 @@ + * until pending frames are delivered + * @WLAN_STA_USES_ENCRYPTION: This station was configured for encryption, + * so drop all packets without a key later. ++ * @WLAN_STA_DECAP_OFFLOAD: This station uses rx decap offload + * + * @NUM_WLAN_STA_FLAGS: number of defined flags + */ +@@ -102,6 +103,7 @@ enum ieee80211_sta_info_flags { + WLAN_STA_MPSP_RECIPIENT, + WLAN_STA_PS_DELIVER, + WLAN_STA_USES_ENCRYPTION, ++ WLAN_STA_DECAP_OFFLOAD, + + NUM_WLAN_STA_FLAGS, + }; +--- a/net/mac80211/trace.h ++++ b/net/mac80211/trace.h +@@ -2740,7 +2740,7 @@ DEFINE_EVENT(local_sdata_addr_evt, drv_u + TP_ARGS(local, sdata) + ); + +-TRACE_EVENT(drv_sta_set_4addr, ++DECLARE_EVENT_CLASS(sta_flag_evt, + TP_PROTO(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_sta *sta, bool enabled), +@@ -2767,6 +2767,22 @@ TRACE_EVENT(drv_sta_set_4addr, + ) + ); + ++DEFINE_EVENT(sta_flag_evt, drv_sta_set_4addr, ++ TP_PROTO(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta, bool enabled), ++ ++ TP_ARGS(local, sdata, sta, enabled) ++); ++ ++DEFINE_EVENT(sta_flag_evt, drv_sta_set_decap_offload, ++ TP_PROTO(struct ieee80211_local *local, ++ struct ieee80211_sub_if_data *sdata, ++ struct ieee80211_sta *sta, bool enabled), ++ ++ TP_ARGS(local, sdata, sta, enabled) ++); ++ + #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ + + #undef TRACE_INCLUDE_PATH diff --git a/package/kernel/mac80211/patches/subsys/315-mac80211-check-and-refresh-aggregation-session-in-en.patch b/package/kernel/mac80211/patches/subsys/315-mac80211-check-and-refresh-aggregation-session-in-en.patch deleted file mode 100644 index e411d59722..0000000000 --- a/package/kernel/mac80211/patches/subsys/315-mac80211-check-and-refresh-aggregation-session-in-en.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 21:11:25 +0200 -Subject: [PATCH] mac80211: check and refresh aggregation session in - encap offload tx - -Update the last_tx timestamp to avoid tearing down the aggregation session -early. Fall back to the slow path if the session setup is still running - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4189,6 +4189,8 @@ static void ieee80211_8023_xmit(struct i - bool authorized = false; - bool multicast; - unsigned char *ra = ehdr->h_dest; -+ struct tid_ampdu_tx *tid_tx; -+ u8 tid; - - if (IS_ERR(sta) || (sta && !sta->uploaded)) - sta = NULL; -@@ -4226,6 +4228,22 @@ static void ieee80211_8023_xmit(struct i - - memset(info, 0, sizeof(*info)); - -+ if (sta) { -+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); -+ if (tid_tx) { -+ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) { -+ /* fall back to non-offload slow path */ -+ __ieee80211_subif_start_xmit(skb, dev, 0, 0, NULL); -+ return; -+ } -+ -+ info->flags |= IEEE80211_TX_CTL_AMPDU; -+ if (tid_tx->timeout) -+ tid_tx->last_tx = jiffies; -+ } -+ } -+ - if (unlikely(!multicast && skb->sk && - skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS)) - info->ack_frame_id = ieee80211_store_ack_skb(local, skb, diff --git a/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch b/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch new file mode 100644 index 0000000000..91a602bd27 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/316-mac80211-fix-a-mistake-check-for-rx_stats-update.patch @@ -0,0 +1,28 @@ +From: Wen Gong +Date: Wed, 9 Dec 2020 11:06:29 +0800 +Subject: [PATCH] mac80211: fix a mistake check for rx_stats update + +It should be !is_multicast_ether_addr() in ieee80211_rx_h_sta_process() +for the rx_stats update, below commit remove the !, this patch is to +change it back. + +It lead the rx rate "iw wlan0 station dump" become invalid for some +scenario when IEEE80211_HW_USES_RSS is set. + +Fixes: 09a740ce352e ("mac80211: receive and process S1G beacons") +Signed-off-by: Wen Gong +Link: https://lore.kernel.org/r/1607483189-3891-1-git-send-email-wgong@codeaurora.org +Signed-off-by: Johannes Berg +--- + +--- a/net/mac80211/rx.c ++++ b/net/mac80211/rx.c +@@ -1758,7 +1758,7 @@ ieee80211_rx_h_sta_process(struct ieee80 + } else if (rx->sdata->vif.type == NL80211_IFTYPE_OCB) { + sta->rx_stats.last_rx = jiffies; + } else if (!ieee80211_is_s1g_beacon(hdr->frame_control) && +- is_multicast_ether_addr(hdr->addr1)) { ++ !is_multicast_ether_addr(hdr->addr1)) { + /* + * Mesh beacons will update last_rx when if they are found to + * match the current local configuration when processed. diff --git a/package/kernel/mac80211/patches/subsys/316-mac80211-skip-encap-offload-for-tx-multicast-control.patch b/package/kernel/mac80211/patches/subsys/316-mac80211-skip-encap-offload-for-tx-multicast-control.patch deleted file mode 100644 index 6dce21db1e..0000000000 --- a/package/kernel/mac80211/patches/subsys/316-mac80211-skip-encap-offload-for-tx-multicast-control.patch +++ /dev/null @@ -1,136 +0,0 @@ -From: Felix Fietkau -Date: Fri, 21 Aug 2020 05:54:10 +0200 -Subject: [PATCH] mac80211: skip encap offload for tx multicast/control - packets - -This simplifies the checks in the encap offload tx handler and allows using -it in cases where software crypto is used for multicast packets, e.g. when -using an AP_VLAN. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4184,88 +4184,47 @@ static void ieee80211_8023_xmit(struct i - struct sk_buff *skb) - { - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -- struct ethhdr *ehdr = (struct ethhdr *)skb->data; - struct ieee80211_local *local = sdata->local; -- bool authorized = false; -- bool multicast; -- unsigned char *ra = ehdr->h_dest; - struct tid_ampdu_tx *tid_tx; - u8 tid; - -- if (IS_ERR(sta) || (sta && !sta->uploaded)) -- sta = NULL; -- -- if (sdata->vif.type == NL80211_IFTYPE_STATION && -- (!sta || !test_sta_flag(sta, WLAN_STA_TDLS_PEER))) -- ra = sdata->u.mgd.bssid; -- -- if (is_zero_ether_addr(ra)) -- goto out_free; -- - if (local->ops->wake_tx_queue) { - u16 queue = __ieee80211_select_queue(sdata, sta, skb); - skb_set_queue_mapping(skb, queue); - skb_get_hash(skb); - } - -- multicast = is_multicast_ether_addr(ra); -- -- if (sta) -- authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED); -- -- if (!multicast && !authorized && -- (ehdr->h_proto != sdata->control_port_protocol || -- !ether_addr_equal(sdata->vif.addr, ehdr->h_source))) -- goto out_free; -- -- if (multicast && sdata->vif.type == NL80211_IFTYPE_AP && -- !atomic_read(&sdata->u.ap.num_mcast_sta)) -- goto out_free; -- - if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) && - test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) - goto out_free; - - memset(info, 0, sizeof(*info)); - -- if (sta) { -- tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -- tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); -- if (tid_tx) { -- if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) { -- /* fall back to non-offload slow path */ -- __ieee80211_subif_start_xmit(skb, dev, 0, 0, NULL); -- return; -- } -- -- info->flags |= IEEE80211_TX_CTL_AMPDU; -- if (tid_tx->timeout) -- tid_tx->last_tx = jiffies; -+ tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK; -+ tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[tid]); -+ if (tid_tx) { -+ if (!test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) { -+ /* fall back to non-offload slow path */ -+ __ieee80211_subif_start_xmit(skb, dev, 0, 0, NULL); -+ return; - } -+ -+ info->flags |= IEEE80211_TX_CTL_AMPDU; -+ if (tid_tx->timeout) -+ tid_tx->last_tx = jiffies; - } - -- if (unlikely(!multicast && skb->sk && -+ if (unlikely(skb->sk && - skb_shinfo(skb)->tx_flags & SKBTX_WIFI_STATUS)) - info->ack_frame_id = ieee80211_store_ack_skb(local, skb, - &info->flags, NULL); - -- if (unlikely(sdata->control_port_protocol == ehdr->h_proto)) { -- if (sdata->control_port_no_encrypt) -- info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT; -- info->control.flags |= IEEE80211_TX_CTRL_PORT_CTRL_PROTO; -- } -- -- if (multicast) -- info->flags |= IEEE80211_TX_CTL_NO_ACK; -- - info->hw_queue = sdata->vif.hw_queue[skb_get_queue_mapping(skb)]; - - ieee80211_tx_stats(dev, skb->len); - -- if (sta) { -- sta->tx_stats.bytes[skb_get_queue_mapping(skb)] += skb->len; -- sta->tx_stats.packets[skb_get_queue_mapping(skb)]++; -- } -+ sta->tx_stats.bytes[skb_get_queue_mapping(skb)] += skb->len; -+ sta->tx_stats.packets[skb_get_queue_mapping(skb)]++; - - if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) - sdata = container_of(sdata->bss, -@@ -4286,6 +4245,7 @@ netdev_tx_t ieee80211_subif_start_xmit_8 - struct net_device *dev) - { - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -+ struct ethhdr *ehdr = (struct ethhdr *)skb->data; - struct sta_info *sta; - - if (WARN_ON(!sdata->hw_80211_encap)) { -@@ -4302,6 +4262,10 @@ netdev_tx_t ieee80211_subif_start_xmit_8 - - if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) - kfree_skb(skb); -+ else if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || -+ !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || -+ sdata->control_port_protocol == ehdr->h_proto)) -+ ieee80211_subif_start_xmit(skb, dev); - else - ieee80211_8023_xmit(sdata, dev, sta, skb); - diff --git a/package/kernel/mac80211/patches/subsys/317-mac80211-set-info-control.hw_key-for-encap-offload-p.patch b/package/kernel/mac80211/patches/subsys/317-mac80211-set-info-control.hw_key-for-encap-offload-p.patch deleted file mode 100644 index cb5a986312..0000000000 --- a/package/kernel/mac80211/patches/subsys/317-mac80211-set-info-control.hw_key-for-encap-offload-p.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Felix Fietkau -Date: Fri, 21 Aug 2020 06:03:45 +0200 -Subject: [PATCH] mac80211: set info->control.hw_key for encap offload - packets - -This is needed for drivers that don't do the key lookup themselves - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4185,6 +4185,7 @@ static void ieee80211_8023_xmit(struct i - { - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_local *local = sdata->local; -+ struct ieee80211_key *key; - struct tid_ampdu_tx *tid_tx; - u8 tid; - -@@ -4233,6 +4234,10 @@ static void ieee80211_8023_xmit(struct i - info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP; - info->control.vif = &sdata->vif; - -+ key = rcu_dereference(sta->ptk[sta->ptk_idx]); -+ if (key) -+ info->control.hw_key = &key->conf; -+ - ieee80211_tx_8023(sdata, skb, skb->len, sta, false); - - return; diff --git a/package/kernel/mac80211/patches/subsys/318-mac80211-rework-tx-encapsulation-offload-API.patch b/package/kernel/mac80211/patches/subsys/318-mac80211-rework-tx-encapsulation-offload-API.patch deleted file mode 100644 index 7593c41da0..0000000000 --- a/package/kernel/mac80211/patches/subsys/318-mac80211-rework-tx-encapsulation-offload-API.patch +++ /dev/null @@ -1,613 +0,0 @@ -From: Felix Fietkau -Date: Thu, 13 Aug 2020 15:37:11 +0200 -Subject: [PATCH] mac80211: rework tx encapsulation offload API - -The current API (which lets the driver turn on/off per vif directly) has a -number of limitations: -- it does not deal with AP_VLAN -- conditions for enabling (no tkip, no monitor) are only checked at - add_interface time -- no way to indicate 4-addr support - -In order to address this, store offload flags in struct ieee80211_vif -(easy to extend for decap offload later). mac80211 initially sets the enable -flag, but gives the driver a chance to modify it before its settings are -applied. In addition to the .add_interface op, a .update_vif_offload op is -introduced, which can be used for runtime changes. - -If a driver can't disable encap offload at runtime, or if it has some extra -limitations, it can simply override the flags within those ops. - -Support for encap offload with 4-address mode interfaces can be enabled -by setting a flag from .add_interface or .update_vif_offload. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -4150,6 +4150,35 @@ static int ath11k_set_he_mu_sounding_mod - return ret; - } - -+static void ath11k_mac_op_update_vif_offload(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif) -+{ -+ struct ath11k *ar = hw->priv; -+ struct ath11k_base *ab = ar->ab; -+ struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); -+ u32 param_id, param_value; -+ int ret; -+ -+ param_id = WMI_VDEV_PARAM_TX_ENCAP_TYPE; -+ if (ath11k_frame_mode != ATH11K_HW_TXRX_ETHERNET || -+ (vif->type != NL80211_IFTYPE_STATION && -+ vif->type != NL80211_IFTYPE_AP)) -+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ -+ if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED) -+ param_value = ATH11K_HW_TXRX_ETHERNET; -+ else -+ param_value = ATH11K_HW_TXRX_NATIVE_WIFI; -+ -+ ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, -+ param_id, param_value); -+ if (ret) { -+ ath11k_warn(ab, "failed to set vdev %d tx encap mode: %d\n", -+ arvif->vdev_id, ret); -+ vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ } -+} -+ - static int ath11k_mac_op_add_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) - { -@@ -4159,7 +4188,6 @@ static int ath11k_mac_op_add_interface(s - struct vdev_create_params vdev_param = {0}; - struct peer_create_params peer_param; - u32 param_id, param_value; -- int hw_encap = 0; - u16 nss; - int i; - int ret; -@@ -4253,30 +4281,7 @@ static int ath11k_mac_op_add_interface(s - list_add(&arvif->list, &ar->arvifs); - spin_unlock_bh(&ar->data_lock); - -- param_id = WMI_VDEV_PARAM_TX_ENCAP_TYPE; -- if (ath11k_frame_mode == ATH11K_HW_TXRX_ETHERNET) -- switch (vif->type) { -- case NL80211_IFTYPE_STATION: -- case NL80211_IFTYPE_AP_VLAN: -- case NL80211_IFTYPE_AP: -- hw_encap = 1; -- break; -- default: -- break; -- } -- -- if (ieee80211_set_hw_80211_encap(vif, hw_encap)) -- param_value = ATH11K_HW_TXRX_ETHERNET; -- else -- param_value = ATH11K_HW_TXRX_NATIVE_WIFI; -- -- ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, -- param_id, param_value); -- if (ret) { -- ath11k_warn(ab, "failed to set vdev %d tx encap mode: %d\n", -- arvif->vdev_id, ret); -- goto err_vdev_del; -- } -+ ath11k_mac_op_update_vif_offload(hw, vif); - - nss = get_num_chains(ar->cfg_tx_chainmask) ? : 1; - ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, -@@ -5599,6 +5604,7 @@ static const struct ieee80211_ops ath11k - .reconfig_complete = ath11k_mac_op_reconfig_complete, - .add_interface = ath11k_mac_op_add_interface, - .remove_interface = ath11k_mac_op_remove_interface, -+ .update_vif_offload = ath11k_mac_op_update_vif_offload, - .config = ath11k_mac_op_config, - .bss_info_changed = ath11k_mac_op_bss_info_changed, - .configure_filter = ath11k_mac_op_configure_filter, -@@ -5852,6 +5858,7 @@ static int __ath11k_mac_register(struct - ieee80211_hw_set(ar->hw, QUEUE_CONTROL); - ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG); - ieee80211_hw_set(ar->hw, REPORTS_LOW_ACK); -+ ieee80211_hw_set(ar->hw, SUPPORTS_TX_ENCAP_OFFLOAD); - if (ht_cap & WMI_HT_CAP_ENABLED) { - ieee80211_hw_set(ar->hw, AMPDU_AGGREGATION); - ieee80211_hw_set(ar->hw, TX_AMPDU_SETUP_IN_HW); ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -1603,6 +1603,21 @@ enum ieee80211_vif_flags { - IEEE80211_VIF_GET_NOA_UPDATE = BIT(3), - }; - -+ -+/** -+ * enum ieee80211_offload_flags - virtual interface offload flags -+ * -+ * @IEEE80211_OFFLOAD_ENCAP_ENABLED: tx encapsulation offload is enabled -+ * The driver supports sending frames passed as 802.3 frames by mac80211. -+ * It must also support sending 802.11 packets for the same interface. -+ * @IEEE80211_OFFLOAD_ENCAP_4ADDR: support 4-address mode encapsulation offload -+ */ -+ -+enum ieee80211_offload_flags { -+ IEEE80211_OFFLOAD_ENCAP_ENABLED = BIT(0), -+ IEEE80211_OFFLOAD_ENCAP_4ADDR = BIT(1), -+}; -+ - /** - * struct ieee80211_vif - per-interface data - * -@@ -1623,6 +1638,11 @@ enum ieee80211_vif_flags { - * these need to be set (or cleared) when the interface is added - * or, if supported by the driver, the interface type is changed - * at runtime, mac80211 will never touch this field -+ * @offloaad_flags: hardware offload capabilities/flags for this interface. -+ * These are initialized by mac80211 before calling .add_interface, -+ * .change_interface or .update_vif_offload and updated by the driver -+ * within these ops, based on supported features or runtime change -+ * restrictions. - * @hw_queue: hardware queue for each AC - * @cab_queue: content-after-beacon (DTIM beacon really) queue, AP mode only - * @chanctx_conf: The channel context this interface is assigned to, or %NULL -@@ -1659,6 +1679,7 @@ struct ieee80211_vif { - struct ieee80211_chanctx_conf __rcu *chanctx_conf; - - u32 driver_flags; -+ u32 offload_flags; - - #ifdef CPTCFG_MAC80211_DEBUGFS - struct dentry *debugfs_dir; -@@ -2325,6 +2346,9 @@ struct ieee80211_txq { - * aggregating MPDUs with the same keyid, allowing mac80211 to keep Tx - * A-MPDU sessions active while rekeying with Extended Key ID. - * -+ * @IEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD: Hardware supports tx encapsulation -+ * offload -+ * - * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays - */ - enum ieee80211_hw_flags { -@@ -2377,6 +2401,7 @@ enum ieee80211_hw_flags { - IEEE80211_HW_SUPPORTS_MULTI_BSSID, - IEEE80211_HW_SUPPORTS_ONLY_HE_MULTI_BSSID, - IEEE80211_HW_AMPDU_KEYBORDER_SUPPORT, -+ IEEE80211_HW_SUPPORTS_TX_ENCAP_OFFLOAD, - - /* keep last, obviously */ - NUM_IEEE80211_HW_FLAGS -@@ -3811,6 +3836,8 @@ enum ieee80211_reconfig_type { - * @set_tid_config: Apply TID specific configurations. This callback may sleep. - * @reset_tid_config: Reset TID specific configuration for the peer. - * This callback may sleep. -+ * @update_vif_config: Update virtual interface offload flags -+ * This callback may sleep. - */ - struct ieee80211_ops { - void (*tx)(struct ieee80211_hw *hw, -@@ -4122,6 +4149,8 @@ struct ieee80211_ops { - int (*reset_tid_config)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_sta *sta, u8 tids); -+ void (*update_vif_offload)(struct ieee80211_hw *hw, -+ struct ieee80211_vif *vif); - }; - - /** ---- a/net/mac80211/debugfs.c -+++ b/net/mac80211/debugfs.c -@@ -408,6 +408,7 @@ static const char *hw_flag_names[] = { - FLAG(SUPPORTS_MULTI_BSSID), - FLAG(SUPPORTS_ONLY_HE_MULTI_BSSID), - FLAG(AMPDU_KEYBORDER_SUPPORT), -+ FLAG(SUPPORTS_TX_ENCAP_OFFLOAD), - #undef FLAG - }; - ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -1385,4 +1385,19 @@ static inline int drv_reset_tid_config(s - - return ret; - } -+ -+static inline void drv_update_vif_offload(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata) -+{ -+ might_sleep(); -+ check_sdata_in_driver(sdata); -+ -+ if (!local->ops->update_vif_offload) -+ return; -+ -+ trace_drv_update_vif_offload(local, sdata); -+ local->ops->update_vif_offload(&local->hw, &sdata->vif); -+ trace_drv_return_void(local); -+} -+ - #endif /* __MAC80211_DRIVER_OPS */ ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -990,8 +990,6 @@ struct ieee80211_sub_if_data { - } debugfs; - #endif - -- bool hw_80211_encap; -- - /* must be last, dynamically sized area in this! */ - struct ieee80211_vif vif; - }; -@@ -1769,6 +1767,7 @@ void ieee80211_del_virtual_monitor(struc - bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata); - void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata, - bool update_bss); -+void ieee80211_recalc_offload(struct ieee80211_local *local); - - static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata) - { ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -43,6 +43,7 @@ - */ - - static void ieee80211_iface_work(struct work_struct *work); -+static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata); - - bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata) - { -@@ -348,6 +349,85 @@ static int ieee80211_check_queues(struct - return 0; - } - -+static bool ieee80211_iftype_supports_encap_offload(enum nl80211_iftype iftype) -+{ -+ switch (iftype) { -+ /* P2P GO and client are mapped to AP/STATION types */ -+ case NL80211_IFTYPE_AP: -+ case NL80211_IFTYPE_STATION: -+ return true; -+ default: -+ return false; -+ } -+} -+ -+static bool ieee80211_set_sdata_offload_flags(struct ieee80211_sub_if_data *sdata) -+{ -+ struct ieee80211_local *local = sdata->local; -+ u32 flags; -+ -+ flags = sdata->vif.offload_flags; -+ -+ if (ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) && -+ ieee80211_iftype_supports_encap_offload(sdata->vif.type)) { -+ flags |= IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ -+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG) && -+ local->hw.wiphy->frag_threshold != (u32)-1) -+ flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ -+ if (local->monitors) -+ flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ } else { -+ flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ } -+ -+ if (sdata->vif.offload_flags == flags) -+ return false; -+ -+ sdata->vif.offload_flags = flags; -+ return true; -+} -+ -+ -+static void ieee80211_recalc_sdata_offload(struct ieee80211_sub_if_data *sdata) -+{ -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_sub_if_data *vsdata; -+ -+ if (ieee80211_set_sdata_offload_flags(sdata)) { -+ drv_update_vif_offload(local, sdata); -+ ieee80211_set_vif_encap_ops(sdata); -+ } -+ -+ list_for_each_entry(vsdata, &local->interfaces, list) { -+ if (vsdata->vif.type != NL80211_IFTYPE_AP_VLAN || -+ vsdata->bss != &sdata->u.ap) -+ continue; -+ -+ ieee80211_set_vif_encap_ops(vsdata); -+ } -+} -+ -+void ieee80211_recalc_offload(struct ieee80211_local *local) -+{ -+ struct ieee80211_sub_if_data *sdata; -+ -+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD)) -+ return; -+ -+ mutex_lock(&local->iflist_mtx); -+ -+ list_for_each_entry(sdata, &local->interfaces, list) { -+ if (!ieee80211_sdata_running(sdata)) -+ continue; -+ -+ ieee80211_recalc_sdata_offload(sdata); -+ } -+ -+ mutex_unlock(&local->iflist_mtx); -+} -+ - void ieee80211_adjust_monitor_flags(struct ieee80211_sub_if_data *sdata, - const int offset) - { -@@ -587,6 +667,7 @@ int ieee80211_do_open(struct wireless_de - if (rtnl_dereference(sdata->bss->beacon)) { - ieee80211_vif_vlan_copy_chanctx(sdata); - netif_carrier_on(dev); -+ ieee80211_set_vif_encap_ops(sdata); - } else { - netif_carrier_off(dev); - } -@@ -616,6 +697,7 @@ int ieee80211_do_open(struct wireless_de - - ieee80211_adjust_monitor_flags(sdata, 1); - ieee80211_configure_filter(local); -+ ieee80211_recalc_offload(local); - mutex_lock(&local->mtx); - ieee80211_recalc_idle(local); - mutex_unlock(&local->mtx); -@@ -625,10 +707,13 @@ int ieee80211_do_open(struct wireless_de - default: - if (coming_up) { - ieee80211_del_virtual_monitor(local); -+ ieee80211_set_sdata_offload_flags(sdata); - - res = drv_add_interface(local, sdata); - if (res) - goto err_stop; -+ -+ ieee80211_set_vif_encap_ops(sdata); - res = ieee80211_check_queues(sdata, - ieee80211_vif_type_p2p(&sdata->vif)); - if (res) -@@ -1286,61 +1371,6 @@ static const struct net_device_ops ieee8 - - }; - --static void __ieee80211_set_hw_80211_encap(struct ieee80211_sub_if_data *sdata, -- bool enable) --{ -- sdata->dev->netdev_ops = enable ? &ieee80211_dataif_8023_ops : -- &ieee80211_dataif_ops; -- sdata->hw_80211_encap = enable; --} -- --bool ieee80211_set_hw_80211_encap(struct ieee80211_vif *vif, bool enable) --{ -- struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif); -- struct ieee80211_local *local = sdata->local; -- struct ieee80211_sub_if_data *iter; -- struct ieee80211_key *key; -- -- mutex_lock(&local->iflist_mtx); -- list_for_each_entry(iter, &local->interfaces, list) { -- struct ieee80211_sub_if_data *disable = NULL; -- -- if (vif->type == NL80211_IFTYPE_MONITOR) { -- disable = iter; -- __ieee80211_set_hw_80211_encap(iter, false); -- } else if (iter->vif.type == NL80211_IFTYPE_MONITOR) { -- disable = sdata; -- enable = false; -- } -- if (disable) -- sdata_dbg(disable, -- "disable hw 80211 encap due to mon co-exist\n"); -- } -- mutex_unlock(&local->iflist_mtx); -- -- if (enable == sdata->hw_80211_encap) -- return enable; -- -- if (!sdata->dev) -- return false; -- -- if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG) && -- (local->hw.wiphy->frag_threshold != (u32)-1)) -- enable = false; -- -- mutex_lock(&sdata->local->key_mtx); -- list_for_each_entry(key, &sdata->key_list, list) { -- if (key->conf.cipher == WLAN_CIPHER_SUITE_TKIP) -- enable = false; -- } -- mutex_unlock(&sdata->local->key_mtx); -- -- __ieee80211_set_hw_80211_encap(sdata, enable); -- -- return enable; --} --EXPORT_SYMBOL(ieee80211_set_hw_80211_encap); -- - static void ieee80211_if_free(struct net_device *dev) - { - free_percpu(netdev_tstats(dev)); -@@ -1371,6 +1401,32 @@ static void ieee80211_if_setup_no_queue( - #endif - } - -+static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata) -+{ -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_sub_if_data *bss = sdata; -+ bool enabled; -+ -+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { -+ if (!sdata->bss) -+ return; -+ -+ bss = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap); -+ } -+ -+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) || -+ !ieee80211_iftype_supports_encap_offload(bss->vif.type)) -+ return; -+ -+ enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ if (sdata->wdev.use_4addr && -+ !(bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_4ADDR)) -+ enabled = false; -+ -+ sdata->dev->netdev_ops = enabled ? &ieee80211_dataif_8023_ops : -+ &ieee80211_dataif_ops; -+} -+ - static void ieee80211_iface_work(struct work_struct *work) - { - struct ieee80211_sub_if_data *sdata = -@@ -1553,7 +1609,6 @@ static void ieee80211_setup_sdata(struct - sdata->vif.bss_conf.txpower = INT_MIN; /* unset */ - - sdata->noack_map = 0; -- sdata->hw_80211_encap = false; - - /* only monitor/p2p-device differ */ - if (sdata->dev) { -@@ -1688,6 +1743,7 @@ static int ieee80211_runtime_change_ifty - - ieee80211_teardown_sdata(sdata); - -+ ieee80211_set_sdata_offload_flags(sdata); - ret = drv_change_interface(local, sdata, internal_type, p2p); - if (ret) - type = ieee80211_vif_type_p2p(&sdata->vif); -@@ -1700,6 +1756,7 @@ static int ieee80211_runtime_change_ifty - ieee80211_check_queues(sdata, type); - - ieee80211_setup_sdata(sdata, type); -+ ieee80211_set_vif_encap_ops(sdata); - - err = ieee80211_do_open(&sdata->wdev, false); - WARN(err, "type change: do_open returned %d", err); ---- a/net/mac80211/key.c -+++ b/net/mac80211/key.c -@@ -177,13 +177,6 @@ static int ieee80211_key_enable_hw_accel - } - } - -- /* TKIP countermeasures don't work in encap offload mode */ -- if (key->conf.cipher == WLAN_CIPHER_SUITE_TKIP && -- sdata->hw_80211_encap) { -- sdata_dbg(sdata, "TKIP is not allowed in hw 80211 encap mode\n"); -- return -EINVAL; -- } -- - ret = drv_set_key(key->local, SET_KEY, sdata, - sta ? &sta->sta : NULL, &key->conf); - -@@ -219,14 +212,6 @@ static int ieee80211_key_enable_hw_accel - case WLAN_CIPHER_SUITE_CCMP_256: - case WLAN_CIPHER_SUITE_GCMP: - case WLAN_CIPHER_SUITE_GCMP_256: -- /* We cannot do software crypto of data frames with -- * encapsulation offload enabled. However for 802.11w to -- * function properly we need cmac/gmac keys. -- */ -- if (sdata->hw_80211_encap) -- return -EINVAL; -- /* Fall through */ -- - case WLAN_CIPHER_SUITE_AES_CMAC: - case WLAN_CIPHER_SUITE_BIP_CMAC_256: - case WLAN_CIPHER_SUITE_BIP_GMAC_128: ---- a/net/mac80211/trace.h -+++ b/net/mac80211/trace.h -@@ -2733,6 +2733,12 @@ TRACE_EVENT(drv_get_ftm_responder_stats, - ) - ); - -+DEFINE_EVENT(local_sdata_addr_evt, drv_update_vif_offload, -+ TP_PROTO(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata), -+ TP_ARGS(local, sdata) -+); -+ - #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ - - #undef TRACE_INCLUDE_PATH ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -4181,11 +4181,10 @@ static bool ieee80211_tx_8023(struct iee - - static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata, - struct net_device *dev, struct sta_info *sta, -- struct sk_buff *skb) -+ struct ieee80211_key *key, struct sk_buff *skb) - { - struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); - struct ieee80211_local *local = sdata->local; -- struct ieee80211_key *key; - struct tid_ampdu_tx *tid_tx; - u8 tid; - -@@ -4234,7 +4233,6 @@ static void ieee80211_8023_xmit(struct i - info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP; - info->control.vif = &sdata->vif; - -- key = rcu_dereference(sta->ptk[sta->ptk_idx]); - if (key) - info->control.hw_key = &key->conf; - -@@ -4251,12 +4249,9 @@ netdev_tx_t ieee80211_subif_start_xmit_8 - { - struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); - struct ethhdr *ehdr = (struct ethhdr *)skb->data; -+ struct ieee80211_key *key; - struct sta_info *sta; -- -- if (WARN_ON(!sdata->hw_80211_encap)) { -- kfree_skb(skb); -- return NETDEV_TX_OK; -- } -+ bool offload = true; - - if (unlikely(skb->len < ETH_HLEN)) { - kfree_skb(skb); -@@ -4265,15 +4260,26 @@ netdev_tx_t ieee80211_subif_start_xmit_8 - - rcu_read_lock(); - -- if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) -+ if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { - kfree_skb(skb); -- else if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || -- !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || -- sdata->control_port_protocol == ehdr->h_proto)) -- ieee80211_subif_start_xmit(skb, dev); -+ goto out; -+ } -+ -+ if (unlikely(IS_ERR_OR_NULL(sta) || !sta->uploaded || -+ !test_sta_flag(sta, WLAN_STA_AUTHORIZED) || -+ sdata->control_port_protocol == ehdr->h_proto)) -+ offload = false; -+ else if ((key = rcu_dereference(sta->ptk[sta->ptk_idx])) && -+ (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) || -+ key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)) -+ offload = false; -+ -+ if (offload) -+ ieee80211_8023_xmit(sdata, dev, sta, key, skb); - else -- ieee80211_8023_xmit(sdata, dev, sta, skb); -+ ieee80211_subif_start_xmit(skb, dev); - -+out: - rcu_read_unlock(); - - return NETDEV_TX_OK; diff --git a/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch b/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch deleted file mode 100644 index e13723b160..0000000000 --- a/package/kernel/mac80211/patches/subsys/319-mac80211-reduce-duplication-in-tx-status-functions.patch +++ /dev/null @@ -1,197 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:16:59 +0200 -Subject: [PATCH] mac80211: reduce duplication in tx status functions - -Move redundant functionality from __ieee80211_tx_status into -ieee80211_tx_status_ext. Preparation for unifying with the 802.3 tx status -codepath. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -184,18 +184,6 @@ static void ieee80211_frame_acked(struct - struct ieee80211_mgmt *mgmt = (void *) skb->data; - struct ieee80211_local *local = sta->local; - struct ieee80211_sub_if_data *sdata = sta->sdata; -- struct ieee80211_tx_info *txinfo = IEEE80211_SKB_CB(skb); -- -- if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { -- sta->status_stats.last_ack = jiffies; -- if (txinfo->status.is_valid_ack_signal) { -- sta->status_stats.last_ack_signal = -- (s8)txinfo->status.ack_signal; -- sta->status_stats.ack_signal_filled = true; -- ewma_avg_signal_add(&sta->status_stats.avg_ack_signal, -- -txinfo->status.ack_signal); -- } -- } - - if (ieee80211_is_data_qos(mgmt->frame_control)) { - struct ieee80211_hdr *hdr = (void *) skb->data; -@@ -899,7 +887,8 @@ void ieee80211_tx_monitor(struct ieee802 - } - - static void __ieee80211_tx_status(struct ieee80211_hw *hw, -- struct ieee80211_tx_status *status) -+ struct ieee80211_tx_status *status, -+ int rates_idx, int retry_count) - { - struct sk_buff *skb = status->skb; - struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; -@@ -908,8 +897,6 @@ static void __ieee80211_tx_status(struct - struct sta_info *sta; - __le16 fc; - struct ieee80211_supported_band *sband; -- int retry_count; -- int rates_idx; - bool send_to_cooked; - bool acked; - bool noack_success; -@@ -918,8 +905,6 @@ static void __ieee80211_tx_status(struct - int tid = IEEE80211_NUM_TIDS; - u16 tx_time_est; - -- rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); -- - sband = local->hw.wiphy->bands[info->band]; - fc = hdr->frame_control; - -@@ -996,24 +981,14 @@ static void __ieee80211_tx_status(struct - if (info->flags & IEEE80211_TX_STAT_TX_FILTERED) { - ieee80211_handle_filtered_frame(local, sta, skb); - return; -- } else { -+ } else if (ieee80211_is_data_present(fc)) { - if (!acked && !noack_success) -- sta->status_stats.retry_failed++; -- sta->status_stats.retry_count += retry_count; -+ sta->status_stats.msdu_failed[tid]++; - -- if (ieee80211_is_data_present(fc)) { -- if (!acked && !noack_success) -- sta->status_stats.msdu_failed[tid]++; -- -- sta->status_stats.msdu_retries[tid] += -- retry_count; -- } -+ sta->status_stats.msdu_retries[tid] += -+ retry_count; - } - -- rate_control_tx_status(local, sband, status); -- if (ieee80211_vif_is_mesh(&sta->sdata->vif)) -- ieee80211s_update_metric(local, sta, status); -- - if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked) - ieee80211_frame_acked(sta, skb); - -@@ -1038,20 +1013,6 @@ static void __ieee80211_tx_status(struct - true); - ieee80211_info_set_tx_time_est(info, 0); - } -- -- if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { -- if (acked) { -- if (sta->status_stats.lost_packets) -- sta->status_stats.lost_packets = 0; -- -- /* Track when last TDLS packet was ACKed */ -- sta->status_stats.last_pkt_time = jiffies; -- } else if (noack_success) { -- /* nothing to do here, do not account as lost */ -- } else { -- ieee80211_lost_packet(sta, info); -- } -- } - } - - /* SNMP counters -@@ -1135,7 +1096,7 @@ void ieee80211_tx_status(struct ieee8021 - if (sta) - status.sta = &sta->sta; - -- __ieee80211_tx_status(hw, &status); -+ ieee80211_tx_status_ext(hw, &status); - rcu_read_unlock(); - } - EXPORT_SYMBOL(ieee80211_tx_status); -@@ -1148,7 +1109,7 @@ void ieee80211_tx_status_ext(struct ieee - struct ieee80211_sta *pubsta = status->sta; - struct ieee80211_supported_band *sband; - struct sta_info *sta; -- int retry_count; -+ int rates_idx, retry_count; - bool acked, noack_success; - - if (pubsta) { -@@ -1158,13 +1119,7 @@ void ieee80211_tx_status_ext(struct ieee - sta->tx_stats.last_rate_info = *status->rate; - } - -- if (status->skb) -- return __ieee80211_tx_status(hw, status); -- -- if (!status->sta) -- return; -- -- ieee80211_tx_get_rates(hw, info, &retry_count); -+ rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); - - sband = hw->wiphy->bands[info->band]; - -@@ -1176,20 +1131,30 @@ void ieee80211_tx_status_ext(struct ieee - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; - -- if (acked) { -- sta->status_stats.last_ack = jiffies; -+ if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { -+ if (acked) { -+ sta->status_stats.last_ack = jiffies; - -- if (sta->status_stats.lost_packets) -- sta->status_stats.lost_packets = 0; -+ if (sta->status_stats.lost_packets) -+ sta->status_stats.lost_packets = 0; - -- /* Track when last packet was ACKed */ -- sta->status_stats.last_pkt_time = jiffies; -- } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { -- return; -- } else if (noack_success) { -- /* nothing to do here, do not account as lost */ -- } else { -- ieee80211_lost_packet(sta, info); -+ /* Track when last packet was ACKed */ -+ sta->status_stats.last_pkt_time = jiffies; -+ -+ if (info->status.is_valid_ack_signal) { -+ sta->status_stats.last_ack_signal = -+ (s8)info->status.ack_signal; -+ sta->status_stats.ack_signal_filled = true; -+ ewma_avg_signal_add(&sta->status_stats.avg_ack_signal, -+ -info->status.ack_signal); -+ } -+ } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { -+ return; -+ } else if (noack_success) { -+ /* nothing to do here, do not account as lost */ -+ } else { -+ ieee80211_lost_packet(sta, info); -+ } - } - - rate_control_tx_status(local, sband, status); -@@ -1197,6 +1162,10 @@ void ieee80211_tx_status_ext(struct ieee - ieee80211s_update_metric(local, sta, status); - } - -+ if (status->skb) -+ return __ieee80211_tx_status(hw, status, rates_idx, -+ retry_count); -+ - if (acked || noack_success) { - I802_DEBUG_INC(local->dot11TransmittedFrameCount); - if (!pubsta) diff --git a/package/kernel/mac80211/patches/subsys/320-mac80211-remove-tx-status-call-to-ieee80211_sta_regi.patch b/package/kernel/mac80211/patches/subsys/320-mac80211-remove-tx-status-call-to-ieee80211_sta_regi.patch deleted file mode 100644 index 168d6458a5..0000000000 --- a/package/kernel/mac80211/patches/subsys/320-mac80211-remove-tx-status-call-to-ieee80211_sta_regi.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:29:12 +0200 -Subject: [PATCH] mac80211: remove tx status call to - ieee80211_sta_register_airtime - -All drivers using airtime fairness are calling ieee80211_sta_register_airtime -directly - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -997,12 +997,6 @@ static void __ieee80211_tx_status(struct - ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, - acked, info->status.tx_time); - -- if (info->status.tx_time && -- wiphy_ext_feature_isset(local->hw.wiphy, -- NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) -- ieee80211_sta_register_airtime(&sta->sta, tid, -- info->status.tx_time, 0); -- - if ((tx_time_est = ieee80211_info_get_tx_time_est(info)) > 0) { - /* Do this here to avoid the expensive lookup of the sta - * in ieee80211_report_used_skb(). diff --git a/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch deleted file mode 100644 index f8287c53a7..0000000000 --- a/package/kernel/mac80211/patches/subsys/321-mac80211-optimize-station-connection-monitor.patch +++ /dev/null @@ -1,174 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:29:56 +0200 -Subject: [PATCH] mac80211: optimize station connection monitor - -Calling mod_timer for every rx/tx packet can be quite expensive. -Instead of constantly updating the timer, we can simply let it run out -and check the timestamp of the last ACK or rx packet to re-arm it. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/ieee80211_i.h -+++ b/net/mac80211/ieee80211_i.h -@@ -2045,8 +2045,6 @@ void ieee80211_dynamic_ps_timer(struct t - void ieee80211_send_nullfunc(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata, - bool powersave); --void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, -- struct ieee80211_hdr *hdr); - void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata, - struct ieee80211_hdr *hdr, bool ack, u16 tx_time); - ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -2432,23 +2432,6 @@ static void ieee80211_set_disassoc(struc - sdata->encrypt_headroom = IEEE80211_ENCRYPT_HEADROOM; - } - --void ieee80211_sta_rx_notify(struct ieee80211_sub_if_data *sdata, -- struct ieee80211_hdr *hdr) --{ -- /* -- * We can postpone the mgd.timer whenever receiving unicast frames -- * from AP because we know that the connection is working both ways -- * at that time. But multicast frames (and hence also beacons) must -- * be ignored here, because we need to trigger the timer during -- * data idle periods for sending the periodic probe request to the -- * AP we're connected to. -- */ -- if (is_multicast_ether_addr(hdr->addr1)) -- return; -- -- ieee80211_sta_reset_conn_monitor(sdata); --} -- - static void ieee80211_reset_ap_probe(struct ieee80211_sub_if_data *sdata) - { - struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; -@@ -2521,21 +2504,13 @@ void ieee80211_sta_tx_notify(struct ieee - { - ieee80211_sta_tx_wmm_ac_notify(sdata, hdr, tx_time); - -- if (!ieee80211_is_data(hdr->frame_control)) -- return; -- -- if (ieee80211_is_any_nullfunc(hdr->frame_control) && -- sdata->u.mgd.probe_send_count > 0) { -- if (ack) -- ieee80211_sta_reset_conn_monitor(sdata); -- else -- sdata->u.mgd.nullfunc_failed = true; -- ieee80211_queue_work(&sdata->local->hw, &sdata->work); -+ if (!ieee80211_is_any_nullfunc(hdr->frame_control) || -+ !sdata->u.mgd.probe_send_count) - return; -- } - -- if (ack) -- ieee80211_sta_reset_conn_monitor(sdata); -+ if (!ack) -+ sdata->u.mgd.nullfunc_failed = true; -+ ieee80211_queue_work(&sdata->local->hw, &sdata->work); - } - - static void ieee80211_mlme_send_probe_req(struct ieee80211_sub_if_data *sdata, -@@ -3600,8 +3575,8 @@ static bool ieee80211_assoc_success(stru - * Start timer to probe the connection to the AP now. - * Also start the timer that will detect beacon loss. - */ -- ieee80211_sta_rx_notify(sdata, (struct ieee80211_hdr *)mgmt); - ieee80211_sta_reset_beacon_monitor(sdata); -+ ieee80211_sta_reset_conn_monitor(sdata); - - ret = true; - out: -@@ -4569,10 +4544,26 @@ static void ieee80211_sta_conn_mon_timer - from_timer(sdata, t, u.mgd.conn_mon_timer); - struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; - struct ieee80211_local *local = sdata->local; -+ struct sta_info *sta; -+ unsigned long timeout; - - if (sdata->vif.csa_active && !ifmgd->csa_waiting_bcn) - return; - -+ sta = sta_info_get(sdata, ifmgd->bssid); -+ if (!sta) -+ return; -+ -+ timeout = sta->status_stats.last_ack; -+ if (time_before(sta->status_stats.last_ack, sta->rx_stats.last_rx)) -+ timeout = sta->rx_stats.last_rx; -+ timeout += IEEE80211_CONNECTION_IDLE_TIME; -+ -+ if (time_is_before_jiffies(timeout)) { -+ mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout)); -+ return; -+ } -+ - ieee80211_queue_work(&local->hw, &ifmgd->monitor_work); - } - ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -1812,9 +1812,6 @@ ieee80211_rx_h_sta_process(struct ieee80 - sta->rx_stats.last_rate = sta_stats_encode_rate(status); - } - -- if (rx->sdata->vif.type == NL80211_IFTYPE_STATION) -- ieee80211_sta_rx_notify(rx->sdata, hdr); -- - sta->rx_stats.fragments++; - - u64_stats_update_begin(&rx->sta->rx_stats.syncp); -@@ -4149,7 +4146,6 @@ void ieee80211_check_fast_rx(struct sta_ - fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr2); - fastrx.expected_ds_bits = 0; - } else { -- fastrx.sta_notify = sdata->u.mgd.probe_send_count > 0; - fastrx.da_offs = offsetof(struct ieee80211_hdr, addr1); - fastrx.sa_offs = offsetof(struct ieee80211_hdr, addr3); - fastrx.expected_ds_bits = -@@ -4379,11 +4375,6 @@ static bool ieee80211_invoke_fast_rx(str - pskb_trim(skb, skb->len - fast_rx->icv_len)) - goto drop; - -- if (unlikely(fast_rx->sta_notify)) { -- ieee80211_sta_rx_notify(rx->sdata, hdr); -- fast_rx->sta_notify = false; -- } -- - /* statistics part of ieee80211_rx_h_sta_process() */ - if (!(status->flag & RX_FLAG_NO_SIGNAL_VAL)) { - stats->last_signal = status->signal; ---- a/net/mac80211/sta_info.h -+++ b/net/mac80211/sta_info.h -@@ -336,7 +336,6 @@ struct ieee80211_fast_tx { - * @expected_ds_bits: from/to DS bits expected - * @icv_len: length of the MIC if present - * @key: bool indicating encryption is expected (key is set) -- * @sta_notify: notify the MLME code (once) - * @internal_forward: forward froms internally on AP/VLAN type interfaces - * @uses_rss: copy of USES_RSS hw flag - * @da_offs: offset of the DA in the header (for header conversion) -@@ -352,7 +351,6 @@ struct ieee80211_fast_rx { - __le16 expected_ds_bits; - u8 icv_len; - u8 key:1, -- sta_notify:1, - internal_forward:1, - uses_rss:1; - u8 da_offs, sa_offs; ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -1227,9 +1227,6 @@ void ieee80211_tx_status_8023(struct iee - sta->status_stats.retry_count += retry_count; - - if (ieee80211_hw_check(hw, REPORTS_TX_ACK_STATUS)) { -- if (acked && vif->type == NL80211_IFTYPE_STATION) -- ieee80211_sta_reset_conn_monitor(sdata); -- - sta->status_stats.last_ack = jiffies; - if (info->flags & IEEE80211_TX_STAT_ACK) { - if (sta->status_stats.lost_packets) diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch deleted file mode 100644 index 8505ce56f6..0000000000 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-swap-NEED_TXPROCESSING-and-HW_80211_ENCAP-t.patch +++ /dev/null @@ -1,227 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:35:32 +0200 -Subject: [PATCH] mac80211: swap NEED_TXPROCESSING and HW_80211_ENCAP tx - flags - -In order to unify the tx status path, the hw 802.11 encapsulation flag -needs to survive the trip to the tx status call. -Since we don't have any free bits in info->flags, we need to move one. -IEEE80211_TX_INTFL_NEED_TXPROCESSING is only used internally in mac80211, -and only before the call into the driver. - -Signed-off-by: Felix Fietkau ---- - ---- a/drivers/net/wireless/ath/ath11k/dp_tx.c -+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c -@@ -14,7 +14,7 @@ ath11k_dp_tx_get_encap_type(struct ath11 - { - struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); - -- if (tx_info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) -+ if (tx_info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) - return HAL_TCL_ENCAP_TYPE_ETHERNET; - - return HAL_TCL_ENCAP_TYPE_NATIVE_WIFI; -@@ -93,7 +93,7 @@ int ath11k_dp_tx(struct ath11k *ar, stru - if (test_bit(ATH11K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)) - return -ESHUTDOWN; - -- if (!(info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) && -+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && - !ieee80211_is_data(hdr->frame_control)) - return -ENOTSUPP; - ---- a/drivers/net/wireless/ath/ath11k/mac.c -+++ b/drivers/net/wireless/ath/ath11k/mac.c -@@ -3749,7 +3749,7 @@ static int ath11k_mac_mgmt_tx_wmi(struct - return -ENOSPC; - - info = IEEE80211_SKB_CB(skb); -- if (!(info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP)) { -+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) { - if ((ieee80211_is_action(hdr->frame_control) || - ieee80211_is_deauth(hdr->frame_control) || - ieee80211_is_disassoc(hdr->frame_control)) && -@@ -3876,7 +3876,7 @@ static void ath11k_mac_op_tx(struct ieee - bool is_prb_rsp; - int ret; - -- if (info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) { -+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) { - skb_cb->flags |= ATH11K_SKB_HW_80211_ENCAP; - } else if (ieee80211_is_mgmt(hdr->frame_control)) { - is_prb_rsp = ieee80211_is_probe_resp(hdr->frame_control); ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -720,9 +720,8 @@ struct ieee80211_bss_conf { - * @IEEE80211_TX_INTFL_OFFCHAN_TX_OK: Internal to mac80211. Used to indicate - * that a frame can be transmitted while the queues are stopped for - * off-channel operation. -- * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, -- * used to indicate that a pending frame requires TX processing before -- * it can be sent out. -+ * @IEEE80211_TX_CTL_HW_80211_ENCAP: This frame uses hardware encapsulation -+ * (header conversion) - * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, - * used to indicate that a frame was already retried due to PS - * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, -@@ -791,7 +790,7 @@ enum mac80211_tx_info_flags { - IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), - IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), - IEEE80211_TX_INTFL_OFFCHAN_TX_OK = BIT(13), -- IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), -+ IEEE80211_TX_CTL_HW_80211_ENCAP = BIT(14), - IEEE80211_TX_INTFL_RETRIED = BIT(15), - IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), - IEEE80211_TX_CTL_NO_PS_BUFFER = BIT(17), -@@ -823,8 +822,9 @@ enum mac80211_tx_info_flags { - * @IEEE80211_TX_CTRL_AMSDU: This frame is an A-MSDU frame - * @IEEE80211_TX_CTRL_FAST_XMIT: This frame is going through the fast_xmit path - * @IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP: This frame skips mesh path lookup -- * @IEEE80211_TX_CTRL_HW_80211_ENCAP: This frame uses hardware encapsulation -- * (header conversion) -+ * @IEEE80211_TX_INTCFL_NEED_TXPROCESSING: completely internal to mac80211, -+ * used to indicate that a pending frame requires TX processing before -+ * it can be sent out. - * - * These flags are used in tx_info->control.flags. - */ -@@ -835,7 +835,7 @@ enum mac80211_tx_control_flags { - IEEE80211_TX_CTRL_AMSDU = BIT(3), - IEEE80211_TX_CTRL_FAST_XMIT = BIT(4), - IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP = BIT(5), -- IEEE80211_TX_CTRL_HW_80211_ENCAP = BIT(6), -+ IEEE80211_TX_INTCFL_NEED_TXPROCESSING = BIT(6), - }; - - /* ---- a/net/mac80211/mesh_hwmp.c -+++ b/net/mac80211/mesh_hwmp.c -@@ -212,7 +212,7 @@ static void prepare_frame_for_deferred_t - skb->priority = 7; - - info->control.vif = &sdata->vif; -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - ieee80211_set_qos_hdr(sdata, skb); - ieee80211_mps_set_frame_flags(sdata, NULL, hdr); - } -@@ -1163,7 +1163,7 @@ int mesh_nexthop_resolve(struct ieee8021 - if (skb_queue_len(&mpath->frame_queue) >= MESH_FRAME_QUEUE_LEN) - skb_to_free = skb_dequeue(&mpath->frame_queue); - -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - ieee80211_set_qos_hdr(sdata, skb); - skb_queue_tail(&mpath->frame_queue, skb); - if (skb_to_free) ---- a/net/mac80211/mesh_ps.c -+++ b/net/mac80211/mesh_ps.c -@@ -432,7 +432,7 @@ static void mpsp_qos_null_append(struct - - info = IEEE80211_SKB_CB(new_skb); - info->control.vif = &sdata->vif; -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - - __skb_queue_tail(frames, new_skb); - } ---- a/net/mac80211/rx.c -+++ b/net/mac80211/rx.c -@@ -2897,7 +2897,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80 - fwd_hdr->frame_control &= ~cpu_to_le16(IEEE80211_FCTL_RETRY); - info = IEEE80211_SKB_CB(fwd_skb); - memset(info, 0, sizeof(*info)); -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - info->control.vif = &rx->sdata->vif; - info->control.jiffies = jiffies; - if (is_multicast_ether_addr(fwd_hdr->addr1)) { ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -66,8 +66,8 @@ static void ieee80211_handle_filtered_fr - - info->control.jiffies = jiffies; - info->control.vif = &sta->sdata->vif; -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING | -- IEEE80211_TX_INTFL_RETRANSMISSION; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; -+ info->flags |= IEEE80211_TX_INTFL_RETRANSMISSION; - info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS; - - sta->status_stats.filtered++; ---- a/net/mac80211/tx.c -+++ b/net/mac80211/tx.c -@@ -530,7 +530,7 @@ ieee80211_tx_h_unicast_ps_buf(struct iee - - info->control.jiffies = jiffies; - info->control.vif = &tx->sdata->vif; -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS; - skb_queue_tail(&sta->ps_tx_buf[ac], tx->skb); - spin_unlock(&sta->ps_lock); -@@ -1132,7 +1132,7 @@ static bool ieee80211_tx_prep_agg(struct - tx->sta->sta.addr, tx->sta->sta.aid); - } - info->control.vif = &tx->sdata->vif; -- info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags |= IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS; - __skb_queue_tail(&tid_tx->pending, skb); - if (skb_queue_len(&tid_tx->pending) > STA_MAX_TX_BUFFER) -@@ -1177,7 +1177,7 @@ ieee80211_tx_prepare(struct ieee80211_su - * we are doing the needed processing, so remove the flag - * now. - */ -- info->flags &= ~IEEE80211_TX_INTFL_NEED_TXPROCESSING; -+ info->control.flags &= ~IEEE80211_TX_INTCFL_NEED_TXPROCESSING; - - hdr = (struct ieee80211_hdr *) skb->data; - -@@ -1256,7 +1256,7 @@ static struct txq_info *ieee80211_get_tx - (info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE)) - return NULL; - -- if (!(info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) && -+ if (!(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) && - unlikely(!ieee80211_is_data_present(hdr->frame_control))) { - if ((!ieee80211_is_mgmt(hdr->frame_control) || - ieee80211_is_bufferable_mmpdu(hdr->frame_control) || -@@ -3640,7 +3640,7 @@ begin: - else - info->flags &= ~IEEE80211_TX_CTL_AMPDU; - -- if (info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) -+ if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) - goto encap_out; - - if (info->control.flags & IEEE80211_TX_CTRL_FAST_XMIT) { -@@ -4230,7 +4230,7 @@ static void ieee80211_8023_xmit(struct i - sdata = container_of(sdata->bss, - struct ieee80211_sub_if_data, u.ap); - -- info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP; -+ info->flags |= IEEE80211_TX_CTL_HW_80211_ENCAP; - info->control.vif = &sdata->vif; - - if (key) -@@ -4355,7 +4355,7 @@ static bool ieee80211_tx_pending_skb(str - - sdata = vif_to_sdata(info->control.vif); - -- if (info->flags & IEEE80211_TX_INTFL_NEED_TXPROCESSING) { -+ if (info->control.flags & IEEE80211_TX_INTCFL_NEED_TXPROCESSING) { - chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); - if (unlikely(!chanctx_conf)) { - dev_kfree_skb(skb); -@@ -4363,7 +4363,7 @@ static bool ieee80211_tx_pending_skb(str - } - info->band = chanctx_conf->def.chan->band; - result = ieee80211_tx(sdata, NULL, skb, true, 0); -- } else if (info->control.flags & IEEE80211_TX_CTRL_HW_80211_ENCAP) { -+ } else if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) { - if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) { - dev_kfree_skb(skb); - return true; diff --git a/package/kernel/mac80211/patches/subsys/323-mac80211-unify-802.3-offload-and-802.11-tx-status-co.patch b/package/kernel/mac80211/patches/subsys/323-mac80211-unify-802.3-offload-and-802.11-tx-status-co.patch deleted file mode 100644 index 7bb54f499b..0000000000 --- a/package/kernel/mac80211/patches/subsys/323-mac80211-unify-802.3-offload-and-802.11-tx-status-co.patch +++ /dev/null @@ -1,159 +0,0 @@ -From: Felix Fietkau -Date: Mon, 17 Aug 2020 13:54:19 +0200 -Subject: [PATCH] mac80211: unify 802.3 (offload) and 802.11 tx status - codepath - -Make ieee80211_tx_status_8023 call ieee80211_tx_status_ext, similar to -ieee80211_tx_status. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -903,7 +903,6 @@ static void __ieee80211_tx_status(struct - struct ieee80211_bar *bar; - int shift = 0; - int tid = IEEE80211_NUM_TIDS; -- u16 tx_time_est; - - sband = local->hw.wiphy->bands[info->band]; - fc = hdr->frame_control; -@@ -996,17 +995,6 @@ static void __ieee80211_tx_status(struct - ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) - ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, - acked, info->status.tx_time); -- -- if ((tx_time_est = ieee80211_info_get_tx_time_est(info)) > 0) { -- /* Do this here to avoid the expensive lookup of the sta -- * in ieee80211_report_used_skb(). -- */ -- ieee80211_sta_update_pending_airtime(local, sta, -- skb_get_queue_mapping(skb), -- tx_time_est, -- true); -- ieee80211_info_set_tx_time_est(info, 0); -- } - } - - /* SNMP counters -@@ -1102,9 +1090,11 @@ void ieee80211_tx_status_ext(struct ieee - struct ieee80211_tx_info *info = status->info; - struct ieee80211_sta *pubsta = status->sta; - struct ieee80211_supported_band *sband; -- struct sta_info *sta; -+ struct sk_buff *skb = status->skb; -+ struct sta_info *sta = NULL; - int rates_idx, retry_count; - bool acked, noack_success; -+ u16 tx_time_est; - - if (pubsta) { - sta = container_of(pubsta, struct sta_info, sta); -@@ -1156,7 +1146,18 @@ void ieee80211_tx_status_ext(struct ieee - ieee80211s_update_metric(local, sta, status); - } - -- if (status->skb) -+ if (skb && (tx_time_est = ieee80211_info_get_tx_time_est(info)) > 0) { -+ /* Do this here to avoid the expensive lookup of the sta -+ * in ieee80211_report_used_skb(). -+ */ -+ ieee80211_sta_update_pending_airtime(local, sta, -+ skb_get_queue_mapping(skb), -+ tx_time_est, -+ true); -+ ieee80211_info_set_tx_time_est(info, 0); -+ } -+ -+ if (skb && !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) - return __ieee80211_tx_status(hw, status, rates_idx, - retry_count); - -@@ -1171,6 +1172,12 @@ void ieee80211_tx_status_ext(struct ieee - } else { - I802_DEBUG_INC(local->dot11FailedCount); - } -+ -+ if (!skb) -+ return; -+ -+ ieee80211_report_used_skb(local, skb, false); -+ dev_kfree_skb(skb); - } - EXPORT_SYMBOL(ieee80211_tx_status_ext); - -@@ -1197,66 +1204,23 @@ void ieee80211_tx_status_8023(struct iee - struct ieee80211_vif *vif, - struct sk_buff *skb) - { -- struct ieee80211_local *local = hw_to_local(hw); - struct ieee80211_sub_if_data *sdata; -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ struct ieee80211_tx_status status = { -+ .skb = skb, -+ .info = IEEE80211_SKB_CB(skb), -+ }; - struct sta_info *sta; -- int retry_count; -- int rates_idx; -- bool acked; - - sdata = vif_to_sdata(vif); - -- acked = info->flags & IEEE80211_TX_STAT_ACK; -- rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); -- - rcu_read_lock(); - -- if (ieee80211_lookup_ra_sta(sdata, skb, &sta)) -- goto counters_update; -- -- if (IS_ERR(sta)) -- goto counters_update; -- -- if (!acked) -- sta->status_stats.retry_failed++; -- -- if (rates_idx != -1) -- sta->tx_stats.last_rate = info->status.rates[rates_idx]; -- -- sta->status_stats.retry_count += retry_count; -- -- if (ieee80211_hw_check(hw, REPORTS_TX_ACK_STATUS)) { -- sta->status_stats.last_ack = jiffies; -- if (info->flags & IEEE80211_TX_STAT_ACK) { -- if (sta->status_stats.lost_packets) -- sta->status_stats.lost_packets = 0; -+ if (!ieee80211_lookup_ra_sta(sdata, skb, &sta) && !IS_ERR(sta)) -+ status.sta = &sta->sta; - -- sta->status_stats.last_pkt_time = jiffies; -- } else { -- ieee80211_lost_packet(sta, info); -- } -- } -+ ieee80211_tx_status_ext(hw, &status); - --counters_update: - rcu_read_unlock(); -- ieee80211_led_tx(local); -- -- if (!(info->flags & IEEE80211_TX_STAT_ACK) && -- !(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED)) -- goto skip_stats_update; -- -- I802_DEBUG_INC(local->dot11TransmittedFrameCount); -- if (is_multicast_ether_addr(skb->data)) -- I802_DEBUG_INC(local->dot11MulticastTransmittedFrameCount); -- if (retry_count > 0) -- I802_DEBUG_INC(local->dot11RetryCount); -- if (retry_count > 1) -- I802_DEBUG_INC(local->dot11MultipleRetryCount); -- --skip_stats_update: -- ieee80211_report_used_skb(local, skb, false); -- dev_kfree_skb(skb); - } - EXPORT_SYMBOL(ieee80211_tx_status_8023); - diff --git a/package/kernel/mac80211/patches/subsys/324-mac80211-support-using-ieee80211_tx_status_ext-to-fr.patch b/package/kernel/mac80211/patches/subsys/324-mac80211-support-using-ieee80211_tx_status_ext-to-fr.patch deleted file mode 100644 index 5469a419bf..0000000000 --- a/package/kernel/mac80211/patches/subsys/324-mac80211-support-using-ieee80211_tx_status_ext-to-fr.patch +++ /dev/null @@ -1,63 +0,0 @@ -From: Felix Fietkau -Date: Thu, 20 Aug 2020 17:27:00 +0200 -Subject: [PATCH] mac80211: support using ieee80211_tx_status_ext to free - skbs without status info - -For encap-offloaded packets, ieee80211_free_txskb cannot be used, since it -does not have the vif pointer. -Using ieee80211_tx_status_ext for this purpose has the advantage of being able -avoid an extra station lookup for AQL - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -1103,6 +1103,21 @@ void ieee80211_tx_status_ext(struct ieee - sta->tx_stats.last_rate_info = *status->rate; - } - -+ if (skb && (tx_time_est = -+ ieee80211_info_get_tx_time_est(IEEE80211_SKB_CB(skb))) > 0) { -+ /* Do this here to avoid the expensive lookup of the sta -+ * in ieee80211_report_used_skb(). -+ */ -+ ieee80211_sta_update_pending_airtime(local, sta, -+ skb_get_queue_mapping(skb), -+ tx_time_est, -+ true); -+ ieee80211_info_set_tx_time_est(IEEE80211_SKB_CB(skb), 0); -+ } -+ -+ if (!status->info) -+ goto free; -+ - rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count); - - sband = hw->wiphy->bands[info->band]; -@@ -1146,17 +1161,6 @@ void ieee80211_tx_status_ext(struct ieee - ieee80211s_update_metric(local, sta, status); - } - -- if (skb && (tx_time_est = ieee80211_info_get_tx_time_est(info)) > 0) { -- /* Do this here to avoid the expensive lookup of the sta -- * in ieee80211_report_used_skb(). -- */ -- ieee80211_sta_update_pending_airtime(local, sta, -- skb_get_queue_mapping(skb), -- tx_time_est, -- true); -- ieee80211_info_set_tx_time_est(info, 0); -- } -- - if (skb && !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) - return __ieee80211_tx_status(hw, status, rates_idx, - retry_count); -@@ -1173,6 +1177,7 @@ void ieee80211_tx_status_ext(struct ieee - I802_DEBUG_INC(local->dot11FailedCount); - } - -+free: - if (!skb) - return; - diff --git a/package/kernel/mac80211/patches/subsys/325-mac80211-extend-ieee80211_tx_status_ext-to-support-b.patch b/package/kernel/mac80211/patches/subsys/325-mac80211-extend-ieee80211_tx_status_ext-to-support-b.patch deleted file mode 100644 index e8b29bb4c5..0000000000 --- a/package/kernel/mac80211/patches/subsys/325-mac80211-extend-ieee80211_tx_status_ext-to-support-b.patch +++ /dev/null @@ -1,53 +0,0 @@ -From: Felix Fietkau -Date: Fri, 21 Aug 2020 05:49:07 +0200 -Subject: [PATCH] mac80211: extend ieee80211_tx_status_ext to support - bulk free - -Store processed skbs ready to be freed in a list so the driver bulk free them - -Signed-off-by: Felix Fietkau ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -1092,12 +1092,14 @@ ieee80211_info_get_tx_time_est(struct ie - * @info: Basic tx status information - * @skb: Packet skb (can be NULL if not provided by the driver) - * @rate: The TX rate that was used when sending the packet -+ * @free_list: list where processed skbs are stored to be free'd by the driver - */ - struct ieee80211_tx_status { - struct ieee80211_sta *sta; - struct ieee80211_tx_info *info; - struct sk_buff *skb; - struct rate_info *rate; -+ struct list_head *free_list; - }; - - /** ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -1053,7 +1053,10 @@ static void __ieee80211_tx_status(struct - * with this test... - */ - if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) { -- dev_kfree_skb(skb); -+ if (status->free_list) -+ list_add_tail(&skb->list, status->free_list); -+ else -+ dev_kfree_skb(skb); - return; - } - -@@ -1182,7 +1185,10 @@ free: - return; - - ieee80211_report_used_skb(local, skb, false); -- dev_kfree_skb(skb); -+ if (status->free_list) -+ list_add_tail(&skb->list, status->free_list); -+ else -+ dev_kfree_skb(skb); - } - EXPORT_SYMBOL(ieee80211_tx_status_ext); - diff --git a/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch b/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch deleted file mode 100644 index aa166c6431..0000000000 --- a/package/kernel/mac80211/patches/subsys/326-mac80211-notify-the-driver-when-a-sta-uses-4-address.patch +++ /dev/null @@ -1,109 +0,0 @@ -From: Felix Fietkau -Date: Fri, 21 Aug 2020 05:51:58 +0200 -Subject: [PATCH] mac80211: notify the driver when a sta uses 4-address - mode - -This is needed for encapsulation offload of 4-address mode packets - -Signed-off-by: Felix Fietkau ---- - ---- a/include/net/mac80211.h -+++ b/include/net/mac80211.h -@@ -3840,6 +3840,8 @@ enum ieee80211_reconfig_type { - * This callback may sleep. - * @update_vif_config: Update virtual interface offload flags - * This callback may sleep. -+ * @sta_set_4addr: Called to notify the driver when a station starts/stops using -+ * 4-address mode - */ - struct ieee80211_ops { - void (*tx)(struct ieee80211_hw *hw, -@@ -4153,6 +4155,8 @@ struct ieee80211_ops { - struct ieee80211_sta *sta, u8 tids); - void (*update_vif_offload)(struct ieee80211_hw *hw, - struct ieee80211_vif *vif); -+ void (*sta_set_4addr)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, -+ struct ieee80211_sta *sta, bool enabled); - }; - - /** ---- a/net/mac80211/cfg.c -+++ b/net/mac80211/cfg.c -@@ -1694,6 +1694,7 @@ static int ieee80211_change_station(stru - - rcu_assign_pointer(vlansdata->u.vlan.sta, sta); - __ieee80211_check_fast_rx_iface(vlansdata); -+ drv_sta_set_4addr(local, sta->sdata, &sta->sta, true); - } - - if (sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN && ---- a/net/mac80211/driver-ops.h -+++ b/net/mac80211/driver-ops.h -@@ -1400,4 +1400,18 @@ static inline void drv_update_vif_offloa - trace_drv_return_void(local); - } - -+static inline void drv_sta_set_4addr(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, bool enabled) -+{ -+ sdata = get_bss_sdata(sdata); -+ if (!check_sdata_in_driver(sdata)) -+ return; -+ -+ trace_drv_sta_set_4addr(local, sdata, sta, enabled); -+ if (local->ops->sta_set_4addr) -+ local->ops->sta_set_4addr(&local->hw, &sdata->vif, sta, enabled); -+ trace_drv_return_void(local); -+} -+ - #endif /* __MAC80211_DRIVER_OPS */ ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -3518,6 +3518,9 @@ static bool ieee80211_assoc_success(stru - goto out; - } - -+ if (sdata->wdev.use_4addr) -+ drv_sta_set_4addr(local, sdata, &sta->sta, true); -+ - mutex_unlock(&sdata->local->sta_mtx); - - /* ---- a/net/mac80211/trace.h -+++ b/net/mac80211/trace.h -@@ -2739,6 +2739,33 @@ DEFINE_EVENT(local_sdata_addr_evt, drv_u - TP_ARGS(local, sdata) - ); - -+TRACE_EVENT(drv_sta_set_4addr, -+ TP_PROTO(struct ieee80211_local *local, -+ struct ieee80211_sub_if_data *sdata, -+ struct ieee80211_sta *sta, bool enabled), -+ -+ TP_ARGS(local, sdata, sta, enabled), -+ -+ TP_STRUCT__entry( -+ LOCAL_ENTRY -+ VIF_ENTRY -+ STA_ENTRY -+ __field(bool, enabled) -+ ), -+ -+ TP_fast_assign( -+ LOCAL_ASSIGN; -+ VIF_ASSIGN; -+ STA_ASSIGN; -+ __entry->enabled = enabled; -+ ), -+ -+ TP_printk( -+ LOCAL_PR_FMT VIF_PR_FMT STA_PR_FMT " enabled:%d", -+ LOCAL_PR_ARG, VIF_PR_ARG, STA_PR_ARG, __entry->enabled -+ ) -+); -+ - #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ - - #undef TRACE_INCLUDE_PATH diff --git a/package/kernel/mac80211/patches/subsys/327-mac80211-reorganize-code-to-remove-a-forward-declara.patch b/package/kernel/mac80211/patches/subsys/327-mac80211-reorganize-code-to-remove-a-forward-declara.patch deleted file mode 100644 index a3d600152c..0000000000 --- a/package/kernel/mac80211/patches/subsys/327-mac80211-reorganize-code-to-remove-a-forward-declara.patch +++ /dev/null @@ -1,1110 +0,0 @@ -From: Felix Fietkau -Date: Tue, 8 Sep 2020 12:16:26 +0200 -Subject: [PATCH] mac80211: reorganize code to remove a forward - declaration - -Remove the newly added ieee80211_set_vif_encap_ops declaration. -No further code changes - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/iface.c -+++ b/net/mac80211/iface.c -@@ -43,7 +43,6 @@ - */ - - static void ieee80211_iface_work(struct work_struct *work); --static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata); - - bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata) - { -@@ -349,6 +348,511 @@ static int ieee80211_check_queues(struct - return 0; - } - -+static int ieee80211_open(struct net_device *dev) -+{ -+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -+ int err; -+ -+ /* fail early if user set an invalid address */ -+ if (!is_valid_ether_addr(dev->dev_addr)) -+ return -EADDRNOTAVAIL; -+ -+ err = ieee80211_check_concurrent_iface(sdata, sdata->vif.type); -+ if (err) -+ return err; -+ -+ return ieee80211_do_open(&sdata->wdev, true); -+} -+ -+static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, -+ bool going_down) -+{ -+ struct ieee80211_local *local = sdata->local; -+ unsigned long flags; -+ struct sk_buff *skb, *tmp; -+ u32 hw_reconf_flags = 0; -+ int i, flushed; -+ struct ps_data *ps; -+ struct cfg80211_chan_def chandef; -+ bool cancel_scan; -+ struct cfg80211_nan_func *func; -+ -+ clear_bit(SDATA_STATE_RUNNING, &sdata->state); -+ -+ cancel_scan = rcu_access_pointer(local->scan_sdata) == sdata; -+ if (cancel_scan) -+ ieee80211_scan_cancel(local); -+ -+ /* -+ * Stop TX on this interface first. -+ */ -+ if (sdata->dev) -+ netif_tx_stop_all_queues(sdata->dev); -+ -+ ieee80211_roc_purge(local, sdata); -+ -+ switch (sdata->vif.type) { -+ case NL80211_IFTYPE_STATION: -+ ieee80211_mgd_stop(sdata); -+ break; -+ case NL80211_IFTYPE_ADHOC: -+ ieee80211_ibss_stop(sdata); -+ break; -+ case NL80211_IFTYPE_MONITOR: -+ if (sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES) -+ break; -+ list_del_rcu(&sdata->u.mntr.list); -+ break; -+ default: -+ break; -+ } -+ -+ /* -+ * Remove all stations associated with this interface. -+ * -+ * This must be done before calling ops->remove_interface() -+ * because otherwise we can later invoke ops->sta_notify() -+ * whenever the STAs are removed, and that invalidates driver -+ * assumptions about always getting a vif pointer that is valid -+ * (because if we remove a STA after ops->remove_interface() -+ * the driver will have removed the vif info already!) -+ * -+ * In WDS mode a station must exist here and be flushed, for -+ * AP_VLANs stations may exist since there's nothing else that -+ * would have removed them, but in other modes there shouldn't -+ * be any stations. -+ */ -+ flushed = sta_info_flush(sdata); -+ WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN && -+ ((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) || -+ (sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1))); -+ -+ /* don't count this interface for allmulti while it is down */ -+ if (sdata->flags & IEEE80211_SDATA_ALLMULTI) -+ atomic_dec(&local->iff_allmultis); -+ -+ if (sdata->vif.type == NL80211_IFTYPE_AP) { -+ local->fif_pspoll--; -+ local->fif_probe_req--; -+ } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { -+ local->fif_probe_req--; -+ } -+ -+ if (sdata->dev) { -+ netif_addr_lock_bh(sdata->dev); -+ spin_lock_bh(&local->filter_lock); -+ __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, -+ sdata->dev->addr_len); -+ spin_unlock_bh(&local->filter_lock); -+ netif_addr_unlock_bh(sdata->dev); -+ } -+ -+ del_timer_sync(&local->dynamic_ps_timer); -+ cancel_work_sync(&local->dynamic_ps_enable_work); -+ -+ cancel_work_sync(&sdata->recalc_smps); -+ sdata_lock(sdata); -+ mutex_lock(&local->mtx); -+ sdata->vif.csa_active = false; -+ if (sdata->vif.type == NL80211_IFTYPE_STATION) -+ sdata->u.mgd.csa_waiting_bcn = false; -+ if (sdata->csa_block_tx) { -+ ieee80211_wake_vif_queues(local, sdata, -+ IEEE80211_QUEUE_STOP_REASON_CSA); -+ sdata->csa_block_tx = false; -+ } -+ mutex_unlock(&local->mtx); -+ sdata_unlock(sdata); -+ -+ cancel_work_sync(&sdata->csa_finalize_work); -+ -+ cancel_delayed_work_sync(&sdata->dfs_cac_timer_work); -+ -+ if (sdata->wdev.cac_started) { -+ chandef = sdata->vif.bss_conf.chandef; -+ WARN_ON(local->suspended); -+ mutex_lock(&local->mtx); -+ ieee80211_vif_release_channel(sdata); -+ mutex_unlock(&local->mtx); -+ cfg80211_cac_event(sdata->dev, &chandef, -+ NL80211_RADAR_CAC_ABORTED, -+ GFP_KERNEL); -+ } -+ -+ /* APs need special treatment */ -+ if (sdata->vif.type == NL80211_IFTYPE_AP) { -+ struct ieee80211_sub_if_data *vlan, *tmpsdata; -+ -+ /* down all dependent devices, that is VLANs */ -+ list_for_each_entry_safe(vlan, tmpsdata, &sdata->u.ap.vlans, -+ u.vlan.list) -+ dev_close(vlan->dev); -+ WARN_ON(!list_empty(&sdata->u.ap.vlans)); -+ } else if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { -+ /* remove all packets in parent bc_buf pointing to this dev */ -+ ps = &sdata->bss->ps; -+ -+ spin_lock_irqsave(&ps->bc_buf.lock, flags); -+ skb_queue_walk_safe(&ps->bc_buf, skb, tmp) { -+ if (skb->dev == sdata->dev) { -+ __skb_unlink(skb, &ps->bc_buf); -+ local->total_ps_buffered--; -+ ieee80211_free_txskb(&local->hw, skb); -+ } -+ } -+ spin_unlock_irqrestore(&ps->bc_buf.lock, flags); -+ } -+ -+ if (going_down) -+ local->open_count--; -+ -+ switch (sdata->vif.type) { -+ case NL80211_IFTYPE_AP_VLAN: -+ mutex_lock(&local->mtx); -+ list_del(&sdata->u.vlan.list); -+ mutex_unlock(&local->mtx); -+ RCU_INIT_POINTER(sdata->vif.chanctx_conf, NULL); -+ /* see comment in the default case below */ -+ ieee80211_free_keys(sdata, true); -+ /* no need to tell driver */ -+ break; -+ case NL80211_IFTYPE_MONITOR: -+ if (sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES) { -+ local->cooked_mntrs--; -+ break; -+ } -+ -+ local->monitors--; -+ if (local->monitors == 0) { -+ local->hw.conf.flags &= ~IEEE80211_CONF_MONITOR; -+ hw_reconf_flags |= IEEE80211_CONF_CHANGE_MONITOR; -+ } -+ -+ ieee80211_adjust_monitor_flags(sdata, -1); -+ break; -+ case NL80211_IFTYPE_NAN: -+ /* clean all the functions */ -+ spin_lock_bh(&sdata->u.nan.func_lock); -+ -+ idr_for_each_entry(&sdata->u.nan.function_inst_ids, func, i) { -+ idr_remove(&sdata->u.nan.function_inst_ids, i); -+ cfg80211_free_nan_func(func); -+ } -+ idr_destroy(&sdata->u.nan.function_inst_ids); -+ -+ spin_unlock_bh(&sdata->u.nan.func_lock); -+ break; -+ case NL80211_IFTYPE_P2P_DEVICE: -+ /* relies on synchronize_rcu() below */ -+ RCU_INIT_POINTER(local->p2p_sdata, NULL); -+ /* fall through */ -+ default: -+ cancel_work_sync(&sdata->work); -+ /* -+ * When we get here, the interface is marked down. -+ * Free the remaining keys, if there are any -+ * (which can happen in AP mode if userspace sets -+ * keys before the interface is operating, and maybe -+ * also in WDS mode) -+ * -+ * Force the key freeing to always synchronize_net() -+ * to wait for the RX path in case it is using this -+ * interface enqueuing frames at this very time on -+ * another CPU. -+ */ -+ ieee80211_free_keys(sdata, true); -+ skb_queue_purge(&sdata->skb_queue); -+ } -+ -+ spin_lock_irqsave(&local->queue_stop_reason_lock, flags); -+ for (i = 0; i < IEEE80211_MAX_QUEUES; i++) { -+ skb_queue_walk_safe(&local->pending[i], skb, tmp) { -+ struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -+ if (info->control.vif == &sdata->vif) { -+ __skb_unlink(skb, &local->pending[i]); -+ ieee80211_free_txskb(&local->hw, skb); -+ } -+ } -+ } -+ spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); -+ -+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) -+ ieee80211_txq_remove_vlan(local, sdata); -+ -+ sdata->bss = NULL; -+ -+ if (local->open_count == 0) -+ ieee80211_clear_tx_pending(local); -+ -+ sdata->vif.bss_conf.beacon_int = 0; -+ -+ /* -+ * If the interface goes down while suspended, presumably because -+ * the device was unplugged and that happens before our resume, -+ * then the driver is already unconfigured and the remainder of -+ * this function isn't needed. -+ * XXX: what about WoWLAN? If the device has software state, e.g. -+ * memory allocated, it might expect teardown commands from -+ * mac80211 here? -+ */ -+ if (local->suspended) { -+ WARN_ON(local->wowlan); -+ WARN_ON(rtnl_dereference(local->monitor_sdata)); -+ return; -+ } -+ -+ switch (sdata->vif.type) { -+ case NL80211_IFTYPE_AP_VLAN: -+ break; -+ case NL80211_IFTYPE_MONITOR: -+ if (local->monitors == 0) -+ ieee80211_del_virtual_monitor(local); -+ -+ mutex_lock(&local->mtx); -+ ieee80211_recalc_idle(local); -+ mutex_unlock(&local->mtx); -+ -+ if (!(sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE)) -+ break; -+ -+ /* fall through */ -+ default: -+ if (going_down) -+ drv_remove_interface(local, sdata); -+ } -+ -+ ieee80211_recalc_ps(local); -+ -+ if (cancel_scan) -+ flush_delayed_work(&local->scan_work); -+ -+ if (local->open_count == 0) { -+ ieee80211_stop_device(local); -+ -+ /* no reconfiguring after stop! */ -+ return; -+ } -+ -+ /* do after stop to avoid reconfiguring when we stop anyway */ -+ ieee80211_configure_filter(local); -+ ieee80211_hw_config(local, hw_reconf_flags); -+ -+ if (local->monitors == local->open_count) -+ ieee80211_add_virtual_monitor(local); -+} -+ -+static int ieee80211_stop(struct net_device *dev) -+{ -+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -+ -+ ieee80211_do_stop(sdata, true); -+ -+ return 0; -+} -+ -+static void ieee80211_set_multicast_list(struct net_device *dev) -+{ -+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -+ struct ieee80211_local *local = sdata->local; -+ int allmulti, sdata_allmulti; -+ -+ allmulti = !!(dev->flags & IFF_ALLMULTI); -+ sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI); -+ -+ if (allmulti != sdata_allmulti) { -+ if (dev->flags & IFF_ALLMULTI) -+ atomic_inc(&local->iff_allmultis); -+ else -+ atomic_dec(&local->iff_allmultis); -+ sdata->flags ^= IEEE80211_SDATA_ALLMULTI; -+ } -+ -+ spin_lock_bh(&local->filter_lock); -+ __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len); -+ spin_unlock_bh(&local->filter_lock); -+ ieee80211_queue_work(&local->hw, &local->reconfig_filter); -+} -+ -+/* -+ * Called when the netdev is removed or, by the code below, before -+ * the interface type changes. -+ */ -+static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata) -+{ -+ int i; -+ -+ /* free extra data */ -+ ieee80211_free_keys(sdata, false); -+ -+ ieee80211_debugfs_remove_netdev(sdata); -+ -+ for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++) -+ __skb_queue_purge(&sdata->fragments[i].skb_list); -+ sdata->fragment_next = 0; -+ -+ if (ieee80211_vif_is_mesh(&sdata->vif)) -+ ieee80211_mesh_teardown_sdata(sdata); -+} -+ -+static void ieee80211_uninit(struct net_device *dev) -+{ -+ ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); -+} -+ -+#if LINUX_VERSION_IS_GEQ(5,2,0) -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ struct net_device *sb_dev) -+#elif LINUX_VERSION_IS_GEQ(4,19,0) -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ struct net_device *sb_dev, -+ select_queue_fallback_t fallback) -+#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ -+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ void *accel_priv, -+ select_queue_fallback_t fallback) -+#elif LINUX_VERSION_IS_GEQ(3,13,0) -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ void *accel_priv) -+#else -+static u16 ieee80211_netdev_select_queue(struct net_device *dev, -+ struct sk_buff *skb) -+#endif -+{ -+ return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); -+} -+ -+static void -+ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) -+{ -+ int i; -+ -+ for_each_possible_cpu(i) { -+ const struct pcpu_sw_netstats *tstats; -+ u64 rx_packets, rx_bytes, tx_packets, tx_bytes; -+ unsigned int start; -+ -+ tstats = per_cpu_ptr(netdev_tstats(dev), i); -+ -+ do { -+ start = u64_stats_fetch_begin_irq(&tstats->syncp); -+ rx_packets = tstats->rx_packets; -+ tx_packets = tstats->tx_packets; -+ rx_bytes = tstats->rx_bytes; -+ tx_bytes = tstats->tx_bytes; -+ } while (u64_stats_fetch_retry_irq(&tstats->syncp, start)); -+ -+ stats->rx_packets += rx_packets; -+ stats->tx_packets += tx_packets; -+ stats->rx_bytes += rx_bytes; -+ stats->tx_bytes += tx_bytes; -+ } -+} -+#if LINUX_VERSION_IS_LESS(4,11,0) -+/* Just declare it here to keep sparse happy */ -+struct rtnl_link_stats64 *bp_ieee80211_get_stats64(struct net_device *dev, -+ struct rtnl_link_stats64 *stats); -+struct rtnl_link_stats64 * -+bp_ieee80211_get_stats64(struct net_device *dev, -+ struct rtnl_link_stats64 *stats){ -+ ieee80211_get_stats64(dev, stats); -+ return stats; -+} -+#endif -+ -+static const struct net_device_ops ieee80211_dataif_ops = { -+ .ndo_open = ieee80211_open, -+ .ndo_stop = ieee80211_stop, -+ .ndo_uninit = ieee80211_uninit, -+ .ndo_start_xmit = ieee80211_subif_start_xmit, -+ .ndo_set_rx_mode = ieee80211_set_multicast_list, -+ .ndo_set_mac_address = ieee80211_change_mac, -+ .ndo_select_queue = ieee80211_netdev_select_queue, -+#if LINUX_VERSION_IS_GEQ(4,11,0) -+ .ndo_get_stats64 = ieee80211_get_stats64, -+#else -+ .ndo_get_stats64 = bp_ieee80211_get_stats64, -+#endif -+ -+}; -+ -+#if LINUX_VERSION_IS_GEQ(5,2,0) -+static u16 ieee80211_monitor_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ struct net_device *sb_dev) -+#elif LINUX_VERSION_IS_GEQ(4,19,0) -+static u16 ieee80211_monitor_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ struct net_device *sb_dev, -+ select_queue_fallback_t fallback) -+#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ -+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) -+static u16 ieee80211_monitor_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ void *accel_priv, -+ select_queue_fallback_t fallback) -+#elif LINUX_VERSION_IS_GEQ(3,13,0) -+static u16 ieee80211_monitor_select_queue(struct net_device *dev, -+ struct sk_buff *skb, -+ void *accel_priv) -+#else -+static u16 ieee80211_monitor_select_queue(struct net_device *dev, -+ struct sk_buff *skb) -+#endif -+{ -+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_hdr *hdr; -+ struct ieee80211_radiotap_header *rtap = (void *)skb->data; -+ -+ if (local->hw.queues < IEEE80211_NUM_ACS) -+ return 0; -+ -+ if (skb->len < 4 || -+ skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */) -+ return 0; /* doesn't matter, frame will be dropped */ -+ -+ hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len)); -+ -+ return ieee80211_select_queue_80211(sdata, skb, hdr); -+} -+ -+static const struct net_device_ops ieee80211_monitorif_ops = { -+ .ndo_open = ieee80211_open, -+ .ndo_stop = ieee80211_stop, -+ .ndo_uninit = ieee80211_uninit, -+ .ndo_start_xmit = ieee80211_monitor_start_xmit, -+ .ndo_set_rx_mode = ieee80211_set_multicast_list, -+ .ndo_set_mac_address = ieee80211_change_mac, -+ .ndo_select_queue = ieee80211_monitor_select_queue, -+#if LINUX_VERSION_IS_GEQ(4,11,0) -+ .ndo_get_stats64 = ieee80211_get_stats64, -+#else -+ .ndo_get_stats64 = bp_ieee80211_get_stats64, -+#endif -+ -+}; -+ -+static const struct net_device_ops ieee80211_dataif_8023_ops = { -+ .ndo_open = ieee80211_open, -+ .ndo_stop = ieee80211_stop, -+ .ndo_uninit = ieee80211_uninit, -+ .ndo_start_xmit = ieee80211_subif_start_xmit_8023, -+ .ndo_set_rx_mode = ieee80211_set_multicast_list, -+ .ndo_set_mac_address = ieee80211_change_mac, -+ .ndo_select_queue = ieee80211_netdev_select_queue, -+#if LINUX_VERSION_IS_GEQ(4,11,0) -+ .ndo_get_stats64 = ieee80211_get_stats64, -+#else -+ .ndo_get_stats64 = bp_ieee80211_get_stats64, -+#endif -+ -+}; -+ - static bool ieee80211_iftype_supports_encap_offload(enum nl80211_iftype iftype) - { - switch (iftype) { -@@ -389,6 +893,31 @@ static bool ieee80211_set_sdata_offload_ - return true; - } - -+static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata) -+{ -+ struct ieee80211_local *local = sdata->local; -+ struct ieee80211_sub_if_data *bss = sdata; -+ bool enabled; -+ -+ if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { -+ if (!sdata->bss) -+ return; -+ -+ bss = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap); -+ } -+ -+ if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) || -+ !ieee80211_iftype_supports_encap_offload(bss->vif.type)) -+ return; -+ -+ enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; -+ if (sdata->wdev.use_4addr && -+ !(bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_4ADDR)) -+ enabled = false; -+ -+ sdata->dev->netdev_ops = enabled ? &ieee80211_dataif_8023_ops : -+ &ieee80211_dataif_ops; -+} - - static void ieee80211_recalc_sdata_offload(struct ieee80211_sub_if_data *sdata) - { -@@ -866,511 +1395,6 @@ int ieee80211_do_open(struct wireless_de - return res; - } - --static int ieee80211_open(struct net_device *dev) --{ -- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -- int err; -- -- /* fail early if user set an invalid address */ -- if (!is_valid_ether_addr(dev->dev_addr)) -- return -EADDRNOTAVAIL; -- -- err = ieee80211_check_concurrent_iface(sdata, sdata->vif.type); -- if (err) -- return err; -- -- return ieee80211_do_open(&sdata->wdev, true); --} -- --static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, -- bool going_down) --{ -- struct ieee80211_local *local = sdata->local; -- unsigned long flags; -- struct sk_buff *skb, *tmp; -- u32 hw_reconf_flags = 0; -- int i, flushed; -- struct ps_data *ps; -- struct cfg80211_chan_def chandef; -- bool cancel_scan; -- struct cfg80211_nan_func *func; -- -- clear_bit(SDATA_STATE_RUNNING, &sdata->state); -- -- cancel_scan = rcu_access_pointer(local->scan_sdata) == sdata; -- if (cancel_scan) -- ieee80211_scan_cancel(local); -- -- /* -- * Stop TX on this interface first. -- */ -- if (sdata->dev) -- netif_tx_stop_all_queues(sdata->dev); -- -- ieee80211_roc_purge(local, sdata); -- -- switch (sdata->vif.type) { -- case NL80211_IFTYPE_STATION: -- ieee80211_mgd_stop(sdata); -- break; -- case NL80211_IFTYPE_ADHOC: -- ieee80211_ibss_stop(sdata); -- break; -- case NL80211_IFTYPE_MONITOR: -- if (sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES) -- break; -- list_del_rcu(&sdata->u.mntr.list); -- break; -- default: -- break; -- } -- -- /* -- * Remove all stations associated with this interface. -- * -- * This must be done before calling ops->remove_interface() -- * because otherwise we can later invoke ops->sta_notify() -- * whenever the STAs are removed, and that invalidates driver -- * assumptions about always getting a vif pointer that is valid -- * (because if we remove a STA after ops->remove_interface() -- * the driver will have removed the vif info already!) -- * -- * In WDS mode a station must exist here and be flushed, for -- * AP_VLANs stations may exist since there's nothing else that -- * would have removed them, but in other modes there shouldn't -- * be any stations. -- */ -- flushed = sta_info_flush(sdata); -- WARN_ON_ONCE(sdata->vif.type != NL80211_IFTYPE_AP_VLAN && -- ((sdata->vif.type != NL80211_IFTYPE_WDS && flushed > 0) || -- (sdata->vif.type == NL80211_IFTYPE_WDS && flushed != 1))); -- -- /* don't count this interface for allmulti while it is down */ -- if (sdata->flags & IEEE80211_SDATA_ALLMULTI) -- atomic_dec(&local->iff_allmultis); -- -- if (sdata->vif.type == NL80211_IFTYPE_AP) { -- local->fif_pspoll--; -- local->fif_probe_req--; -- } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) { -- local->fif_probe_req--; -- } -- -- if (sdata->dev) { -- netif_addr_lock_bh(sdata->dev); -- spin_lock_bh(&local->filter_lock); -- __hw_addr_unsync(&local->mc_list, &sdata->dev->mc, -- sdata->dev->addr_len); -- spin_unlock_bh(&local->filter_lock); -- netif_addr_unlock_bh(sdata->dev); -- } -- -- del_timer_sync(&local->dynamic_ps_timer); -- cancel_work_sync(&local->dynamic_ps_enable_work); -- -- cancel_work_sync(&sdata->recalc_smps); -- sdata_lock(sdata); -- mutex_lock(&local->mtx); -- sdata->vif.csa_active = false; -- if (sdata->vif.type == NL80211_IFTYPE_STATION) -- sdata->u.mgd.csa_waiting_bcn = false; -- if (sdata->csa_block_tx) { -- ieee80211_wake_vif_queues(local, sdata, -- IEEE80211_QUEUE_STOP_REASON_CSA); -- sdata->csa_block_tx = false; -- } -- mutex_unlock(&local->mtx); -- sdata_unlock(sdata); -- -- cancel_work_sync(&sdata->csa_finalize_work); -- -- cancel_delayed_work_sync(&sdata->dfs_cac_timer_work); -- -- if (sdata->wdev.cac_started) { -- chandef = sdata->vif.bss_conf.chandef; -- WARN_ON(local->suspended); -- mutex_lock(&local->mtx); -- ieee80211_vif_release_channel(sdata); -- mutex_unlock(&local->mtx); -- cfg80211_cac_event(sdata->dev, &chandef, -- NL80211_RADAR_CAC_ABORTED, -- GFP_KERNEL); -- } -- -- /* APs need special treatment */ -- if (sdata->vif.type == NL80211_IFTYPE_AP) { -- struct ieee80211_sub_if_data *vlan, *tmpsdata; -- -- /* down all dependent devices, that is VLANs */ -- list_for_each_entry_safe(vlan, tmpsdata, &sdata->u.ap.vlans, -- u.vlan.list) -- dev_close(vlan->dev); -- WARN_ON(!list_empty(&sdata->u.ap.vlans)); -- } else if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { -- /* remove all packets in parent bc_buf pointing to this dev */ -- ps = &sdata->bss->ps; -- -- spin_lock_irqsave(&ps->bc_buf.lock, flags); -- skb_queue_walk_safe(&ps->bc_buf, skb, tmp) { -- if (skb->dev == sdata->dev) { -- __skb_unlink(skb, &ps->bc_buf); -- local->total_ps_buffered--; -- ieee80211_free_txskb(&local->hw, skb); -- } -- } -- spin_unlock_irqrestore(&ps->bc_buf.lock, flags); -- } -- -- if (going_down) -- local->open_count--; -- -- switch (sdata->vif.type) { -- case NL80211_IFTYPE_AP_VLAN: -- mutex_lock(&local->mtx); -- list_del(&sdata->u.vlan.list); -- mutex_unlock(&local->mtx); -- RCU_INIT_POINTER(sdata->vif.chanctx_conf, NULL); -- /* see comment in the default case below */ -- ieee80211_free_keys(sdata, true); -- /* no need to tell driver */ -- break; -- case NL80211_IFTYPE_MONITOR: -- if (sdata->u.mntr.flags & MONITOR_FLAG_COOK_FRAMES) { -- local->cooked_mntrs--; -- break; -- } -- -- local->monitors--; -- if (local->monitors == 0) { -- local->hw.conf.flags &= ~IEEE80211_CONF_MONITOR; -- hw_reconf_flags |= IEEE80211_CONF_CHANGE_MONITOR; -- } -- -- ieee80211_adjust_monitor_flags(sdata, -1); -- break; -- case NL80211_IFTYPE_NAN: -- /* clean all the functions */ -- spin_lock_bh(&sdata->u.nan.func_lock); -- -- idr_for_each_entry(&sdata->u.nan.function_inst_ids, func, i) { -- idr_remove(&sdata->u.nan.function_inst_ids, i); -- cfg80211_free_nan_func(func); -- } -- idr_destroy(&sdata->u.nan.function_inst_ids); -- -- spin_unlock_bh(&sdata->u.nan.func_lock); -- break; -- case NL80211_IFTYPE_P2P_DEVICE: -- /* relies on synchronize_rcu() below */ -- RCU_INIT_POINTER(local->p2p_sdata, NULL); -- /* fall through */ -- default: -- cancel_work_sync(&sdata->work); -- /* -- * When we get here, the interface is marked down. -- * Free the remaining keys, if there are any -- * (which can happen in AP mode if userspace sets -- * keys before the interface is operating, and maybe -- * also in WDS mode) -- * -- * Force the key freeing to always synchronize_net() -- * to wait for the RX path in case it is using this -- * interface enqueuing frames at this very time on -- * another CPU. -- */ -- ieee80211_free_keys(sdata, true); -- skb_queue_purge(&sdata->skb_queue); -- } -- -- spin_lock_irqsave(&local->queue_stop_reason_lock, flags); -- for (i = 0; i < IEEE80211_MAX_QUEUES; i++) { -- skb_queue_walk_safe(&local->pending[i], skb, tmp) { -- struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); -- if (info->control.vif == &sdata->vif) { -- __skb_unlink(skb, &local->pending[i]); -- ieee80211_free_txskb(&local->hw, skb); -- } -- } -- } -- spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); -- -- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) -- ieee80211_txq_remove_vlan(local, sdata); -- -- sdata->bss = NULL; -- -- if (local->open_count == 0) -- ieee80211_clear_tx_pending(local); -- -- sdata->vif.bss_conf.beacon_int = 0; -- -- /* -- * If the interface goes down while suspended, presumably because -- * the device was unplugged and that happens before our resume, -- * then the driver is already unconfigured and the remainder of -- * this function isn't needed. -- * XXX: what about WoWLAN? If the device has software state, e.g. -- * memory allocated, it might expect teardown commands from -- * mac80211 here? -- */ -- if (local->suspended) { -- WARN_ON(local->wowlan); -- WARN_ON(rtnl_dereference(local->monitor_sdata)); -- return; -- } -- -- switch (sdata->vif.type) { -- case NL80211_IFTYPE_AP_VLAN: -- break; -- case NL80211_IFTYPE_MONITOR: -- if (local->monitors == 0) -- ieee80211_del_virtual_monitor(local); -- -- mutex_lock(&local->mtx); -- ieee80211_recalc_idle(local); -- mutex_unlock(&local->mtx); -- -- if (!(sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE)) -- break; -- -- /* fall through */ -- default: -- if (going_down) -- drv_remove_interface(local, sdata); -- } -- -- ieee80211_recalc_ps(local); -- -- if (cancel_scan) -- flush_delayed_work(&local->scan_work); -- -- if (local->open_count == 0) { -- ieee80211_stop_device(local); -- -- /* no reconfiguring after stop! */ -- return; -- } -- -- /* do after stop to avoid reconfiguring when we stop anyway */ -- ieee80211_configure_filter(local); -- ieee80211_hw_config(local, hw_reconf_flags); -- -- if (local->monitors == local->open_count) -- ieee80211_add_virtual_monitor(local); --} -- --static int ieee80211_stop(struct net_device *dev) --{ -- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -- -- ieee80211_do_stop(sdata, true); -- -- return 0; --} -- --static void ieee80211_set_multicast_list(struct net_device *dev) --{ -- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -- struct ieee80211_local *local = sdata->local; -- int allmulti, sdata_allmulti; -- -- allmulti = !!(dev->flags & IFF_ALLMULTI); -- sdata_allmulti = !!(sdata->flags & IEEE80211_SDATA_ALLMULTI); -- -- if (allmulti != sdata_allmulti) { -- if (dev->flags & IFF_ALLMULTI) -- atomic_inc(&local->iff_allmultis); -- else -- atomic_dec(&local->iff_allmultis); -- sdata->flags ^= IEEE80211_SDATA_ALLMULTI; -- } -- -- spin_lock_bh(&local->filter_lock); -- __hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len); -- spin_unlock_bh(&local->filter_lock); -- ieee80211_queue_work(&local->hw, &local->reconfig_filter); --} -- --/* -- * Called when the netdev is removed or, by the code below, before -- * the interface type changes. -- */ --static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata) --{ -- int i; -- -- /* free extra data */ -- ieee80211_free_keys(sdata, false); -- -- ieee80211_debugfs_remove_netdev(sdata); -- -- for (i = 0; i < IEEE80211_FRAGMENT_MAX; i++) -- __skb_queue_purge(&sdata->fragments[i].skb_list); -- sdata->fragment_next = 0; -- -- if (ieee80211_vif_is_mesh(&sdata->vif)) -- ieee80211_mesh_teardown_sdata(sdata); --} -- --static void ieee80211_uninit(struct net_device *dev) --{ -- ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); --} -- --#if LINUX_VERSION_IS_GEQ(5,2,0) --static u16 ieee80211_netdev_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- struct net_device *sb_dev) --#elif LINUX_VERSION_IS_GEQ(4,19,0) --static u16 ieee80211_netdev_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- struct net_device *sb_dev, -- select_queue_fallback_t fallback) --#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ -- (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) --static u16 ieee80211_netdev_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- void *accel_priv, -- select_queue_fallback_t fallback) --#elif LINUX_VERSION_IS_GEQ(3,13,0) --static u16 ieee80211_netdev_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- void *accel_priv) --#else --static u16 ieee80211_netdev_select_queue(struct net_device *dev, -- struct sk_buff *skb) --#endif --{ -- return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); --} -- --static void --ieee80211_get_stats64(struct net_device *dev, struct rtnl_link_stats64 *stats) --{ -- int i; -- -- for_each_possible_cpu(i) { -- const struct pcpu_sw_netstats *tstats; -- u64 rx_packets, rx_bytes, tx_packets, tx_bytes; -- unsigned int start; -- -- tstats = per_cpu_ptr(netdev_tstats(dev), i); -- -- do { -- start = u64_stats_fetch_begin_irq(&tstats->syncp); -- rx_packets = tstats->rx_packets; -- tx_packets = tstats->tx_packets; -- rx_bytes = tstats->rx_bytes; -- tx_bytes = tstats->tx_bytes; -- } while (u64_stats_fetch_retry_irq(&tstats->syncp, start)); -- -- stats->rx_packets += rx_packets; -- stats->tx_packets += tx_packets; -- stats->rx_bytes += rx_bytes; -- stats->tx_bytes += tx_bytes; -- } --} --#if LINUX_VERSION_IS_LESS(4,11,0) --/* Just declare it here to keep sparse happy */ --struct rtnl_link_stats64 *bp_ieee80211_get_stats64(struct net_device *dev, -- struct rtnl_link_stats64 *stats); --struct rtnl_link_stats64 * --bp_ieee80211_get_stats64(struct net_device *dev, -- struct rtnl_link_stats64 *stats){ -- ieee80211_get_stats64(dev, stats); -- return stats; --} --#endif -- --static const struct net_device_ops ieee80211_dataif_ops = { -- .ndo_open = ieee80211_open, -- .ndo_stop = ieee80211_stop, -- .ndo_uninit = ieee80211_uninit, -- .ndo_start_xmit = ieee80211_subif_start_xmit, -- .ndo_set_rx_mode = ieee80211_set_multicast_list, -- .ndo_set_mac_address = ieee80211_change_mac, -- .ndo_select_queue = ieee80211_netdev_select_queue, --#if LINUX_VERSION_IS_GEQ(4,11,0) -- .ndo_get_stats64 = ieee80211_get_stats64, --#else -- .ndo_get_stats64 = bp_ieee80211_get_stats64, --#endif -- --}; -- --#if LINUX_VERSION_IS_GEQ(5,2,0) --static u16 ieee80211_monitor_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- struct net_device *sb_dev) --#elif LINUX_VERSION_IS_GEQ(4,19,0) --static u16 ieee80211_monitor_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- struct net_device *sb_dev, -- select_queue_fallback_t fallback) --#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ -- (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) --static u16 ieee80211_monitor_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- void *accel_priv, -- select_queue_fallback_t fallback) --#elif LINUX_VERSION_IS_GEQ(3,13,0) --static u16 ieee80211_monitor_select_queue(struct net_device *dev, -- struct sk_buff *skb, -- void *accel_priv) --#else --static u16 ieee80211_monitor_select_queue(struct net_device *dev, -- struct sk_buff *skb) --#endif --{ -- struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); -- struct ieee80211_local *local = sdata->local; -- struct ieee80211_hdr *hdr; -- struct ieee80211_radiotap_header *rtap = (void *)skb->data; -- -- if (local->hw.queues < IEEE80211_NUM_ACS) -- return 0; -- -- if (skb->len < 4 || -- skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */) -- return 0; /* doesn't matter, frame will be dropped */ -- -- hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len)); -- -- return ieee80211_select_queue_80211(sdata, skb, hdr); --} -- --static const struct net_device_ops ieee80211_monitorif_ops = { -- .ndo_open = ieee80211_open, -- .ndo_stop = ieee80211_stop, -- .ndo_uninit = ieee80211_uninit, -- .ndo_start_xmit = ieee80211_monitor_start_xmit, -- .ndo_set_rx_mode = ieee80211_set_multicast_list, -- .ndo_set_mac_address = ieee80211_change_mac, -- .ndo_select_queue = ieee80211_monitor_select_queue, --#if LINUX_VERSION_IS_GEQ(4,11,0) -- .ndo_get_stats64 = ieee80211_get_stats64, --#else -- .ndo_get_stats64 = bp_ieee80211_get_stats64, --#endif -- --}; -- --static const struct net_device_ops ieee80211_dataif_8023_ops = { -- .ndo_open = ieee80211_open, -- .ndo_stop = ieee80211_stop, -- .ndo_uninit = ieee80211_uninit, -- .ndo_start_xmit = ieee80211_subif_start_xmit_8023, -- .ndo_set_rx_mode = ieee80211_set_multicast_list, -- .ndo_set_mac_address = ieee80211_change_mac, -- .ndo_select_queue = ieee80211_netdev_select_queue, --#if LINUX_VERSION_IS_GEQ(4,11,0) -- .ndo_get_stats64 = ieee80211_get_stats64, --#else -- .ndo_get_stats64 = bp_ieee80211_get_stats64, --#endif -- --}; -- - static void ieee80211_if_free(struct net_device *dev) - { - free_percpu(netdev_tstats(dev)); -@@ -1401,32 +1425,6 @@ static void ieee80211_if_setup_no_queue( - #endif - } - --static void ieee80211_set_vif_encap_ops(struct ieee80211_sub_if_data *sdata) --{ -- struct ieee80211_local *local = sdata->local; -- struct ieee80211_sub_if_data *bss = sdata; -- bool enabled; -- -- if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { -- if (!sdata->bss) -- return; -- -- bss = container_of(sdata->bss, struct ieee80211_sub_if_data, u.ap); -- } -- -- if (!ieee80211_hw_check(&local->hw, SUPPORTS_TX_ENCAP_OFFLOAD) || -- !ieee80211_iftype_supports_encap_offload(bss->vif.type)) -- return; -- -- enabled = bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED; -- if (sdata->wdev.use_4addr && -- !(bss->vif.offload_flags & IEEE80211_OFFLOAD_ENCAP_4ADDR)) -- enabled = false; -- -- sdata->dev->netdev_ops = enabled ? &ieee80211_dataif_8023_ops : -- &ieee80211_dataif_ops; --} -- - static void ieee80211_iface_work(struct work_struct *work) - { - struct ieee80211_sub_if_data *sdata = diff --git a/package/kernel/mac80211/patches/subsys/328-mac80211-extend-AQL-aggregation-estimation-to-HE-and.patch b/package/kernel/mac80211/patches/subsys/328-mac80211-extend-AQL-aggregation-estimation-to-HE-and.patch deleted file mode 100644 index 3d687f8341..0000000000 --- a/package/kernel/mac80211/patches/subsys/328-mac80211-extend-AQL-aggregation-estimation-to-HE-and.patch +++ /dev/null @@ -1,49 +0,0 @@ -From: Felix Fietkau -Date: Thu, 27 Aug 2020 12:44:36 +0200 -Subject: [PATCH] mac80211: extend AQL aggregation estimation to HE and fix - unit mismatch - -The unit of the return value of ieee80211_get_rate_duration is nanoseconds, not -milliseconds. Adjust the duration checks to account for that. -For higher data rates, allow larger estimated aggregation sizes, and add some -values for HE as well, which can use much larger aggregates. -Since small packets with high data rates can now lead to duration values too -small for info->tx_time_est, return a minimum of 4us. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -668,20 +668,26 @@ u32 ieee80211_calc_expected_tx_airtime(s - * This will not be very accurate, but much better than simply - * assuming un-aggregated tx in all cases. - */ -- if (duration > 400) /* <= VHT20 MCS2 1S */ -+ if (duration > 400 * 1024) /* <= VHT20 MCS2 1S */ - agg_shift = 1; -- else if (duration > 250) /* <= VHT20 MCS3 1S or MCS1 2S */ -+ else if (duration > 250 * 1024) /* <= VHT20 MCS3 1S or MCS1 2S */ - agg_shift = 2; -- else if (duration > 150) /* <= VHT20 MCS5 1S or MCS3 2S */ -+ else if (duration > 150 * 1024) /* <= VHT20 MCS5 1S or MCS2 2S */ - agg_shift = 3; -- else -+ else if (duration > 70 * 1024) /* <= VHT20 MCS5 2S */ - agg_shift = 4; -+ else if (stat.encoding != RX_ENC_HE || -+ duration > 20 * 1024) /* <= HE40 MCS6 2S */ -+ agg_shift = 5; -+ else -+ agg_shift = 6; - - duration *= len; - duration /= AVG_PKT_SIZE; - duration /= 1024; -+ duration += (overhead >> agg_shift); - -- return duration + (overhead >> agg_shift); -+ return max_t(u32, duration, 4); - } - - if (!conf) diff --git a/package/kernel/mac80211/patches/subsys/329-mac80211-add-AQL-support-for-VHT160-tx-rates.patch b/package/kernel/mac80211/patches/subsys/329-mac80211-add-AQL-support-for-VHT160-tx-rates.patch deleted file mode 100644 index e22a09e711..0000000000 --- a/package/kernel/mac80211/patches/subsys/329-mac80211-add-AQL-support-for-VHT160-tx-rates.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Felix Fietkau -Date: Thu, 27 Aug 2020 12:47:48 +0200 -Subject: [PATCH] mac80211: add AQL support for VHT160 tx rates - -When converting from struct ieee80211_tx_rate to ieee80211_rx_status, -there was one check missing to fill in the bandwidth for 160 MHz - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/airtime.c -+++ b/net/mac80211/airtime.c -@@ -560,7 +560,9 @@ static int ieee80211_fill_rx_status(stru - if (rate->idx < 0 || !rate->count) - return -1; - -- if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH) -+ if (rate->flags & IEEE80211_TX_RC_160_MHZ_WIDTH) -+ stat->bw = RATE_INFO_BW_160; -+ else if (rate->flags & IEEE80211_TX_RC_80_MHZ_WIDTH) - stat->bw = RATE_INFO_BW_80; - else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) - stat->bw = RATE_INFO_BW_40; diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch b/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch deleted file mode 100644 index b67030d135..0000000000 --- a/package/kernel/mac80211/patches/subsys/330-mac80211-allow-bigger-A-MSDU-sizes-in-VHT-even-if-HT.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Felix Fietkau -Date: Wed, 16 Sep 2020 18:43:46 +0200 -Subject: [PATCH] mac80211: allow bigger A-MSDU sizes in VHT, even if HT is - limited - -Some APs (e.g. Asus RT-AC88U) have been observed to report an HT MSDU size -limit of 3839 and a VHT limit of 7991. These APs can handle bigger frames -than 3839 bytes just fine, so we should remove the VHT limit based on the -HT capabilities. This improves tx throughput. - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/vht.c -+++ b/net/mac80211/vht.c -@@ -315,10 +315,6 @@ ieee80211_vht_cap_ie_to_sta_vht_cap(stru - - sta->sta.bandwidth = ieee80211_sta_cur_vht_bw(sta); - -- /* If HT IE reported 3839 bytes only, stay with that size. */ -- if (sta->sta.max_amsdu_len == IEEE80211_MAX_MPDU_LEN_HT_3839) -- return; -- - switch (vht_cap->cap & IEEE80211_VHT_CAP_MAX_MPDU_MASK) { - case IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454: - sta->sta.max_amsdu_len = IEEE80211_MAX_MPDU_LEN_VHT_11454; diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch deleted file mode 100644 index cff8045c05..0000000000 --- a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch +++ /dev/null @@ -1,70 +0,0 @@ -From: Felix Fietkau -Date: Mon, 21 Sep 2020 17:43:06 +0200 -Subject: [PATCH] mac80211: fix regression in sta connection monitor - -When a frame was acked and probe frames were sent, the connection monitoring -needs to be reset, otherwise it will keep probing until the connection is -considered dead, even though frames have been acked in the mean time. - -Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") -Reported-by: Georgi Valkov -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -991,10 +991,6 @@ static void __ieee80211_tx_status(struct - if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked) - ieee80211_frame_acked(sta, skb); - -- if ((sta->sdata->vif.type == NL80211_IFTYPE_STATION) && -- ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) -- ieee80211_sta_tx_notify(sta->sdata, (void *) skb->data, -- acked, info->status.tx_time); - } - - /* SNMP counters -@@ -1129,11 +1125,18 @@ void ieee80211_tx_status_ext(struct ieee - noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); - - if (pubsta) { -+ struct ieee80211_sub_if_data *sdata = sta->sdata; -+ - if (!acked && !noack_success) - sta->status_stats.retry_failed++; - sta->status_stats.retry_count += retry_count; - - if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { -+ if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ skb && !(info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP)) -+ ieee80211_sta_tx_notify(sdata, (void *) skb->data, -+ acked, info->status.tx_time); -+ - if (acked) { - sta->status_stats.last_ack = jiffies; - -@@ -1143,6 +1146,11 @@ void ieee80211_tx_status_ext(struct ieee - /* Track when last packet was ACKed */ - sta->status_stats.last_pkt_time = jiffies; - -+ /* Reset connection monitor */ -+ if (sdata->vif.type == NL80211_IFTYPE_STATION && -+ unlikely(sdata->u.mgd.probe_send_count > 0)) -+ sdata->u.mgd.probe_send_count = 0; -+ - if (info->status.is_valid_ack_signal) { - sta->status_stats.last_ack_signal = - (s8)info->status.ack_signal; ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -2508,7 +2508,9 @@ void ieee80211_sta_tx_notify(struct ieee - !sdata->u.mgd.probe_send_count) - return; - -- if (!ack) -+ if (ack) -+ sdata->u.mgd.probe_send_count = 0; -+ else - sdata->u.mgd.nullfunc_failed = true; - ieee80211_queue_work(&sdata->local->hw, &sdata->work); - } diff --git a/package/kernel/mac80211/patches/subsys/333-mac80211-fix-memory-leak-on-filtered-powersave-frame.patch b/package/kernel/mac80211/patches/subsys/333-mac80211-fix-memory-leak-on-filtered-powersave-frame.patch deleted file mode 100644 index cdbbcf5d06..0000000000 --- a/package/kernel/mac80211/patches/subsys/333-mac80211-fix-memory-leak-on-filtered-powersave-frame.patch +++ /dev/null @@ -1,55 +0,0 @@ -From: Felix Fietkau -Date: Fri, 16 Oct 2020 19:54:49 +0200 -Subject: [PATCH] mac80211: fix memory leak on filtered powersave frames - -After the status rework, ieee80211_tx_status_ext is leaking un-acknowledged -packets for stations in powersave mode. -To fix this, move the code handling those packets from __ieee80211_tx_status -into ieee80211_tx_status_ext - -Reported-by: Tobias Waldvogel -Fixes: 3318111cf63d ("mac80211: reduce duplication in tx status functions") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/status.c -+++ b/net/mac80211/status.c -@@ -49,7 +49,8 @@ static void ieee80211_handle_filtered_fr - int ac; - - if (info->flags & (IEEE80211_TX_CTL_NO_PS_BUFFER | -- IEEE80211_TX_CTL_AMPDU)) { -+ IEEE80211_TX_CTL_AMPDU | -+ IEEE80211_TX_CTL_HW_80211_ENCAP)) { - ieee80211_free_txskb(&local->hw, skb); - return; - } -@@ -924,15 +925,6 @@ static void __ieee80211_tx_status(struct - ieee80211_mpsp_trigger_process( - ieee80211_get_qos_ctl(hdr), sta, true, acked); - -- if (!acked && test_sta_flag(sta, WLAN_STA_PS_STA)) { -- /* -- * The STA is in power save mode, so assume -- * that this TX packet failed because of that. -- */ -- ieee80211_handle_filtered_frame(local, sta, skb); -- return; -- } -- - if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL) && - (ieee80211_is_data(hdr->frame_control)) && - (rates_idx != -1)) -@@ -1159,6 +1151,12 @@ void ieee80211_tx_status_ext(struct ieee - -info->status.ack_signal); - } - } else if (test_sta_flag(sta, WLAN_STA_PS_STA)) { -+ /* -+ * The STA is in power save mode, so assume -+ * that this TX packet failed because of that. -+ */ -+ if (skb) -+ ieee80211_handle_filtered_frame(local, sta, skb); - return; - } else if (noack_success) { - /* nothing to do here, do not account as lost */ diff --git a/package/kernel/mac80211/patches/subsys/334-mac80211-minstrel-remove-deferred-sampling-code.patch b/package/kernel/mac80211/patches/subsys/334-mac80211-minstrel-remove-deferred-sampling-code.patch deleted file mode 100644 index e3a877fb94..0000000000 --- a/package/kernel/mac80211/patches/subsys/334-mac80211-minstrel-remove-deferred-sampling-code.patch +++ /dev/null @@ -1,96 +0,0 @@ -From: Felix Fietkau -Date: Wed, 11 Nov 2020 19:17:44 +0100 -Subject: [PATCH] mac80211: minstrel: remove deferred sampling code - -Deferring sampling attempts to the second stage has some bad interactions -with drivers that process the rate table in hardware and use the probe flag -to indicate probing packets (e.g. most mt76 drivers). On affected drivers -it can lead to probing not working at all. - -If the link conditions turn worse, it might not be such a good idea to -do a lot of sampling for lower rates in this case. - -Fix this by simply skipping the sample attempt instead of deferring it, -but keep the checks that would allow it to be sampled if it was skipped -too often, but only if it has less than 95% success probability. - -Also ensure that IEEE80211_TX_CTL_RATE_CTRL_PROBE is set for all probing -packets. - -Cc: stable@vger.kernel.org -Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.c -+++ b/net/mac80211/rc80211_minstrel.c -@@ -287,12 +287,6 @@ minstrel_tx_status(void *priv, struct ie - mi->r[ndx].stats.success += success; - } - -- if ((info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) && (i >= 0)) -- mi->sample_packets++; -- -- if (mi->sample_deferred > 0) -- mi->sample_deferred--; -- - if (time_after(jiffies, mi->last_stats_update + - mp->update_interval / (mp->new_avg ? 2 : 1))) - minstrel_update_stats(mp, mi); -@@ -367,7 +361,7 @@ minstrel_get_rate(void *priv, struct iee - return; - - delta = (mi->total_packets * sampling_ratio / 100) - -- (mi->sample_packets + mi->sample_deferred / 2); -+ mi->sample_packets; - - /* delta < 0: no sampling required */ - prev_sample = mi->prev_sample; -@@ -376,7 +370,6 @@ minstrel_get_rate(void *priv, struct iee - return; - - if (mi->total_packets >= 10000) { -- mi->sample_deferred = 0; - mi->sample_packets = 0; - mi->total_packets = 0; - } else if (delta > mi->n_rates * 2) { -@@ -401,19 +394,8 @@ minstrel_get_rate(void *priv, struct iee - * rate sampling method should be used. - * Respect such rates that are not sampled for 20 interations. - */ -- if (mrr_capable && -- msr->perfect_tx_time > mr->perfect_tx_time && -- msr->stats.sample_skipped < 20) { -- /* Only use IEEE80211_TX_CTL_RATE_CTRL_PROBE to mark -- * packets that have the sampling rate deferred to the -- * second MRR stage. Increase the sample counter only -- * if the deferred sample rate was actually used. -- * Use the sample_deferred counter to make sure that -- * the sampling is not done in large bursts */ -- info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; -- rate++; -- mi->sample_deferred++; -- } else { -+ if (msr->perfect_tx_time < mr->perfect_tx_time || -+ msr->stats.sample_skipped >= 20) { - if (!msr->sample_limit) - return; - -@@ -433,6 +415,7 @@ minstrel_get_rate(void *priv, struct iee - - rate->idx = mi->r[ndx].rix; - rate->count = minstrel_get_retry_count(&mi->r[ndx], info); -+ info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; - } - - ---- a/net/mac80211/rc80211_minstrel.h -+++ b/net/mac80211/rc80211_minstrel.h -@@ -126,7 +126,6 @@ struct minstrel_sta_info { - u8 max_prob_rate; - unsigned int total_packets; - unsigned int sample_packets; -- int sample_deferred; - - unsigned int sample_row; - unsigned int sample_column; diff --git a/package/kernel/mac80211/patches/subsys/335-mac80211-minstrel-fix-tx-status-processing-corner-ca.patch b/package/kernel/mac80211/patches/subsys/335-mac80211-minstrel-fix-tx-status-processing-corner-ca.patch deleted file mode 100644 index b1c339a1e6..0000000000 --- a/package/kernel/mac80211/patches/subsys/335-mac80211-minstrel-fix-tx-status-processing-corner-ca.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Felix Fietkau -Date: Wed, 11 Nov 2020 19:25:39 +0100 -Subject: [PATCH] mac80211: minstrel: fix tx status processing corner case - -Some drivers fill the status rate list without setting the rate index after -the final rate to -1. minstrel_ht already deals with this, but minstrel -doesn't, which causes it to get stuck at the lowest rate on these drivers. - -Fix this by checking the count as well. - -Cc: stable@vger.kernel.org -Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel.c -+++ b/net/mac80211/rc80211_minstrel.c -@@ -274,7 +274,7 @@ minstrel_tx_status(void *priv, struct ie - success = !!(info->flags & IEEE80211_TX_STAT_ACK); - - for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { -- if (ar[i].idx < 0) -+ if (ar[i].idx < 0 || !ar[i].count) - break; - - ndx = rix_to_ndx(mi, ar[i].idx); diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch index 378c37455d..d05217d1f8 100644 --- a/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch +++ b/package/kernel/mac80211/patches/subsys/336-mac80211-do-not-drop-tx-nulldata-packets-on-encrypte.patch @@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c -@@ -657,7 +657,7 @@ ieee80211_tx_h_select_key(struct ieee802 +@@ -662,7 +662,7 @@ ieee80211_tx_h_select_key(struct ieee802 if (!skip_hw && tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) info->control.hw_key = &tx->key->conf; diff --git a/package/kernel/mac80211/patches/subsys/339-mac80211-remove-legacy-minstrel-rate-control.patch b/package/kernel/mac80211/patches/subsys/339-mac80211-remove-legacy-minstrel-rate-control.patch index 8fd93247af..96ee595ac1 100644 --- a/package/kernel/mac80211/patches/subsys/339-mac80211-remove-legacy-minstrel-rate-control.patch +++ b/package/kernel/mac80211/patches/subsys/339-mac80211-remove-legacy-minstrel-rate-control.patch @@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau --- a/net/mac80211/Makefile +++ b/net/mac80211/Makefile -@@ -54,11 +54,9 @@ mac80211-$(CONFIG_PM) += pm.o +@@ -55,11 +55,9 @@ mac80211-$(CONFIG_PM) += pm.o CFLAGS_trace.o := -I$(src) rc80211_minstrel-y := \ diff --git a/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch b/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch index c96fc56921..7df24fa4bd 100644 --- a/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch +++ b/package/kernel/mac80211/patches/subsys/353-mac80211-fix-station-rate-table-updates-on-assoc.patch @@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau drv_sta_remove(local, sdata, &sta->sta); --- a/net/mac80211/rate.c +++ b/net/mac80211/rate.c -@@ -934,7 +934,8 @@ int rate_control_set_rates(struct ieee80 +@@ -960,7 +960,8 @@ int rate_control_set_rates(struct ieee80 if (old) kfree_rcu(old, rcu_head); diff --git a/package/kernel/mac80211/patches/subsys/354-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch b/package/kernel/mac80211/patches/subsys/354-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch new file mode 100644 index 0000000000..16bcbc2ef9 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/354-mac80211-minstrel_ht-reduce-fluctuations-in-rate-pro.patch @@ -0,0 +1,30 @@ +From: Felix Fietkau +Date: Sat, 6 Feb 2021 16:08:01 +0100 +Subject: [PATCH] mac80211: minstrel_ht: reduce fluctuations in rate + probability stats + +In some scenarios when there is a lot of fluctuation in packet error rates, +rate switching can be amplified when the statistics get skewed by time slots +with very few tries. +Make the input data to the moving average more smooth by adding the +success/attempts count from the last stats window as well. This has the +advantage of smoothing the data without introducing any extra lag to sampling +rates. +This significantly improves rate stability on a strong test link subjected to +periodic noise bursts generated with a SDR + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -700,7 +700,8 @@ minstrel_ht_calc_rate_stats(struct minst + unsigned int cur_prob; + + if (unlikely(mrs->attempts > 0)) { +- cur_prob = MINSTREL_FRAC(mrs->success, mrs->attempts); ++ cur_prob = MINSTREL_FRAC(mrs->success + mrs->last_success, ++ mrs->attempts + mrs->last_attempts); + minstrel_filter_avg_add(&mrs->prob_avg, + &mrs->prob_avg_1, cur_prob); + mrs->att_hist += mrs->attempts; diff --git a/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch b/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch new file mode 100644 index 0000000000..aec2e07781 --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/355-mac80211-minstrel_ht-rework-rate-downgrade-code-and-.patch @@ -0,0 +1,151 @@ +From: Felix Fietkau +Date: Sat, 6 Feb 2021 16:33:14 +0100 +Subject: [PATCH] mac80211: minstrel_ht: rework rate downgrade code and + max_prob rate selection + +The current fallback code for fast rate switching on potentially failing rates +is triggering too often if there is some strong noise on the channel. This can +lead to wild fluctuations in the rate selection. +Additionally, switching down to max_prob_rate can create a significant gap down +in throughput, especially when using only 2 spatial streams, because max_prob_rate +is limited to using fewer streams than the max_tp rates. +In order to improve throughput without reducing reliability too much, use the +rate downgrade code for the max_prob_rate only, and allow the non-downgraded +max_prob_rate to use as many spatial streams as the max_tp rates + +Signed-off-by: Felix Fietkau +--- + +--- a/net/mac80211/rc80211_minstrel_ht.c ++++ b/net/mac80211/rc80211_minstrel_ht.c +@@ -511,6 +511,14 @@ minstrel_ht_set_best_prob_rate(struct mi + int cur_tp_avg, cur_group, cur_idx; + int max_gpr_group, max_gpr_idx; + int max_gpr_tp_avg, max_gpr_prob; ++ int min_dur; ++ ++ min_dur = max(minstrel_get_duration(mi->max_tp_rate[0]), ++ minstrel_get_duration(mi->max_tp_rate[1])); ++ ++ /* make the rate at least 18% slower than max tp rates */ ++ if (minstrel_get_duration(index) <= min_dur * 19 / 16) ++ return; + + cur_group = MI_RATE_GROUP(index); + cur_idx = MI_RATE_IDX(index); +@@ -532,11 +540,6 @@ minstrel_ht_set_best_prob_rate(struct mi + !minstrel_ht_is_legacy_group(max_tp_group)) + return; + +- /* skip rates faster than max tp rate with lower prob */ +- if (minstrel_get_duration(mi->max_tp_rate[0]) > minstrel_get_duration(index) && +- mrs->prob_avg < max_tp_prob) +- return; +- + max_gpr_group = MI_RATE_GROUP(mg->max_group_prob_rate); + max_gpr_idx = MI_RATE_IDX(mg->max_group_prob_rate); + max_gpr_prob = mi->groups[max_gpr_group].rates[max_gpr_idx].prob_avg; +@@ -594,40 +597,6 @@ minstrel_ht_assign_best_tp_rates(struct + + } + +-/* +- * Try to increase robustness of max_prob rate by decrease number of +- * streams if possible. +- */ +-static inline void +-minstrel_ht_prob_rate_reduce_streams(struct minstrel_ht_sta *mi) +-{ +- struct minstrel_mcs_group_data *mg; +- int tmp_max_streams, group, tmp_idx, tmp_prob; +- int tmp_tp = 0; +- +- if (!mi->sta->ht_cap.ht_supported) +- return; +- +- group = MI_RATE_GROUP(mi->max_tp_rate[0]); +- tmp_max_streams = minstrel_mcs_groups[group].streams; +- for (group = 0; group < ARRAY_SIZE(minstrel_mcs_groups); group++) { +- mg = &mi->groups[group]; +- if (!mi->supported[group] || group == MINSTREL_CCK_GROUP) +- continue; +- +- tmp_idx = MI_RATE_IDX(mg->max_group_prob_rate); +- tmp_prob = mi->groups[group].rates[tmp_idx].prob_avg; +- +- if (tmp_tp < minstrel_ht_get_tp_avg(mi, group, tmp_idx, tmp_prob) && +- (minstrel_mcs_groups[group].streams < tmp_max_streams)) { +- mi->max_prob_rate = mg->max_group_prob_rate; +- tmp_tp = minstrel_ht_get_tp_avg(mi, group, +- tmp_idx, +- tmp_prob); +- } +- } +-} +- + static u16 + __minstrel_ht_get_sample_rate(struct minstrel_ht_sta *mi, + enum minstrel_sample_type type) +@@ -1111,8 +1080,6 @@ minstrel_ht_update_stats(struct minstrel + + mi->max_prob_rate = tmp_max_prob_rate; + +- /* Try to increase robustness of max_prob_rate*/ +- minstrel_ht_prob_rate_reduce_streams(mi); + minstrel_ht_refill_sample_rates(mi); + + #ifdef CPTCFG_MAC80211_DEBUGFS +@@ -1157,7 +1124,7 @@ minstrel_ht_txstat_valid(struct minstrel + } + + static void +-minstrel_downgrade_rate(struct minstrel_ht_sta *mi, u16 *idx, bool primary) ++minstrel_downgrade_prob_rate(struct minstrel_ht_sta *mi, u16 *idx) + { + int group, orig_group; + +@@ -1172,11 +1139,7 @@ minstrel_downgrade_rate(struct minstrel_ + minstrel_mcs_groups[orig_group].streams) + continue; + +- if (primary) +- *idx = mi->groups[group].max_group_tp_rate[0]; +- else +- *idx = mi->groups[group].max_group_tp_rate[1]; +- break; ++ *idx = mi->groups[group].max_group_prob_rate; + } + } + +@@ -1210,7 +1173,7 @@ minstrel_ht_tx_status(void *priv, struct + struct ieee80211_tx_info *info = st->info; + struct minstrel_ht_sta *mi = priv_sta; + struct ieee80211_tx_rate *ar = info->status.rates; +- struct minstrel_rate_stats *rate, *rate2; ++ struct minstrel_rate_stats *rate; + struct minstrel_priv *mp = priv; + u32 update_interval = mp->update_interval; + bool last, update = false; +@@ -1256,18 +1219,13 @@ minstrel_ht_tx_status(void *priv, struct + /* + * check for sudden death of spatial multiplexing, + * downgrade to a lower number of streams if necessary. ++ * only do this for the max_prob_rate to prevent spurious ++ * rate fluctuations when the link changes suddenly + */ +- rate = minstrel_get_ratestats(mi, mi->max_tp_rate[0]); ++ rate = minstrel_get_ratestats(mi, mi->max_prob_rate); + if (rate->attempts > 30 && + rate->success < rate->attempts / 4) { +- minstrel_downgrade_rate(mi, &mi->max_tp_rate[0], true); +- update = true; +- } +- +- rate2 = minstrel_get_ratestats(mi, mi->max_tp_rate[1]); +- if (rate2->attempts > 30 && +- rate2->success < rate2->attempts / 4) { +- minstrel_downgrade_rate(mi, &mi->max_tp_rate[1], false); ++ minstrel_downgrade_prob_rate(mi, &mi->max_prob_rate); + update = true; + } + } diff --git a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch index feb6b5b11e..f9c4caa51c 100644 --- a/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch +++ b/package/kernel/mac80211/patches/subsys/400-allow-ibss-mixed.patch @@ -5,7 +5,7 @@ and we should ignore this. --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -612,21 +612,6 @@ static int wiphy_verify_combinations(str +@@ -614,21 +614,6 @@ static int wiphy_verify_combinations(str c->limits[j].max > 1)) return -EINVAL; diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch index 6abf3a1261..48c70f8db2 100644 --- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3610,6 +3610,7 @@ struct mgmt_frame_regs { +@@ -3736,6 +3736,7 @@ struct mgmt_frame_regs { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -3932,6 +3933,7 @@ struct cfg80211_ops { +@@ -4058,6 +4059,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -18,7 +18,7 @@ const u8 *addr); --- a/include/net/mac80211.h +++ b/include/net/mac80211.h -@@ -1521,6 +1521,7 @@ enum ieee80211_smps_mode { +@@ -1561,6 +1561,7 @@ enum ieee80211_smps_mode { * * @power_level: requested transmit power (in dBm), backward compatibility * value only that is set to the minimum of all interfaces @@ -26,7 +26,7 @@ * * @chandef: the channel definition to tune to * @radar_enabled: whether radar detection is enabled -@@ -1541,6 +1542,7 @@ enum ieee80211_smps_mode { +@@ -1581,6 +1582,7 @@ enum ieee80211_smps_mode { struct ieee80211_conf { u32 flags; int power_level, dynamic_ps_timeout; @@ -36,9 +36,9 @@ u8 ps_dtim_period; --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h -@@ -2505,6 +2505,9 @@ enum nl80211_commands { - * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from - * association request when used with NL80211_CMD_NEW_STATION). +@@ -2527,6 +2527,9 @@ enum nl80211_commands { + * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in + * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. @@ -46,9 +46,9 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2987,6 +2990,8 @@ enum nl80211_attrs { - - NL80211_ATTR_HE_6GHZ_CAPABILITY, +@@ -3016,6 +3019,8 @@ enum nl80211_attrs { + NL80211_ATTR_S1G_CAPABILITY, + NL80211_ATTR_S1G_CAPABILITY_MASK, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2612,6 +2612,19 @@ static int ieee80211_get_tx_power(struct +@@ -2707,6 +2707,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -4042,6 +4055,7 @@ const struct cfg80211_ops mac80211_confi +@@ -4137,6 +4150,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power, @@ -87,7 +87,7 @@ CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd) --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1383,6 +1383,7 @@ struct ieee80211_local { +@@ -1400,6 +1400,7 @@ struct ieee80211_local { int dynamic_ps_forced_timeout; int user_power_level; /* in dBm, for all interfaces */ @@ -129,15 +129,15 @@ local->hw.max_mtu = IEEE80211_MAX_DATA_LEN; --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -658,6 +658,7 @@ static const struct nla_policy nl80211_p - .type = NLA_EXACT_LEN, - .len = sizeof(struct ieee80211_he_6ghz_capa), - }, +@@ -732,6 +732,7 @@ static const struct nla_policy nl80211_p + NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), + [NL80211_ATTR_S1G_CAPABILITY_MASK] = + NLA_POLICY_EXACT_LEN(IEEE80211_S1G_CAPABILITY_LEN), + [NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 }, }; /* policy for the key attributes */ -@@ -3139,6 +3140,20 @@ static int nl80211_set_wiphy(struct sk_b +@@ -3240,6 +3241,20 @@ static int nl80211_set_wiphy(struct sk_b if (result) return result; } diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile index 05d710387c..810ee4c3d4 100644 --- a/package/kernel/mt76/Makefile +++ b/package/kernel/mt76/Makefile @@ -8,9 +8,9 @@ PKG_LICENSE_FILES:= PKG_SOURCE_URL:=https://github.com/openwrt/mt76 PKG_SOURCE_PROTO:=git -PKG_SOURCE_DATE:=2021-01-27 -PKG_SOURCE_VERSION:=8696919d9aae9b673f916bca41c5e1671eec5b0e -PKG_MIRROR_HASH:=82675e11f537eaa2fe2c1029880f7993ed4401d0d59b12faf6dbe96ac3eb8308 +PKG_SOURCE_DATE:=2021-02-14 +PKG_SOURCE_VERSION:=289cd7804587dc48f776d450db9cd3762692a370 +PKG_MIRROR_HASH:=91885feca9d935586c6e33a8e3734bfa61991d869bf42ac0d1c8c3b19bfa9653 PKG_MAINTAINER:=Felix Fietkau PKG_BUILD_PARALLEL:=1 @@ -143,11 +143,19 @@ define KernelPackage/mt7603 AUTOLOAD:=$(call AutoProbe,mt7603e) endef +define KernelPackage/mt76-connac + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7615/MT79xx wireless driver common code + HIDDEN:=1 + DEPENDS+=+kmod-mt76-core + FILES:= $(PKG_BUILD_DIR)/mt76-connac-lib.ko +endef + define KernelPackage/mt7615-common $(KernelPackage/mt76-default) TITLE:=MediaTek MT7615 wireless driver common code HIDDEN:=1 - DEPENDS+=@PCI_SUPPORT +kmod-mt76-core + DEPENDS+=@PCI_SUPPORT +kmod-mt76-core +kmod-mt76-connac FILES:= $(PKG_BUILD_DIR)/mt7615/mt7615-common.ko endef @@ -210,6 +218,14 @@ define KernelPackage/mt7915e AUTOLOAD:=$(call AutoProbe,mt7915e) endef +define KernelPackage/mt7921e + $(KernelPackage/mt76-default) + TITLE:=MediaTek MT7921e wireless driver + DEPENDS+=@PCI_SUPPORT +kmod-mt76-connac + FILES:= $(PKG_BUILD_DIR)/mt7921/mt7921e.ko + AUTOLOAD:=$(call AutoProbe,mt7921e) +endef + define Package/mt76-test SECTION:=devel CATEGORY:=Development @@ -267,6 +283,9 @@ endif ifdef CONFIG_PACKAGE_kmod-mt7603 PKG_MAKE_FLAGS += CONFIG_MT7603E=m endif +ifdef CONFIG_PACKAGE_kmod-mt76-connac + PKG_MAKE_FLAGS += CONFIG_MT76_CONNAC_LIB=m +endif ifdef CONFIG_PACKAGE_kmod-mt7615-common PKG_MAKE_FLAGS += CONFIG_MT7615_COMMON=m endif @@ -290,6 +309,9 @@ endif ifdef CONFIG_PACKAGE_kmod-mt7915e PKG_MAKE_FLAGS += CONFIG_MT7915E=m endif +ifdef CONFIG_PACKAGE_kmod-mt7921e + PKG_MAKE_FLAGS += CONFIG_MT7921E=m +endif define Build/Compile +$(MAKE) $(PKG_JOBS) -C "$(LINUX_DIR)" \ @@ -400,6 +422,7 @@ $(eval $(call KernelPackage,mt76x2-common)) $(eval $(call KernelPackage,mt76x2u)) $(eval $(call KernelPackage,mt76x2)) $(eval $(call KernelPackage,mt7603)) +$(eval $(call KernelPackage,mt76-connac)) $(eval $(call KernelPackage,mt7615-common)) $(eval $(call KernelPackage,mt7615-firmware)) $(eval $(call KernelPackage,mt7615e)) @@ -409,5 +432,6 @@ $(eval $(call KernelPackage,mt7663-usb-sdio)) $(eval $(call KernelPackage,mt7663u)) $(eval $(call KernelPackage,mt7663s)) $(eval $(call KernelPackage,mt7915e)) +$(eval $(call KernelPackage,mt7921e)) $(eval $(call KernelPackage,mt76)) $(eval $(call BuildPackage,mt76-test)) diff --git a/package/libs/gmp/Makefile b/package/libs/gmp/Makefile index 4ea69019f6..eb7d808139 100644 --- a/package/libs/gmp/Makefile +++ b/package/libs/gmp/Makefile @@ -8,17 +8,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gmp -PKG_VERSION:=6.1.2 -PKG_RELEASE:=2 +PKG_VERSION:=6.2.1 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)$(PKG_REVISION).tar.xz PKG_SOURCE_URL:=@GNU/gmp/ -PKG_HASH:=87b565e89a9a684fe4ebeeddb8399dce2599f9c9049854ca8c0dfbdea0e21912 +PKG_HASH:=fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 PKG_FIXUP:=autoreconf -PKG_LICENSE:=GPL-2.0+ +PKG_LICENSE:=GPL-2.0-or-later PKG_USE_MIPS16:=0 diff --git a/package/libs/libevent2/Makefile b/package/libs/libevent2/Makefile index 701840a871..85c159c2a6 100644 --- a/package/libs/libevent2/Makefile +++ b/package/libs/libevent2/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libevent2 -PKG_VERSION:=2.1.11 -PKG_RELEASE:=2 +PKG_VERSION:=2.1.12 +PKG_RELEASE:=1 PKG_SOURCE:=libevent-$(PKG_VERSION)-stable.tar.gz PKG_SOURCE_URL:=https://github.com/libevent/libevent/releases/download/release-$(PKG_VERSION)-stable -PKG_HASH:=a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d +PKG_HASH:=92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb PKG_BUILD_DIR:=$(BUILD_DIR)/libevent-$(PKG_VERSION)-stable PKG_MAINTAINER:=Jo-Philipp Wich diff --git a/package/libs/libevent2/patches/0001-Add-missing-file-Uninstall.cmake.in.patch b/package/libs/libevent2/patches/0001-Add-missing-file-Uninstall.cmake.in.patch deleted file mode 100644 index b0b4bf8c0b..0000000000 --- a/package/libs/libevent2/patches/0001-Add-missing-file-Uninstall.cmake.in.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9c2d9d2c8f65d7c6bb268c0e9795bac296661ca8 Mon Sep 17 00:00:00 2001 -From: Daniel Engberg -Date: Wed, 7 Aug 2019 00:56:39 +0200 -Subject: [PATCH] Add missing file Uninstall.cmake.in - -Needed to fix compilation - -Signed-off-by: Daniel Engberg ---- - cmake/Uninstall.cmake.in | 23 +++++++++++++++++++++++ - 1 file changed, 23 insertions(+) - create mode 100644 cmake/Uninstall.cmake.in - -diff --git a/cmake/Uninstall.cmake.in b/cmake/Uninstall.cmake.in -new file mode 100644 -index 0000000..c6dc09e ---- /dev/null -+++ b/cmake/Uninstall.cmake.in -@@ -0,0 +1,23 @@ -+# https://gitlab.kitware.com/cmake/community/wikis/FAQ#can-i-do-make-uninstall-with-cmake -+ -+if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") -+ message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") -+endif(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") -+ -+file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) -+string(REGEX REPLACE "\n" ";" files "${files}") -+foreach(file ${files}) -+ message(STATUS "Uninstalling $ENV{DESTDIR}${file}") -+ if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") -+ exec_program( -+ "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" -+ OUTPUT_VARIABLE rm_out -+ RETURN_VALUE rm_retval -+ ) -+ if(NOT "${rm_retval}" STREQUAL 0) -+ message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") -+ endif(NOT "${rm_retval}" STREQUAL 0) -+ else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") -+ message(STATUS "File $ENV{DESTDIR}${file} does not exist.") -+ endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") -+endforeach(file) --- -2.22.0 - diff --git a/package/libs/libevent2/patches/0002-Add-Uninstall.cmake.in-into-dist-archive.patch b/package/libs/libevent2/patches/0002-Add-Uninstall.cmake.in-into-dist-archive.patch deleted file mode 100644 index c5bea996b7..0000000000 --- a/package/libs/libevent2/patches/0002-Add-Uninstall.cmake.in-into-dist-archive.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f05ba671931e2b4e38459899f6f63f79f99869fe Mon Sep 17 00:00:00 2001 -From: Azat Khuzhin -Date: Sat, 3 Aug 2019 14:32:21 +0300 -Subject: [PATCH] Add Uninstall.cmake.in into dist archive - -Fixes: #863 ---- - Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/Makefile.am b/Makefile.am -index af75a963..92f9433c 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -127,6 +127,7 @@ CMAKE_FILES = \ - cmake/LibeventConfig.cmake.in \ - cmake/LibeventConfigVersion.cmake.in \ - cmake/VersionViaGit.cmake \ -+ cmake/Uninstall.cmake.in \ - event-config.h.cmake \ - evconfig-private.h.cmake \ - CMakeLists.txt --- -2.22.0 - diff --git a/package/libs/libnftnl/Makefile b/package/libs/libnftnl/Makefile index c56fb068ce..198e01ba22 100644 --- a/package/libs/libnftnl/Makefile +++ b/package/libs/libnftnl/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libnftnl -PKG_VERSION:=1.1.7 -PKG_RELEASE:=2 +PKG_VERSION:=1.1.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://netfilter.org/projects/$(PKG_NAME)/files -PKG_HASH:=20dbc13f11004aea2c9e479cfb90359cb11fe3446c3140811c18e4ec1648ed8f -PKG_MAINTAINER:=Steven Barth -PKG_LICENSE:=GPL-2.0+ +PKG_HASH:=04a3fa5b08b736268f7e65836b9f05d9d5f438181467bee3c76c3c4a4f3ab711 -PKG_FIXUP:=autoreconf +PKG_MAINTAINER:=Steven Barth +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/package.mk @@ -31,7 +32,7 @@ define Package/libnftnl DEPENDS:=+libmnl TITLE:=Low-level netlink library for the nf_tables subsystem URL:=http://www.netfilter.org/projects/libnftnl - ABI_VERSION:=12 + ABI_VERSION:=11 endef define Package/libnftnl/description diff --git a/package/libs/readline/Makefile b/package/libs/readline/Makefile index e0204104c5..d41a6d74f4 100644 --- a/package/libs/readline/Makefile +++ b/package/libs/readline/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=readline -PKG_VERSION:=8.0 +PKG_VERSION:=8.1 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@GNU/readline -PKG_HASH:=e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461 +PKG_HASH:=f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02 -PKG_LICENSE:=GPL-3.0 +PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_CPE_ID:=cpe:/a:gnu:readline diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile index dcc6aca40c..ff01fca663 100644 --- a/package/libs/wolfssl/Makefile +++ b/package/libs/wolfssl/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wolfssl PKG_VERSION:=4.6.0-stable -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION) diff --git a/package/libs/wolfssl/patches/010-CVE-2021-3336.patch b/package/libs/wolfssl/patches/010-CVE-2021-3336.patch new file mode 100644 index 0000000000..abb9bfdd9b --- /dev/null +++ b/package/libs/wolfssl/patches/010-CVE-2021-3336.patch @@ -0,0 +1,53 @@ +From fad1e67677bf7797b6bd6e1f21a513c289d963a7 Mon Sep 17 00:00:00 2001 +From: Sean Parkinson +Date: Thu, 21 Jan 2021 08:24:38 +1000 +Subject: [PATCH] TLS 1.3: ensure key for signature in CertificateVerify + +--- + src/tls13.c | 18 +++++++++++++----- + 1 file changed, 13 insertions(+), 5 deletions(-) + +--- a/src/tls13.c ++++ b/src/tls13.c +@@ -5624,28 +5624,36 @@ static int DoTls13CertificateVerify(WOLF + #ifdef HAVE_ED25519 + if (args->sigAlgo == ed25519_sa_algo && + !ssl->peerEd25519KeyPresent) { +- WOLFSSL_MSG("Oops, peer sent ED25519 key but not in verify"); ++ WOLFSSL_MSG("Peer sent ED22519 sig but not ED22519 cert"); ++ ret = SIG_VERIFY_E; ++ goto exit_dcv; + } + #endif + #ifdef HAVE_ED448 + if (args->sigAlgo == ed448_sa_algo && !ssl->peerEd448KeyPresent) { +- WOLFSSL_MSG("Oops, peer sent ED448 key but not in verify"); ++ WOLFSSL_MSG("Peer sent ED448 sig but not ED448 cert"); ++ ret = SIG_VERIFY_E; ++ goto exit_dcv; + } + #endif + #ifdef HAVE_ECC + if (args->sigAlgo == ecc_dsa_sa_algo && + !ssl->peerEccDsaKeyPresent) { +- WOLFSSL_MSG("Oops, peer sent ECC key but not in verify"); ++ WOLFSSL_MSG("Peer sent ECC sig but not ECC cert"); ++ ret = SIG_VERIFY_E; ++ goto exit_dcv; + } + #endif + #ifndef NO_RSA + if (args->sigAlgo == rsa_sa_algo) { +- WOLFSSL_MSG("Oops, peer sent PKCS#1.5 signature"); ++ WOLFSSL_MSG("Peer sent PKCS#1.5 algo but not in certificate"); + ERROR_OUT(INVALID_PARAMETER, exit_dcv); + } + if (args->sigAlgo == rsa_pss_sa_algo && + (ssl->peerRsaKey == NULL || !ssl->peerRsaKeyPresent)) { +- WOLFSSL_MSG("Oops, peer sent RSA key but not in verify"); ++ WOLFSSL_MSG("Peer sent RSA sig but not RSA cert"); ++ ret = SIG_VERIFY_E; ++ goto exit_dcv; + } + #endif + diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile index 6ab97c6e92..62f74923f0 100644 --- a/package/network/services/hostapd/Makefile +++ b/package/network/services/hostapd/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=hostapd -PKG_RELEASE:=30 +PKG_RELEASE:=31 PKG_SOURCE_URL:=http://w1.fi/hostap.git PKG_SOURCE_PROTO:=git diff --git a/package/network/services/hostapd/patches/110-notify-mgmt-frames.patch b/package/network/services/hostapd/patches/110-notify-mgmt-frames.patch new file mode 100644 index 0000000000..9e187253d4 --- /dev/null +++ b/package/network/services/hostapd/patches/110-notify-mgmt-frames.patch @@ -0,0 +1,116 @@ +From 53f8fdb534d5222a0e852e38afde3f49832ace06 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= +Date: Thu, 26 Nov 2020 09:27:40 +0100 +Subject: [PATCH] hostapd: Add an option to notify management frames on + ctrl_iface +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In some contexts (e.g. Multi-AP) it can be useful to have access to +some of the management frames in upper layers (e.g. to be able to +process the content of association requests externally). + +Add 'notify_mgmt_frames'. When enabled, it will notify the ctrl_iface +when a management frame arrives using 'AP_MGMT_FRAME_RECEIVED'. + +Note that to avoid completely flooding the ctrl_iface, not all +management frames are included (e.g. beacons are excluded). + +Signed-off-by: Raphaël Mélotte +--- + hostapd/config_file.c | 2 ++ + hostapd/hostapd.conf | 4 ++++ + src/ap/ap_config.h | 2 ++ + src/ap/ieee802_11.c | 25 +++++++++++++++++++++++++ + src/common/wpa_ctrl.h | 3 +++ + 5 files changed, 36 insertions(+) + +--- a/hostapd/config_file.c ++++ b/hostapd/config_file.c +@@ -4456,6 +4456,8 @@ static int hostapd_config_fill(struct ho + bss->multicast_to_unicast = atoi(pos); + } else if (os_strcmp(buf, "broadcast_deauth") == 0) { + bss->broadcast_deauth = atoi(pos); ++ } else if (os_strcmp(buf, "notify_mgmt_frames") == 0) { ++ conf->notify_mgmt_frames = atoi(pos); + #ifdef CONFIG_DPP + } else if (os_strcmp(buf, "dpp_name") == 0) { + os_free(bss->dpp_name); +--- a/hostapd/hostapd.conf ++++ b/hostapd/hostapd.conf +@@ -571,6 +571,10 @@ wmm_ac_vo_acm=0 + # Default: 1 (enabled) + #broadcast_deauth=1 + ++# Get notifications for management frames: ++# Default: 0 (disabled) ++#notify_mgmt_frames=0 ++ + ##### IEEE 802.11n related configuration ###################################### + + # ieee80211n: Whether IEEE 802.11n (HT) is enabled +--- a/src/ap/ap_config.h ++++ b/src/ap/ap_config.h +@@ -1060,6 +1060,8 @@ struct hostapd_config { + unsigned int airtime_update_interval; + #define AIRTIME_MODE_MAX (__AIRTIME_MODE_MAX - 1) + #endif /* CONFIG_AIRTIME_POLICY */ ++ ++ u8 notify_mgmt_frames; + }; + + +--- a/src/ap/ieee802_11.c ++++ b/src/ap/ieee802_11.c +@@ -4878,6 +4878,28 @@ static int handle_action(struct hostapd_ + return 1; + } + ++/** ++ * notify_mgmt_frame - notify of management frames on the control interface. ++ * @hapd: hostapd BSS data structure (the BSS to which the management frame was ++ * sent to) ++ * @buf: management frame data (starting from IEEE 802.11 header) ++ * @len: length of frame data in octets ++ * ++ * Notify the control interface of any management frame. ++ */ ++static void notify_mgmt_frame(struct hostapd_data *hapd, const u8 *buf, ++ size_t len) ++{ ++ ++ int hex_len = len * 2 + 1; ++ char *hex = os_malloc(hex_len); ++ ++ if (hex) { ++ wpa_snprintf_hex(hex, hex_len, buf, len); ++ wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, AP_MGMT_FRAME_RECEIVED "buf=%s", hex); ++ os_free(hex); ++ } ++} + + /** + * ieee802_11_mgmt - process incoming IEEE 802.11 management frames +@@ -4969,6 +4991,9 @@ int ieee802_11_mgmt(struct hostapd_data + if (hapd->iconf->track_sta_max_num) + sta_track_add(hapd->iface, mgmt->sa, ssi_signal); + ++ if (hapd->iconf->notify_mgmt_frames) ++ notify_mgmt_frame(hapd, buf, len); ++ + switch (stype) { + case WLAN_FC_STYPE_AUTH: + wpa_printf(MSG_DEBUG, "mgmt::auth"); +--- a/src/common/wpa_ctrl.h ++++ b/src/common/wpa_ctrl.h +@@ -396,6 +396,9 @@ extern "C" { + #define BIT(x) (1U << (x)) + #endif + ++/* Event triggered for received management frame */ ++#define AP_MGMT_FRAME_RECEIVED "AP-MGMT-FRAME-RECEIVED " ++ + /* BSS command information masks */ + + #define WPA_BSS_MASK_ALL 0xFFFDFFFF diff --git a/package/network/services/hostapd/patches/120-reconfigure-wps-credentials.patch b/package/network/services/hostapd/patches/120-reconfigure-wps-credentials.patch new file mode 100644 index 0000000000..1826b6685b --- /dev/null +++ b/package/network/services/hostapd/patches/120-reconfigure-wps-credentials.patch @@ -0,0 +1,178 @@ +From b389a77a0f6dccf495dbce5be9476000f6ec06a2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= +Date: Wed, 9 Dec 2020 19:55:53 +0100 +Subject: [PATCH] wps: reconfigure credentials on reload +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When new credentials are configured and hostapd is reconfigured using +SIGHUP (or reload on the ctrl_iface), also update the wps credentials. + +Before these changes, when WPS is triggered the registar always serves +the credentials that were configured when hostapd started. + +Signed-off-by: Raphaël Mélotte +--- + src/ap/wps_hostapd.c | 86 +++++++++++++++++++++++++++++++++++++++-- + src/wps/wps.h | 6 +++ + src/wps/wps_registrar.c | 29 ++++++++++++++ + 3 files changed, 118 insertions(+), 3 deletions(-) + +--- a/src/ap/wps_hostapd.c ++++ b/src/ap/wps_hostapd.c +@@ -1375,6 +1375,43 @@ static void hostapd_wps_nfc_clear(struct + #endif /* CONFIG_WPS_NFC */ + } + ++int hostapd_wps_update_multi_ap(struct hostapd_data *hapd, ++ struct wps_registrar *reg) { ++ struct hostapd_bss_config *conf = hapd->conf; ++ u8 *multi_ap_backhaul_network_key = NULL; ++ size_t multi_ap_backhaul_network_key_len = 0; ++ int ret = -1; ++ ++ if ((conf->multi_ap & FRONTHAUL_BSS) && ++ conf->multi_ap_backhaul_ssid.ssid_len) { ++ if (conf->multi_ap_backhaul_ssid.wpa_passphrase) { ++ multi_ap_backhaul_network_key = ++ (u8 *) os_strdup(conf->multi_ap_backhaul_ssid.wpa_passphrase); ++ if (multi_ap_backhaul_network_key == NULL) ++ return -1; ++ multi_ap_backhaul_network_key_len = ++ os_strlen(conf->multi_ap_backhaul_ssid.wpa_passphrase); ++ } else if (conf->multi_ap_backhaul_ssid.wpa_psk) { ++ multi_ap_backhaul_network_key = os_malloc(2 * PMK_LEN + 1); ++ if (multi_ap_backhaul_network_key == NULL) ++ return -1; ++ wpa_snprintf_hex((char *) multi_ap_backhaul_network_key, ++ 2 * PMK_LEN + 1, ++ conf->multi_ap_backhaul_ssid.wpa_psk->psk, ++ PMK_LEN); ++ multi_ap_backhaul_network_key_len = 2 * PMK_LEN; ++ } ++ ret = wps_registrar_update_multi_ap(reg, ++ conf->multi_ap_backhaul_ssid.ssid, ++ conf->multi_ap_backhaul_ssid.ssid_len, ++ multi_ap_backhaul_network_key, ++ multi_ap_backhaul_network_key_len); ++ os_free(multi_ap_backhaul_network_key); ++ } ++ return ret; ++} ++ ++ + + void hostapd_deinit_wps(struct hostapd_data *hapd) + { +@@ -1409,11 +1446,54 @@ void hostapd_update_wps(struct hostapd_d + hapd->wps->upc = hapd->conf->upc; + #endif /* CONFIG_WPS_UPNP */ + +- hostapd_wps_set_vendor_ext(hapd, hapd->wps); +- hostapd_wps_set_application_ext(hapd, hapd->wps); ++ struct wps_context *wps = hapd->wps; ++ struct hostapd_bss_config *conf = hapd->conf; ++ ++ os_memcpy(wps->ssid, conf->ssid.ssid, conf->ssid.ssid_len); ++ wps->ssid_len = conf->ssid.ssid_len; ++ ++ /* Clear wps settings, then fill them again */ ++ os_free(wps->network_key); ++ wps->network_key = NULL; ++ wps->network_key_len = 0; ++ wps->psk_set = 0; ++ if (conf->ssid.wpa_psk_file) { ++ /* Use per-device PSKs */ ++ } else if (conf->ssid.wpa_passphrase) { ++ wps->network_key = (u8 *) os_strdup(conf->ssid.wpa_passphrase); ++ if (wps->network_key == NULL) ++ return; ++ wps->network_key_len = os_strlen(conf->ssid.wpa_passphrase); ++ } else if (conf->ssid.wpa_psk) { ++ wps->network_key = os_malloc(2 * PMK_LEN + 1); ++ if (wps->network_key == NULL) ++ return; ++ wpa_snprintf_hex((char *) wps->network_key, 2 * PMK_LEN + 1, ++ conf->ssid.wpa_psk->psk, PMK_LEN); ++ wps->network_key_len = 2 * PMK_LEN; ++#ifdef CONFIG_WEP ++ } else if (conf->ssid.wep.keys_set && conf->ssid.wep.key[0]) { ++ wps->network_key = os_malloc(conf->ssid.wep.len[0]); ++ if (wps->network_key == NULL) ++ return; ++ os_memcpy(wps->network_key, conf->ssid.wep.key[0], ++ conf->ssid.wep.len[0]); ++ wps->network_key_len = conf->ssid.wep.len[0]; ++#endif /* CONFIG_WEP */ ++ } ++ ++ if (conf->ssid.wpa_psk) { ++ os_memcpy(wps->psk, conf->ssid.wpa_psk->psk, PMK_LEN); ++ wps->psk_set = 1; ++ } ++ ++ hostapd_wps_update_multi_ap(hapd, wps->registrar); ++ ++ hostapd_wps_set_vendor_ext(hapd, wps); ++ hostapd_wps_set_application_ext(hapd, wps); + + if (hapd->conf->wps_state) +- wps_registrar_update_ie(hapd->wps->registrar); ++ wps_registrar_update_ie(wps->registrar); + else + hostapd_deinit_wps(hapd); + } +--- a/src/wps/wps.h ++++ b/src/wps/wps.h +@@ -938,6 +938,12 @@ struct wpabuf * wps_build_nfc_handover_s + struct wpabuf *nfc_dh_pubkey, + struct wpabuf *nfc_dev_pw); + ++int wps_registrar_update_multi_ap(struct wps_registrar *reg, ++ const u8 *multi_ap_backhaul_ssid, ++ size_t multi_ap_backhaul_ssid_len, ++ const u8 *multi_ap_backhaul_network_key, ++ size_t multi_ap_backhaul_network_key_len); ++ + /* ndef.c */ + struct wpabuf * ndef_parse_wifi(const struct wpabuf *buf); + struct wpabuf * ndef_build_wifi(const struct wpabuf *buf); +--- a/src/wps/wps_registrar.c ++++ b/src/wps/wps_registrar.c +@@ -3669,6 +3669,35 @@ int wps_registrar_config_ap(struct wps_r + } + + ++int wps_registrar_update_multi_ap(struct wps_registrar *reg, ++ const u8 *multi_ap_backhaul_ssid, ++ size_t multi_ap_backhaul_ssid_len, ++ const u8 *multi_ap_backhaul_network_key, ++ size_t multi_ap_backhaul_network_key_len) ++{ ++ if (multi_ap_backhaul_ssid != NULL) { ++ os_memcpy(reg->multi_ap_backhaul_ssid, ++ multi_ap_backhaul_ssid, ++ multi_ap_backhaul_ssid_len); ++ reg->multi_ap_backhaul_ssid_len = ++ multi_ap_backhaul_ssid_len; ++ } ++ os_free(reg->multi_ap_backhaul_network_key); ++ reg->multi_ap_backhaul_network_key = NULL; ++ reg->multi_ap_backhaul_network_key_len = 0; ++ ++ if (multi_ap_backhaul_network_key != NULL) { ++ reg->multi_ap_backhaul_network_key = ++ os_memdup(multi_ap_backhaul_network_key, ++ multi_ap_backhaul_network_key_len); ++ if (reg->multi_ap_backhaul_network_key == NULL) ++ return -1; ++ reg->multi_ap_backhaul_network_key_len = ++ multi_ap_backhaul_network_key_len; ++ } ++ return 0; ++} ++ + #ifdef CONFIG_WPS_NFC + + int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg, diff --git a/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch b/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch new file mode 100644 index 0000000000..fd3017af92 --- /dev/null +++ b/package/network/services/hostapd/patches/130-wpa_supplicant-multi_ap_roam.patch @@ -0,0 +1,37 @@ +From 8a4893dd06eb236460db4937f3c54e246739ad28 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rapha=C3=ABl=20M=C3=A9lotte?= +Date: Wed, 3 Feb 2021 14:23:17 +0100 +Subject: [PATCH] wpa_supplicant: multi_ap: only enable 4addr mode if not + already enabled +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +If 4addr mode is already enabled, the call to enable it a second time +may fail. If this happens when roaming, it leads to deauthentication. + +Signed-off-by: Raphaël Mélotte +--- + wpa_supplicant/events.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/wpa_supplicant/events.c ++++ b/wpa_supplicant/events.c +@@ -2589,11 +2589,13 @@ static void multi_ap_set_4addr_mode(stru + goto fail; + } + +- if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) { +- wpa_printf(MSG_ERROR, "Failed to set 4addr mode"); +- goto fail; ++ if (wpa_s->enabled_4addr_mode == 0) { ++ if (wpa_drv_set_4addr_mode(wpa_s, 1) < 0) { ++ wpa_printf(MSG_ERROR, "Failed to set 4addr mode"); ++ goto fail; ++ } ++ wpa_s->enabled_4addr_mode = 1; + } +- wpa_s->enabled_4addr_mode = 1; + return; + + fail: diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch index 9119a24c55..4f3e3decfe 100644 --- a/package/network/services/hostapd/patches/200-multicall.patch +++ b/package/network/services/hostapd/patches/200-multicall.patch @@ -231,7 +231,7 @@ os_memset(&global, 0, sizeof(global)); --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -4579,8 +4579,8 @@ static void wpas_event_unprot_beacon(str +@@ -4581,8 +4581,8 @@ static void wpas_event_unprot_beacon(str } @@ -242,7 +242,7 @@ { struct wpa_supplicant *wpa_s = ctx; int resched; -@@ -5398,7 +5398,7 @@ void wpa_supplicant_event(void *ctx, enu +@@ -5400,7 +5400,7 @@ void wpa_supplicant_event(void *ctx, enu } diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch b/package/network/services/hostapd/patches/370-ap_sta_support.patch index 1c5f72ddc0..a7a646d2d1 100644 --- a/package/network/services/hostapd/patches/370-ap_sta_support.patch +++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch @@ -274,7 +274,7 @@ if (ieee802_11_build_ap_params(hapd, ¶ms) < 0) --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c -@@ -4579,6 +4579,60 @@ static void wpas_event_unprot_beacon(str +@@ -4581,6 +4581,60 @@ static void wpas_event_unprot_beacon(str } @@ -335,7 +335,7 @@ void supplicant_event(void *ctx, enum wpa_event_type event, union wpa_event_data *data) { -@@ -4881,8 +4935,10 @@ void supplicant_event(void *ctx, enum wp +@@ -4883,8 +4937,10 @@ void supplicant_event(void *ctx, enum wp channel_width_to_string(data->ch_switch.ch_width), data->ch_switch.cf1, data->ch_switch.cf2); diff --git a/package/network/services/hostapd/patches/700-wifi-reload.patch b/package/network/services/hostapd/patches/700-wifi-reload.patch index 4acf4aaa06..d5520d0b77 100644 --- a/package/network/services/hostapd/patches/700-wifi-reload.patch +++ b/package/network/services/hostapd/patches/700-wifi-reload.patch @@ -51,9 +51,9 @@ #define AIRTIME_MODE_MAX (__AIRTIME_MODE_MAX - 1) #endif /* CONFIG_AIRTIME_POLICY */ + char *config_id; + + u8 notify_mgmt_frames; }; - - --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -218,6 +218,10 @@ static int hostapd_iface_conf_changed(st diff --git a/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch b/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch index 4657b55d85..944f7d71c9 100644 --- a/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch +++ b/package/network/services/hostapd/patches/801-P2P-Fix-copying-of-secondary-device-types-for-P2P-gr.patch @@ -20,11 +20,9 @@ Signed-off-by: Jouni Malinen src/p2p/p2p.c | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c -index 74b7b52ae05c..5cbfc217fc1f 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c -@@ -453,6 +453,8 @@ static void p2p_copy_client_info(struct p2p_device *dev, +@@ -453,6 +453,8 @@ static void p2p_copy_client_info(struct dev->info.config_methods = cli->config_methods; os_memcpy(dev->info.pri_dev_type, cli->pri_dev_type, 8); dev->info.wps_sec_dev_type_list_len = 8 * cli->num_sec_dev_types; @@ -33,6 +31,3 @@ index 74b7b52ae05c..5cbfc217fc1f 100644 os_memcpy(dev->info.wps_sec_dev_type_list, cli->sec_dev_types, dev->info.wps_sec_dev_type_list_len); } --- -2.25.1 - diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile index fe3e526ef1..799a63c23d 100644 --- a/package/network/services/odhcpd/Makefile +++ b/package/network/services/odhcpd/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcpd -PKG_RELEASE:=1 +PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git diff --git a/package/network/services/odhcpd/files/odhcpd.defaults b/package/network/services/odhcpd/files/odhcpd.defaults index 5a1706f785..1350636ba4 100644 --- a/package/network/services/odhcpd/files/odhcpd.defaults +++ b/package/network/services/odhcpd/files/odhcpd.defaults @@ -11,20 +11,40 @@ json_get_vars protocol json_select .. json_select .. +ODHCPDONLY=0 +V4MODE=disabled +V6MODE=disabled + +[ -e /usr/sbin/dnsmasq ] || ODHCPDONLY=1 + case "$protocol" in # only enable server mode on statically addressed lan ports -"static") [ -e /proc/sys/net/ipv6 ] && MODE=server || MODE=disabled ;; -*) MODE=disabled ;; +"static") + V4MODE=server + [ -e /proc/sys/net/ipv6 ] && V6MODE=server + ;; esac +uci get dhcp.lan 1>/dev/null 2>/dev/null || { +uci batch < PKG_LICENSE:=GPL-2.0 diff --git a/package/network/utils/iw/patches/001-nl80211_h_sync.patch b/package/network/utils/iw/patches/001-nl80211_h_sync.patch index 4b462d3f20..c944e02ba6 100644 --- a/package/network/utils/iw/patches/001-nl80211_h_sync.patch +++ b/package/network/utils/iw/patches/001-nl80211_h_sync.patch @@ -1,8 +1,8 @@ --- a/nl80211.h +++ b/nl80211.h -@@ -2515,6 +2515,9 @@ enum nl80211_commands { - * @NL80211_ATTR_HE_6GHZ_CAPABILITY: HE 6 GHz Band Capability element (from - * association request when used with NL80211_CMD_NEW_STATION). +@@ -2527,6 +2527,9 @@ enum nl80211_commands { + * override mask. Used with NL80211_ATTR_S1G_CAPABILITY in + * NL80211_CMD_ASSOCIATE or NL80211_CMD_CONNECT. * + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce + * transmit power to stay within regulatory limits. u32, dBi. @@ -10,9 +10,9 @@ * @NUM_NL80211_ATTR: total number of nl80211_attrs available * @NL80211_ATTR_MAX: highest attribute number currently defined * @__NL80211_ATTR_AFTER_LAST: internal use -@@ -2997,6 +3000,8 @@ enum nl80211_attrs { - - NL80211_ATTR_HE_6GHZ_CAPABILITY, +@@ -3016,6 +3019,8 @@ enum nl80211_attrs { + NL80211_ATTR_S1G_CAPABILITY, + NL80211_ATTR_S1G_CAPABILITY_MASK, + NL80211_ATTR_WIPHY_ANTENNA_GAIN, + diff --git a/package/network/utils/iw/patches/200-reduce_size.patch b/package/network/utils/iw/patches/200-reduce_size.patch index 1e8286300b..af30876012 100644 --- a/package/network/utils/iw/patches/200-reduce_size.patch +++ b/package/network/utils/iw/patches/200-reduce_size.patch @@ -337,9 +337,9 @@ SECTION(switch); COMMAND(switch, freq, " [NOHT|HT20|HT40+|HT40-|5MHz|10MHz|80MHz] [beacons ] [block-tx]\n" -@@ -956,3 +959,4 @@ COMMAND(set, tidconf, "[peer PKG_LICENSE:=GPL-2.0 diff --git a/package/utils/busybox/Config-defaults.in b/package/utils/busybox/Config-defaults.in index b3c0f632bb..eb28bf6991 100644 --- a/package/utils/busybox/Config-defaults.in +++ b/package/utils/busybox/Config-defaults.in @@ -85,9 +85,6 @@ config BUSYBOX_DEFAULT_FEATURE_SYSLOG_INFO config BUSYBOX_DEFAULT_FEATURE_SYSLOG bool default y -config BUSYBOX_DEFAULT_PLATFORM_LINUX - bool - default y config BUSYBOX_DEFAULT_STATIC bool default n @@ -130,6 +127,9 @@ config BUSYBOX_DEFAULT_USE_PORTABLE_CODE config BUSYBOX_DEFAULT_STACK_OPTIMIZATION_386 bool default n +config BUSYBOX_DEFAULT_STATIC_LIBGCC + bool + default n config BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS bool default y @@ -169,6 +169,9 @@ config BUSYBOX_DEFAULT_UNIT_TEST config BUSYBOX_DEFAULT_WERROR bool default n +config BUSYBOX_DEFAULT_WARN_SIMPLE_MSG + bool + default n config BUSYBOX_DEFAULT_NO_DEBUG_LIB bool default y @@ -872,6 +875,9 @@ config BUSYBOX_DEFAULT_USLEEP config BUSYBOX_DEFAULT_UUDECODE bool default n +config BUSYBOX_DEFAULT_BASE32 + bool + default n config BUSYBOX_DEFAULT_BASE64 bool default n @@ -1160,6 +1166,9 @@ config BUSYBOX_DEFAULT_FEATURE_FIND_QUIT config BUSYBOX_DEFAULT_FEATURE_FIND_DELETE bool default n +config BUSYBOX_DEFAULT_FEATURE_FIND_EMPTY + bool + default n config BUSYBOX_DEFAULT_FEATURE_FIND_PATH bool default y @@ -1565,9 +1574,6 @@ config BUSYBOX_DEFAULT_FEATURE_GETOPT_LONG config BUSYBOX_DEFAULT_HEXDUMP bool default y -config BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE - bool - default n config BUSYBOX_DEFAULT_HD bool default n @@ -1778,6 +1784,9 @@ config BUSYBOX_DEFAULT_TASKSET config BUSYBOX_DEFAULT_FEATURE_TASKSET_FANCY bool default n +config BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST + bool + default n config BUSYBOX_DEFAULT_UEVENT bool default n @@ -1814,6 +1823,9 @@ config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_BTRFS config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS bool default n +config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EROFS + bool + default n config BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT bool default n @@ -2096,6 +2108,9 @@ config BUSYBOX_DEFAULT_MAN config BUSYBOX_DEFAULT_MICROCOM bool default n +config BUSYBOX_DEFAULT_MIM + bool + default n config BUSYBOX_DEFAULT_MT bool default n @@ -2268,6 +2283,18 @@ config BUSYBOX_DEFAULT_FEATURE_HTTPD_PROXY config BUSYBOX_DEFAULT_FEATURE_HTTPD_GZIP bool default n +config BUSYBOX_DEFAULT_FEATURE_HTTPD_ETAG + bool + default n +config BUSYBOX_DEFAULT_FEATURE_HTTPD_LAST_MODIFIED + bool + default n +config BUSYBOX_DEFAULT_FEATURE_HTTPD_DATE + bool + default n +config BUSYBOX_DEFAULT_FEATURE_HTTPD_ACL_IP + bool + default n config BUSYBOX_DEFAULT_IFCONFIG bool default y @@ -2892,6 +2919,9 @@ config BUSYBOX_DEFAULT_BASH_IS_HUSH config BUSYBOX_DEFAULT_BASH_IS_NONE bool default y +config BUSYBOX_DEFAULT_SHELL_ASH + bool + default y config BUSYBOX_DEFAULT_ASH bool default y @@ -2952,6 +2982,9 @@ config BUSYBOX_DEFAULT_CTTYHACK config BUSYBOX_DEFAULT_HUSH bool default n +config BUSYBOX_DEFAULT_SHELL_HUSH + bool + default n config BUSYBOX_DEFAULT_HUSH_BASH_COMPAT bool default n @@ -3114,6 +3147,9 @@ config BUSYBOX_DEFAULT_FEATURE_SYSLOGD_DUP config BUSYBOX_DEFAULT_FEATURE_SYSLOGD_CFG bool default n +config BUSYBOX_DEFAULT_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS + bool + default n config BUSYBOX_DEFAULT_FEATURE_SYSLOGD_READ_BUFFER_SIZE int default 0 diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile index 366a767e88..3fef000c62 100644 --- a/package/utils/busybox/Makefile +++ b/package/utils/busybox/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=busybox -PKG_VERSION:=1.31.1 -PKG_RELEASE:=9 +PKG_VERSION:=1.33.0 +PKG_RELEASE:=1 PKG_FLAGS:=essential PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://www.busybox.net/downloads \ http://sources.buildroot.net -PKG_HASH:=d0f940a72f648943c1f2211e0e3117387c31d765137d92bd8284a3fb9752a998 +PKG_HASH:=d568681c91a85edc6710770cebc1e80e042ad74d305b5c2e6d57a5f3de3b8fbd PKG_BUILD_DEPENDS:=BUSYBOX_CONFIG_PAM:libpam PKG_BUILD_PARALLEL:=1 diff --git a/package/utils/busybox/config/Config.in b/package/utils/busybox/config/Config.in index 03af3464f9..f30629839e 100644 --- a/package/utils/busybox/config/Config.in +++ b/package/utils/busybox/config/Config.in @@ -155,12 +155,13 @@ config BUSYBOX_CONFIG_FEATURE_PIDFILE config BUSYBOX_CONFIG_PID_FILE_PATH string "Directory for pidfiles" default BUSYBOX_DEFAULT_PID_FILE_PATH - depends on BUSYBOX_CONFIG_FEATURE_PIDFILE + depends on BUSYBOX_CONFIG_FEATURE_PIDFILE || BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES help This is the default path where pidfiles are created. Applets which allow you to set the pidfile path on the command line will override this value. The option has no effect on applets that require you to - specify a pidfile path. + specify a pidfile path. When crond has the 'Support special times' + option enabled, the 'crond.reboot' file is also stored here. config BUSYBOX_CONFIG_BUSYBOX bool "Include busybox applet" @@ -310,7 +311,6 @@ config BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH config BUSYBOX_CONFIG_SELINUX bool "Support NSA Security Enhanced Linux" default BUSYBOX_DEFAULT_SELINUX - select BUSYBOX_CONFIG_PLATFORM_LINUX help Enable support for SELinux in applets ls, ps, and id. Also provide the option of compiling in SELinux applets. @@ -356,17 +356,6 @@ config BUSYBOX_CONFIG_FEATURE_SYSLOG #This option is auto-selected when you select any applet which may #send its output to syslog. You do not need to select it manually. -config BUSYBOX_CONFIG_PLATFORM_LINUX - bool #No description makes it a hidden option - default BUSYBOX_DEFAULT_PLATFORM_LINUX - #help - #For the most part, busybox requires only POSIX compatibility - #from the target system, but some applets and features use - #Linux-specific interfaces. - # - #This is automatically selected if any applet or feature requires - #Linux-specific interfaces. You do not need to select it manually. - comment 'Build Options' config BUSYBOX_CONFIG_STATIC @@ -539,6 +528,14 @@ config BUSYBOX_CONFIG_STACK_OPTIMIZATION_386 do not work with it (they use SSE instructions without ensuring stack alignment). +config BUSYBOX_CONFIG_STATIC_LIBGCC + bool "Use -static-libgcc" + default BUSYBOX_DEFAULT_STATIC_LIBGCC + help + This option instructs gcc to link in a static version of its + support library, libgcc. This means that the binary will require + one fewer dynamic library at run time. + comment 'Installation Options ("make install" behavior)' choice @@ -660,6 +657,19 @@ config BUSYBOX_CONFIG_WERROR Most people should answer N. +config BUSYBOX_CONFIG_WARN_SIMPLE_MSG + bool "Warn about single parameter bb_xx_msg calls" + default BUSYBOX_DEFAULT_WARN_SIMPLE_MSG + help + This will cause warnings to be shown for any instances of + bb_error_msg(), bb_error_msg_and_die(), bb_perror_msg(), + bb_perror_msg_and_die(), bb_herror_msg() or bb_herror_msg_and_die() + being called with a single parameter. In these cases the equivalent + bb_simple_xx_msg function should be used instead. + Note that use of STRERROR_FMT may give false positives. + + If you aren't developing busybox, say N here. + choice prompt "Additional debugging library" default BUSYBOX_CONFIG_NO_DEBUG_LIB diff --git a/package/utils/busybox/config/archival/Config.in b/package/utils/busybox/config/archival/Config.in index 64e4601a86..ea167a46af 100644 --- a/package/utils/busybox/config/archival/Config.in +++ b/package/utils/busybox/config/archival/Config.in @@ -256,7 +256,7 @@ config BUSYBOX_CONFIG_FEATURE_GZIP_LEVELS help Enable support for compression levels 4-9. The default level is 6. If levels 1-3 are specified, 4 is used. - If this option is not selected, -N options are ignored and -9 + If this option is not selected, -N options are ignored and -6 is used. config BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS diff --git a/package/utils/busybox/config/console-tools/Config.in b/package/utils/busybox/config/console-tools/Config.in index 9f8a257ebe..cf224e5e2e 100644 --- a/package/utils/busybox/config/console-tools/Config.in +++ b/package/utils/busybox/config/console-tools/Config.in @@ -9,7 +9,6 @@ menu "Console Utilities" config BUSYBOX_CONFIG_CHVT bool "chvt (2 kb)" default BUSYBOX_DEFAULT_CHVT - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program is used to change to another terminal. Example: chvt 4 (change to terminal /dev/tty4) @@ -21,39 +20,33 @@ config BUSYBOX_CONFIG_CLEAR config BUSYBOX_CONFIG_DEALLOCVT bool "deallocvt (1.9 kb)" default BUSYBOX_DEFAULT_DEALLOCVT - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program deallocates unused virtual consoles. config BUSYBOX_CONFIG_DUMPKMAP bool "dumpkmap (1.6 kb)" default BUSYBOX_DEFAULT_DUMPKMAP - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program dumps the kernel's keyboard translation table to stdout, in binary format. You can then use loadkmap to load it. config BUSYBOX_CONFIG_FGCONSOLE bool "fgconsole (1.5 kb)" default BUSYBOX_DEFAULT_FGCONSOLE - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program prints active (foreground) console number. config BUSYBOX_CONFIG_KBD_MODE bool "kbd_mode (4.1 kb)" default BUSYBOX_DEFAULT_KBD_MODE - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program reports and sets keyboard mode. config BUSYBOX_CONFIG_LOADFONT bool "loadfont (5.2 kb)" default BUSYBOX_DEFAULT_LOADFONT - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program loads a console font from standard input. config BUSYBOX_CONFIG_SETFONT bool "setfont (24 kb)" default BUSYBOX_DEFAULT_SETFONT - select BUSYBOX_CONFIG_PLATFORM_LINUX help Allows to load console screen map. Useful for i18n. @@ -87,14 +80,12 @@ config BUSYBOX_CONFIG_FEATURE_LOADFONT_RAW config BUSYBOX_CONFIG_LOADKMAP bool "loadkmap (1.8 kb)" default BUSYBOX_DEFAULT_LOADKMAP - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program loads a keyboard translation table from standard input. config BUSYBOX_CONFIG_OPENVT bool "openvt (7.2 kb)" default BUSYBOX_DEFAULT_OPENVT - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program is used to start a command on an unused virtual terminal. @@ -123,7 +114,6 @@ config BUSYBOX_CONFIG_FEATURE_RESIZE_PRINT config BUSYBOX_CONFIG_SETCONSOLE bool "setconsole (3.6 kb)" default BUSYBOX_DEFAULT_SETCONSOLE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Redirect writes to /dev/console to another device, like the current tty while logged in via telnet. @@ -137,20 +127,17 @@ config BUSYBOX_CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS config BUSYBOX_CONFIG_SETKEYCODES bool "setkeycodes (2.1 kb)" default BUSYBOX_DEFAULT_SETKEYCODES - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program loads entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. config BUSYBOX_CONFIG_SETLOGCONS bool "setlogcons (1.8 kb)" default BUSYBOX_DEFAULT_SETLOGCONS - select BUSYBOX_CONFIG_PLATFORM_LINUX help This program redirects the output console of kernel messages. config BUSYBOX_CONFIG_SHOWKEY bool "showkey (4.7 kb)" default BUSYBOX_DEFAULT_SHOWKEY - select BUSYBOX_CONFIG_PLATFORM_LINUX help Shows keys pressed. diff --git a/package/utils/busybox/config/coreutils/Config.in b/package/utils/busybox/config/coreutils/Config.in index c5cd54d7f6..e256ca36f5 100644 --- a/package/utils/busybox/config/coreutils/Config.in +++ b/package/utils/busybox/config/coreutils/Config.in @@ -110,12 +110,10 @@ config BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT Enable option (-I) to output an ISO-8601 compliant date/time string. -# defaults to "no": stat's nanosecond field is a bit non-portable config BUSYBOX_CONFIG_FEATURE_DATE_NANO bool "Support %[num]N nanosecond format specifier" - default BUSYBOX_DEFAULT_FEATURE_DATE_NANO # syscall(__NR_clock_gettime) + default BUSYBOX_DEFAULT_FEATURE_DATE_NANO # stat's nanosecond field is a bit non-portable depends on BUSYBOX_CONFIG_DATE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Support %[num]N format specifier. Adds ~250 bytes of code. @@ -636,7 +634,6 @@ config BUSYBOX_CONFIG_FEATURE_STAT_FILESYSTEM bool "Enable display of filesystem status (-f)" default BUSYBOX_DEFAULT_FEATURE_STAT_FILESYSTEM depends on BUSYBOX_CONFIG_STAT - select BUSYBOX_CONFIG_PLATFORM_LINUX # statfs() help Without this, stat will not support the '-f' option to display information about filesystem status. @@ -837,6 +834,11 @@ config BUSYBOX_CONFIG_UUDECODE default BUSYBOX_DEFAULT_UUDECODE help uudecode is used to decode a uuencoded file. +config BUSYBOX_CONFIG_BASE32 + bool "base32 (4.9 kb)" + default BUSYBOX_DEFAULT_BASE32 + help + Base32 encode and decode config BUSYBOX_CONFIG_BASE64 bool "base64 (4.9 kb)" default BUSYBOX_DEFAULT_BASE64 diff --git a/package/utils/busybox/config/e2fsprogs/Config.in b/package/utils/busybox/config/e2fsprogs/Config.in index 19713acd3e..4a9aa2ab4e 100644 --- a/package/utils/busybox/config/e2fsprogs/Config.in +++ b/package/utils/busybox/config/e2fsprogs/Config.in @@ -21,7 +21,6 @@ config BUSYBOX_CONFIG_FSCK config BUSYBOX_CONFIG_LSATTR bool "lsattr (5.5 kb)" default BUSYBOX_DEFAULT_LSATTR - select BUSYBOX_CONFIG_PLATFORM_LINUX help lsattr lists the file attributes on a second extended file system. config BUSYBOX_CONFIG_TUNE2FS diff --git a/package/utils/busybox/config/findutils/Config.in b/package/utils/busybox/config/findutils/Config.in index bebcbb39ef..89901ca59d 100644 --- a/package/utils/busybox/config/findutils/Config.in +++ b/package/utils/busybox/config/findutils/Config.in @@ -159,6 +159,14 @@ config BUSYBOX_CONFIG_FEATURE_FIND_DELETE WARNING: This option can do much harm if used wrong. Busybox will not try to protect the user from doing stupid things. Use with care. +config BUSYBOX_CONFIG_FEATURE_FIND_EMPTY + bool "Enable -empty: match empty files or directories" + default BUSYBOX_DEFAULT_FEATURE_FIND_EMPTY + depends on BUSYBOX_CONFIG_FIND + help + Support the 'find -empty' option to find empty regular files + or directories. + config BUSYBOX_CONFIG_FEATURE_FIND_PATH bool "Enable -path: match pathname with shell pattern" default BUSYBOX_DEFAULT_FEATURE_FIND_PATH diff --git a/package/utils/busybox/config/klibc-utils/Config.in b/package/utils/busybox/config/klibc-utils/Config.in index 95e15b6def..408c9f695d 100644 --- a/package/utils/busybox/config/klibc-utils/Config.in +++ b/package/utils/busybox/config/klibc-utils/Config.in @@ -24,7 +24,6 @@ config BUSYBOX_CONFIG_RESUME config BUSYBOX_CONFIG_RUN_INIT bool "run-init (7.7 kb)" default BUSYBOX_DEFAULT_RUN_INIT - select BUSYBOX_CONFIG_PLATFORM_LINUX help The run-init utility is used from initramfs to select a new root device. Under initramfs, you have to use this instead of diff --git a/package/utils/busybox/config/libbb/Config.in b/package/utils/busybox/config/libbb/Config.in index f476e86073..906649c5c9 100644 --- a/package/utils/busybox/config/libbb/Config.in +++ b/package/utils/busybox/config/libbb/Config.in @@ -390,7 +390,6 @@ config BUSYBOX_CONFIG_FEATURE_VERBOSE_CP_MESSAGE config BUSYBOX_CONFIG_FEATURE_USE_SENDFILE bool "Use sendfile system call" default BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE - select BUSYBOX_CONFIG_PLATFORM_LINUX help When enabled, busybox will use the kernel sendfile() function instead of read/write loops to copy data between file descriptors @@ -432,7 +431,6 @@ config BUSYBOX_CONFIG_FEATURE_SKIP_ROOTFS config BUSYBOX_CONFIG_MONOTONIC_SYSCALL bool "Use clock_gettime(CLOCK_MONOTONIC) syscall" default BUSYBOX_DEFAULT_MONOTONIC_SYSCALL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Use clock_gettime(CLOCK_MONOTONIC) syscall for measuring time intervals (time, ping, traceroute etc need this). diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in index 6ce6d2d7e3..f3b29787d1 100644 --- a/package/utils/busybox/config/miscutils/Config.in +++ b/package/utils/busybox/config/miscutils/Config.in @@ -9,7 +9,6 @@ menu "Miscellaneous Utilities" config BUSYBOX_CONFIG_ADJTIMEX bool "adjtimex (4.7 kb)" default BUSYBOX_DEFAULT_ADJTIMEX - select BUSYBOX_CONFIG_PLATFORM_LINUX help Adjtimex reads and optionally sets adjustment parameters for the Linux clock adjustment algorithm. @@ -122,7 +121,6 @@ endif config BUSYBOX_CONFIG_BEEP bool "beep (2.4 kb)" default BUSYBOX_DEFAULT_BEEP - select BUSYBOX_CONFIG_PLATFORM_LINUX help The beep applets beeps in a given freq/Hz. @@ -210,7 +208,6 @@ config BUSYBOX_CONFIG_FEATURE_CHAT_CLR_ABORT config BUSYBOX_CONFIG_CONSPY bool "conspy (10 kb)" default BUSYBOX_DEFAULT_CONSPY - select BUSYBOX_CONFIG_PLATFORM_LINUX help A text-mode VNC like program for Linux virtual terminals. example: conspy NUM shared access to console num @@ -276,7 +273,6 @@ config BUSYBOX_CONFIG_CRONTAB config BUSYBOX_CONFIG_DEVFSD bool "devfsd (obsolete)" default BUSYBOX_DEFAULT_DEVFSD - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_FEATURE_SYSLOG help This is deprecated and should NOT be used anymore. @@ -319,7 +315,6 @@ config BUSYBOX_CONFIG_DEVFSD_VERBOSE config BUSYBOX_CONFIG_FEATURE_DEVFS bool "Use devfs names for all devices (obsolete)" default BUSYBOX_DEFAULT_FEATURE_DEVFS - select BUSYBOX_CONFIG_PLATFORM_LINUX help This is obsolete and should NOT be used anymore. Use linux >= 2.6 (optionally with hotplug) and mdev instead! @@ -337,7 +332,6 @@ config BUSYBOX_CONFIG_DEVMEM config BUSYBOX_CONFIG_FBSPLASH bool "fbsplash (26 kb)" default BUSYBOX_DEFAULT_FBSPLASH - select BUSYBOX_CONFIG_PLATFORM_LINUX help Shows splash image and progress bar on framebuffer device. Can be used during boot phase of an embedded device. @@ -383,7 +377,6 @@ config BUSYBOX_CONFIG_FLASHCP config BUSYBOX_CONFIG_HDPARM bool "hdparm (25 kb)" default BUSYBOX_DEFAULT_HDPARM - select BUSYBOX_CONFIG_PLATFORM_LINUX help Get/Set hard drive parameters. Primarily intended for ATA drives. @@ -445,35 +438,30 @@ config BUSYBOX_CONFIG_HEXEDIT config BUSYBOX_CONFIG_I2CGET bool "i2cget (5.5 kb)" default BUSYBOX_DEFAULT_I2CGET - select BUSYBOX_CONFIG_PLATFORM_LINUX help Read from I2C/SMBus chip registers. config BUSYBOX_CONFIG_I2CSET bool "i2cset (6.7 kb)" default BUSYBOX_DEFAULT_I2CSET - select BUSYBOX_CONFIG_PLATFORM_LINUX help Set I2C registers. config BUSYBOX_CONFIG_I2CDUMP bool "i2cdump (7.1 kb)" default BUSYBOX_DEFAULT_I2CDUMP - select BUSYBOX_CONFIG_PLATFORM_LINUX help Examine I2C registers. config BUSYBOX_CONFIG_I2CDETECT bool "i2cdetect (7.1 kb)" default BUSYBOX_DEFAULT_I2CDETECT - select BUSYBOX_CONFIG_PLATFORM_LINUX help Detect I2C chips. config BUSYBOX_CONFIG_I2CTRANSFER bool "i2ctransfer (4.0 kb)" default BUSYBOX_DEFAULT_I2CTRANSFER - select BUSYBOX_CONFIG_PLATFORM_LINUX help Send user-defined I2C messages in one transfer. @@ -587,7 +575,6 @@ config BUSYBOX_CONFIG_LOCK config BUSYBOX_CONFIG_LSSCSI bool "lsscsi (2.5 kb)" default BUSYBOX_DEFAULT_LSSCSI - #select PLATFORM_LINUX help lsscsi is a utility for displaying information about SCSI buses in the system and devices connected to them. @@ -634,6 +621,13 @@ config BUSYBOX_CONFIG_MICROCOM default BUSYBOX_DEFAULT_MICROCOM help The poor man's minicom utility for chatting with serial port devices. +config BUSYBOX_CONFIG_MIM + bool "mim (0.5 kb)" + default BUSYBOX_DEFAULT_MIM + depends on BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS + help + Run a script from a Makefile-like specification file. + Unlike 'make' dependencies aren't supported. config BUSYBOX_CONFIG_MT bool "mt (2.5 kb)" default BUSYBOX_DEFAULT_MT @@ -644,26 +638,22 @@ config BUSYBOX_CONFIG_MT config BUSYBOX_CONFIG_NANDWRITE bool "nandwrite (4.8 kb)" default BUSYBOX_DEFAULT_NANDWRITE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Write to the specified MTD device, with bad blocks awareness config BUSYBOX_CONFIG_NANDDUMP bool "nanddump (5.2 kb)" default BUSYBOX_DEFAULT_NANDDUMP - select BUSYBOX_CONFIG_PLATFORM_LINUX help Dump the content of raw NAND chip config BUSYBOX_CONFIG_PARTPROBE bool "partprobe (3.5 kb)" default BUSYBOX_DEFAULT_PARTPROBE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Ask kernel to rescan partition table. config BUSYBOX_CONFIG_RAIDAUTORUN bool "raidautorun (1.3 kb)" default BUSYBOX_DEFAULT_RAIDAUTORUN - select BUSYBOX_CONFIG_PLATFORM_LINUX help raidautorun tells the kernel md driver to search and start RAID arrays. @@ -671,7 +661,6 @@ config BUSYBOX_CONFIG_READAHEAD bool "readahead (1.5 kb)" default BUSYBOX_DEFAULT_READAHEAD depends on BUSYBOX_CONFIG_LFS - select BUSYBOX_CONFIG_PLATFORM_LINUX help Preload the files listed on the command line into RAM cache so that subsequent reads on these files will not block on disk I/O. @@ -687,7 +676,6 @@ config BUSYBOX_CONFIG_READAHEAD config BUSYBOX_CONFIG_RFKILL bool "rfkill (4.4 kb)" default BUSYBOX_DEFAULT_RFKILL # doesn't build on Ubuntu 9.04 - select BUSYBOX_CONFIG_PLATFORM_LINUX help Enable/disable wireless devices. @@ -708,7 +696,6 @@ config BUSYBOX_CONFIG_RUNLEVEL config BUSYBOX_CONFIG_RX bool "rx (2.9 kb)" default BUSYBOX_DEFAULT_RX - select BUSYBOX_CONFIG_PLATFORM_LINUX help Receive files using the Xmodem protocol. config BUSYBOX_CONFIG_SETFATTR @@ -719,7 +706,6 @@ config BUSYBOX_CONFIG_SETFATTR config BUSYBOX_CONFIG_SETSERIAL bool "setserial (6.9 kb)" default BUSYBOX_DEFAULT_SETSERIAL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Retrieve or set Linux serial port. config BUSYBOX_CONFIG_STRINGS @@ -749,48 +735,41 @@ config BUSYBOX_CONFIG_TTYSIZE config BUSYBOX_CONFIG_UBIATTACH bool "ubiattach (4.2 kb)" default BUSYBOX_DEFAULT_UBIATTACH - select BUSYBOX_CONFIG_PLATFORM_LINUX help Attach MTD device to an UBI device. config BUSYBOX_CONFIG_UBIDETACH bool "ubidetach (4.1 kb)" default BUSYBOX_DEFAULT_UBIDETACH - select BUSYBOX_CONFIG_PLATFORM_LINUX help Detach MTD device from an UBI device. config BUSYBOX_CONFIG_UBIMKVOL bool "ubimkvol (5.3 kb)" default BUSYBOX_DEFAULT_UBIMKVOL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Create a UBI volume. config BUSYBOX_CONFIG_UBIRMVOL bool "ubirmvol (4.9 kb)" default BUSYBOX_DEFAULT_UBIRMVOL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Delete a UBI volume. config BUSYBOX_CONFIG_UBIRSVOL bool "ubirsvol (4.2 kb)" default BUSYBOX_DEFAULT_UBIRSVOL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Resize a UBI volume. config BUSYBOX_CONFIG_UBIUPDATEVOL bool "ubiupdatevol (5.2 kb)" default BUSYBOX_DEFAULT_UBIUPDATEVOL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Update a UBI volume. config BUSYBOX_CONFIG_UBIRENAME bool "ubirename (2.4 kb)" default BUSYBOX_DEFAULT_UBIRENAME - select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to rename UBI volumes config BUSYBOX_CONFIG_VOLNAME @@ -801,7 +780,6 @@ config BUSYBOX_CONFIG_VOLNAME config BUSYBOX_CONFIG_WATCHDOG bool "watchdog (5.3 kb)" default BUSYBOX_DEFAULT_WATCHDOG - select BUSYBOX_CONFIG_PLATFORM_LINUX help The watchdog utility is used with hardware or software watchdog device drivers. It opens the specified watchdog device special file diff --git a/package/utils/busybox/config/modutils/Config.in b/package/utils/busybox/config/modutils/Config.in index cc2d20813b..e3538081ea 100644 --- a/package/utils/busybox/config/modutils/Config.in +++ b/package/utils/busybox/config/modutils/Config.in @@ -37,7 +37,6 @@ config BUSYBOX_CONFIG_MODPROBE_SMALL config BUSYBOX_CONFIG_DEPMOD bool "depmod (27 kb)" default BUSYBOX_DEFAULT_DEPMOD - select BUSYBOX_CONFIG_PLATFORM_LINUX help depmod generates modules.dep (and potentially modules.alias and modules.symbols) that contain dependency information @@ -45,13 +44,11 @@ config BUSYBOX_CONFIG_DEPMOD config BUSYBOX_CONFIG_INSMOD bool "insmod (22 kb)" default BUSYBOX_DEFAULT_INSMOD - select BUSYBOX_CONFIG_PLATFORM_LINUX help insmod is used to load specified modules in the running kernel. config BUSYBOX_CONFIG_LSMOD bool "lsmod (1.9 kb)" default BUSYBOX_DEFAULT_LSMOD - select BUSYBOX_CONFIG_PLATFORM_LINUX help lsmod is used to display a list of loaded modules. @@ -66,13 +63,11 @@ config BUSYBOX_CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT config BUSYBOX_CONFIG_MODINFO bool "modinfo (24 kb)" default BUSYBOX_DEFAULT_MODINFO - select BUSYBOX_CONFIG_PLATFORM_LINUX help Show information about a Linux Kernel module config BUSYBOX_CONFIG_MODPROBE bool "modprobe (28 kb)" default BUSYBOX_DEFAULT_MODPROBE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Handle the loading of modules, and their dependencies on a high level. @@ -90,7 +85,6 @@ config BUSYBOX_CONFIG_FEATURE_MODPROBE_BLACKLIST config BUSYBOX_CONFIG_RMMOD bool "rmmod (3.3 kb)" default BUSYBOX_DEFAULT_RMMOD - select BUSYBOX_CONFIG_PLATFORM_LINUX help rmmod is used to unload specified modules from the kernel. diff --git a/package/utils/busybox/config/networking/Config.in b/package/utils/busybox/config/networking/Config.in index f07a2d46e5..6608f5899d 100644 --- a/package/utils/busybox/config/networking/Config.in +++ b/package/utils/busybox/config/networking/Config.in @@ -61,19 +61,16 @@ config BUSYBOX_CONFIG_FEATURE_TLS_SHA1 config BUSYBOX_CONFIG_ARP bool "arp (10 kb)" default BUSYBOX_DEFAULT_ARP - select BUSYBOX_CONFIG_PLATFORM_LINUX help Manipulate the system ARP cache. config BUSYBOX_CONFIG_ARPING bool "arping (9 kb)" default BUSYBOX_DEFAULT_ARPING - select BUSYBOX_CONFIG_PLATFORM_LINUX help Ping hosts by ARP packets. config BUSYBOX_CONFIG_BRCTL bool "brctl (4.7 kb)" default BUSYBOX_DEFAULT_BRCTL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Manage ethernet bridges. Supports addbr/delbr and addif/delif. @@ -104,7 +101,6 @@ config BUSYBOX_CONFIG_DNSD config BUSYBOX_CONFIG_ETHER_WAKE bool "ether-wake (4.9 kb)" default BUSYBOX_DEFAULT_ETHER_WAKE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Send a magic packet to wake up sleeping machines. config BUSYBOX_CONFIG_FTPD @@ -289,10 +285,47 @@ config BUSYBOX_CONFIG_FEATURE_HTTPD_GZIP help Makes httpd send files using GZIP content encoding if the client supports it and a pre-compressed .gz exists. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_ETAG + bool "Support caching via ETag header" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_ETAG + depends on BUSYBOX_CONFIG_HTTPD + help + If server responds with ETag then next time client (browser) + resend it via If-None-Match header. + Then httpd will check if file wasn't modified and if not, + return 304 Not Modified status code. + The ETag value is constructed from last modification date + in unix epoch, and size: "hex(last_mod)-hex(file_size)". + It's not completely reliable as hash functions but fair enough. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_LAST_MODIFIED + bool "Add Last-Modified header to response" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_LAST_MODIFIED + depends on BUSYBOX_CONFIG_HTTPD + help + The Last-Modified header is used for cache validation. + The client sends last seen mtime to server in If-Modified-Since. + Both headers MUST be an RFC 1123 formatted, which is hard to parse. + Use ETag header instead. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_DATE + bool "Add Date header to response" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_DATE + depends on BUSYBOX_CONFIG_HTTPD + help + RFC2616 says that server MUST add Date header to response. + But it is almost useless and can be omitted. + +config BUSYBOX_CONFIG_FEATURE_HTTPD_ACL_IP + bool "ACL IP" + default BUSYBOX_DEFAULT_FEATURE_HTTPD_ACL_IP + depends on BUSYBOX_CONFIG_HTTPD + help + Support IP deny/allow rules config BUSYBOX_CONFIG_IFCONFIG bool "ifconfig (12 kb)" default BUSYBOX_DEFAULT_IFCONFIG - select BUSYBOX_CONFIG_PLATFORM_LINUX help Ifconfig is used to configure the kernel-resident network interfaces. @@ -339,14 +372,12 @@ config BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS config BUSYBOX_CONFIG_IFENSLAVE bool "ifenslave (13 kb)" default BUSYBOX_DEFAULT_IFENSLAVE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Userspace application to bind several interfaces to a logical interface (use with kernel bonding driver). config BUSYBOX_CONFIG_IFPLUGD bool "ifplugd (10 kb)" default BUSYBOX_DEFAULT_IFPLUGD - select BUSYBOX_CONFIG_PLATFORM_LINUX help Network interface plug detection daemon. config BUSYBOX_CONFIG_IFUP @@ -498,7 +529,6 @@ config BUSYBOX_CONFIG_FEATURE_INETD_RPC config BUSYBOX_CONFIG_IP bool "ip (35 kb)" default BUSYBOX_DEFAULT_IP - select BUSYBOX_CONFIG_PLATFORM_LINUX help The "ip" applet is a TCP/IP interface configuration and routing utility. @@ -510,7 +540,6 @@ config BUSYBOX_CONFIG_IPADDR bool "ipaddr (14 kb)" default BUSYBOX_DEFAULT_IPADDR select BUSYBOX_CONFIG_FEATURE_IP_ADDRESS - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip addr" @@ -518,7 +547,6 @@ config BUSYBOX_CONFIG_IPLINK bool "iplink (17 kb)" default BUSYBOX_DEFAULT_IPLINK select BUSYBOX_CONFIG_FEATURE_IP_LINK - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip link" @@ -526,7 +554,6 @@ config BUSYBOX_CONFIG_IPROUTE bool "iproute (15 kb)" default BUSYBOX_DEFAULT_IPROUTE select BUSYBOX_CONFIG_FEATURE_IP_ROUTE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip route" @@ -534,7 +561,6 @@ config BUSYBOX_CONFIG_IPTUNNEL bool "iptunnel (9.6 kb)" default BUSYBOX_DEFAULT_IPTUNNEL select BUSYBOX_CONFIG_FEATURE_IP_TUNNEL - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip tunnel" @@ -542,7 +568,6 @@ config BUSYBOX_CONFIG_IPRULE bool "iprule (10 kb)" default BUSYBOX_DEFAULT_IPRULE select BUSYBOX_CONFIG_FEATURE_IP_RULE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip rule" @@ -550,7 +575,6 @@ config BUSYBOX_CONFIG_IPNEIGH bool "ipneigh (8.3 kb)" default BUSYBOX_DEFAULT_IPNEIGH select BUSYBOX_CONFIG_FEATURE_IP_NEIGH - select BUSYBOX_CONFIG_PLATFORM_LINUX help Short form of "ip neigh" @@ -641,7 +665,6 @@ config BUSYBOX_CONFIG_FAKEIDENTD config BUSYBOX_CONFIG_NAMEIF bool "nameif (6.6 kb)" default BUSYBOX_DEFAULT_NAMEIF - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_FEATURE_SYSLOG help nameif is used to rename network interface by its MAC address. @@ -718,7 +741,6 @@ config BUSYBOX_CONFIG_NETMSG config BUSYBOX_CONFIG_NETSTAT bool "netstat (10 kb)" default BUSYBOX_DEFAULT_NETSTAT - select BUSYBOX_CONFIG_PLATFORM_LINUX help netstat prints information about the Linux networking subsystem. @@ -768,7 +790,6 @@ config BUSYBOX_CONFIG_FEATURE_NSLOOKUP_OPENWRT_LONG_OPTIONS config BUSYBOX_CONFIG_NTPD bool "ntpd (22 kb)" default BUSYBOX_DEFAULT_NTPD - select BUSYBOX_CONFIG_PLATFORM_LINUX help The NTP client/server daemon. @@ -795,7 +816,6 @@ config BUSYBOX_CONFIG_FEATURE_NTP_AUTH config BUSYBOX_CONFIG_PING bool "ping (10 kb)" default BUSYBOX_DEFAULT_PING - select BUSYBOX_CONFIG_PLATFORM_LINUX help ping uses the ICMP protocol's mandatory ECHO_REQUEST datagram to elicit an ICMP ECHO_RESPONSE from a host or gateway. @@ -823,13 +843,11 @@ config BUSYBOX_CONFIG_PSCAN config BUSYBOX_CONFIG_ROUTE bool "route (8.7 kb)" default BUSYBOX_DEFAULT_ROUTE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Route displays or manipulates the kernel's IP routing tables. config BUSYBOX_CONFIG_SLATTACH bool "slattach (6.2 kb)" default BUSYBOX_DEFAULT_SLATTACH - select BUSYBOX_CONFIG_PLATFORM_LINUX help slattach configures serial line as SLIP network interface. config BUSYBOX_CONFIG_SSL_CLIENT @@ -1029,7 +1047,6 @@ config BUSYBOX_CONFIG_TLS config BUSYBOX_CONFIG_TRACEROUTE bool "traceroute (11 kb)" default BUSYBOX_DEFAULT_TRACEROUTE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to trace the route of IP packets. @@ -1055,7 +1072,6 @@ config BUSYBOX_CONFIG_FEATURE_TRACEROUTE_USE_ICMP config BUSYBOX_CONFIG_TUNCTL bool "tunctl (6.2 kb)" default BUSYBOX_DEFAULT_TUNCTL - select BUSYBOX_CONFIG_PLATFORM_LINUX help tunctl creates or deletes tun devices. @@ -1069,7 +1085,6 @@ config BUSYBOX_CONFIG_FEATURE_TUNCTL_UG config BUSYBOX_CONFIG_VCONFIG bool "vconfig (2.3 kb)" default BUSYBOX_DEFAULT_VCONFIG - select BUSYBOX_CONFIG_PLATFORM_LINUX help Creates, removes, and configures VLAN interfaces config BUSYBOX_CONFIG_WGET @@ -1154,6 +1169,9 @@ config BUSYBOX_CONFIG_FEATURE_WGET_HTTPS patches, but do want to waste bandwidth expaining how wrong it is, you will be ignored. + FEATURE_WGET_OPENSSL does implement TLS verification + using the certificates available to OpenSSL. + config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL bool "Try to connect to HTTPS using openssl" default BUSYBOX_DEFAULT_FEATURE_WGET_OPENSSL @@ -1178,6 +1196,9 @@ config BUSYBOX_CONFIG_FEATURE_WGET_OPENSSL If openssl can't be executed, internal TLS code will be used (if you enabled it); if openssl can be executed but fails later, wget can't detect this, and download will fail. + + By default TLS verification is performed, unless + --no-check-certificate option is passed. config BUSYBOX_CONFIG_WHOIS bool "whois (6.3 kb)" default BUSYBOX_DEFAULT_WHOIS @@ -1186,7 +1207,6 @@ config BUSYBOX_CONFIG_WHOIS config BUSYBOX_CONFIG_ZCIP bool "zcip (8.4 kb)" default BUSYBOX_DEFAULT_ZCIP - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_FEATURE_SYSLOG help ZCIP provides ZeroConf IPv4 address selection, according to RFC 3927. diff --git a/package/utils/busybox/config/networking/udhcp/Config.in b/package/utils/busybox/config/networking/udhcp/Config.in index 99d5bb9d21..9bede61499 100644 --- a/package/utils/busybox/config/networking/udhcp/Config.in +++ b/package/utils/busybox/config/networking/udhcp/Config.in @@ -7,7 +7,6 @@ config BUSYBOX_CONFIG_UDHCPD bool "udhcpd (21 kb)" default BUSYBOX_DEFAULT_UDHCPD - select BUSYBOX_CONFIG_PLATFORM_LINUX help udhcpd is a DHCP server geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. @@ -63,7 +62,6 @@ config BUSYBOX_CONFIG_DHCPRELAY config BUSYBOX_CONFIG_UDHCPC bool "udhcpc (24 kb)" default BUSYBOX_DEFAULT_UDHCPC - select BUSYBOX_CONFIG_PLATFORM_LINUX help udhcpc is a DHCP client geared primarily toward embedded systems, while striving to be fully functional and RFC compliant. diff --git a/package/utils/busybox/config/procps/Config.in b/package/utils/busybox/config/procps/Config.in index 6a0d51f353..e6c3271254 100644 --- a/package/utils/busybox/config/procps/Config.in +++ b/package/utils/busybox/config/procps/Config.in @@ -9,7 +9,6 @@ menu "Process Utilities" config BUSYBOX_CONFIG_FREE bool "free (3.1 kb)" default BUSYBOX_DEFAULT_FREE - select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo() help free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. @@ -144,7 +143,6 @@ config BUSYBOX_CONFIG_FEATURE_PS_TIME bool "Enable -o time and -o etime specifiers" default BUSYBOX_DEFAULT_FEATURE_PS_TIME depends on (BUSYBOX_CONFIG_PS || BUSYBOX_CONFIG_MINIPS) && BUSYBOX_CONFIG_DESKTOP - select BUSYBOX_CONFIG_PLATFORM_LINUX config BUSYBOX_CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS bool "Support Linux prior to 2.4.0 and non-ELF systems" @@ -243,7 +241,6 @@ config BUSYBOX_CONFIG_FEATURE_TOPMEM config BUSYBOX_CONFIG_UPTIME bool "uptime (3.7 kb)" default BUSYBOX_DEFAULT_UPTIME - select BUSYBOX_CONFIG_PLATFORM_LINUX #sysinfo() help uptime gives a one line display of the current time, how long the system has been running, how many users are currently logged diff --git a/package/utils/busybox/config/shell/Config.in b/package/utils/busybox/config/shell/Config.in index 1ae6eb042e..cb43bcd84c 100644 --- a/package/utils/busybox/config/shell/Config.in +++ b/package/utils/busybox/config/shell/Config.in @@ -18,6 +18,7 @@ choice config BUSYBOX_CONFIG_SH_IS_ASH depends on !BUSYBOX_CONFIG_NOMMU bool "ash" + select BUSYBOX_CONFIG_SHELL_ASH help Choose ash to be the shell executed by 'sh' name. The ash code will be built into busybox. If you don't select @@ -26,6 +27,7 @@ config BUSYBOX_CONFIG_SH_IS_ASH config BUSYBOX_CONFIG_SH_IS_HUSH bool "hush" + select BUSYBOX_CONFIG_SHELL_HUSH help Choose hush to be the shell executed by 'sh' name. The hush code will be built into busybox. If you don't select @@ -58,6 +60,7 @@ choice config BUSYBOX_CONFIG_BASH_IS_ASH depends on !BUSYBOX_CONFIG_NOMMU bool "ash" + select BUSYBOX_CONFIG_SHELL_ASH help Choose ash to be the shell executed by 'bash' name. The ash code will be built into busybox. If you don't select @@ -66,6 +69,7 @@ config BUSYBOX_CONFIG_BASH_IS_ASH config BUSYBOX_CONFIG_BASH_IS_HUSH bool "hush" + select BUSYBOX_CONFIG_SHELL_HUSH help Choose hush to be the shell executed by 'bash' name. The hush code will be built into busybox. If you don't select @@ -78,10 +82,15 @@ config BUSYBOX_CONFIG_BASH_IS_NONE endchoice +config BUSYBOX_CONFIG_SHELL_ASH + bool #hidden option + depends on !BUSYBOX_CONFIG_NOMMU + config BUSYBOX_CONFIG_ASH bool "ash (78 kb)" default BUSYBOX_DEFAULT_ASH depends on !BUSYBOX_CONFIG_NOMMU + select BUSYBOX_CONFIG_SHELL_ASH help The most complete and most pedantically correct shell included with busybox. This shell is actually a derivative of the Debian 'dash' @@ -91,17 +100,17 @@ config BUSYBOX_CONFIG_ASH # ash options # note: Don't remove !NOMMU part in the next line; it would break # menuconfig's indenting. -if !NOMMU && (BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH) +if !NOMMU && (BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH) config BUSYBOX_CONFIG_ASH_OPTIMIZE_FOR_SIZE bool "Optimize for size instead of speed" default BUSYBOX_DEFAULT_ASH_OPTIMIZE_FOR_SIZE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB bool "Use internal glob() implementation" default BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB # Y is bigger, but because of uclibc glob() bug, let Y be default for now - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help Do not use glob() function from libc, use internal implementation. Use this if you are getting "glob.h: No such file or directory" @@ -112,7 +121,7 @@ config BUSYBOX_CONFIG_ASH_INTERNAL_GLOB config BUSYBOX_CONFIG_ASH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_ASH_BASH_COMPAT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_BASH_SOURCE_CURDIR bool "'source' and '.' builtins search current directory after $PATH" @@ -133,17 +142,17 @@ config BUSYBOX_CONFIG_ASH_BASH_NOT_FOUND_HOOK config BUSYBOX_CONFIG_ASH_JOB_CONTROL bool "Job control" default BUSYBOX_DEFAULT_ASH_JOB_CONTROL - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_ALIAS bool "Alias support" default BUSYBOX_DEFAULT_ASH_ALIAS - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT bool "Pseudorandom generator and $RANDOM variable" default BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help Enable pseudorandom generator and dynamic variable "$RANDOM". Each read of "$RANDOM" will generate a new pseudorandom value. @@ -154,7 +163,7 @@ config BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT config BUSYBOX_CONFIG_ASH_EXPAND_PRMT bool "Expand prompt string" default BUSYBOX_DEFAULT_ASH_EXPAND_PRMT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help $PS# may contain volatile content, such as backquote commands. This option recreates the prompt string from the environment @@ -163,14 +172,14 @@ config BUSYBOX_CONFIG_ASH_EXPAND_PRMT config BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT bool "Idle timeout variable $TMOUT" default BUSYBOX_DEFAULT_ASH_IDLE_TIMEOUT - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help Enable bash-like auto-logout after $TMOUT seconds of idle time. config BUSYBOX_CONFIG_ASH_MAIL bool "Check for new mail in interactive shell" default BUSYBOX_DEFAULT_ASH_MAIL - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help Enable "check for new mail" function: if set, $MAIL file and $MAILPATH list of files @@ -180,32 +189,32 @@ config BUSYBOX_CONFIG_ASH_MAIL config BUSYBOX_CONFIG_ASH_ECHO bool "echo builtin" default BUSYBOX_DEFAULT_ASH_ECHO - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_PRINTF bool "printf builtin" default BUSYBOX_DEFAULT_ASH_PRINTF - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_TEST bool "test builtin" default BUSYBOX_DEFAULT_ASH_TEST - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_HELP bool "help builtin" default BUSYBOX_DEFAULT_ASH_HELP - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_GETOPTS bool "getopts builtin" default BUSYBOX_DEFAULT_ASH_GETOPTS - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH config BUSYBOX_CONFIG_ASH_CMDCMD bool "command builtin" default BUSYBOX_DEFAULT_ASH_CMDCMD - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH + depends on BUSYBOX_CONFIG_SHELL_ASH help Enable support for the 'command' builtin, which allows you to run the specified command or builtin, @@ -258,6 +267,7 @@ config BUSYBOX_CONFIG_CTTYHACK config BUSYBOX_CONFIG_HUSH bool "hush (68 kb)" default BUSYBOX_DEFAULT_HUSH + select BUSYBOX_CONFIG_SHELL_HUSH help hush is a small shell. It handles the normal flow control constructs such as if/then/elif/else/fi, for/in/do/done, while loops, @@ -269,10 +279,18 @@ config BUSYBOX_CONFIG_HUSH It does not handle select, aliases, tilde expansion, &>file and >&file redirection of stdout+stderr. +config BUSYBOX_CONFIG_SHELL_HUSH + bool "Internal shell for embedded script support" + default BUSYBOX_DEFAULT_SHELL_HUSH + +# hush options +# It's only needed to get "nice" menuconfig indenting. +if SHELL_HUSH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + config BUSYBOX_CONFIG_HUSH_BASH_COMPAT bool "bash-compatible extensions" default BUSYBOX_DEFAULT_HUSH_BASH_COMPAT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_BRACE_EXPANSION bool "Brace expansion" @@ -296,7 +314,7 @@ config BUSYBOX_CONFIG_HUSH_BASH_SOURCE_CURDIR config BUSYBOX_CONFIG_HUSH_INTERACTIVE bool "Interactive mode" default BUSYBOX_DEFAULT_HUSH_INTERACTIVE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable interactive mode (prompt and command editing). Without this, hush simply reads and executes commands @@ -322,31 +340,31 @@ config BUSYBOX_CONFIG_HUSH_JOB config BUSYBOX_CONFIG_HUSH_TICK bool "Support command substitution" default BUSYBOX_DEFAULT_HUSH_TICK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable `command` and $(command). config BUSYBOX_CONFIG_HUSH_IF bool "Support if/then/elif/else/fi" default BUSYBOX_DEFAULT_HUSH_IF - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_LOOPS bool "Support for, while and until loops" default BUSYBOX_DEFAULT_HUSH_LOOPS - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_CASE bool "Support case ... esac statement" default BUSYBOX_DEFAULT_HUSH_CASE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable case ... esac statement. +400 bytes. config BUSYBOX_CONFIG_HUSH_FUNCTIONS bool "Support funcname() { commands; } syntax" default BUSYBOX_DEFAULT_HUSH_FUNCTIONS - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable support for shell functions. +800 bytes. @@ -360,7 +378,7 @@ config BUSYBOX_CONFIG_HUSH_LOCAL config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT bool "Pseudorandom generator and $RANDOM variable" default BUSYBOX_DEFAULT_HUSH_RANDOM_SUPPORT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable pseudorandom generator and dynamic variable "$RANDOM". Each read of "$RANDOM" will generate a new pseudorandom value. @@ -368,7 +386,7 @@ config BUSYBOX_CONFIG_HUSH_RANDOM_SUPPORT config BUSYBOX_CONFIG_HUSH_MODE_X bool "Support 'hush -x' option and 'set -x' command" default BUSYBOX_DEFAULT_HUSH_MODE_X - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help This instructs hush to print commands before execution. Adds ~300 bytes. @@ -376,27 +394,27 @@ config BUSYBOX_CONFIG_HUSH_MODE_X config BUSYBOX_CONFIG_HUSH_ECHO bool "echo builtin" default BUSYBOX_DEFAULT_HUSH_ECHO - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_PRINTF bool "printf builtin" default BUSYBOX_DEFAULT_HUSH_PRINTF - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_TEST bool "test builtin" default BUSYBOX_DEFAULT_HUSH_TEST - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_HELP bool "help builtin" default BUSYBOX_DEFAULT_HUSH_HELP - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_EXPORT bool "export builtin" default BUSYBOX_DEFAULT_HUSH_EXPORT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_EXPORT_N bool "Support 'export -n' option" @@ -408,83 +426,85 @@ config BUSYBOX_CONFIG_HUSH_EXPORT_N config BUSYBOX_CONFIG_HUSH_READONLY bool "readonly builtin" default BUSYBOX_DEFAULT_HUSH_READONLY - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH help Enable support for read-only variables. config BUSYBOX_CONFIG_HUSH_KILL bool "kill builtin (supports kill %jobspec)" default BUSYBOX_DEFAULT_HUSH_KILL - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_WAIT bool "wait builtin" default BUSYBOX_DEFAULT_HUSH_WAIT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_COMMAND bool "command builtin" default BUSYBOX_DEFAULT_HUSH_COMMAND - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_TRAP bool "trap builtin" default BUSYBOX_DEFAULT_HUSH_TRAP - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_TYPE bool "type builtin" default BUSYBOX_DEFAULT_HUSH_TYPE - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_TIMES bool "times builtin" default BUSYBOX_DEFAULT_HUSH_TIMES - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_READ bool "read builtin" default BUSYBOX_DEFAULT_HUSH_READ - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_SET bool "set builtin" default BUSYBOX_DEFAULT_HUSH_SET - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_UNSET bool "unset builtin" default BUSYBOX_DEFAULT_HUSH_UNSET - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_ULIMIT bool "ulimit builtin" default BUSYBOX_DEFAULT_HUSH_ULIMIT - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_UMASK bool "umask builtin" default BUSYBOX_DEFAULT_HUSH_UMASK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_GETOPTS bool "getopts builtin" default BUSYBOX_DEFAULT_HUSH_GETOPTS - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_HUSH_MEMLEAK bool "memleak builtin (debugging)" default BUSYBOX_DEFAULT_HUSH_MEMLEAK - depends on BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_HUSH + +endif # hush options comment "Options common to all shells" -if ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH +if BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH config BUSYBOX_CONFIG_FEATURE_SH_MATH bool "POSIX math support" default BUSYBOX_DEFAULT_FEATURE_SH_MATH - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help Enable math support in the shell via $((...)) syntax. @@ -505,14 +525,14 @@ config BUSYBOX_CONFIG_FEATURE_SH_MATH_BASE config BUSYBOX_CONFIG_FEATURE_SH_EXTRA_QUIET bool "Hide message on interactive shell startup" default BUSYBOX_DEFAULT_FEATURE_SH_EXTRA_QUIET - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help Remove the busybox introduction when starting a shell. config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE bool "Standalone shell" default BUSYBOX_DEFAULT_FEATURE_SH_STANDALONE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help This option causes busybox shells to use busybox applets in preference to executables in the PATH whenever possible. For @@ -533,7 +553,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_STANDALONE config BUSYBOX_CONFIG_FEATURE_SH_NOFORK bool "Run 'nofork' applets directly" default BUSYBOX_DEFAULT_FEATURE_SH_NOFORK - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help This option causes busybox shells to not execute typical fork/exec/wait sequence, but call _main directly, @@ -551,14 +571,14 @@ config BUSYBOX_CONFIG_FEATURE_SH_NOFORK config BUSYBOX_CONFIG_FEATURE_SH_READ_FRAC bool "read -t N.NNN support (+110 bytes)" default BUSYBOX_DEFAULT_FEATURE_SH_READ_FRAC - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help Enable support for fractional second timeout in read builtin. config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE bool "Use $HISTFILESIZE" default BUSYBOX_DEFAULT_FEATURE_SH_HISTFILESIZE - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help This option makes busybox shells to use $HISTFILESIZE variable to set shell history size. Note that its max value is capped @@ -567,7 +587,7 @@ config BUSYBOX_CONFIG_FEATURE_SH_HISTFILESIZE config BUSYBOX_CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS bool "Embed scripts in the binary" default BUSYBOX_DEFAULT_FEATURE_SH_EMBEDDED_SCRIPTS - depends on BUSYBOX_CONFIG_ASH || BUSYBOX_CONFIG_HUSH || BUSYBOX_CONFIG_SH_IS_ASH || BUSYBOX_CONFIG_BASH_IS_ASH || BUSYBOX_CONFIG_SH_IS_HUSH || BUSYBOX_CONFIG_BASH_IS_HUSH + depends on BUSYBOX_CONFIG_SHELL_ASH || BUSYBOX_CONFIG_SHELL_HUSH help Allow scripts to be compressed and embedded in the busybox binary. The scripts should be placed in the 'embed' directory diff --git a/package/utils/busybox/config/sysklogd/Config.in b/package/utils/busybox/config/sysklogd/Config.in index 33a5e8238a..1aa2ea005f 100644 --- a/package/utils/busybox/config/sysklogd/Config.in +++ b/package/utils/busybox/config/sysklogd/Config.in @@ -23,7 +23,6 @@ config BUSYBOX_CONFIG_FEATURE_KLOGD_KLOGCTL bool "Use the klogctl() interface" default BUSYBOX_DEFAULT_FEATURE_KLOGD_KLOGCTL depends on BUSYBOX_CONFIG_KLOGD - select BUSYBOX_CONFIG_PLATFORM_LINUX help The klogd applet supports two interfaces for reading kernel messages. Linux provides the klogctl() interface @@ -116,6 +115,14 @@ config BUSYBOX_CONFIG_FEATURE_SYSLOGD_CFG help Supports restricted syslogd config. See docs/syslog.conf.txt +config BUSYBOX_CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS + bool "Include milliseconds in timestamps" + default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS + depends on BUSYBOX_CONFIG_SYSLOGD + help + Includes milliseconds (HH:MM:SS.mmm) in timestamp when + timestamps are added. + config BUSYBOX_CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE int "Read buffer size in bytes" default BUSYBOX_DEFAULT_FEATURE_SYSLOGD_READ_BUFFER_SIZE @@ -153,7 +160,6 @@ config BUSYBOX_CONFIG_FEATURE_KMSG_SYSLOG bool "Linux kernel printk buffer support" default BUSYBOX_DEFAULT_FEATURE_KMSG_SYSLOG depends on BUSYBOX_CONFIG_SYSLOGD - select BUSYBOX_CONFIG_PLATFORM_LINUX help When you enable this feature, the syslogd utility will write system log message to the Linux kernel's printk buffer. diff --git a/package/utils/busybox/config/util-linux/Config.in b/package/utils/busybox/config/util-linux/Config.in index 1a3871e92c..e3e59f1506 100644 --- a/package/utils/busybox/config/util-linux/Config.in +++ b/package/utils/busybox/config/util-linux/Config.in @@ -9,7 +9,6 @@ menu "Linux System Utilities" config BUSYBOX_CONFIG_ACPID bool "acpid (9 kb)" default BUSYBOX_DEFAULT_ACPID - select BUSYBOX_CONFIG_PLATFORM_LINUX help acpid listens to ACPI events coming either in textual form from /proc/acpi/event (though it is marked deprecated it is still widely @@ -31,13 +30,11 @@ config BUSYBOX_CONFIG_FEATURE_ACPID_COMPAT config BUSYBOX_CONFIG_BLKDISCARD bool "blkdiscard (4.3 kb)" default BUSYBOX_DEFAULT_BLKDISCARD - select BUSYBOX_CONFIG_PLATFORM_LINUX help blkdiscard discards sectors on a given device. config BUSYBOX_CONFIG_BLKID bool "blkid (12 kb)" default BUSYBOX_DEFAULT_BLKID - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_VOLUMEID help Lists labels and UUIDs of all filesystems. @@ -67,7 +64,6 @@ config BUSYBOX_CONFIG_CHRT config BUSYBOX_CONFIG_DMESG bool "dmesg (3.7 kb)" default BUSYBOX_DEFAULT_DMESG - select BUSYBOX_CONFIG_PLATFORM_LINUX help dmesg is used to examine or control the kernel ring buffer. When the Linux kernel prints messages to the system log, they are stored in @@ -100,7 +96,6 @@ config BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY config BUSYBOX_CONFIG_EJECT bool "eject (4 kb)" default BUSYBOX_DEFAULT_EJECT - select BUSYBOX_CONFIG_PLATFORM_LINUX help Used to eject cdroms. (defaults to /dev/cdrom) @@ -119,13 +114,11 @@ config BUSYBOX_CONFIG_FALLOCATE config BUSYBOX_CONFIG_FATATTR bool "fatattr (1.9 kb)" default BUSYBOX_DEFAULT_FATATTR - select BUSYBOX_CONFIG_PLATFORM_LINUX help fatattr lists or changes the file attributes on a fat file system. config BUSYBOX_CONFIG_FBSET bool "fbset (5.9 kb)" default BUSYBOX_DEFAULT_FBSET - select BUSYBOX_CONFIG_PLATFORM_LINUX help fbset is used to show or change the settings of a Linux frame buffer device. The frame buffer device provides a simple and unique @@ -153,13 +146,11 @@ config BUSYBOX_CONFIG_FEATURE_FBSET_READMODE config BUSYBOX_CONFIG_FDFORMAT bool "fdformat (4.4 kb)" default BUSYBOX_DEFAULT_FDFORMAT - select BUSYBOX_CONFIG_PLATFORM_LINUX help fdformat is used to low-level format a floppy disk. config BUSYBOX_CONFIG_FDISK bool "fdisk (37 kb)" default BUSYBOX_DEFAULT_FDISK - select BUSYBOX_CONFIG_PLATFORM_LINUX help The fdisk utility is used to divide hard disks into one or more logical disks, which are generally called partitions. This utility @@ -233,7 +224,6 @@ config BUSYBOX_CONFIG_FEATURE_FDISK_ADVANCED config BUSYBOX_CONFIG_FINDFS bool "findfs (12 kb)" default BUSYBOX_DEFAULT_FINDFS - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_VOLUMEID help Prints the name of a filesystem with given label or UUID. @@ -245,7 +235,6 @@ config BUSYBOX_CONFIG_FLOCK config BUSYBOX_CONFIG_FDFLUSH bool "fdflush (1.3 kb)" default BUSYBOX_DEFAULT_FDFLUSH - select BUSYBOX_CONFIG_PLATFORM_LINUX help fdflush is only needed when changing media on slightly-broken removable media drives. It is used to make Linux believe that a @@ -258,7 +247,6 @@ config BUSYBOX_CONFIG_FDFLUSH config BUSYBOX_CONFIG_FREERAMDISK bool "freeramdisk (1.3 kb)" default BUSYBOX_DEFAULT_FREERAMDISK - select BUSYBOX_CONFIG_PLATFORM_LINUX help Linux allows you to create ramdisks. This utility allows you to delete them and completely free all memory that was used for the @@ -279,14 +267,12 @@ config BUSYBOX_CONFIG_FSCK_MINIX config BUSYBOX_CONFIG_FSFREEZE bool "fsfreeze (3.5 kb)" default BUSYBOX_DEFAULT_FSFREEZE - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_LONG_OPTS help Halt new accesses and flush writes on a mounted filesystem. config BUSYBOX_CONFIG_FSTRIM bool "fstrim (4.4 kb)" default BUSYBOX_DEFAULT_FSTRIM - select BUSYBOX_CONFIG_PLATFORM_LINUX help Discard unused blocks on a mounted filesystem. config BUSYBOX_CONFIG_GETOPT @@ -313,16 +299,6 @@ config BUSYBOX_CONFIG_HEXDUMP The hexdump utility is used to display binary data in a readable way that is comparable to the output from most hex editors. -config BUSYBOX_CONFIG_FEATURE_HEXDUMP_REVERSE - bool "Support -R, reverse of 'hexdump -Cv'" - default BUSYBOX_DEFAULT_FEATURE_HEXDUMP_REVERSE - depends on BUSYBOX_CONFIG_HEXDUMP - help - The hexdump utility is used to display binary data in an ascii - readable way. This option creates binary data from an ascii input. - NB: this option is non-standard. It's unwise to use it in scripts - aimed to be portable. - config BUSYBOX_CONFIG_HD bool "hd (7.8 kb)" default BUSYBOX_DEFAULT_HD @@ -337,7 +313,6 @@ config BUSYBOX_CONFIG_XXD config BUSYBOX_CONFIG_HWCLOCK bool "hwclock (5.8 kb)" default BUSYBOX_DEFAULT_HWCLOCK - select BUSYBOX_CONFIG_PLATFORM_LINUX help The hwclock utility is used to read and set the hardware clock on a system. This is primarily used to set the current time on @@ -358,7 +333,6 @@ config BUSYBOX_CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS config BUSYBOX_CONFIG_IONICE bool "ionice (3.8 kb)" default BUSYBOX_DEFAULT_IONICE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Set/set program io scheduling class and priority Requires kernel >= 2.6.13 @@ -372,7 +346,6 @@ config BUSYBOX_CONFIG_IPCRM config BUSYBOX_CONFIG_IPCS bool "ipcs (11 kb)" default BUSYBOX_DEFAULT_IPCS - select BUSYBOX_CONFIG_PLATFORM_LINUX help The ipcs utility is used to provide information on the currently allocated System V interprocess (IPC) objects in the system. @@ -393,7 +366,6 @@ config BUSYBOX_CONFIG_FEATURE_LAST_FANCY config BUSYBOX_CONFIG_LOSETUP bool "losetup (5.5 kb)" default BUSYBOX_DEFAULT_LOSETUP - select BUSYBOX_CONFIG_PLATFORM_LINUX help losetup is used to associate or detach a loop device with a regular file or block device, and to query the status of a loop device. This @@ -401,7 +373,6 @@ config BUSYBOX_CONFIG_LOSETUP config BUSYBOX_CONFIG_LSPCI bool "lspci (6.3 kb)" default BUSYBOX_DEFAULT_LSPCI - #select PLATFORM_LINUX help lspci is a utility for displaying information about PCI buses in the system and devices connected to them. @@ -410,7 +381,6 @@ config BUSYBOX_CONFIG_LSPCI config BUSYBOX_CONFIG_LSUSB bool "lsusb (4.2 kb)" default BUSYBOX_DEFAULT_LSUSB - #select PLATFORM_LINUX help lsusb is a utility for displaying information about USB buses in the system and devices connected to them. @@ -419,7 +389,6 @@ config BUSYBOX_CONFIG_LSUSB config BUSYBOX_CONFIG_MDEV bool "mdev (17 kb)" default BUSYBOX_DEFAULT_MDEV - select BUSYBOX_CONFIG_PLATFORM_LINUX help mdev is a mini-udev implementation for dynamically creating device nodes in the /dev directory. @@ -505,20 +474,17 @@ config BUSYBOX_CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP config BUSYBOX_CONFIG_MKE2FS bool "mke2fs (10 kb)" default BUSYBOX_DEFAULT_MKE2FS - select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to create EXT2 filesystems. config BUSYBOX_CONFIG_MKFS_EXT2 bool "mkfs.ext2 (10 kb)" default BUSYBOX_DEFAULT_MKFS_EXT2 - select BUSYBOX_CONFIG_PLATFORM_LINUX help Alias to "mke2fs". config BUSYBOX_CONFIG_MKFS_MINIX bool "mkfs.minix (10 kb)" default BUSYBOX_DEFAULT_MKFS_MINIX - select BUSYBOX_CONFIG_PLATFORM_LINUX help The minix filesystem is a nice, small, compact, read-write filesystem with little overhead. If you wish to be able to create minix @@ -535,21 +501,18 @@ config BUSYBOX_CONFIG_FEATURE_MINIX2 config BUSYBOX_CONFIG_MKFS_REISER bool "mkfs_reiser" default BUSYBOX_DEFAULT_MKFS_REISER - select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to create ReiserFS filesystems. Note: this applet needs a lot of testing and polishing. config BUSYBOX_CONFIG_MKDOSFS bool "mkdosfs (7.2 kb)" default BUSYBOX_DEFAULT_MKDOSFS - select BUSYBOX_CONFIG_PLATFORM_LINUX help Utility to create FAT32 filesystems. config BUSYBOX_CONFIG_MKFS_VFAT bool "mkfs.vfat (7.2 kb)" default BUSYBOX_DEFAULT_MKFS_VFAT - select BUSYBOX_CONFIG_PLATFORM_LINUX help Alias to "mkdosfs". config BUSYBOX_CONFIG_MKSWAP @@ -583,7 +546,6 @@ config BUSYBOX_CONFIG_MORE config BUSYBOX_CONFIG_MOUNT bool "mount (23 kb)" default BUSYBOX_DEFAULT_MOUNT - select BUSYBOX_CONFIG_PLATFORM_LINUX help All files and filesystems in Unix are arranged into one big directory tree. The 'mount' utility is used to graft a filesystem onto a @@ -685,7 +647,7 @@ config BUSYBOX_CONFIG_NOLOGIN config BUSYBOX_CONFIG_NOLOGIN_DEPENDENCIES bool "Enable dependencies for nologin" - default BUSYBOX_DEFAULT_NOLOGIN_DEPENDENCIES + default BUSYBOX_DEFAULT_NOLOGIN_DEPENDENCIES # Y default makes it harder to select single-applet test depends on BUSYBOX_CONFIG_NOLOGIN select BUSYBOX_CONFIG_CAT select BUSYBOX_CONFIG_ECHO @@ -699,13 +661,11 @@ config BUSYBOX_CONFIG_NOLOGIN_DEPENDENCIES config BUSYBOX_CONFIG_NSENTER bool "nsenter (6.5 kb)" default BUSYBOX_DEFAULT_NSENTER - select BUSYBOX_CONFIG_PLATFORM_LINUX help Run program with namespaces of other processes. config BUSYBOX_CONFIG_PIVOT_ROOT bool "pivot_root (1.1 kb)" default BUSYBOX_DEFAULT_PIVOT_ROOT - select BUSYBOX_CONFIG_PLATFORM_LINUX help The pivot_root utility swaps the mount points for the root filesystem with some other mounted filesystem. This allows you to do all sorts @@ -730,7 +690,6 @@ config BUSYBOX_CONFIG_RDEV config BUSYBOX_CONFIG_READPROFILE bool "readprofile (7.1 kb)" default BUSYBOX_DEFAULT_READPROFILE - #select PLATFORM_LINUX help This allows you to parse /proc/profile for basic profiling. config BUSYBOX_CONFIG_RENICE @@ -747,7 +706,6 @@ config BUSYBOX_CONFIG_REV config BUSYBOX_CONFIG_RTCWAKE bool "rtcwake (6.8 kb)" default BUSYBOX_DEFAULT_RTCWAKE - select BUSYBOX_CONFIG_PLATFORM_LINUX help Enter a system sleep state until specified wakeup time. config BUSYBOX_CONFIG_SCRIPT @@ -764,7 +722,6 @@ config BUSYBOX_CONFIG_SCRIPTREPLAY config BUSYBOX_CONFIG_SETARCH bool "setarch (3.6 kb)" default BUSYBOX_DEFAULT_SETARCH - select BUSYBOX_CONFIG_PLATFORM_LINUX help The linux32 utility is used to create a 32bit environment for the specified program (usually a shell). It only makes sense to have @@ -774,20 +731,17 @@ config BUSYBOX_CONFIG_SETARCH config BUSYBOX_CONFIG_LINUX32 bool "linux32 (3.3 kb)" default BUSYBOX_DEFAULT_LINUX32 - select BUSYBOX_CONFIG_PLATFORM_LINUX help Alias to "setarch linux32". config BUSYBOX_CONFIG_LINUX64 bool "linux64 (3.3 kb)" default BUSYBOX_DEFAULT_LINUX64 - select BUSYBOX_CONFIG_PLATFORM_LINUX help Alias to "setarch linux64". config BUSYBOX_CONFIG_SETPRIV bool "setpriv (6.6 kb)" default BUSYBOX_DEFAULT_SETPRIV - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_LONG_OPTS help Run a program with different Linux privilege settings. @@ -828,7 +782,6 @@ config BUSYBOX_CONFIG_SETSID config BUSYBOX_CONFIG_SWAPON bool "swapon (15 kb)" default BUSYBOX_DEFAULT_SWAPON - select BUSYBOX_CONFIG_PLATFORM_LINUX help Once you have created some swap space using 'mkswap', you also need to enable your swap space with the 'swapon' utility. The 'swapoff' @@ -855,7 +808,6 @@ config BUSYBOX_CONFIG_FEATURE_SWAPON_PRI config BUSYBOX_CONFIG_SWAPOFF bool "swapoff (14 kb)" default BUSYBOX_DEFAULT_SWAPOFF - select BUSYBOX_CONFIG_PLATFORM_LINUX config BUSYBOX_CONFIG_FEATURE_SWAPONOFF_LABEL bool "Support specifying devices by label or UUID" @@ -868,7 +820,6 @@ config BUSYBOX_CONFIG_FEATURE_SWAPONOFF_LABEL config BUSYBOX_CONFIG_SWITCH_ROOT bool "switch_root (5.5 kb)" default BUSYBOX_DEFAULT_SWITCH_ROOT - select BUSYBOX_CONFIG_PLATFORM_LINUX help The switch_root utility is used from initramfs to select a new root device. Under initramfs, you have to use this instead of @@ -900,17 +851,23 @@ config BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY Needed for machines with more than 32-64 CPUs: affinity parameter 0xHHHHHHHHHHHHHHHHHHHH can be arbitrarily long in this case. Otherwise, it is limited to sizeof(long). + +config BUSYBOX_CONFIG_FEATURE_TASKSET_CPULIST + bool "CPU list support (-c option)" + default BUSYBOX_DEFAULT_FEATURE_TASKSET_CPULIST + depends on BUSYBOX_CONFIG_FEATURE_TASKSET_FANCY + help + Add support for taking/printing affinity as CPU list when '-c' + option is used. For example, it prints '0-3,7' instead of mask '8f'. config BUSYBOX_CONFIG_UEVENT bool "uevent (3.1 kb)" default BUSYBOX_DEFAULT_UEVENT - select BUSYBOX_CONFIG_PLATFORM_LINUX help uevent is a netlink listener for kernel uevent notifications sent via netlink. It is usually used for dynamic device creation. config BUSYBOX_CONFIG_UMOUNT bool "umount (5.1 kb)" default BUSYBOX_DEFAULT_UMOUNT - select BUSYBOX_CONFIG_PLATFORM_LINUX help When you want to remove a mounted filesystem from its current mount point, for example when you are shutting down the system, the @@ -927,7 +884,6 @@ config BUSYBOX_CONFIG_UNSHARE bool "unshare (7.2 kb)" default BUSYBOX_DEFAULT_UNSHARE depends on !BUSYBOX_CONFIG_NOMMU - select BUSYBOX_CONFIG_PLATFORM_LINUX select BUSYBOX_CONFIG_LONG_OPTS help Run program with some namespaces unshared from parent. diff --git a/package/utils/busybox/config/util-linux/volume_id/Config.in b/package/utils/busybox/config/util-linux/volume_id/Config.in index b50fcac34a..57d8258e77 100644 --- a/package/utils/busybox/config/util-linux/volume_id/Config.in +++ b/package/utils/busybox/config/util-linux/volume_id/Config.in @@ -23,6 +23,12 @@ config BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS bool "cramfs filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_CRAMFS depends on BUSYBOX_CONFIG_VOLUMEID +config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EROFS + bool "erofs filesystem" + default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EROFS + depends on BUSYBOX_CONFIG_VOLUMEID + help + Erofs is a compressed readonly filesystem for Linux. config BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXFAT bool "exFAT filesystem" default BUSYBOX_DEFAULT_FEATURE_VOLUMEID_EXFAT diff --git a/package/utils/busybox/patches/001-remove-stime-function-calls.patch b/package/utils/busybox/patches/001-remove-stime-function-calls.patch deleted file mode 100644 index ccf9bef356..0000000000 --- a/package/utils/busybox/patches/001-remove-stime-function-calls.patch +++ /dev/null @@ -1,84 +0,0 @@ -From d3539be8f27b8cbfdfee460fe08299158f08bcd9 Mon Sep 17 00:00:00 2001 -From: Alistair Francis -Date: Tue, 19 Nov 2019 13:06:40 +0100 -Subject: Remove stime() function calls - -stime() has been deprecated in glibc 2.31 and replaced with -clock_settime(). Let's replace the stime() function calls with -clock_settime() in preperation. - -function old new delta -rdate_main 197 224 +27 -clock_settime - 27 +27 -date_main 926 941 +15 -stime 37 - -37 ------------------------------------------------------------------------------- -(add/remove: 2/2 grow/shrink: 2/0 up/down: 69/-37) Total: 32 bytes - -Signed-off-by: Alistair Francis -Signed-off-by: Denys Vlasenko ---- - coreutils/date.c | 6 +++++- - libbb/missing_syscalls.c | 8 -------- - util-linux/rdate.c | 8 ++++++-- - 3 files changed, 11 insertions(+), 11 deletions(-) - ---- a/coreutils/date.c -+++ b/coreutils/date.c -@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, cha - time(&ts.tv_sec); - #endif - } -+#if !ENABLE_FEATURE_DATE_NANO -+ ts.tv_nsec = 0; -+#endif - localtime_r(&ts.tv_sec, &tm_time); - - /* If date string is given, update tm_time, and maybe set date */ -@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, cha - if (date_str[0] != '@') - tm_time.tm_isdst = -1; - ts.tv_sec = validate_tm_time(date_str, &tm_time); -+ ts.tv_nsec = 0; - - /* if setting time, set it */ -- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { -+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { - bb_perror_msg("can't set date"); - } - } ---- a/libbb/missing_syscalls.c -+++ b/libbb/missing_syscalls.c -@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) - return syscall(__NR_getsid, pid); - } - --int stime(const time_t *t) --{ -- struct timeval tv; -- tv.tv_sec = *t; -- tv.tv_usec = 0; -- return settimeofday(&tv, NULL); --} -- - int sethostname(const char *name, size_t len) - { - return syscall(__NR_sethostname, name, len); ---- a/util-linux/rdate.c -+++ b/util-linux/rdate.c -@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, ch - if (!(flags & 2)) { /* no -p (-s may be present) */ - if (time(NULL) == remote_time) - bb_error_msg("current time matches remote time"); -- else -- if (stime(&remote_time) < 0) -+ else { -+ struct timespec ts; -+ ts.tv_sec = remote_time; -+ ts.tv_nsec = 0; -+ if (clock_settime(CLOCK_REALTIME, &ts) < 0) - bb_perror_msg_and_die("can't set time of day"); -+ } - } - - if (flags != 1) /* not lone -s */ diff --git a/package/utils/busybox/patches/010-fix-wrong-variable.patch b/package/utils/busybox/patches/010-fix-wrong-variable.patch new file mode 100644 index 0000000000..1b6fa7be61 --- /dev/null +++ b/package/utils/busybox/patches/010-fix-wrong-variable.patch @@ -0,0 +1,11 @@ +--- a/libbb/update_passwd.c ++++ b/libbb/update_passwd.c +@@ -48,7 +48,7 @@ static void check_selinux_update_passwd( + bb_simple_error_msg_and_die("SELinux: access denied"); + } + if (ENABLE_FEATURE_CLEAN_UP) +- freecon(context); ++ freecon(seuser); + } + #else + # define check_selinux_update_passwd(username) ((void)0) diff --git a/package/utils/busybox/patches/100-trylink_bash.patch b/package/utils/busybox/patches/100-trylink_bash.patch deleted file mode 100644 index f9571fcbc8..0000000000 --- a/package/utils/busybox/patches/100-trylink_bash.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/scripts/trylink -+++ b/scripts/trylink -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/usr/bin/env bash - - debug=false - diff --git a/package/utils/busybox/patches/101-gen_build_files_bash.patch b/package/utils/busybox/patches/101-gen_build_files_bash.patch deleted file mode 100644 index d258fb8bc4..0000000000 --- a/package/utils/busybox/patches/101-gen_build_files_bash.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/scripts/gen_build_files.sh -+++ b/scripts/gen_build_files.sh -@@ -1,4 +1,4 @@ --#!/bin/sh -+#!/usr/bin/env bash - - # Note: was using sed OPTS CMD -- FILES - # but users complain that many sed implementations diff --git a/package/utils/busybox/patches/110-no_static_libgcc.patch b/package/utils/busybox/patches/110-no_static_libgcc.patch deleted file mode 100644 index 2148a09e00..0000000000 --- a/package/utils/busybox/patches/110-no_static_libgcc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.flags -+++ b/Makefile.flags -@@ -51,7 +51,7 @@ CFLAGS += $(call cc-option,-fno-builtin- - # -fno-guess-branch-probability: prohibit pseudo-random guessing - # of branch probabilities (hopefully makes bloatcheck more stable): - CFLAGS += $(call cc-option,-fno-guess-branch-probability,) --CFLAGS += $(call cc-option,-funsigned-char -static-libgcc,) -+CFLAGS += $(call cc-option,-funsigned-char,) - CFLAGS += $(call cc-option,-falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1,) - # Defeat .eh_frame bloat (gcc 4.6.3 x86-32 defconfig: 20% smaller busybox binary): - CFLAGS += $(call cc-option,-fno-unwind-tables,) diff --git a/package/utils/busybox/patches/120-lto-jobserver.patch b/package/utils/busybox/patches/120-lto-jobserver.patch index 99c5b51201..d4f997e6d8 100644 --- a/package/utils/busybox/patches/120-lto-jobserver.patch +++ b/package/utils/busybox/patches/120-lto-jobserver.patch @@ -1,6 +1,6 @@ --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include -@@ -130,7 +130,7 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$ +@@ -131,7 +131,7 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$ # if_changed = $(if $(strip $(filter-out $(PHONY),$?) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ @@ -9,7 +9,7 @@ $(echo-cmd) $(cmd_$(1)); \ echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd) -@@ -139,7 +139,7 @@ if_changed = $(if $(strip $(filter-out $ +@@ -140,7 +140,7 @@ if_changed = $(if $(strip $(filter-out $ if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \ $(filter-out FORCE $(wildcard $^),$^) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ @@ -18,7 +18,7 @@ $(echo-cmd) $(cmd_$(1)); \ scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \ rm -f $(depfile); \ -@@ -150,5 +150,5 @@ if_changed_dep = $(if $(strip $(filter-o +@@ -151,5 +151,5 @@ if_changed_dep = $(if $(strip $(filter-o # and if so will execute $(rule_foo) if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \ $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ diff --git a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch index 4bab25a8d5..2e67009224 100644 --- a/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch +++ b/package/utils/busybox/patches/200-udhcpc_reduce_msgs.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -713,6 +713,7 @@ static int bcast_or_ucast(struct dhcp_pa +@@ -712,6 +712,7 @@ static int bcast_or_ucast(struct dhcp_pa static NOINLINE int send_discover(uint32_t xid, uint32_t requested) { struct dhcp_packet packet; @@ -8,7 +8,7 @@ /* Fill in: op, htype, hlen, cookie, chaddr fields, * random xid field (we override it below), -@@ -730,6 +731,7 @@ static NOINLINE int send_discover(uint32 +@@ -729,6 +730,7 @@ static NOINLINE int send_discover(uint32 */ add_client_options(&packet); diff --git a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch index 256b049d9e..875f2ce5fc 100644 --- a/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch +++ b/package/utils/busybox/patches/201-udhcpc_changed_ifindex.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1416,6 +1416,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c +@@ -1415,6 +1415,12 @@ int udhcpc_main(int argc UNUSED_PARAM, c /* silence "uninitialized!" warning */ unsigned timestamp_before_wait = timestamp_before_wait; diff --git a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch index 3d3c0cc403..88a98c0a1c 100644 --- a/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch +++ b/package/utils/busybox/patches/203-udhcpc_renew_no_deconfig.patch @@ -1,6 +1,6 @@ --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c -@@ -1126,7 +1126,6 @@ static void perform_renew(void) +@@ -1125,7 +1125,6 @@ static void perform_renew(void) client_data.state = RENEW_REQUESTED; break; case RENEW_REQUESTED: /* impatient are we? fine, square 1 */ diff --git a/package/utils/busybox/patches/230-add_nslookup_lede.patch b/package/utils/busybox/patches/230-add_nslookup_lede.patch index f0ac4b51c1..446b01c3f1 100644 --- a/package/utils/busybox/patches/230-add_nslookup_lede.patch +++ b/package/utils/busybox/patches/230-add_nslookup_lede.patch @@ -19,9 +19,9 @@ Signed-off-by: Jo-Philipp Wich --- a/Makefile.flags +++ b/Makefile.flags -@@ -134,6 +134,12 @@ else - LDLIBS += m - endif +@@ -158,6 +158,12 @@ endif + # libm may be needed for dc, awk, ntpd + # librt may be needed for clock_gettime() +# nslookup_lede might need the resolv library +RESOLV_AVAILABLE := $(shell echo 'int main(void){res_init();return 0;}' >resolvtest.c; $(CC) $(CFLAGS) -include resolv.h -lresolv -o /dev/null resolvtest.c >/dev/null 2>&1 && echo "y"; rm resolvtest.c) diff --git a/package/utils/busybox/patches/240-telnetd_intr.patch b/package/utils/busybox/patches/240-telnetd_intr.patch deleted file mode 100644 index 773ba44db5..0000000000 --- a/package/utils/busybox/patches/240-telnetd_intr.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/networking/telnetd.c -+++ b/networking/telnetd.c -@@ -509,6 +509,7 @@ make_new_session( - - /* Restore default signal handling ASAP */ - bb_signals((1 << SIGCHLD) + (1 << SIGPIPE), SIG_DFL); -+ signal(SIGINT, SIG_DFL); - - pid = getpid(); - diff --git a/package/utils/busybox/patches/250-date-k-flag.patch b/package/utils/busybox/patches/250-date-k-flag.patch deleted file mode 100644 index 5aadbb233c..0000000000 --- a/package/utils/busybox/patches/250-date-k-flag.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- a/coreutils/date.c -+++ b/coreutils/date.c -@@ -123,6 +123,7 @@ - //usage: IF_FEATURE_DATE_ISOFMT( - //usage: "\n -D FMT Use FMT (strptime format) for -d TIME conversion" - //usage: ) -+//usage: "\n -k Set Kernel timezone from localtime and exit" - //usage: "\n" - //usage: "\nRecognized TIME formats:" - //usage: "\n hh:mm[:ss]" -@@ -139,9 +140,8 @@ - - #include "libbb.h" - #include "common_bufsiz.h" --#if ENABLE_FEATURE_DATE_NANO --# include --#endif -+#include -+#include - - enum { - OPT_RFC2822 = (1 << 0), /* R */ -@@ -149,8 +149,9 @@ enum { - OPT_UTC = (1 << 2), /* u */ - OPT_DATE = (1 << 3), /* d */ - OPT_REFERENCE = (1 << 4), /* r */ -- OPT_TIMESPEC = (1 << 5) * ENABLE_FEATURE_DATE_ISOFMT, /* I */ -- OPT_HINT = (1 << 6) * ENABLE_FEATURE_DATE_ISOFMT, /* D */ -+ OPT_KERNELTZ = (1 << 5), /* k */ -+ OPT_TIMESPEC = (1 << 6) * ENABLE_FEATURE_DATE_ISOFMT, /* I */ -+ OPT_HINT = (1 << 7) * ENABLE_FEATURE_DATE_ISOFMT, /* D */ - }; - - #if ENABLE_LONG_OPTS -@@ -162,6 +163,7 @@ static const char date_longopts[] ALIGN1 - /* "universal\0" No_argument "u" */ - "date\0" Required_argument "d" - "reference\0" Required_argument "r" -+ "set-kernel-tz\0" No_argument "k" - ; - #endif - -@@ -181,6 +183,8 @@ static void maybe_set_utc(int opt) - int date_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; - int date_main(int argc UNUSED_PARAM, char **argv) - { -+ time_t tt; -+ struct timezone tz; - struct timespec ts; - struct tm tm_time; - char buf_fmt_dt2str[64]; -@@ -193,7 +197,7 @@ int date_main(int argc UNUSED_PARAM, cha - char *isofmt_arg = NULL; - - opt = getopt32long(argv, "^" -- "Rs:ud:r:" -+ "Rs:ud:r:k" - IF_FEATURE_DATE_ISOFMT("I::D:") - "\0" - "d--s:s--d" -@@ -256,6 +260,31 @@ int date_main(int argc UNUSED_PARAM, cha - if (*argv) - bb_show_usage(); - -+ /* Setting of kernel timezone was requested */ -+ if (opt & OPT_KERNELTZ) { -+ tt = time(NULL); -+ localtime_r(&tt, &tm_time); -+ -+ /* workaround warp_clock() on first invocation */ -+ memset(&tz, 0, sizeof(tz)); -+ syscall(SYS_settimeofday, NULL, &tz); -+ -+ memset(&tz, 0, sizeof(tz)); -+#ifdef __USE_MISC -+ tz.tz_minuteswest = -(tm_time.tm_gmtoff / 60); -+#else -+ tz.tz_minuteswest = -(tm_time.__tm_gmtoff / 60); -+#endif -+ -+ if (syscall(SYS_settimeofday, NULL, &tz)) -+ { -+ bb_perror_msg("can't set kernel time zone"); -+ return EXIT_FAILURE; -+ } -+ -+ return EXIT_SUCCESS; -+ } -+ - /* Now we have parsed all the information except the date format - * which depends on whether the clock is being set or read */ - diff --git a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch index 3741e25c3f..0389eed5da 100644 --- a/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch +++ b/package/utils/busybox/patches/500-move-traceroute-applets-to-bin.patch @@ -1,6 +1,6 @@ --- a/networking/traceroute.c +++ b/networking/traceroute.c -@@ -237,8 +237,8 @@ +@@ -236,8 +236,8 @@ //config: depends on TRACEROUTE || TRACEROUTE6 /* Needs socket(AF_INET, SOCK_RAW, IPPROTO_ICMP), therefore BB_SUID_MAYBE: */ diff --git a/package/utils/busybox/patches/520-loginutils-handle-crypt-failures.patch b/package/utils/busybox/patches/520-loginutils-handle-crypt-failures.patch index d44375426f..91340d46e6 100644 --- a/package/utils/busybox/patches/520-loginutils-handle-crypt-failures.patch +++ b/package/utils/busybox/patches/520-loginutils-handle-crypt-failures.patch @@ -1,6 +1,6 @@ --- a/loginutils/chpasswd.c +++ b/loginutils/chpasswd.c -@@ -97,6 +97,11 @@ int chpasswd_main(int argc UNUSED_PARAM, +@@ -89,6 +89,11 @@ int chpasswd_main(int argc UNUSED_PARAM, crypt_make_pw_salt(salt, algo); free_me = pass = pw_encrypt(pass, salt, 0); @@ -14,7 +14,7 @@ /* This is rather complex: if user is not found in /etc/shadow, --- a/loginutils/cryptpw.c +++ b/loginutils/cryptpw.c -@@ -95,7 +95,7 @@ int cryptpw_main(int argc UNUSED_PARAM, +@@ -87,7 +87,7 @@ int cryptpw_main(int argc UNUSED_PARAM, /* Supports: cryptpw -m sha256 PASS 'rounds=999999999$SALT' */ char salt[MAX_PW_SALT_LEN + sizeof("rounds=999999999$")]; char *salt_ptr; @@ -23,7 +23,7 @@ const char *opt_m, *opt_S; int fd; -@@ -140,8 +140,12 @@ int cryptpw_main(int argc UNUSED_PARAM, +@@ -132,8 +132,12 @@ int cryptpw_main(int argc UNUSED_PARAM, /* may still be NULL on EOF/error */ } diff --git a/package/utils/busybox/patches/600-allow-ntpd-non-root.patch b/package/utils/busybox/patches/600-allow-ntpd-non-root.patch deleted file mode 100644 index b5d4c2a07d..0000000000 --- a/package/utils/busybox/patches/600-allow-ntpd-non-root.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/networking/ntpd.c -+++ b/networking/ntpd.c -@@ -2414,9 +2414,6 @@ static NOINLINE void ntp_init(char **arg - - srand(getpid()); - -- if (getuid()) -- bb_error_msg_and_die(bb_msg_you_must_be_root); -- - /* Set some globals */ - G.discipline_jitter = G_precision_sec; - G.stratum = MAXSTRAT; diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile index 1decfd7ae7..0d243302c2 100644 --- a/package/utils/f2fs-tools/Makefile +++ b/package/utils/f2fs-tools/Makefile @@ -8,21 +8,21 @@ include $(TOPDIR)/rules.mk PKG_NAME:=f2fs-tools -PKG_VERSION:=1.13.0 +PKG_VERSION:=1.14.0 PKG_RELEASE:=1 -PKG_LICENSE:=GPL-2.0 - PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/ -PKG_HASH:=b39d3ae9224267aab0070b5f17d91d0c5143f6d960166a27f6b11c8c87072c7d +PKG_HASH:=619263d4e2022152a1472c1d912eaae104f20bd227ce0bb9d41d1d6608094bd1 + +PKG_MAINTAINER:=Felix Fietkau +PKG_LICENSE:=GPL-2.0-only +PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 -PKG_MAINTAINER:=Felix Fietkau - include $(INCLUDE_DIR)/package.mk define Package/f2fs-tools/Default diff --git a/rules.mk b/rules.mk index cbe1b0cb4c..c6bd7327c5 100644 --- a/rules.mk +++ b/rules.mk @@ -339,6 +339,10 @@ else $(SCRIPT_DIR)/rstrip.sh endif +SET_ABI_VERSION= \ + PATCHELF="$(STAGING_DIR_HOST)/bin/patchelf" \ + $(SCRIPT_DIR)/set-abi-version.sh + ifeq ($(CONFIG_IPV6),y) DISABLE_IPV6:= else @@ -428,6 +432,8 @@ $(shell \ ) endef +abi_version_str = $(subst -,,$(subst _,,$(subst .,,$(1)))) + COMMITCOUNT = $(if $(DUMP),0,$(call commitcount)) AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1)) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8ffc093548..81b1ffcb56 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1113,7 +1113,7 @@ sub top_of_openwrt_tree { my ($root) = @_; my @tree_check = ( - "BSDmakefile", "Config.in", "LICENSE", "Makefile", "README.md", + "BSDmakefile", "Config.in", "LICENSES", "Makefile", "README.md", "feeds.conf.default", "include", "package", "rules.mk", "scripts", "target", "toolchain", "tools" ); diff --git a/scripts/metadata.pm b/scripts/metadata.pm index f6dce39662..5fbb77a36c 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -249,7 +249,6 @@ sub parse_package_metadata($) { /^Build-Types:\s*(.+)\s*$/ and $src->{buildtypes} = [ split /\s+/, $1 ]; next unless $pkg; /^Version: \s*(.+)\s*$/ and $pkg->{version} = $1; - /^ABIVersion: \s*(.+)\s*$/ and $pkg->{abiversion} = $1; /^Title: \s*(.+)\s*$/ and $pkg->{title} = $1; /^Menu: \s*(.+)\s*$/ and $pkg->{menu} = $1; /^Submenu: \s*(.+)\s*$/ and $pkg->{submenu} = $1; diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl index 5abc1bdef3..02102be8f3 100755 --- a/scripts/package-metadata.pl +++ b/scripts/package-metadata.pl @@ -532,21 +532,6 @@ sub gen_package_auxiliary() { if ($pkg->{name} && $pkg->{repository}) { print "Package/$name/subdir = $pkg->{repository}\n"; } - if ($pkg->{name} && defined($pkg->{abiversion}) && length($pkg->{abiversion})) { - my $abiv; - - if ($pkg->{abiversion} =~ m!^(\d{4})-(\d{2})-(\d{2})-[0-9a-f]{7,40}$!) { - print STDERR "WARNING: Reducing ABI version '$pkg->{abiversion}' of package '$name' to '$1$2$3'\n"; - $abiv = "$1$2$3"; - } - else { - $abiv = $pkg->{abiversion}; - } - - foreach my $n (@{$pkg->{provides}}) { - print "Package/$n/abiversion = $abiv\n"; - } - } my %depends; foreach my $dep (@{$pkg->{depends} || []}) { if ($dep =~ m!^\+?(?:[^:]+:)?([^@]+)$!) { diff --git a/scripts/set-abi-version.sh b/scripts/set-abi-version.sh new file mode 100755 index 0000000000..a61c842c6d --- /dev/null +++ b/scripts/set-abi-version.sh @@ -0,0 +1,73 @@ +#!/usr/bin/env bash +# +# Copyright (C) 2020 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +SELF=${0##*/} + +[ -n "$PATCHELF" ] || { + echo "$SELF: patchelf command not defined (PATCHELF variable not set)" + exit 1 +} + +ABI_VER="$1" +PATCH_DIR="$2" +REF_LIST="$3" + +[ -n "$ABI_VER" -a -n "$PATCH_DIR" ] || { + echo "$SELF: no ABI version or files/directories specified" + echo "usage: $SELF [...]" + exit 1 +} + +cmd() { + echo "$@" >&2 + "$@" || exit 1 +} + +gen_lib_list() { + while read F; do + F="${F##*/}" + case "$F" in + lib*.so*);; + *) continue;; + esac + echo -n "$F:" + done < "$REF_LIST" +} + +find "$PATCH_DIR" -type f -a -name 'lib*.so*' | \ +( + while read F; do + NEW_F="${F%%.so*}.so.$ABI_VER" + NEW_NAME="${NEW_F##*/}" + [ "$NEW_F" != "$F" ] || continue + cmd mv "$F" "$NEW_F" + [ "$REF_LIST" ] || cmd ln -s "$NEW_NAME" "$F" + cmd $PATCHELF --set-soname "$NEW_NAME" "$NEW_F" + done +) + +[ -n "$REF_LIST" ] || exit 0 + +LIBS="$(gen_lib_list)" +LIBS="${LIBS%%:}" +find "$PATCH_DIR" -type f -a -exec file {} \; | \ + sed -n -e 's/^\(.*\):.*ELF.*\(executable\|relocatable\|shared object\).*,.*/\1:\2/p' | \ +( + IFS=":" + while read F S; do + $PATCHELF --print-needed "$F" | while read L; do + BASE_L="${L%%.so*}" + for lib in $LIBS; do + base_lib="${lib%%.so*}" + [ "$BASE_L" = "$base_lib" ] || continue + [ "$l" = "$lib" ] && continue + cmd $PATCHELF --replace-needed "$L" "$lib" "$F" + done + done + done + true +) diff --git a/target/linux/Makefile b/target/linux/Makefile index 3a70b80bb3..a939d42bc0 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -1,9 +1,7 @@ -# +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2007 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile index bae20d0d04..b2e8d8fd1c 100644 --- a/target/linux/apm821xx/Makefile +++ b/target/linux/apm821xx/Makefile @@ -1,7 +1,5 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk ARCH:=powerpc diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index c1cb2bcfdd..2737a32436 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -1,7 +1,5 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/apm821xx/nand/profiles/00-default.mk b/target/linux/apm821xx/nand/profiles/00-default.mk index 8c2203f5a9..8fcc479cff 100644 --- a/target/linux/apm821xx/nand/profiles/00-default.mk +++ b/target/linux/apm821xx/nand/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch index 53f4aae7f1..40d731b8e6 100644 --- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch +++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch @@ -43,7 +43,7 @@ produce a noisy warning. hcd->msi_enabled = 1; --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1881,6 +1881,7 @@ struct xhci_hcd { +@@ -1882,6 +1882,7 @@ struct xhci_hcd { struct xhci_hub usb2_rhub; struct xhci_hub usb3_rhub; /* support xHCI 1.0 spec USB2 hardware LPM */ diff --git a/target/linux/apm821xx/sata/profiles/00-default.mk b/target/linux/apm821xx/sata/profiles/00-default.mk index 887741abd3..a203821533 100644 --- a/target/linux/apm821xx/sata/profiles/00-default.mk +++ b/target/linux/apm821xx/sata/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/arc770/Makefile b/target/linux/arc770/Makefile index 530fb1ea6e..1320c8283b 100644 --- a/target/linux/arc770/Makefile +++ b/target/linux/arc770/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arc diff --git a/target/linux/arc770/generic/profiles/00-default.mk b/target/linux/arc770/generic/profiles/00-default.mk index 9f69663170..02404305d4 100644 --- a/target/linux/arc770/generic/profiles/00-default.mk +++ b/target/linux/arc770/generic/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile (all drivers) diff --git a/target/linux/arc770/image/Makefile b/target/linux/arc770/image/Makefile index 260757845e..172eb06744 100644 --- a/target/linux/arc770/image/Makefile +++ b/target/linux/arc770/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/arc770/image/gen_axs10x_sdcard_img.sh b/target/linux/arc770/image/gen_axs10x_sdcard_img.sh index 87c2bba92c..12ead10dbe 100755 --- a/target/linux/arc770/image/gen_axs10x_sdcard_img.sh +++ b/target/linux/arc770/image/gen_axs10x_sdcard_img.sh @@ -1,11 +1,7 @@ #!/bin/sh - +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 5 ] || { diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile index 5b3650ef8d..2746dcecce 100644 --- a/target/linux/archs38/Makefile +++ b/target/linux/archs38/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arc diff --git a/target/linux/archs38/generic/profiles/00-default.mk b/target/linux/archs38/generic/profiles/00-default.mk index 172ad4bcfb..38da896fa6 100644 --- a/target/linux/archs38/generic/profiles/00-default.mk +++ b/target/linux/archs38/generic/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile (all drivers) diff --git a/target/linux/archs38/image/Makefile b/target/linux/archs38/image/Makefile index 1e0d3e99fd..e8cfb63ce1 100644 --- a/target/linux/archs38/image/Makefile +++ b/target/linux/archs38/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/archs38/image/gen_axs10x_sdcard_img.sh b/target/linux/archs38/image/gen_axs10x_sdcard_img.sh index 87c2bba92c..12ead10dbe 100755 --- a/target/linux/archs38/image/gen_axs10x_sdcard_img.sh +++ b/target/linux/archs38/image/gen_axs10x_sdcard_img.sh @@ -1,11 +1,7 @@ #!/bin/sh - +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 5 ] || { diff --git a/target/linux/armvirt/Makefile b/target/linux/armvirt/Makefile index 4a8c6b092c..bf069952d9 100644 --- a/target/linux/armvirt/Makefile +++ b/target/linux/armvirt/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk BOARD:=armvirt diff --git a/target/linux/armvirt/image/Makefile b/target/linux/armvirt/image/Makefile index 0292dbab42..5f9ef21d65 100644 --- a/target/linux/armvirt/image/Makefile +++ b/target/linux/armvirt/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016-2017 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile index e941f34669..fe6a93244a 100644 --- a/target/linux/at91/Makefile +++ b/target/linux/at91/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts b/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts index e6451202aa..7de05ee749 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/at91-q5xr5.dts @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * q5xr5.dts - Device Tree file for Exegin Q5xR5 board * * Copyright (C) 2014 Owen Kirby - * - * Licensed under GPLv2. */ + /dts-v1/; #include "at91sam9g20.dtsi" diff --git a/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts b/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts index 4651fdf241..d9d7da619a 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/lmu5000.dts @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * lmu5000.dst - Device Tree file for CalAmp LMU5000 board * * Copyright (C) 2013 Adam Porter - * - * Licensed under GPLv2. */ + /dts-v1/; #include "at91sam9g20.dtsi" diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts index 1f51893ce3..fd9d260f2a 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/wb45n.dts @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * wb45n.dts - Device Tree file for WB45NBT board * * Copyright (C) 2015 Laird - * - * Licensed under GPLv2 or later. */ + /dts-v1/; #include "at91sam9g25.dtsi" diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts index febd76b874..15b10a8b06 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts +++ b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dts @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * wb50n.dts - Device Tree file for wb50n board * * Copyright (C) 2015 Laird - * - * Licensed under GPLv2 or later. */ + /dts-v1/; #include "wb50n.dtsi" diff --git a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi index 8d30424442..936cce39ed 100644 --- a/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi +++ b/target/linux/at91/files/arch/arm/boot/dts/wb50n.dtsi @@ -1,10 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * wb50n.dts - Device Tree file for wb50n board * * Copyright (C) 2015 Laird - * - * Licensed under GPLv2 or later. */ + #include "sama5d31.dtsi" / { diff --git a/target/linux/at91/image/Makefile b/target/linux/at91/image/Makefile index 25fc34eba0..e17e4d6a52 100644 --- a/target/linux/at91/image/Makefile +++ b/target/linux/at91/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/at91/image/gen_at91_sdcard_img.sh b/target/linux/at91/image/gen_at91_sdcard_img.sh index 5171b6723e..4d2808bc3b 100755 --- a/target/linux/at91/image/gen_at91_sdcard_img.sh +++ b/target/linux/at91/image/gen_at91_sdcard_img.sh @@ -1,11 +1,7 @@ #!/bin/sh - +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 5 ] || { diff --git a/target/linux/at91/modules.mk b/target/linux/at91/modules.mk index 998c042ee1..0590afef82 100644 --- a/target/linux/at91/modules.mk +++ b/target/linux/at91/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/mmc-at91 SUBMENU:=$(OTHER_MENU) diff --git a/target/linux/ath25/Makefile b/target/linux/ath25/Makefile index 8b175fc194..1d8bee507b 100644 --- a/target/linux/ath25/Makefile +++ b/target/linux/ath25/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mips diff --git a/target/linux/ath25/image/Makefile b/target/linux/ath25/image/Makefile index afc6c91259..a072f2408a 100644 --- a/target/linux/ath25/image/Makefile +++ b/target/linux/ath25/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/ath25/profiles/00-default.mk b/target/linux/ath25/profiles/00-default.mk index b40eb1b0ce..3aeb31064a 100644 --- a/target/linux/ath25/profiles/00-default.mk +++ b/target/linux/ath25/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr810n-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr810n-v1.dts index 36f83809b8..6749479616 100644 --- a/target/linux/ath79/dts/qca9531_tplink_tl-wr810n-v1.dts +++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr810n-v1.dts @@ -11,7 +11,7 @@ regulator-name = "usb_vbus"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - gpio = <&gpio 8 GPIO_ACTIVE_HIGH>; + gpio = <&gpio 11 GPIO_ACTIVE_HIGH>; enable-active-high; }; }; diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 2e520ac067..08d9e017a7 100644 --- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -56,9 +56,6 @@ case "$FIRMWARE" in caldata_extract "calibrate" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1) ;; - meraki,mr12) - caldata_extract "art" 0x11000 0xeb8 - ;; nec,wg800hp) caldata_extract "art" 0x1000 0x440 ath9k_patch_mac $(mtd_get_mac_text board_data 0x680) @@ -108,6 +105,9 @@ case "$FIRMWARE" in caldata_extract "calibrate" 0x5000 0x440 ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0) ;; + meraki,mr12) + caldata_extract "art" 0x11000 0xeb8 + ;; netgear,wnr2200-8m|\ netgear,wnr2200-16m|\ pcs,cap324|\ diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index 4a51cf1fbf..c2d2474336 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -4,6 +4,8 @@ include $(INCLUDE_DIR)/image.mk KERNEL_LOADADDR = 0x80060000 DEVICE_VARS += LOADER_FLASH_OFFS LOADER_TYPE +DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID +DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION define Build/combined-image sh $(TOPDIR)/scripts/combined-image.sh \ diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk index d4f43bbaca..8a74fdc0c9 100644 --- a/target/linux/ath79/image/common-netgear.mk +++ b/target/linux/ath79/image/common-netgear.mk @@ -1,5 +1,3 @@ -DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID - define Build/netgear-rootfs mkimage \ -A mips -O linux -T filesystem -C none \ diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 37fcb36937..abf269a8ce 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,5 +1,3 @@ -DEVICE_VARS += RAS_ROOTFS_SIZE RAS_BOARD RAS_VERSION - # attention: only zlib compression is allowed for the boot fs define Build/zyxel-buildkerneljffs rm -rf $(KDIR_TMP)/zyxelnbg6716 diff --git a/target/linux/bcm27xx/Makefile b/target/linux/bcm27xx/Makefile index 3bf4ec4858..c68592a9d4 100644 --- a/target/linux/bcm27xx/Makefile +++ b/target/linux/bcm27xx/Makefile @@ -1,10 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2020 OpenWrt.org # Copyright (C) 2017 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/bcm27xx/image/Makefile b/target/linux/bcm27xx/image/Makefile index ec0255bc0d..fbef5ecbf4 100644 --- a/target/linux/bcm27xx/image/Makefile +++ b/target/linux/bcm27xx/image/Makefile @@ -1,10 +1,8 @@ -# +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2012-2019 OpenWrt.org # Copyright (C) 2016-2017 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/bcm27xx/modules.mk b/target/linux/bcm27xx/modules.mk index 480509193f..ec2b4edbd2 100644 --- a/target/linux/bcm27xx/modules.mk +++ b/target/linux/bcm27xx/modules.mk @@ -1,8 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/target/linux/bcm27xx/modules/*.mk diff --git a/target/linux/bcm27xx/modules/hwmon.mk b/target/linux/bcm27xx/modules/hwmon.mk index 5081cee1d3..316f0b8419 100644 --- a/target/linux/bcm27xx/modules/hwmon.mk +++ b/target/linux/bcm27xx/modules/hwmon.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/hwmon-raspberrypi TITLE:=Raspberry Pi voltage monitor diff --git a/target/linux/bcm27xx/modules/i2c.mk b/target/linux/bcm27xx/modules/i2c.mk index 15beac41e5..ba266b29f2 100644 --- a/target/linux/bcm27xx/modules/i2c.mk +++ b/target/linux/bcm27xx/modules/i2c.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# I2C_BCM2835_MODULES:=\ CONFIG_I2C_BCM2835:drivers/i2c/busses/i2c-bcm2835 diff --git a/target/linux/bcm27xx/modules/other.mk b/target/linux/bcm27xx/modules/other.mk index 54e12c7bb9..2d4aa3c079 100644 --- a/target/linux/bcm27xx/modules/other.mk +++ b/target/linux/bcm27xx/modules/other.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/pwm-bcm2835 SUBMENU:=$(OTHER_MENU) diff --git a/target/linux/bcm27xx/modules/sound.mk b/target/linux/bcm27xx/modules/sound.mk index a4aeb629c3..8c6f1bf49c 100644 --- a/target/linux/bcm27xx/modules/sound.mk +++ b/target/linux/bcm27xx/modules/sound.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/sound-arm-bcm2835 TITLE:=BCM2835 ALSA driver diff --git a/target/linux/bcm27xx/modules/spi.mk b/target/linux/bcm27xx/modules/spi.mk index 8840852149..948978dd44 100644 --- a/target/linux/bcm27xx/modules/spi.mk +++ b/target/linux/bcm27xx/modules/spi.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/spi-bcm2835 SUBMENU:=$(SPI_MENU) diff --git a/target/linux/bcm27xx/modules/video.mk b/target/linux/bcm27xx/modules/video.mk index f7286cee3c..2eff4a45d5 100644 --- a/target/linux/bcm27xx/modules/video.mk +++ b/target/linux/bcm27xx/modules/video.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2019 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/camera-bcm2835 TITLE:=BCM2835 Camera diff --git a/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch index e3c7c30389..a125fdcb47 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch @@ -85,6 +85,6 @@ Signed-off-by: Jonathan Bell #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_EP_CTX_BROKEN_DCS BIT_ULL(36) + #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - unsigned int num_active_eps; diff --git a/target/linux/bcm27xx/patches-5.4/950-0316-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch b/target/linux/bcm27xx/patches-5.4/950-0316-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch index 0fb5c12ac3..d36f3eb802 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0316-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0316-kbuild-Allow-.dtbo-overlays-to-be-built-piecemeal.patch @@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell --- a/Makefile +++ b/Makefile -@@ -1267,6 +1267,9 @@ ifneq ($(dtstree),) +@@ -1261,6 +1261,9 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ diff --git a/target/linux/bcm27xx/patches-5.4/950-0460-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch b/target/linux/bcm27xx/patches-5.4/950-0460-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch index a33cfe7142..b1cd7bffbe 100644 --- a/target/linux/bcm27xx/patches-5.4/950-0460-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch +++ b/target/linux/bcm27xx/patches-5.4/950-0460-Kbuild-Allow-.dtbo-overlays-to-be-built-adjust.patch @@ -15,7 +15,7 @@ Signed-off-by: Nataliya Korovkina --- a/Makefile +++ b/Makefile -@@ -1267,7 +1267,7 @@ ifneq ($(dtstree),) +@@ -1261,7 +1261,7 @@ ifneq ($(dtstree),) %.dtb: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ diff --git a/target/linux/bcm47xx/Makefile b/target/linux/bcm47xx/Makefile index 6be852919c..9ffd4f3f29 100644 --- a/target/linux/bcm47xx/Makefile +++ b/target/linux/bcm47xx/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2008 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mipsel diff --git a/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk b/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk index 4c420fb299..8ff95b4dd9 100644 --- a/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/100-Broadcom-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b43 NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default) diff --git a/target/linux/bcm47xx/generic/profiles/101-Broadcom-wl.mk b/target/linux/bcm47xx/generic/profiles/101-Broadcom-wl.mk index db0a31d6ca..498bc7bfda 100644 --- a/target/linux/bcm47xx/generic/profiles/101-Broadcom-wl.mk +++ b/target/linux/bcm47xx/generic/profiles/101-Broadcom-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-wl NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (wl, proprietary) diff --git a/target/linux/bcm47xx/generic/profiles/104-Broadcom-ath5k.mk b/target/linux/bcm47xx/generic/profiles/104-Broadcom-ath5k.mk index ca5295f7e3..e66b251691 100644 --- a/target/linux/bcm47xx/generic/profiles/104-Broadcom-ath5k.mk +++ b/target/linux/bcm47xx/generic/profiles/104-Broadcom-ath5k.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-ath5k NAME:=Broadcom SoC, all Ethernet, Atheros WiFi (ath5k) diff --git a/target/linux/bcm47xx/generic/profiles/105-Broadcom-none.mk b/target/linux/bcm47xx/generic/profiles/105-Broadcom-none.mk index 9c66d57967..0b883825d0 100644 --- a/target/linux/bcm47xx/generic/profiles/105-Broadcom-none.mk +++ b/target/linux/bcm47xx/generic/profiles/105-Broadcom-none.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-none NAME:=Broadcom SoC, all Ethernet, No WiFi diff --git a/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk b/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk index 662a7c8e94..0231bff642 100644 --- a/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/200-Broadcom-b44-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b44-b43 NAME:=Broadcom SoC, b44 Ethernet, BCM43xx WiFi (b43, default) diff --git a/target/linux/bcm47xx/generic/profiles/201-Broadcom-b44-wl.mk b/target/linux/bcm47xx/generic/profiles/201-Broadcom-b44-wl.mk index fe6c2d8f87..5d55398dfc 100644 --- a/target/linux/bcm47xx/generic/profiles/201-Broadcom-b44-wl.mk +++ b/target/linux/bcm47xx/generic/profiles/201-Broadcom-b44-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b44-wl NAME:=Broadcom SoC, b44 Ethernet, BCM43xx WiFi (wl, proprietary) diff --git a/target/linux/bcm47xx/generic/profiles/204-Broadcom-b44-ath5k.mk b/target/linux/bcm47xx/generic/profiles/204-Broadcom-b44-ath5k.mk index e9dda49d66..fd9ee6fd15 100644 --- a/target/linux/bcm47xx/generic/profiles/204-Broadcom-b44-ath5k.mk +++ b/target/linux/bcm47xx/generic/profiles/204-Broadcom-b44-ath5k.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b44-ath5k NAME:=Broadcom SoC, b44 Ethernet, Atheros WiFi (ath5k) diff --git a/target/linux/bcm47xx/generic/profiles/205-Broadcom-b44-none.mk b/target/linux/bcm47xx/generic/profiles/205-Broadcom-b44-none.mk index 6c409057cc..79a223a316 100644 --- a/target/linux/bcm47xx/generic/profiles/205-Broadcom-b44-none.mk +++ b/target/linux/bcm47xx/generic/profiles/205-Broadcom-b44-none.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b44-none NAME:=Broadcom SoC, b44 Ethernet, No WiFi diff --git a/target/linux/bcm47xx/generic/profiles/210-Broadcom-tg3-b43.mk b/target/linux/bcm47xx/generic/profiles/210-Broadcom-tg3-b43.mk index a0bece914d..69c59c503f 100644 --- a/target/linux/bcm47xx/generic/profiles/210-Broadcom-tg3-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/210-Broadcom-tg3-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-tg3-b43 NAME:=Broadcom SoC, tg3 Ethernet, BCM43xx WiFi (b43) diff --git a/target/linux/bcm47xx/generic/profiles/211-Broadcom-tg3-wl.mk b/target/linux/bcm47xx/generic/profiles/211-Broadcom-tg3-wl.mk index 20acd75bc5..f594027662 100644 --- a/target/linux/bcm47xx/generic/profiles/211-Broadcom-tg3-wl.mk +++ b/target/linux/bcm47xx/generic/profiles/211-Broadcom-tg3-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-tg3-wl NAME:=Broadcom SoC, tg3 Ethernet, BCM43xx WiFi (wl, proprietary) diff --git a/target/linux/bcm47xx/generic/profiles/215-Broadcom-tg3-none.mk b/target/linux/bcm47xx/generic/profiles/215-Broadcom-tg3-none.mk index 7974279bc4..a75e49cb05 100644 --- a/target/linux/bcm47xx/generic/profiles/215-Broadcom-tg3-none.mk +++ b/target/linux/bcm47xx/generic/profiles/215-Broadcom-tg3-none.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-tg3-none NAME:=Broadcom SoC, tg3 Ethernet, no WiFi diff --git a/target/linux/bcm47xx/generic/profiles/220-Broadcom-bgmac-b43.mk b/target/linux/bcm47xx/generic/profiles/220-Broadcom-bgmac-b43.mk index 6ef0691a4c..4d05421c8e 100644 --- a/target/linux/bcm47xx/generic/profiles/220-Broadcom-bgmac-b43.mk +++ b/target/linux/bcm47xx/generic/profiles/220-Broadcom-bgmac-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-bgmac-b43 NAME:=Broadcom SoC, bgmac Ethernet, BCM43xx WiFi (b43) diff --git a/target/linux/bcm47xx/generic/profiles/221-Broadcom-bgmac-wl.mk b/target/linux/bcm47xx/generic/profiles/221-Broadcom-bgmac-wl.mk index bb7e7c2c9c..b426b99d37 100644 --- a/target/linux/bcm47xx/generic/profiles/221-Broadcom-bgmac-wl.mk +++ b/target/linux/bcm47xx/generic/profiles/221-Broadcom-bgmac-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-bgmac-wl NAME:=Broadcom SoC, bgmac Ethernet, BCM43xx WiFi (wl, proprietary) diff --git a/target/linux/bcm47xx/generic/profiles/225-Broadcom-bgmac-none.mk b/target/linux/bcm47xx/generic/profiles/225-Broadcom-bgmac-none.mk index 77299cd501..8ce675543e 100644 --- a/target/linux/bcm47xx/generic/profiles/225-Broadcom-bgmac-none.mk +++ b/target/linux/bcm47xx/generic/profiles/225-Broadcom-bgmac-none.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-bgmac-none NAME:=Broadcom SoC, bgmac Ethernet, No WiFi diff --git a/target/linux/bcm47xx/generic/profiles/226-Broadcom-bgmac-brcsmac.mk b/target/linux/bcm47xx/generic/profiles/226-Broadcom-bgmac-brcsmac.mk index d9dc9e7a4a..93a76dc32c 100644 --- a/target/linux/bcm47xx/generic/profiles/226-Broadcom-bgmac-brcsmac.mk +++ b/target/linux/bcm47xx/generic/profiles/226-Broadcom-bgmac-brcsmac.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-bgmac-brcmsmac NAME:=Broadcom SoC, bgmac Ethernet, BCM43xx WiFi (brcmsmac) diff --git a/target/linux/bcm47xx/generic/profiles/PS-1208MFG.mk b/target/linux/bcm47xx/generic/profiles/PS-1208MFG.mk index 90c2688c8e..88b417840a 100644 --- a/target/linux/bcm47xx/generic/profiles/PS-1208MFG.mk +++ b/target/linux/bcm47xx/generic/profiles/PS-1208MFG.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Ps1208mfg NAME:=Edimax PS-1208MFG diff --git a/target/linux/bcm47xx/image/Makefile b/target/linux/bcm47xx/image/Makefile index e08a3125bd..2aeef178a4 100644 --- a/target/linux/bcm47xx/image/Makefile +++ b/target/linux/bcm47xx/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk b/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk index 50d777010b..c54f11bb89 100644 --- a/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk +++ b/target/linux/bcm47xx/legacy/profiles/100-Broadcom-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-b43 NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (b43, default) diff --git a/target/linux/bcm47xx/legacy/profiles/101-Broadcom-wl.mk b/target/linux/bcm47xx/legacy/profiles/101-Broadcom-wl.mk index 26bbacf3be..a4c58f6334 100644 --- a/target/linux/bcm47xx/legacy/profiles/101-Broadcom-wl.mk +++ b/target/linux/bcm47xx/legacy/profiles/101-Broadcom-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-wl NAME:=Broadcom SoC, all Ethernet, BCM43xx WiFi (wl, proprietary) diff --git a/target/linux/bcm47xx/mips74k/profiles/100-Broadcom-b43.mk b/target/linux/bcm47xx/mips74k/profiles/100-Broadcom-b43.mk index bd3b010f69..b91179cf2a 100644 --- a/target/linux/bcm47xx/mips74k/profiles/100-Broadcom-b43.mk +++ b/target/linux/bcm47xx/mips74k/profiles/100-Broadcom-b43.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-mips74k-b43 NAME:=Broadcom SoC, BCM43xx WiFi (b43) diff --git a/target/linux/bcm47xx/mips74k/profiles/101-Broadcom-brcsmac.mk b/target/linux/bcm47xx/mips74k/profiles/101-Broadcom-brcsmac.mk index a138ef93b0..e31b37278d 100644 --- a/target/linux/bcm47xx/mips74k/profiles/101-Broadcom-brcsmac.mk +++ b/target/linux/bcm47xx/mips74k/profiles/101-Broadcom-brcsmac.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-mips74k-brcmsmac NAME:=Broadcom SoC, BCM43xx WiFi (brcmsmac) diff --git a/target/linux/bcm47xx/mips74k/profiles/102-Broadcom-wl.mk b/target/linux/bcm47xx/mips74k/profiles/102-Broadcom-wl.mk index 8f60c7ee32..66a44dc0fb 100644 --- a/target/linux/bcm47xx/mips74k/profiles/102-Broadcom-wl.mk +++ b/target/linux/bcm47xx/mips74k/profiles/102-Broadcom-wl.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-mips74k-wl NAME:=Broadcom SoC, BCM43xx WiFi (proprietary wl) diff --git a/target/linux/bcm47xx/mips74k/profiles/103-Broadcom-none.mk b/target/linux/bcm47xx/mips74k/profiles/103-Broadcom-none.mk index 66e9a9f0f7..d5e3f57fcd 100644 --- a/target/linux/bcm47xx/mips74k/profiles/103-Broadcom-none.mk +++ b/target/linux/bcm47xx/mips74k/profiles/103-Broadcom-none.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Broadcom-mips74k-none NAME:=Broadcom SoC, No WiFi diff --git a/target/linux/bcm47xx/modules.mk b/target/linux/bcm47xx/modules.mk index cd46901a3b..5924694a53 100644 --- a/target/linux/bcm47xx/modules.mk +++ b/target/linux/bcm47xx/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2012 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/bgmac TITLE:=Broadcom bgmac driver diff --git a/target/linux/bcm4908/config-5.4 b/target/linux/bcm4908/config-5.4 index 2a3cd647fc..a3cca74c76 100644 --- a/target/linux/bcm4908/config-5.4 +++ b/target/linux/bcm4908/config-5.4 @@ -40,7 +40,7 @@ CONFIG_B53=y # CONFIG_B53_MMAP_DRIVER is not set # CONFIG_B53_SERDES is not set # CONFIG_B53_SRAB_DRIVER is not set -CONFIG_BCM4908ENET=y +CONFIG_BCM4908_ENET=y CONFIG_BCM7XXX_PHY=y CONFIG_BCM_NET_PHYLIB=y CONFIG_BCM_PMB=y diff --git a/target/linux/bcm4908/patches-5.4/170-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch b/target/linux/bcm4908/patches-5.4/072-v5.12-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch similarity index 81% rename from target/linux/bcm4908/patches-5.4/170-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch rename to target/linux/bcm4908/patches-5.4/072-v5.12-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch index 4c0f44199b..8c60b9706e 100644 --- a/target/linux/bcm4908/patches-5.4/170-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch +++ b/target/linux/bcm4908/patches-5.4/072-v5.12-0001-dt-bindings-net-document-BCM4908-Ethernet-controller.patch @@ -1,10 +1,15 @@ +From 387d1c1819790aa8398c7cffab587f9a050a0d1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 5 Feb 2021 21:57:41 +0100 -Subject: [PATCH 1/2] dt-bindings: net: document BCM4908 Ethernet controller +Date: Sun, 7 Feb 2021 23:26:31 +0100 +Subject: [PATCH] dt-bindings: net: document BCM4908 Ethernet controller +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit BCM4908 is a family of SoCs with integrated Ethernet controller. Signed-off-by: Rafał Miłecki +Signed-off-by: David S. Miller --- .../bindings/net/brcm,bcm4908enet.yaml | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/target/linux/bcm4908/patches-5.4/170-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch b/target/linux/bcm4908/patches-5.4/072-v5.12-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch similarity index 98% rename from target/linux/bcm4908/patches-5.4/170-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch rename to target/linux/bcm4908/patches-5.4/072-v5.12-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch index 5b2084e80c..adef3d87ac 100644 --- a/target/linux/bcm4908/patches-5.4/170-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch +++ b/target/linux/bcm4908/patches-5.4/072-v5.12-0002-net-broadcom-bcm4908enet-add-BCM4908-controller-driv.patch @@ -1,12 +1,17 @@ +From 4feffeadbcb2e5b11cbbf191a33c245b74a5837b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Date: Fri, 5 Feb 2021 21:59:51 +0100 -Subject: [PATCH 2/2] net: broadcom: bcm4908enet: add BCM4908 controller driver +Date: Sun, 7 Feb 2021 23:26:32 +0100 +Subject: [PATCH] net: broadcom: bcm4908enet: add BCM4908 controller driver +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit BCM4908 SoCs family uses Ethernel controller that includes UniMAC but uses different DMA engine (than other controllers) and requires different programming. Signed-off-by: Rafał Miłecki +Signed-off-by: David S. Miller --- MAINTAINERS | 9 + drivers/net/ethernet/broadcom/Kconfig | 8 + diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0001-dt-bindings-net-rename-BCM4908-Ethernet-binding.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0001-dt-bindings-net-rename-BCM4908-Ethernet-binding.patch new file mode 100644 index 0000000000..df3fca624a --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0001-dt-bindings-net-rename-BCM4908-Ethernet-binding.patch @@ -0,0 +1,128 @@ +From 6710c5b0674f8811f7d8fbfc526684e7ed77f765 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:32 +0100 +Subject: [PATCH] dt-bindings: net: rename BCM4908 Ethernet binding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Rob pointed out that a normal convention is "brcm,bcm4908-enet" so +update whole binding to match it. + +Suggested-by: Rob Herring +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + .../net/{brcm,bcm4908enet.yaml => brcm,bcm4908-enet.yaml} | 6 +++--- + MAINTAINERS | 2 +- + 2 files changed, 4 insertions(+), 4 deletions(-) + rename Documentation/devicetree/bindings/net/{brcm,bcm4908enet.yaml => brcm,bcm4908-enet.yaml} (85%) + +--- a/Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml ++++ /dev/null +@@ -1,45 +0,0 @@ +-# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +-%YAML 1.2 +---- +-$id: http://devicetree.org/schemas/net/brcm,bcm4908enet.yaml# +-$schema: http://devicetree.org/meta-schemas/core.yaml# +- +-title: Broadcom BCM4908 Ethernet controller +- +-description: Broadcom's Ethernet controller integrated into BCM4908 family SoCs +- +-maintainers: +- - Rafał Miłecki +- +-properties: +- compatible: +- const: brcm,bcm4908enet +- +- reg: +- maxItems: 1 +- +- interrupts: +- description: RX interrupt +- +- interrupt-names: +- const: rx +- +-required: +- - reg +- - interrupts +- - interrupt-names +- +-additionalProperties: false +- +-examples: +- - | +- #include +- #include +- +- ethernet@80002000 { +- compatible = "brcm,bcm4908enet"; +- reg = <0x80002000 0x1000>; +- +- interrupts = ; +- interrupt-names = "rx"; +- }; +--- /dev/null ++++ b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml +@@ -0,0 +1,45 @@ ++# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause ++%YAML 1.2 ++--- ++$id: http://devicetree.org/schemas/net/brcm,bcm4908-enet.yaml# ++$schema: http://devicetree.org/meta-schemas/core.yaml# ++ ++title: Broadcom BCM4908 Ethernet controller ++ ++description: Broadcom's Ethernet controller integrated into BCM4908 family SoCs ++ ++maintainers: ++ - Rafał Miłecki ++ ++properties: ++ compatible: ++ const: brcm,bcm4908-enet ++ ++ reg: ++ maxItems: 1 ++ ++ interrupts: ++ description: RX interrupt ++ ++ interrupt-names: ++ const: rx ++ ++required: ++ - reg ++ - interrupts ++ - interrupt-names ++ ++additionalProperties: false ++ ++examples: ++ - | ++ #include ++ #include ++ ++ ethernet@80002000 { ++ compatible = "brcm,bcm4908-enet"; ++ reg = <0x80002000 0x1000>; ++ ++ interrupts = ; ++ interrupt-names = "rx"; ++ }; +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -3212,7 +3212,7 @@ M: Rafał Miłecki + M: bcm-kernel-feedback-list@broadcom.com + L: netdev@vger.kernel.org + S: Maintained +-F: Documentation/devicetree/bindings/net/brcm,bcm4908enet.yaml ++F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml + F: drivers/net/ethernet/broadcom/bcm4908enet.* + F: drivers/net/ethernet/broadcom/unimac.h + diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0002-dt-bindings-net-bcm4908-enet-include-ethernet-contro.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0002-dt-bindings-net-bcm4908-enet-include-ethernet-contro.patch new file mode 100644 index 0000000000..a4409a818a --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0002-dt-bindings-net-bcm4908-enet-include-ethernet-contro.patch @@ -0,0 +1,32 @@ +From f08b5cf1eb1f2aefc6fe4a89c8c757ba94721d0b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:33 +0100 +Subject: [PATCH] dt-bindings: net: bcm4908-enet: include + ethernet-controller.yaml +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It should be /included/ by every Ethernet controller binding. It adds +support for various generic properties. + +Suggested-by: Rob Herring +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml ++++ b/Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml +@@ -11,6 +11,9 @@ description: Broadcom's Ethernet control + maintainers: + - Rafał Miłecki + ++allOf: ++ - $ref: ethernet-controller.yaml# ++ + properties: + compatible: + const: brcm,bcm4908-enet diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0003-net-broadcom-rename-BCM4908-driver-update-DT-binding.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0003-net-broadcom-rename-BCM4908-driver-update-DT-binding.patch new file mode 100644 index 0000000000..603d4c9c0c --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0003-net-broadcom-rename-BCM4908-driver-update-DT-binding.patch @@ -0,0 +1,1614 @@ +From 9d61d138ab30bbfe4a8609853c81e881c4054a0b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:34 +0100 +Subject: [PATCH] net: broadcom: rename BCM4908 driver & update DT binding +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +compatible string was updated to match normal naming convention so +update driver as well + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + MAINTAINERS | 2 +- + drivers/net/ethernet/broadcom/Kconfig | 2 +- + drivers/net/ethernet/broadcom/Makefile | 2 +- + .../{bcm4908enet.c => bcm4908_enet.c} | 215 +++++++++--------- + .../{bcm4908enet.h => bcm4908_enet.h} | 4 +- + 5 files changed, 113 insertions(+), 112 deletions(-) + rename drivers/net/ethernet/broadcom/{bcm4908enet.c => bcm4908_enet.c} (68%) + rename drivers/net/ethernet/broadcom/{bcm4908enet.h => bcm4908_enet.h} (98%) + +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -3213,7 +3213,7 @@ M: bcm-kernel-feedback-list@broadcom.com + L: netdev@vger.kernel.org + S: Maintained + F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml +-F: drivers/net/ethernet/broadcom/bcm4908enet.* ++F: drivers/net/ethernet/broadcom/bcm4908_enet.* + F: drivers/net/ethernet/broadcom/unimac.h + + BROADCOM BCM5301X ARM ARCHITECTURE +--- a/drivers/net/ethernet/broadcom/Kconfig ++++ b/drivers/net/ethernet/broadcom/Kconfig +@@ -51,7 +51,7 @@ config B44_PCI + depends on B44_PCI_AUTOSELECT && B44_PCICORE_AUTOSELECT + default y + +-config BCM4908ENET ++config BCM4908_ENET + tristate "Broadcom BCM4908 internal mac support" + depends on ARCH_BCM4908 || COMPILE_TEST + default y +--- a/drivers/net/ethernet/broadcom/Makefile ++++ b/drivers/net/ethernet/broadcom/Makefile +@@ -4,7 +4,7 @@ + # + + obj-$(CONFIG_B44) += b44.o +-obj-$(CONFIG_BCM4908ENET) += bcm4908enet.o ++obj-$(CONFIG_BCM4908_ENET) += bcm4908_enet.o + obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o + obj-$(CONFIG_BCMGENET) += genet/ + obj-$(CONFIG_BNX2) += bnx2.o +--- a/drivers/net/ethernet/broadcom/bcm4908enet.c ++++ /dev/null +@@ -1,676 +0,0 @@ +-// SPDX-License-Identifier: GPL-2.0-only +-/* +- * Copyright (C) 2021 Rafał Miłecki +- */ +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include "bcm4908enet.h" +-#include "unimac.h" +- +-#define ENET_DMA_CH_RX_CFG ENET_DMA_CH0_CFG +-#define ENET_DMA_CH_TX_CFG ENET_DMA_CH1_CFG +-#define ENET_DMA_CH_RX_STATE_RAM ENET_DMA_CH0_STATE_RAM +-#define ENET_DMA_CH_TX_STATE_RAM ENET_DMA_CH1_STATE_RAM +- +-#define ENET_TX_BDS_NUM 200 +-#define ENET_RX_BDS_NUM 200 +-#define ENET_RX_BDS_NUM_MAX 8192 +- +-#define ENET_DMA_INT_DEFAULTS (ENET_DMA_CH_CFG_INT_DONE | \ +- ENET_DMA_CH_CFG_INT_NO_DESC | \ +- ENET_DMA_CH_CFG_INT_BUFF_DONE) +-#define ENET_DMA_MAX_BURST_LEN 8 /* in 64 bit words */ +- +-#define ENET_MTU_MIN 60 +-#define ENET_MTU_MAX 1500 /* Is it possible to support 2044? */ +-#define ENET_MTU_MAX_EXTRA_SIZE 32 /* L2 */ +- +-struct bcm4908enet_dma_ring_bd { +- __le32 ctl; +- __le32 addr; +-} __packed; +- +-struct bcm4908enet_dma_ring_slot { +- struct sk_buff *skb; +- unsigned int len; +- dma_addr_t dma_addr; +-}; +- +-struct bcm4908enet_dma_ring { +- int is_tx; +- int read_idx; +- int write_idx; +- int length; +- u16 cfg_block; +- u16 st_ram_block; +- +- union { +- void *cpu_addr; +- struct bcm4908enet_dma_ring_bd *buf_desc; +- }; +- dma_addr_t dma_addr; +- +- struct bcm4908enet_dma_ring_slot *slots; +-}; +- +-struct bcm4908enet { +- struct device *dev; +- struct net_device *netdev; +- struct napi_struct napi; +- void __iomem *base; +- +- struct bcm4908enet_dma_ring tx_ring; +- struct bcm4908enet_dma_ring rx_ring; +-}; +- +-/*** +- * R/W ops +- */ +- +-static inline u32 enet_read(struct bcm4908enet *enet, u16 offset) +-{ +- return readl(enet->base + offset); +-} +- +-static inline void enet_write(struct bcm4908enet *enet, u16 offset, u32 value) +-{ +- writel(value, enet->base + offset); +-} +- +-static inline void enet_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set) +-{ +- u32 val; +- +- WARN_ON(set & ~mask); +- +- val = enet_read(enet, offset); +- val = (val & ~mask) | (set & mask); +- enet_write(enet, offset, val); +-} +- +-static inline void enet_set(struct bcm4908enet *enet, u16 offset, u32 set) +-{ +- enet_maskset(enet, offset, set, set); +-} +- +-static inline u32 enet_umac_read(struct bcm4908enet *enet, u16 offset) +-{ +- return enet_read(enet, ENET_UNIMAC + offset); +-} +- +-static inline void enet_umac_write(struct bcm4908enet *enet, u16 offset, u32 value) +-{ +- enet_write(enet, ENET_UNIMAC + offset, value); +-} +- +-static inline void enet_umac_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set) +-{ +- enet_maskset(enet, ENET_UNIMAC + offset, mask, set); +-} +- +-static inline void enet_umac_set(struct bcm4908enet *enet, u16 offset, u32 set) +-{ +- enet_set(enet, ENET_UNIMAC + offset, set); +-} +- +-/*** +- * Helpers +- */ +- +-static void bcm4908enet_intrs_on(struct bcm4908enet *enet) +-{ +- enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, ENET_DMA_INT_DEFAULTS); +-} +- +-static void bcm4908enet_intrs_off(struct bcm4908enet *enet) +-{ +- enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, 0); +-} +- +-static void bcm4908enet_intrs_ack(struct bcm4908enet *enet) +-{ +- enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_STAT, ENET_DMA_INT_DEFAULTS); +-} +- +-/*** +- * DMA +- */ +- +-static int bcm4908_dma_alloc_buf_descs(struct bcm4908enet *enet, struct bcm4908enet_dma_ring *ring) +-{ +- int size = ring->length * sizeof(struct bcm4908enet_dma_ring_bd); +- struct device *dev = enet->dev; +- +- ring->cpu_addr = dma_alloc_coherent(dev, size, &ring->dma_addr, GFP_KERNEL); +- if (!ring->cpu_addr) +- return -ENOMEM; +- +- if (((uintptr_t)ring->cpu_addr) & (0x40 - 1)) { +- dev_err(dev, "Invalid DMA ring alignment\n"); +- goto err_free_buf_descs; +- } +- +- ring->slots = kzalloc(ring->length * sizeof(*ring->slots), GFP_KERNEL); +- if (!ring->slots) +- goto err_free_buf_descs; +- +- memset(ring->cpu_addr, 0, size); +- +- ring->read_idx = 0; +- ring->write_idx = 0; +- +- return 0; +- +-err_free_buf_descs: +- dma_free_coherent(dev, size, ring->cpu_addr, ring->dma_addr); +- return -ENOMEM; +-} +- +-static void bcm4908enet_dma_free(struct bcm4908enet *enet) +-{ +- struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring; +- struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; +- struct device *dev = enet->dev; +- int size; +- +- size = rx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd); +- if (rx_ring->cpu_addr) +- dma_free_coherent(dev, size, rx_ring->cpu_addr, rx_ring->dma_addr); +- kfree(rx_ring->slots); +- +- size = tx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd); +- if (tx_ring->cpu_addr) +- dma_free_coherent(dev, size, tx_ring->cpu_addr, tx_ring->dma_addr); +- kfree(tx_ring->slots); +-} +- +-static int bcm4908enet_dma_alloc(struct bcm4908enet *enet) +-{ +- struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring; +- struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; +- struct device *dev = enet->dev; +- int err; +- +- tx_ring->length = ENET_TX_BDS_NUM; +- tx_ring->is_tx = 1; +- tx_ring->cfg_block = ENET_DMA_CH_TX_CFG; +- tx_ring->st_ram_block = ENET_DMA_CH_TX_STATE_RAM; +- err = bcm4908_dma_alloc_buf_descs(enet, tx_ring); +- if (err) { +- dev_err(dev, "Failed to alloc TX buf descriptors: %d\n", err); +- return err; +- } +- +- rx_ring->length = ENET_RX_BDS_NUM; +- rx_ring->is_tx = 0; +- rx_ring->cfg_block = ENET_DMA_CH_RX_CFG; +- rx_ring->st_ram_block = ENET_DMA_CH_RX_STATE_RAM; +- err = bcm4908_dma_alloc_buf_descs(enet, rx_ring); +- if (err) { +- dev_err(dev, "Failed to alloc RX buf descriptors: %d\n", err); +- bcm4908enet_dma_free(enet); +- return err; +- } +- +- return 0; +-} +- +-static void bcm4908enet_dma_reset(struct bcm4908enet *enet) +-{ +- struct bcm4908enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; +- int i; +- +- /* Disable the DMA controller and channel */ +- for (i = 0; i < ARRAY_SIZE(rings); i++) +- enet_write(enet, rings[i]->cfg_block + ENET_DMA_CH_CFG, 0); +- enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN, 0); +- +- /* Reset channels state */ +- for (i = 0; i < ARRAY_SIZE(rings); i++) { +- struct bcm4908enet_dma_ring *ring = rings[i]; +- +- enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, 0); +- enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_STATE_DATA, 0); +- enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_DESC_LEN_STATUS, 0); +- enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_DESC_BASE_BUFPTR, 0); +- } +-} +- +-static int bcm4908enet_dma_alloc_rx_buf(struct bcm4908enet *enet, unsigned int idx) +-{ +- struct bcm4908enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx]; +- struct bcm4908enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx]; +- struct device *dev = enet->dev; +- u32 tmp; +- int err; +- +- slot->len = ENET_MTU_MAX + ENET_MTU_MAX_EXTRA_SIZE; +- +- slot->skb = netdev_alloc_skb(enet->netdev, slot->len); +- if (!slot->skb) +- return -ENOMEM; +- +- slot->dma_addr = dma_map_single(dev, slot->skb->data, slot->len, DMA_FROM_DEVICE); +- err = dma_mapping_error(dev, slot->dma_addr); +- if (err) { +- dev_err(dev, "Failed to map DMA buffer: %d\n", err); +- kfree_skb(slot->skb); +- slot->skb = NULL; +- return err; +- } +- +- tmp = slot->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; +- tmp |= DMA_CTL_STATUS_OWN; +- if (idx == enet->rx_ring.length - 1) +- tmp |= DMA_CTL_STATUS_WRAP; +- buf_desc->ctl = cpu_to_le32(tmp); +- buf_desc->addr = cpu_to_le32(slot->dma_addr); +- +- return 0; +-} +- +-static void bcm4908enet_dma_ring_init(struct bcm4908enet *enet, +- struct bcm4908enet_dma_ring *ring) +-{ +- int reset_channel = 0; /* We support only 1 main channel (with TX and RX) */ +- int reset_subch = ring->is_tx ? 1 : 0; +- +- /* Reset the DMA channel */ +- enet_write(enet, ENET_DMA_CTRL_CHANNEL_RESET, BIT(reset_channel * 2 + reset_subch)); +- enet_write(enet, ENET_DMA_CTRL_CHANNEL_RESET, 0); +- +- enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0); +- enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG_MAX_BURST, ENET_DMA_MAX_BURST_LEN); +- enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG_INT_MASK, 0); +- +- enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, +- (uint32_t)ring->dma_addr); +-} +- +-static void bcm4908enet_dma_uninit(struct bcm4908enet *enet) +-{ +- struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; +- struct bcm4908enet_dma_ring_slot *slot; +- struct device *dev = enet->dev; +- int i; +- +- for (i = rx_ring->length - 1; i >= 0; i--) { +- slot = &rx_ring->slots[i]; +- if (!slot->skb) +- continue; +- dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_FROM_DEVICE); +- kfree_skb(slot->skb); +- slot->skb = NULL; +- } +-} +- +-static int bcm4908enet_dma_init(struct bcm4908enet *enet) +-{ +- struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring; +- struct device *dev = enet->dev; +- int err; +- int i; +- +- for (i = 0; i < rx_ring->length; i++) { +- err = bcm4908enet_dma_alloc_rx_buf(enet, i); +- if (err) { +- dev_err(dev, "Failed to alloc RX buffer: %d\n", err); +- bcm4908enet_dma_uninit(enet); +- return err; +- } +- } +- +- bcm4908enet_dma_ring_init(enet, &enet->tx_ring); +- bcm4908enet_dma_ring_init(enet, &enet->rx_ring); +- +- return 0; +-} +- +-static void bcm4908enet_dma_tx_ring_ensable(struct bcm4908enet *enet, +- struct bcm4908enet_dma_ring *ring) +-{ +- enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); +-} +- +-static void bcm4908enet_dma_tx_ring_disable(struct bcm4908enet *enet, +- struct bcm4908enet_dma_ring *ring) +-{ +- enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0); +-} +- +-static void bcm4908enet_dma_rx_ring_enable(struct bcm4908enet *enet, +- struct bcm4908enet_dma_ring *ring) +-{ +- enet_set(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); +-} +- +-static void bcm4908enet_dma_rx_ring_disable(struct bcm4908enet *enet, +- struct bcm4908enet_dma_ring *ring) +-{ +- unsigned long deadline; +- u32 tmp; +- +- enet_maskset(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE, 0); +- +- deadline = jiffies + usecs_to_jiffies(2000); +- do { +- tmp = enet_read(enet, ring->cfg_block + ENET_DMA_CH_CFG); +- if (!(tmp & ENET_DMA_CH_CFG_ENABLE)) +- return; +- enet_maskset(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE, 0); +- usleep_range(10, 30); +- } while (!time_after_eq(jiffies, deadline)); +- +- dev_warn(enet->dev, "Timeout waiting for DMA TX stop\n"); +-} +- +-/*** +- * Ethernet driver +- */ +- +-static void bcm4908enet_gmac_init(struct bcm4908enet *enet) +-{ +- u32 cmd; +- +- cmd = enet_umac_read(enet, UMAC_CMD); +- enet_umac_write(enet, UMAC_CMD, cmd | CMD_SW_RESET); +- enet_umac_write(enet, UMAC_CMD, cmd & ~CMD_SW_RESET); +- +- enet_set(enet, ENET_FLUSH, ENET_FLUSH_RXFIFO_FLUSH | ENET_FLUSH_TXFIFO_FLUSH); +- enet_maskset(enet, ENET_FLUSH, ENET_FLUSH_RXFIFO_FLUSH | ENET_FLUSH_TXFIFO_FLUSH, 0); +- +- enet_set(enet, ENET_MIB_CTRL, ENET_MIB_CTRL_CLR_MIB); +- enet_maskset(enet, ENET_MIB_CTRL, ENET_MIB_CTRL_CLR_MIB, 0); +- +- cmd = enet_umac_read(enet, UMAC_CMD); +- cmd &= ~(CMD_SPEED_MASK << CMD_SPEED_SHIFT); +- cmd &= ~CMD_TX_EN; +- cmd &= ~CMD_RX_EN; +- cmd |= CMD_SPEED_1000 << CMD_SPEED_SHIFT; +- enet_umac_write(enet, UMAC_CMD, cmd); +- +- enet_maskset(enet, ENET_GMAC_STATUS, +- ENET_GMAC_STATUS_ETH_SPEED_MASK | +- ENET_GMAC_STATUS_HD | +- ENET_GMAC_STATUS_AUTO_CFG_EN | +- ENET_GMAC_STATUS_LINK_UP, +- ENET_GMAC_STATUS_ETH_SPEED_1000 | +- ENET_GMAC_STATUS_AUTO_CFG_EN | +- ENET_GMAC_STATUS_LINK_UP); +-} +- +-static irqreturn_t bcm4908enet_irq_handler(int irq, void *dev_id) +-{ +- struct bcm4908enet *enet = dev_id; +- +- bcm4908enet_intrs_off(enet); +- bcm4908enet_intrs_ack(enet); +- +- napi_schedule(&enet->napi); +- +- return IRQ_HANDLED; +-} +- +-static int bcm4908enet_open(struct net_device *netdev) +-{ +- struct bcm4908enet *enet = netdev_priv(netdev); +- struct device *dev = enet->dev; +- int err; +- +- err = request_irq(netdev->irq, bcm4908enet_irq_handler, 0, "enet", enet); +- if (err) { +- dev_err(dev, "Failed to request IRQ %d: %d\n", netdev->irq, err); +- return err; +- } +- +- bcm4908enet_gmac_init(enet); +- bcm4908enet_dma_reset(enet); +- bcm4908enet_dma_init(enet); +- +- enet_umac_set(enet, UMAC_CMD, CMD_TX_EN | CMD_RX_EN); +- +- enet_set(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN); +- enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_FLOWC_CH1_EN, 0); +- bcm4908enet_dma_rx_ring_enable(enet, &enet->rx_ring); +- +- napi_enable(&enet->napi); +- netif_carrier_on(netdev); +- netif_start_queue(netdev); +- +- bcm4908enet_intrs_ack(enet); +- bcm4908enet_intrs_on(enet); +- +- return 0; +-} +- +-static int bcm4908enet_stop(struct net_device *netdev) +-{ +- struct bcm4908enet *enet = netdev_priv(netdev); +- +- netif_stop_queue(netdev); +- netif_carrier_off(netdev); +- napi_disable(&enet->napi); +- +- bcm4908enet_dma_rx_ring_disable(enet, &enet->rx_ring); +- bcm4908enet_dma_tx_ring_disable(enet, &enet->tx_ring); +- +- bcm4908enet_dma_uninit(enet); +- +- free_irq(enet->netdev->irq, enet); +- +- return 0; +-} +- +-static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev) +-{ +- struct bcm4908enet *enet = netdev_priv(netdev); +- struct bcm4908enet_dma_ring *ring = &enet->tx_ring; +- struct bcm4908enet_dma_ring_slot *slot; +- struct device *dev = enet->dev; +- struct bcm4908enet_dma_ring_bd *buf_desc; +- int free_buf_descs; +- u32 tmp; +- +- /* Free transmitted skbs */ +- while (ring->read_idx != ring->write_idx) { +- buf_desc = &ring->buf_desc[ring->read_idx]; +- if (buf_desc->ctl & DMA_CTL_STATUS_OWN) +- break; +- slot = &ring->slots[ring->read_idx]; +- +- dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_TO_DEVICE); +- dev_kfree_skb(slot->skb); +- if (++ring->read_idx == ring->length) +- ring->read_idx = 0; +- } +- +- /* Don't use the last empty buf descriptor */ +- if (ring->read_idx <= ring->write_idx) +- free_buf_descs = ring->read_idx - ring->write_idx + ring->length; +- else +- free_buf_descs = ring->read_idx - ring->write_idx; +- if (free_buf_descs < 2) +- return NETDEV_TX_BUSY; +- +- /* Hardware removes OWN bit after sending data */ +- buf_desc = &ring->buf_desc[ring->write_idx]; +- if (unlikely(le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN)) { +- netif_stop_queue(netdev); +- return NETDEV_TX_BUSY; +- } +- +- slot = &ring->slots[ring->write_idx]; +- slot->skb = skb; +- slot->len = skb->len; +- slot->dma_addr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE); +- if (unlikely(dma_mapping_error(dev, slot->dma_addr))) +- return NETDEV_TX_BUSY; +- +- tmp = skb->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; +- tmp |= DMA_CTL_STATUS_OWN; +- tmp |= DMA_CTL_STATUS_SOP; +- tmp |= DMA_CTL_STATUS_EOP; +- tmp |= DMA_CTL_STATUS_APPEND_CRC; +- if (ring->write_idx + 1 == ring->length - 1) +- tmp |= DMA_CTL_STATUS_WRAP; +- +- buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); +- buf_desc->ctl = cpu_to_le32(tmp); +- +- bcm4908enet_dma_tx_ring_ensable(enet, &enet->tx_ring); +- +- if (++ring->write_idx == ring->length - 1) +- ring->write_idx = 0; +- enet->netdev->stats.tx_bytes += skb->len; +- enet->netdev->stats.tx_packets++; +- +- return NETDEV_TX_OK; +-} +- +-static int bcm4908enet_poll(struct napi_struct *napi, int weight) +-{ +- struct bcm4908enet *enet = container_of(napi, struct bcm4908enet, napi); +- struct device *dev = enet->dev; +- int handled = 0; +- +- while (handled < weight) { +- struct bcm4908enet_dma_ring_bd *buf_desc; +- struct bcm4908enet_dma_ring_slot slot; +- u32 ctl; +- int len; +- int err; +- +- buf_desc = &enet->rx_ring.buf_desc[enet->rx_ring.read_idx]; +- ctl = le32_to_cpu(buf_desc->ctl); +- if (ctl & DMA_CTL_STATUS_OWN) +- break; +- +- slot = enet->rx_ring.slots[enet->rx_ring.read_idx]; +- +- /* Provide new buffer before unpinning the old one */ +- err = bcm4908enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx); +- if (err) +- break; +- +- if (++enet->rx_ring.read_idx == enet->rx_ring.length) +- enet->rx_ring.read_idx = 0; +- +- len = (ctl & DMA_CTL_LEN_DESC_BUFLENGTH) >> DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; +- +- if (len < ENET_MTU_MIN || +- (ctl & (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) != (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) { +- enet->netdev->stats.rx_dropped++; +- break; +- } +- +- dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE); +- +- skb_put(slot.skb, len - 4 + 2); +- slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev); +- netif_receive_skb(slot.skb); +- +- enet->netdev->stats.rx_packets++; +- enet->netdev->stats.rx_bytes += len; +- } +- +- if (handled < weight) { +- napi_complete_done(napi, handled); +- bcm4908enet_intrs_on(enet); +- } +- +- return handled; +-} +- +-static const struct net_device_ops bcm96xx_netdev_ops = { +- .ndo_open = bcm4908enet_open, +- .ndo_stop = bcm4908enet_stop, +- .ndo_start_xmit = bcm4908enet_start_xmit, +- .ndo_set_mac_address = eth_mac_addr, +-}; +- +-static int bcm4908enet_probe(struct platform_device *pdev) +-{ +- struct device *dev = &pdev->dev; +- struct net_device *netdev; +- struct bcm4908enet *enet; +- int err; +- +- netdev = devm_alloc_etherdev(dev, sizeof(*enet)); +- if (!netdev) +- return -ENOMEM; +- +- enet = netdev_priv(netdev); +- enet->dev = dev; +- enet->netdev = netdev; +- +- enet->base = devm_platform_ioremap_resource(pdev, 0); +- if (IS_ERR(enet->base)) { +- dev_err(dev, "Failed to map registers: %ld\n", PTR_ERR(enet->base)); +- return PTR_ERR(enet->base); +- } +- +- netdev->irq = platform_get_irq_byname(pdev, "rx"); +- if (netdev->irq < 0) +- return netdev->irq; +- +- dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); +- +- err = bcm4908enet_dma_alloc(enet); +- if (err) +- return err; +- +- SET_NETDEV_DEV(netdev, &pdev->dev); +- eth_hw_addr_random(netdev); +- netdev->netdev_ops = &bcm96xx_netdev_ops; +- netdev->min_mtu = ETH_ZLEN; +- netdev->mtu = ENET_MTU_MAX; +- netdev->max_mtu = ENET_MTU_MAX; +- netif_napi_add(netdev, &enet->napi, bcm4908enet_poll, 64); +- +- err = register_netdev(netdev); +- if (err) { +- bcm4908enet_dma_free(enet); +- return err; +- } +- +- platform_set_drvdata(pdev, enet); +- +- return 0; +-} +- +-static int bcm4908enet_remove(struct platform_device *pdev) +-{ +- struct bcm4908enet *enet = platform_get_drvdata(pdev); +- +- unregister_netdev(enet->netdev); +- netif_napi_del(&enet->napi); +- bcm4908enet_dma_free(enet); +- +- return 0; +-} +- +-static const struct of_device_id bcm4908enet_of_match[] = { +- { .compatible = "brcm,bcm4908enet"}, +- {}, +-}; +- +-static struct platform_driver bcm4908enet_driver = { +- .driver = { +- .name = "bcm4908enet", +- .of_match_table = bcm4908enet_of_match, +- }, +- .probe = bcm4908enet_probe, +- .remove = bcm4908enet_remove, +-}; +-module_platform_driver(bcm4908enet_driver); +- +-MODULE_LICENSE("GPL v2"); +-MODULE_DEVICE_TABLE(of, bcm4908enet_of_match); +--- /dev/null ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -0,0 +1,677 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++/* ++ * Copyright (C) 2021 Rafał Miłecki ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "bcm4908_enet.h" ++#include "unimac.h" ++ ++#define ENET_DMA_CH_RX_CFG ENET_DMA_CH0_CFG ++#define ENET_DMA_CH_TX_CFG ENET_DMA_CH1_CFG ++#define ENET_DMA_CH_RX_STATE_RAM ENET_DMA_CH0_STATE_RAM ++#define ENET_DMA_CH_TX_STATE_RAM ENET_DMA_CH1_STATE_RAM ++ ++#define ENET_TX_BDS_NUM 200 ++#define ENET_RX_BDS_NUM 200 ++#define ENET_RX_BDS_NUM_MAX 8192 ++ ++#define ENET_DMA_INT_DEFAULTS (ENET_DMA_CH_CFG_INT_DONE | \ ++ ENET_DMA_CH_CFG_INT_NO_DESC | \ ++ ENET_DMA_CH_CFG_INT_BUFF_DONE) ++#define ENET_DMA_MAX_BURST_LEN 8 /* in 64 bit words */ ++ ++#define ENET_MTU_MIN 60 ++#define ENET_MTU_MAX 1500 /* Is it possible to support 2044? */ ++#define ENET_MTU_MAX_EXTRA_SIZE 32 /* L2 */ ++ ++struct bcm4908_enet_dma_ring_bd { ++ __le32 ctl; ++ __le32 addr; ++} __packed; ++ ++struct bcm4908_enet_dma_ring_slot { ++ struct sk_buff *skb; ++ unsigned int len; ++ dma_addr_t dma_addr; ++}; ++ ++struct bcm4908_enet_dma_ring { ++ int is_tx; ++ int read_idx; ++ int write_idx; ++ int length; ++ u16 cfg_block; ++ u16 st_ram_block; ++ ++ union { ++ void *cpu_addr; ++ struct bcm4908_enet_dma_ring_bd *buf_desc; ++ }; ++ dma_addr_t dma_addr; ++ ++ struct bcm4908_enet_dma_ring_slot *slots; ++}; ++ ++struct bcm4908_enet { ++ struct device *dev; ++ struct net_device *netdev; ++ struct napi_struct napi; ++ void __iomem *base; ++ ++ struct bcm4908_enet_dma_ring tx_ring; ++ struct bcm4908_enet_dma_ring rx_ring; ++}; ++ ++/*** ++ * R/W ops ++ */ ++ ++static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset) ++{ ++ return readl(enet->base + offset); ++} ++ ++static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) ++{ ++ writel(value, enet->base + offset); ++} ++ ++static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) ++{ ++ u32 val; ++ ++ WARN_ON(set & ~mask); ++ ++ val = enet_read(enet, offset); ++ val = (val & ~mask) | (set & mask); ++ enet_write(enet, offset, val); ++} ++ ++static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) ++{ ++ enet_maskset(enet, offset, set, set); ++} ++ ++static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) ++{ ++ return enet_read(enet, ENET_UNIMAC + offset); ++} ++ ++static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) ++{ ++ enet_write(enet, ENET_UNIMAC + offset, value); ++} ++ ++static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) ++{ ++ enet_maskset(enet, ENET_UNIMAC + offset, mask, set); ++} ++ ++static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) ++{ ++ enet_set(enet, ENET_UNIMAC + offset, set); ++} ++ ++/*** ++ * Helpers ++ */ ++ ++static void bcm4908_enet_intrs_on(struct bcm4908_enet *enet) ++{ ++ enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, ENET_DMA_INT_DEFAULTS); ++} ++ ++static void bcm4908_enet_intrs_off(struct bcm4908_enet *enet) ++{ ++ enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, 0); ++} ++ ++static void bcm4908_enet_intrs_ack(struct bcm4908_enet *enet) ++{ ++ enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_STAT, ENET_DMA_INT_DEFAULTS); ++} ++ ++/*** ++ * DMA ++ */ ++ ++static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ int size = ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); ++ struct device *dev = enet->dev; ++ ++ ring->cpu_addr = dma_alloc_coherent(dev, size, &ring->dma_addr, GFP_KERNEL); ++ if (!ring->cpu_addr) ++ return -ENOMEM; ++ ++ if (((uintptr_t)ring->cpu_addr) & (0x40 - 1)) { ++ dev_err(dev, "Invalid DMA ring alignment\n"); ++ goto err_free_buf_descs; ++ } ++ ++ ring->slots = kzalloc(ring->length * sizeof(*ring->slots), GFP_KERNEL); ++ if (!ring->slots) ++ goto err_free_buf_descs; ++ ++ memset(ring->cpu_addr, 0, size); ++ ++ ring->read_idx = 0; ++ ring->write_idx = 0; ++ ++ return 0; ++ ++err_free_buf_descs: ++ dma_free_coherent(dev, size, ring->cpu_addr, ring->dma_addr); ++ return -ENOMEM; ++} ++ ++static void bcm4908_enet_dma_free(struct bcm4908_enet *enet) ++{ ++ struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; ++ struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; ++ struct device *dev = enet->dev; ++ int size; ++ ++ size = rx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); ++ if (rx_ring->cpu_addr) ++ dma_free_coherent(dev, size, rx_ring->cpu_addr, rx_ring->dma_addr); ++ kfree(rx_ring->slots); ++ ++ size = tx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd); ++ if (tx_ring->cpu_addr) ++ dma_free_coherent(dev, size, tx_ring->cpu_addr, tx_ring->dma_addr); ++ kfree(tx_ring->slots); ++} ++ ++static int bcm4908_enet_dma_alloc(struct bcm4908_enet *enet) ++{ ++ struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring; ++ struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; ++ struct device *dev = enet->dev; ++ int err; ++ ++ tx_ring->length = ENET_TX_BDS_NUM; ++ tx_ring->is_tx = 1; ++ tx_ring->cfg_block = ENET_DMA_CH_TX_CFG; ++ tx_ring->st_ram_block = ENET_DMA_CH_TX_STATE_RAM; ++ err = bcm4908_dma_alloc_buf_descs(enet, tx_ring); ++ if (err) { ++ dev_err(dev, "Failed to alloc TX buf descriptors: %d\n", err); ++ return err; ++ } ++ ++ rx_ring->length = ENET_RX_BDS_NUM; ++ rx_ring->is_tx = 0; ++ rx_ring->cfg_block = ENET_DMA_CH_RX_CFG; ++ rx_ring->st_ram_block = ENET_DMA_CH_RX_STATE_RAM; ++ err = bcm4908_dma_alloc_buf_descs(enet, rx_ring); ++ if (err) { ++ dev_err(dev, "Failed to alloc RX buf descriptors: %d\n", err); ++ bcm4908_enet_dma_free(enet); ++ return err; ++ } ++ ++ return 0; ++} ++ ++static void bcm4908_enet_dma_reset(struct bcm4908_enet *enet) ++{ ++ struct bcm4908_enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring }; ++ int i; ++ ++ /* Disable the DMA controller and channel */ ++ for (i = 0; i < ARRAY_SIZE(rings); i++) ++ enet_write(enet, rings[i]->cfg_block + ENET_DMA_CH_CFG, 0); ++ enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN, 0); ++ ++ /* Reset channels state */ ++ for (i = 0; i < ARRAY_SIZE(rings); i++) { ++ struct bcm4908_enet_dma_ring *ring = rings[i]; ++ ++ enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, 0); ++ enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_STATE_DATA, 0); ++ enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_DESC_LEN_STATUS, 0); ++ enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_DESC_BASE_BUFPTR, 0); ++ } ++} ++ ++static int bcm4908_enet_dma_alloc_rx_buf(struct bcm4908_enet *enet, unsigned int idx) ++{ ++ struct bcm4908_enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx]; ++ struct bcm4908_enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx]; ++ struct device *dev = enet->dev; ++ u32 tmp; ++ int err; ++ ++ slot->len = ENET_MTU_MAX + ENET_MTU_MAX_EXTRA_SIZE; ++ ++ slot->skb = netdev_alloc_skb(enet->netdev, slot->len); ++ if (!slot->skb) ++ return -ENOMEM; ++ ++ slot->dma_addr = dma_map_single(dev, slot->skb->data, slot->len, DMA_FROM_DEVICE); ++ err = dma_mapping_error(dev, slot->dma_addr); ++ if (err) { ++ dev_err(dev, "Failed to map DMA buffer: %d\n", err); ++ kfree_skb(slot->skb); ++ slot->skb = NULL; ++ return err; ++ } ++ ++ tmp = slot->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; ++ tmp |= DMA_CTL_STATUS_OWN; ++ if (idx == enet->rx_ring.length - 1) ++ tmp |= DMA_CTL_STATUS_WRAP; ++ buf_desc->ctl = cpu_to_le32(tmp); ++ buf_desc->addr = cpu_to_le32(slot->dma_addr); ++ ++ return 0; ++} ++ ++static void bcm4908_enet_dma_ring_init(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ int reset_channel = 0; /* We support only 1 main channel (with TX and RX) */ ++ int reset_subch = ring->is_tx ? 1 : 0; ++ ++ /* Reset the DMA channel */ ++ enet_write(enet, ENET_DMA_CTRL_CHANNEL_RESET, BIT(reset_channel * 2 + reset_subch)); ++ enet_write(enet, ENET_DMA_CTRL_CHANNEL_RESET, 0); ++ ++ enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0); ++ enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG_MAX_BURST, ENET_DMA_MAX_BURST_LEN); ++ enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG_INT_MASK, 0); ++ ++ enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, ++ (uint32_t)ring->dma_addr); ++} ++ ++static void bcm4908_enet_dma_uninit(struct bcm4908_enet *enet) ++{ ++ struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; ++ struct bcm4908_enet_dma_ring_slot *slot; ++ struct device *dev = enet->dev; ++ int i; ++ ++ for (i = rx_ring->length - 1; i >= 0; i--) { ++ slot = &rx_ring->slots[i]; ++ if (!slot->skb) ++ continue; ++ dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_FROM_DEVICE); ++ kfree_skb(slot->skb); ++ slot->skb = NULL; ++ } ++} ++ ++static int bcm4908_enet_dma_init(struct bcm4908_enet *enet) ++{ ++ struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring; ++ struct device *dev = enet->dev; ++ int err; ++ int i; ++ ++ for (i = 0; i < rx_ring->length; i++) { ++ err = bcm4908_enet_dma_alloc_rx_buf(enet, i); ++ if (err) { ++ dev_err(dev, "Failed to alloc RX buffer: %d\n", err); ++ bcm4908_enet_dma_uninit(enet); ++ return err; ++ } ++ } ++ ++ bcm4908_enet_dma_ring_init(enet, &enet->tx_ring); ++ bcm4908_enet_dma_ring_init(enet, &enet->rx_ring); ++ ++ return 0; ++} ++ ++static void bcm4908_enet_dma_tx_ring_ensable(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); ++} ++ ++static void bcm4908_enet_dma_tx_ring_disable(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0); ++} ++ ++static void bcm4908_enet_dma_rx_ring_enable(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ enet_set(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); ++} ++ ++static void bcm4908_enet_dma_rx_ring_disable(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) ++{ ++ unsigned long deadline; ++ u32 tmp; ++ ++ enet_maskset(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE, 0); ++ ++ deadline = jiffies + usecs_to_jiffies(2000); ++ do { ++ tmp = enet_read(enet, ring->cfg_block + ENET_DMA_CH_CFG); ++ if (!(tmp & ENET_DMA_CH_CFG_ENABLE)) ++ return; ++ enet_maskset(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE, 0); ++ usleep_range(10, 30); ++ } while (!time_after_eq(jiffies, deadline)); ++ ++ dev_warn(enet->dev, "Timeout waiting for DMA TX stop\n"); ++} ++ ++/*** ++ * Ethernet driver ++ */ ++ ++static void bcm4908_enet_gmac_init(struct bcm4908_enet *enet) ++{ ++ u32 cmd; ++ ++ cmd = enet_umac_read(enet, UMAC_CMD); ++ enet_umac_write(enet, UMAC_CMD, cmd | CMD_SW_RESET); ++ enet_umac_write(enet, UMAC_CMD, cmd & ~CMD_SW_RESET); ++ ++ enet_set(enet, ENET_FLUSH, ENET_FLUSH_RXFIFO_FLUSH | ENET_FLUSH_TXFIFO_FLUSH); ++ enet_maskset(enet, ENET_FLUSH, ENET_FLUSH_RXFIFO_FLUSH | ENET_FLUSH_TXFIFO_FLUSH, 0); ++ ++ enet_set(enet, ENET_MIB_CTRL, ENET_MIB_CTRL_CLR_MIB); ++ enet_maskset(enet, ENET_MIB_CTRL, ENET_MIB_CTRL_CLR_MIB, 0); ++ ++ cmd = enet_umac_read(enet, UMAC_CMD); ++ cmd &= ~(CMD_SPEED_MASK << CMD_SPEED_SHIFT); ++ cmd &= ~CMD_TX_EN; ++ cmd &= ~CMD_RX_EN; ++ cmd |= CMD_SPEED_1000 << CMD_SPEED_SHIFT; ++ enet_umac_write(enet, UMAC_CMD, cmd); ++ ++ enet_maskset(enet, ENET_GMAC_STATUS, ++ ENET_GMAC_STATUS_ETH_SPEED_MASK | ++ ENET_GMAC_STATUS_HD | ++ ENET_GMAC_STATUS_AUTO_CFG_EN | ++ ENET_GMAC_STATUS_LINK_UP, ++ ENET_GMAC_STATUS_ETH_SPEED_1000 | ++ ENET_GMAC_STATUS_AUTO_CFG_EN | ++ ENET_GMAC_STATUS_LINK_UP); ++} ++ ++static irqreturn_t bcm4908_enet_irq_handler(int irq, void *dev_id) ++{ ++ struct bcm4908_enet *enet = dev_id; ++ ++ bcm4908_enet_intrs_off(enet); ++ bcm4908_enet_intrs_ack(enet); ++ ++ napi_schedule(&enet->napi); ++ ++ return IRQ_HANDLED; ++} ++ ++static int bcm4908_enet_open(struct net_device *netdev) ++{ ++ struct bcm4908_enet *enet = netdev_priv(netdev); ++ struct device *dev = enet->dev; ++ int err; ++ ++ err = request_irq(netdev->irq, bcm4908_enet_irq_handler, 0, "enet", enet); ++ if (err) { ++ dev_err(dev, "Failed to request IRQ %d: %d\n", netdev->irq, err); ++ return err; ++ } ++ ++ bcm4908_enet_gmac_init(enet); ++ bcm4908_enet_dma_reset(enet); ++ bcm4908_enet_dma_init(enet); ++ ++ enet_umac_set(enet, UMAC_CMD, CMD_TX_EN | CMD_RX_EN); ++ ++ enet_set(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN); ++ enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_FLOWC_CH1_EN, 0); ++ bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring); ++ ++ napi_enable(&enet->napi); ++ netif_carrier_on(netdev); ++ netif_start_queue(netdev); ++ ++ bcm4908_enet_intrs_ack(enet); ++ bcm4908_enet_intrs_on(enet); ++ ++ return 0; ++} ++ ++static int bcm4908_enet_stop(struct net_device *netdev) ++{ ++ struct bcm4908_enet *enet = netdev_priv(netdev); ++ ++ netif_stop_queue(netdev); ++ netif_carrier_off(netdev); ++ napi_disable(&enet->napi); ++ ++ bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring); ++ bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring); ++ ++ bcm4908_enet_dma_uninit(enet); ++ ++ free_irq(enet->netdev->irq, enet); ++ ++ return 0; ++} ++ ++static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev) ++{ ++ struct bcm4908_enet *enet = netdev_priv(netdev); ++ struct bcm4908_enet_dma_ring *ring = &enet->tx_ring; ++ struct bcm4908_enet_dma_ring_slot *slot; ++ struct device *dev = enet->dev; ++ struct bcm4908_enet_dma_ring_bd *buf_desc; ++ int free_buf_descs; ++ u32 tmp; ++ ++ /* Free transmitted skbs */ ++ while (ring->read_idx != ring->write_idx) { ++ buf_desc = &ring->buf_desc[ring->read_idx]; ++ if (buf_desc->ctl & DMA_CTL_STATUS_OWN) ++ break; ++ slot = &ring->slots[ring->read_idx]; ++ ++ dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_TO_DEVICE); ++ dev_kfree_skb(slot->skb); ++ if (++ring->read_idx == ring->length) ++ ring->read_idx = 0; ++ } ++ ++ /* Don't use the last empty buf descriptor */ ++ if (ring->read_idx <= ring->write_idx) ++ free_buf_descs = ring->read_idx - ring->write_idx + ring->length; ++ else ++ free_buf_descs = ring->read_idx - ring->write_idx; ++ if (free_buf_descs < 2) ++ return NETDEV_TX_BUSY; ++ ++ /* Hardware removes OWN bit after sending data */ ++ buf_desc = &ring->buf_desc[ring->write_idx]; ++ if (unlikely(le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN)) { ++ netif_stop_queue(netdev); ++ return NETDEV_TX_BUSY; ++ } ++ ++ slot = &ring->slots[ring->write_idx]; ++ slot->skb = skb; ++ slot->len = skb->len; ++ slot->dma_addr = dma_map_single(dev, skb->data, skb->len, DMA_TO_DEVICE); ++ if (unlikely(dma_mapping_error(dev, slot->dma_addr))) ++ return NETDEV_TX_BUSY; ++ ++ tmp = skb->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; ++ tmp |= DMA_CTL_STATUS_OWN; ++ tmp |= DMA_CTL_STATUS_SOP; ++ tmp |= DMA_CTL_STATUS_EOP; ++ tmp |= DMA_CTL_STATUS_APPEND_CRC; ++ if (ring->write_idx + 1 == ring->length - 1) ++ tmp |= DMA_CTL_STATUS_WRAP; ++ ++ buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); ++ buf_desc->ctl = cpu_to_le32(tmp); ++ ++ bcm4908_enet_dma_tx_ring_ensable(enet, &enet->tx_ring); ++ ++ if (++ring->write_idx == ring->length - 1) ++ ring->write_idx = 0; ++ enet->netdev->stats.tx_bytes += skb->len; ++ enet->netdev->stats.tx_packets++; ++ ++ return NETDEV_TX_OK; ++} ++ ++static int bcm4908_enet_poll(struct napi_struct *napi, int weight) ++{ ++ struct bcm4908_enet *enet = container_of(napi, struct bcm4908_enet, napi); ++ struct device *dev = enet->dev; ++ int handled = 0; ++ ++ while (handled < weight) { ++ struct bcm4908_enet_dma_ring_bd *buf_desc; ++ struct bcm4908_enet_dma_ring_slot slot; ++ u32 ctl; ++ int len; ++ int err; ++ ++ buf_desc = &enet->rx_ring.buf_desc[enet->rx_ring.read_idx]; ++ ctl = le32_to_cpu(buf_desc->ctl); ++ if (ctl & DMA_CTL_STATUS_OWN) ++ break; ++ ++ slot = enet->rx_ring.slots[enet->rx_ring.read_idx]; ++ ++ /* Provide new buffer before unpinning the old one */ ++ err = bcm4908_enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx); ++ if (err) ++ break; ++ ++ if (++enet->rx_ring.read_idx == enet->rx_ring.length) ++ enet->rx_ring.read_idx = 0; ++ ++ len = (ctl & DMA_CTL_LEN_DESC_BUFLENGTH) >> DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; ++ ++ if (len < ENET_MTU_MIN || ++ (ctl & (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) != (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) { ++ enet->netdev->stats.rx_dropped++; ++ break; ++ } ++ ++ dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE); ++ ++ skb_put(slot.skb, len - 4 + 2); ++ slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev); ++ netif_receive_skb(slot.skb); ++ ++ enet->netdev->stats.rx_packets++; ++ enet->netdev->stats.rx_bytes += len; ++ } ++ ++ if (handled < weight) { ++ napi_complete_done(napi, handled); ++ bcm4908_enet_intrs_on(enet); ++ } ++ ++ return handled; ++} ++ ++static const struct net_device_ops bcm96xx_netdev_ops = { ++ .ndo_open = bcm4908_enet_open, ++ .ndo_stop = bcm4908_enet_stop, ++ .ndo_start_xmit = bcm4908_enet_start_xmit, ++ .ndo_set_mac_address = eth_mac_addr, ++}; ++ ++static int bcm4908_enet_probe(struct platform_device *pdev) ++{ ++ struct device *dev = &pdev->dev; ++ struct net_device *netdev; ++ struct bcm4908_enet *enet; ++ int err; ++ ++ netdev = devm_alloc_etherdev(dev, sizeof(*enet)); ++ if (!netdev) ++ return -ENOMEM; ++ ++ enet = netdev_priv(netdev); ++ enet->dev = dev; ++ enet->netdev = netdev; ++ ++ enet->base = devm_platform_ioremap_resource(pdev, 0); ++ if (IS_ERR(enet->base)) { ++ dev_err(dev, "Failed to map registers: %ld\n", PTR_ERR(enet->base)); ++ return PTR_ERR(enet->base); ++ } ++ ++ netdev->irq = platform_get_irq_byname(pdev, "rx"); ++ if (netdev->irq < 0) ++ return netdev->irq; ++ ++ dma_set_coherent_mask(dev, DMA_BIT_MASK(32)); ++ ++ err = bcm4908_enet_dma_alloc(enet); ++ if (err) ++ return err; ++ ++ SET_NETDEV_DEV(netdev, &pdev->dev); ++ eth_hw_addr_random(netdev); ++ netdev->netdev_ops = &bcm96xx_netdev_ops; ++ netdev->min_mtu = ETH_ZLEN; ++ netdev->mtu = ENET_MTU_MAX; ++ netdev->max_mtu = ENET_MTU_MAX; ++ netif_napi_add(netdev, &enet->napi, bcm4908_enet_poll, 64); ++ ++ err = register_netdev(netdev); ++ if (err) { ++ bcm4908_enet_dma_free(enet); ++ return err; ++ } ++ ++ platform_set_drvdata(pdev, enet); ++ ++ return 0; ++} ++ ++static int bcm4908_enet_remove(struct platform_device *pdev) ++{ ++ struct bcm4908_enet *enet = platform_get_drvdata(pdev); ++ ++ unregister_netdev(enet->netdev); ++ netif_napi_del(&enet->napi); ++ bcm4908_enet_dma_free(enet); ++ ++ return 0; ++} ++ ++static const struct of_device_id bcm4908_enet_of_match[] = { ++ { .compatible = "brcm,bcm4908-enet"}, ++ {}, ++}; ++ ++static struct platform_driver bcm4908_enet_driver = { ++ .driver = { ++ .name = "bcm4908_enet", ++ .of_match_table = bcm4908_enet_of_match, ++ }, ++ .probe = bcm4908_enet_probe, ++ .remove = bcm4908_enet_remove, ++}; ++module_platform_driver(bcm4908_enet_driver); ++ ++MODULE_LICENSE("GPL v2"); ++MODULE_DEVICE_TABLE(of, bcm4908_enet_of_match); +--- a/drivers/net/ethernet/broadcom/bcm4908enet.h ++++ /dev/null +@@ -1,96 +0,0 @@ +-/* SPDX-License-Identifier: GPL-2.0-only */ +-#ifndef __BCM4908ENET_H +-#define __BCM4908ENET_H +- +-#define ENET_CONTROL 0x000 +-#define ENET_MIB_CTRL 0x004 +-#define ENET_MIB_CTRL_CLR_MIB 0x00000001 +-#define ENET_RX_ERR_MASK 0x008 +-#define ENET_MIB_MAX_PKT_SIZE 0x00C +-#define ENET_MIB_MAX_PKT_SIZE_VAL 0x00003fff +-#define ENET_DIAG_OUT 0x01c +-#define ENET_ENABLE_DROP_PKT 0x020 +-#define ENET_IRQ_ENABLE 0x024 +-#define ENET_IRQ_ENABLE_OVFL 0x00000001 +-#define ENET_GMAC_STATUS 0x028 +-#define ENET_GMAC_STATUS_ETH_SPEED_MASK 0x00000003 +-#define ENET_GMAC_STATUS_ETH_SPEED_10 0x00000000 +-#define ENET_GMAC_STATUS_ETH_SPEED_100 0x00000001 +-#define ENET_GMAC_STATUS_ETH_SPEED_1000 0x00000002 +-#define ENET_GMAC_STATUS_HD 0x00000004 +-#define ENET_GMAC_STATUS_AUTO_CFG_EN 0x00000008 +-#define ENET_GMAC_STATUS_LINK_UP 0x00000010 +-#define ENET_IRQ_STATUS 0x02c +-#define ENET_IRQ_STATUS_OVFL 0x00000001 +-#define ENET_OVERFLOW_COUNTER 0x030 +-#define ENET_FLUSH 0x034 +-#define ENET_FLUSH_RXFIFO_FLUSH 0x00000001 +-#define ENET_FLUSH_TXFIFO_FLUSH 0x00000002 +-#define ENET_RSV_SELECT 0x038 +-#define ENET_BP_FORCE 0x03c +-#define ENET_BP_FORCE_FORCE 0x00000001 +-#define ENET_DMA_RX_OK_TO_SEND_COUNT 0x040 +-#define ENET_DMA_RX_OK_TO_SEND_COUNT_VAL 0x0000000f +-#define ENET_TX_CRC_CTRL 0x044 +-#define ENET_MIB 0x200 +-#define ENET_UNIMAC 0x400 +-#define ENET_DMA 0x800 +-#define ENET_DMA_CONTROLLER_CFG 0x800 +-#define ENET_DMA_CTRL_CFG_MASTER_EN 0x00000001 +-#define ENET_DMA_CTRL_CFG_FLOWC_CH1_EN 0x00000002 +-#define ENET_DMA_CTRL_CFG_FLOWC_CH3_EN 0x00000004 +-#define ENET_DMA_FLOWCTL_CH1_THRESH_LO 0x804 +-#define ENET_DMA_FLOWCTL_CH1_THRESH_HI 0x808 +-#define ENET_DMA_FLOWCTL_CH1_ALLOC 0x80c +-#define ENET_DMA_FLOWCTL_CH1_ALLOC_FORCE 0x80000000 +-#define ENET_DMA_FLOWCTL_CH3_THRESH_LO 0x810 +-#define ENET_DMA_FLOWCTL_CH3_THRESH_HI 0x814 +-#define ENET_DMA_FLOWCTL_CH3_ALLOC 0x818 +-#define ENET_DMA_FLOWCTL_CH5_THRESH_LO 0x81C +-#define ENET_DMA_FLOWCTL_CH5_THRESH_HI 0x820 +-#define ENET_DMA_FLOWCTL_CH5_ALLOC 0x824 +-#define ENET_DMA_FLOWCTL_CH7_THRESH_LO 0x828 +-#define ENET_DMA_FLOWCTL_CH7_THRESH_HI 0x82C +-#define ENET_DMA_FLOWCTL_CH7_ALLOC 0x830 +-#define ENET_DMA_CTRL_CHANNEL_RESET 0x834 +-#define ENET_DMA_CTRL_CHANNEL_DEBUG 0x838 +-#define ENET_DMA_CTRL_GLOBAL_INTERRUPT_STATUS 0x840 +-#define ENET_DMA_CTRL_GLOBAL_INTERRUPT_MASK 0x844 +-#define ENET_DMA_CH0_CFG 0xa00 /* RX */ +-#define ENET_DMA_CH1_CFG 0xa10 /* TX */ +-#define ENET_DMA_CH0_STATE_RAM 0xc00 /* RX */ +-#define ENET_DMA_CH1_STATE_RAM 0xc10 /* TX */ +- +-#define ENET_DMA_CH_CFG 0x00 /* assorted configuration */ +-#define ENET_DMA_CH_CFG_ENABLE 0x00000001 /* set to enable channel */ +-#define ENET_DMA_CH_CFG_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ +-#define ENET_DMA_CH_CFG_BURST_HALT 0x00000004 /* idle after finish current memory burst */ +-#define ENET_DMA_CH_CFG_INT_STAT 0x04 /* interrupts control and status */ +-#define ENET_DMA_CH_CFG_INT_MASK 0x08 /* interrupts mask */ +-#define ENET_DMA_CH_CFG_INT_BUFF_DONE 0x00000001 /* buffer done */ +-#define ENET_DMA_CH_CFG_INT_DONE 0x00000002 /* packet xfer complete */ +-#define ENET_DMA_CH_CFG_INT_NO_DESC 0x00000004 /* no valid descriptors */ +-#define ENET_DMA_CH_CFG_INT_RX_ERROR 0x00000008 /* rxdma detect client protocol error */ +-#define ENET_DMA_CH_CFG_MAX_BURST 0x0c /* max burst length permitted */ +-#define ENET_DMA_CH_CFG_MAX_BURST_DESCSIZE_SEL 0x00040000 /* DMA Descriptor Size Selection */ +-#define ENET_DMA_CH_CFG_SIZE 0x10 +- +-#define ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR 0x00 /* descriptor ring start address */ +-#define ENET_DMA_CH_STATE_RAM_STATE_DATA 0x04 /* state/bytes done/ring offset */ +-#define ENET_DMA_CH_STATE_RAM_DESC_LEN_STATUS 0x08 /* buffer descriptor status and len */ +-#define ENET_DMA_CH_STATE_RAM_DESC_BASE_BUFPTR 0x0c /* buffer descrpitor current processing */ +-#define ENET_DMA_CH_STATE_RAM_SIZE 0x10 +- +-#define DMA_CTL_STATUS_APPEND_CRC 0x00000100 +-#define DMA_CTL_STATUS_APPEND_BRCM_TAG 0x00000200 +-#define DMA_CTL_STATUS_PRIO 0x00000C00 /* Prio for Tx */ +-#define DMA_CTL_STATUS_WRAP 0x00001000 /* */ +-#define DMA_CTL_STATUS_SOP 0x00002000 /* first buffer in packet */ +-#define DMA_CTL_STATUS_EOP 0x00004000 /* last buffer in packet */ +-#define DMA_CTL_STATUS_OWN 0x00008000 /* cleared by DMA, set by SW */ +-#define DMA_CTL_LEN_DESC_BUFLENGTH 0x0fff0000 +-#define DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT 16 +-#define DMA_CTL_LEN_DESC_MULTICAST 0x40000000 +-#define DMA_CTL_LEN_DESC_USEFPM 0x80000000 +- +-#endif +--- /dev/null ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.h +@@ -0,0 +1,96 @@ ++/* SPDX-License-Identifier: GPL-2.0-only */ ++#ifndef __BCM4908_ENET_H ++#define __BCM4908_ENET_H ++ ++#define ENET_CONTROL 0x000 ++#define ENET_MIB_CTRL 0x004 ++#define ENET_MIB_CTRL_CLR_MIB 0x00000001 ++#define ENET_RX_ERR_MASK 0x008 ++#define ENET_MIB_MAX_PKT_SIZE 0x00C ++#define ENET_MIB_MAX_PKT_SIZE_VAL 0x00003fff ++#define ENET_DIAG_OUT 0x01c ++#define ENET_ENABLE_DROP_PKT 0x020 ++#define ENET_IRQ_ENABLE 0x024 ++#define ENET_IRQ_ENABLE_OVFL 0x00000001 ++#define ENET_GMAC_STATUS 0x028 ++#define ENET_GMAC_STATUS_ETH_SPEED_MASK 0x00000003 ++#define ENET_GMAC_STATUS_ETH_SPEED_10 0x00000000 ++#define ENET_GMAC_STATUS_ETH_SPEED_100 0x00000001 ++#define ENET_GMAC_STATUS_ETH_SPEED_1000 0x00000002 ++#define ENET_GMAC_STATUS_HD 0x00000004 ++#define ENET_GMAC_STATUS_AUTO_CFG_EN 0x00000008 ++#define ENET_GMAC_STATUS_LINK_UP 0x00000010 ++#define ENET_IRQ_STATUS 0x02c ++#define ENET_IRQ_STATUS_OVFL 0x00000001 ++#define ENET_OVERFLOW_COUNTER 0x030 ++#define ENET_FLUSH 0x034 ++#define ENET_FLUSH_RXFIFO_FLUSH 0x00000001 ++#define ENET_FLUSH_TXFIFO_FLUSH 0x00000002 ++#define ENET_RSV_SELECT 0x038 ++#define ENET_BP_FORCE 0x03c ++#define ENET_BP_FORCE_FORCE 0x00000001 ++#define ENET_DMA_RX_OK_TO_SEND_COUNT 0x040 ++#define ENET_DMA_RX_OK_TO_SEND_COUNT_VAL 0x0000000f ++#define ENET_TX_CRC_CTRL 0x044 ++#define ENET_MIB 0x200 ++#define ENET_UNIMAC 0x400 ++#define ENET_DMA 0x800 ++#define ENET_DMA_CONTROLLER_CFG 0x800 ++#define ENET_DMA_CTRL_CFG_MASTER_EN 0x00000001 ++#define ENET_DMA_CTRL_CFG_FLOWC_CH1_EN 0x00000002 ++#define ENET_DMA_CTRL_CFG_FLOWC_CH3_EN 0x00000004 ++#define ENET_DMA_FLOWCTL_CH1_THRESH_LO 0x804 ++#define ENET_DMA_FLOWCTL_CH1_THRESH_HI 0x808 ++#define ENET_DMA_FLOWCTL_CH1_ALLOC 0x80c ++#define ENET_DMA_FLOWCTL_CH1_ALLOC_FORCE 0x80000000 ++#define ENET_DMA_FLOWCTL_CH3_THRESH_LO 0x810 ++#define ENET_DMA_FLOWCTL_CH3_THRESH_HI 0x814 ++#define ENET_DMA_FLOWCTL_CH3_ALLOC 0x818 ++#define ENET_DMA_FLOWCTL_CH5_THRESH_LO 0x81C ++#define ENET_DMA_FLOWCTL_CH5_THRESH_HI 0x820 ++#define ENET_DMA_FLOWCTL_CH5_ALLOC 0x824 ++#define ENET_DMA_FLOWCTL_CH7_THRESH_LO 0x828 ++#define ENET_DMA_FLOWCTL_CH7_THRESH_HI 0x82C ++#define ENET_DMA_FLOWCTL_CH7_ALLOC 0x830 ++#define ENET_DMA_CTRL_CHANNEL_RESET 0x834 ++#define ENET_DMA_CTRL_CHANNEL_DEBUG 0x838 ++#define ENET_DMA_CTRL_GLOBAL_INTERRUPT_STATUS 0x840 ++#define ENET_DMA_CTRL_GLOBAL_INTERRUPT_MASK 0x844 ++#define ENET_DMA_CH0_CFG 0xa00 /* RX */ ++#define ENET_DMA_CH1_CFG 0xa10 /* TX */ ++#define ENET_DMA_CH0_STATE_RAM 0xc00 /* RX */ ++#define ENET_DMA_CH1_STATE_RAM 0xc10 /* TX */ ++ ++#define ENET_DMA_CH_CFG 0x00 /* assorted configuration */ ++#define ENET_DMA_CH_CFG_ENABLE 0x00000001 /* set to enable channel */ ++#define ENET_DMA_CH_CFG_PKT_HALT 0x00000002 /* idle after an EOP flag is detected */ ++#define ENET_DMA_CH_CFG_BURST_HALT 0x00000004 /* idle after finish current memory burst */ ++#define ENET_DMA_CH_CFG_INT_STAT 0x04 /* interrupts control and status */ ++#define ENET_DMA_CH_CFG_INT_MASK 0x08 /* interrupts mask */ ++#define ENET_DMA_CH_CFG_INT_BUFF_DONE 0x00000001 /* buffer done */ ++#define ENET_DMA_CH_CFG_INT_DONE 0x00000002 /* packet xfer complete */ ++#define ENET_DMA_CH_CFG_INT_NO_DESC 0x00000004 /* no valid descriptors */ ++#define ENET_DMA_CH_CFG_INT_RX_ERROR 0x00000008 /* rxdma detect client protocol error */ ++#define ENET_DMA_CH_CFG_MAX_BURST 0x0c /* max burst length permitted */ ++#define ENET_DMA_CH_CFG_MAX_BURST_DESCSIZE_SEL 0x00040000 /* DMA Descriptor Size Selection */ ++#define ENET_DMA_CH_CFG_SIZE 0x10 ++ ++#define ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR 0x00 /* descriptor ring start address */ ++#define ENET_DMA_CH_STATE_RAM_STATE_DATA 0x04 /* state/bytes done/ring offset */ ++#define ENET_DMA_CH_STATE_RAM_DESC_LEN_STATUS 0x08 /* buffer descriptor status and len */ ++#define ENET_DMA_CH_STATE_RAM_DESC_BASE_BUFPTR 0x0c /* buffer descrpitor current processing */ ++#define ENET_DMA_CH_STATE_RAM_SIZE 0x10 ++ ++#define DMA_CTL_STATUS_APPEND_CRC 0x00000100 ++#define DMA_CTL_STATUS_APPEND_BRCM_TAG 0x00000200 ++#define DMA_CTL_STATUS_PRIO 0x00000C00 /* Prio for Tx */ ++#define DMA_CTL_STATUS_WRAP 0x00001000 /* */ ++#define DMA_CTL_STATUS_SOP 0x00002000 /* first buffer in packet */ ++#define DMA_CTL_STATUS_EOP 0x00004000 /* last buffer in packet */ ++#define DMA_CTL_STATUS_OWN 0x00008000 /* cleared by DMA, set by SW */ ++#define DMA_CTL_LEN_DESC_BUFLENGTH 0x0fff0000 ++#define DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT 16 ++#define DMA_CTL_LEN_DESC_MULTICAST 0x40000000 ++#define DMA_CTL_LEN_DESC_USEFPM 0x80000000 ++ ++#endif diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0004-net-broadcom-bcm4908_enet-drop-unneeded-memset.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0004-net-broadcom-bcm4908_enet-drop-unneeded-memset.patch new file mode 100644 index 0000000000..561f045b75 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0004-net-broadcom-bcm4908_enet-drop-unneeded-memset.patch @@ -0,0 +1,30 @@ +From af263af64683f018be9ce3c309edfa9903f5109a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:35 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: drop unneeded memset() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +dma_alloc_coherent takes care of zeroing allocated memory + +Suggested-by: Andrew Lunn +Signed-off-by: Rafał Miłecki +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -163,8 +163,6 @@ static int bcm4908_dma_alloc_buf_descs(s + if (!ring->slots) + goto err_free_buf_descs; + +- memset(ring->cpu_addr, 0, size); +- + ring->read_idx = 0; + ring->write_idx = 0; + diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0005-net-broadcom-bcm4908_enet-drop-inline-from-C-functio.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0005-net-broadcom-bcm4908_enet-drop-inline-from-C-functio.patch new file mode 100644 index 0000000000..a8c188f30d --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0005-net-broadcom-bcm4908_enet-drop-inline-from-C-functio.patch @@ -0,0 +1,75 @@ +From 7b778ae4eb9cd6e1518e4e47902a104b13ae8929 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:36 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: drop "inline" from C functions +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It seems preferred to let compiler optimize code if applicable. +While at it drop unused enet_umac_maskset(). + +Suggested-by: Andrew Lunn +Signed-off-by: Rafał Miłecki +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 19 +++++++------------ + 1 file changed, 7 insertions(+), 12 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -75,17 +75,17 @@ struct bcm4908_enet { + * R/W ops + */ + +-static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset) ++static u32 enet_read(struct bcm4908_enet *enet, u16 offset) + { + return readl(enet->base + offset); + } + +-static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) ++static void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value) + { + writel(value, enet->base + offset); + } + +-static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) ++static void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) + { + u32 val; + +@@ -96,27 +96,22 @@ static inline void enet_maskset(struct b + enet_write(enet, offset, val); + } + +-static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) ++static void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set) + { + enet_maskset(enet, offset, set, set); + } + +-static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) ++static u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset) + { + return enet_read(enet, ENET_UNIMAC + offset); + } + +-static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) ++static void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value) + { + enet_write(enet, ENET_UNIMAC + offset, value); + } + +-static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set) +-{ +- enet_maskset(enet, ENET_UNIMAC + offset, mask, set); +-} +- +-static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) ++static void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set) + { + enet_set(enet, ENET_UNIMAC + offset, set); + } diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0006-net-broadcom-bcm4908_enet-fix-minor-typos.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0006-net-broadcom-bcm4908_enet-fix-minor-typos.patch new file mode 100644 index 0000000000..1aacb1c8cf --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0006-net-broadcom-bcm4908_enet-fix-minor-typos.patch @@ -0,0 +1,60 @@ +From e3948811720341f99cd5cb4a8a650473400ec4f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:37 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: fix minor typos +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +1. Fix "ensable" typo noticed by Andrew +2. Fix chipset name in the struct net_device_ops variable + +Suggested-by: Andrew Lunn +Signed-off-by: Rafał Miłecki +Reviewed-by: Andrew Lunn +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -328,8 +328,8 @@ static int bcm4908_enet_dma_init(struct + return 0; + } + +-static void bcm4908_enet_dma_tx_ring_ensable(struct bcm4908_enet *enet, +- struct bcm4908_enet_dma_ring *ring) ++static void bcm4908_enet_dma_tx_ring_enable(struct bcm4908_enet *enet, ++ struct bcm4908_enet_dma_ring *ring) + { + enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE); + } +@@ -519,7 +519,7 @@ static int bcm4908_enet_start_xmit(struc + buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr); + buf_desc->ctl = cpu_to_le32(tmp); + +- bcm4908_enet_dma_tx_ring_ensable(enet, &enet->tx_ring); ++ bcm4908_enet_dma_tx_ring_enable(enet, &enet->tx_ring); + + if (++ring->write_idx == ring->length - 1) + ring->write_idx = 0; +@@ -583,7 +583,7 @@ static int bcm4908_enet_poll(struct napi + return handled; + } + +-static const struct net_device_ops bcm96xx_netdev_ops = { ++static const struct net_device_ops bcm4908_enet_netdev_ops = { + .ndo_open = bcm4908_enet_open, + .ndo_stop = bcm4908_enet_stop, + .ndo_start_xmit = bcm4908_enet_start_xmit, +@@ -623,7 +623,7 @@ static int bcm4908_enet_probe(struct pla + + SET_NETDEV_DEV(netdev, &pdev->dev); + eth_hw_addr_random(netdev); +- netdev->netdev_ops = &bcm96xx_netdev_ops; ++ netdev->netdev_ops = &bcm4908_enet_netdev_ops; + netdev->min_mtu = ETH_ZLEN; + netdev->mtu = ENET_MTU_MAX; + netdev->max_mtu = ENET_MTU_MAX; diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0007-net-broadcom-bcm4908_enet-fix-received-skb-length.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0007-net-broadcom-bcm4908_enet-fix-received-skb-length.patch new file mode 100644 index 0000000000..1b51979d71 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0007-net-broadcom-bcm4908_enet-fix-received-skb-length.patch @@ -0,0 +1,28 @@ +From 195e2d9febfbeef1d09701c387925e5c2f5cb038 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:38 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: fix received skb length +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use ETH_FCS_LEN instead of magic value and drop incorrect + 2 + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -567,7 +567,7 @@ static int bcm4908_enet_poll(struct napi + + dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE); + +- skb_put(slot.skb, len - 4 + 2); ++ skb_put(slot.skb, len - ETH_FCS_LEN); + slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev); + netif_receive_skb(slot.skb); + diff --git a/target/linux/bcm4908/patches-5.4/073-v5.12-0008-net-broadcom-bcm4908_enet-fix-endianness-in-xmit-cod.patch b/target/linux/bcm4908/patches-5.4/073-v5.12-0008-net-broadcom-bcm4908_enet-fix-endianness-in-xmit-cod.patch new file mode 100644 index 0000000000..eda0bf482e --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/073-v5.12-0008-net-broadcom-bcm4908_enet-fix-endianness-in-xmit-cod.patch @@ -0,0 +1,28 @@ +From bdd70b997799099597fc0952fb0ec1bd80505bc4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Thu, 11 Feb 2021 13:12:39 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: fix endianness in xmit code +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Use le32_to_cpu() for reading __le32 struct field filled by hw. + +Signed-off-by: Rafał Miłecki +Reviewed-by: Florian Fainelli +Signed-off-by: David S. Miller +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -476,7 +476,7 @@ static int bcm4908_enet_start_xmit(struc + /* Free transmitted skbs */ + while (ring->read_idx != ring->write_idx) { + buf_desc = &ring->buf_desc[ring->read_idx]; +- if (buf_desc->ctl & DMA_CTL_STATUS_OWN) ++ if (le32_to_cpu(buf_desc->ctl) & DMA_CTL_STATUS_OWN) + break; + slot = &ring->slots[ring->read_idx]; + diff --git a/target/linux/bcm4908/patches-5.4/082-v5.12-0002-soc-bcm-add-PM-driver-for-Broadcom-s-PMB.patch b/target/linux/bcm4908/patches-5.4/082-v5.12-0002-soc-bcm-add-PM-driver-for-Broadcom-s-PMB.patch index e462174ca6..29e48c7f6c 100644 --- a/target/linux/bcm4908/patches-5.4/082-v5.12-0002-soc-bcm-add-PM-driver-for-Broadcom-s-PMB.patch +++ b/target/linux/bcm4908/patches-5.4/082-v5.12-0002-soc-bcm-add-PM-driver-for-Broadcom-s-PMB.patch @@ -24,7 +24,7 @@ Signed-off-by: Florian Fainelli --- a/MAINTAINERS +++ b/MAINTAINERS -@@ -3405,6 +3405,16 @@ L: linux-mips@vger.kernel.org +@@ -3414,6 +3414,16 @@ L: linux-mips@vger.kernel.org S: Maintained F: drivers/firmware/broadcom/* diff --git a/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-set-MTU-on-open-on-request.patch b/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-set-MTU-on-open-on-request.patch new file mode 100644 index 0000000000..87cb851034 --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/170-net-broadcom-bcm4908_enet-set-MTU-on-open-on-request.patch @@ -0,0 +1,113 @@ +From d7dfbcba0437955ccbe4c6db736526d528f27720 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 12 Feb 2021 16:06:00 +0100 +Subject: [PATCH] net: broadcom: bcm4908_enet: set MTU on open & on request + +Hardware comes up with default max frame size set to 1518. When using it +with switch it results in actual Ethernet MTU 1492: +1518 - 14 (Ethernet header) - 4 (Broadcom's tag) - 4 (802.1q) - 4 (FCS) + +Above means hardware in its default state can't handle standard Ethernet +traffic (MTU 1500). + +Define maximum possible Ethernet overhead and always set MAC max frame +length accordingly. This change fixes handling Ethernet frames of length +1506 - 1514. +--- + drivers/net/ethernet/broadcom/bcm4908_enet.c | 31 ++++++++++++++++---- + 1 file changed, 25 insertions(+), 6 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm4908_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c +@@ -5,6 +5,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -29,9 +30,10 @@ + ENET_DMA_CH_CFG_INT_BUFF_DONE) + #define ENET_DMA_MAX_BURST_LEN 8 /* in 64 bit words */ + +-#define ENET_MTU_MIN 60 +-#define ENET_MTU_MAX 1500 /* Is it possible to support 2044? */ +-#define ENET_MTU_MAX_EXTRA_SIZE 32 /* L2 */ ++#define ENET_MTU_MAX ETH_DATA_LEN /* Is it possible to support 2044? */ ++#define BRCM_MAX_TAG_LEN 6 ++#define ENET_MAX_ETH_OVERHEAD (ETH_HLEN + BRCM_MAX_TAG_LEN + VLAN_HLEN + \ ++ ETH_FCS_LEN + 4) /* 32 */ + + struct bcm4908_enet_dma_ring_bd { + __le32 ctl; +@@ -135,6 +137,11 @@ static void bcm4908_enet_intrs_ack(struc + enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_STAT, ENET_DMA_INT_DEFAULTS); + } + ++static void bcm4908_enet_set_mtu(struct bcm4908_enet *enet, int mtu) ++{ ++ enet_umac_write(enet, UMAC_MAX_FRAME_LEN, mtu + ENET_MAX_ETH_OVERHEAD); ++} ++ + /*** + * DMA + */ +@@ -246,7 +253,7 @@ static int bcm4908_enet_dma_alloc_rx_buf + u32 tmp; + int err; + +- slot->len = ENET_MTU_MAX + ENET_MTU_MAX_EXTRA_SIZE; ++ slot->len = ENET_MTU_MAX + ENET_MAX_ETH_OVERHEAD; + + slot->skb = netdev_alloc_skb(enet->netdev, slot->len); + if (!slot->skb) +@@ -374,6 +381,8 @@ static void bcm4908_enet_gmac_init(struc + { + u32 cmd; + ++ bcm4908_enet_set_mtu(enet, enet->netdev->mtu); ++ + cmd = enet_umac_read(enet, UMAC_CMD); + enet_umac_write(enet, UMAC_CMD, cmd | CMD_SW_RESET); + enet_umac_write(enet, UMAC_CMD, cmd & ~CMD_SW_RESET); +@@ -559,7 +568,7 @@ static int bcm4908_enet_poll(struct napi + + len = (ctl & DMA_CTL_LEN_DESC_BUFLENGTH) >> DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT; + +- if (len < ENET_MTU_MIN || ++ if (len < ETH_ZLEN || + (ctl & (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) != (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) { + enet->netdev->stats.rx_dropped++; + break; +@@ -583,11 +592,21 @@ static int bcm4908_enet_poll(struct napi + return handled; + } + ++static int bcm4908_enet_change_mtu(struct net_device *netdev, int new_mtu) ++{ ++ struct bcm4908_enet *enet = netdev_priv(netdev); ++ ++ bcm4908_enet_set_mtu(enet, new_mtu); ++ ++ return 0; ++} ++ + static const struct net_device_ops bcm4908_enet_netdev_ops = { + .ndo_open = bcm4908_enet_open, + .ndo_stop = bcm4908_enet_stop, + .ndo_start_xmit = bcm4908_enet_start_xmit, + .ndo_set_mac_address = eth_mac_addr, ++ .ndo_change_mtu = bcm4908_enet_change_mtu, + }; + + static int bcm4908_enet_probe(struct platform_device *pdev) +@@ -625,7 +644,7 @@ static int bcm4908_enet_probe(struct pla + eth_hw_addr_random(netdev); + netdev->netdev_ops = &bcm4908_enet_netdev_ops; + netdev->min_mtu = ETH_ZLEN; +- netdev->mtu = ENET_MTU_MAX; ++ netdev->mtu = ETH_DATA_LEN; + netdev->max_mtu = ENET_MTU_MAX; + netif_napi_add(netdev, &enet->napi, bcm4908_enet_poll, 64); + diff --git a/target/linux/bcm4908/patches-5.4/302-arm64-dts-broadcom-bcm4908-describe-Ethernet-control.patch b/target/linux/bcm4908/patches-5.4/302-arm64-dts-broadcom-bcm4908-describe-Ethernet-control.patch index 755292dacf..ed8fac387f 100644 --- a/target/linux/bcm4908/patches-5.4/302-arm64-dts-broadcom-bcm4908-describe-Ethernet-control.patch +++ b/target/linux/bcm4908/patches-5.4/302-arm64-dts-broadcom-bcm4908-describe-Ethernet-control.patch @@ -10,34 +10,14 @@ BCM4908 SoCs have an integrated Ethernet controller. Signed-off-by: Rafał Miłecki --- ---- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts -+++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts -@@ -87,6 +87,17 @@ - full-duplex; - }; - }; -+ -+ port@8 { -+ reg = <8>; -+ phy-mode = "internal"; -+ brcm,use-bcm-hdr; -+ ethernet = <&gmac>; -+ fixed-link { -+ speed = <1000>; -+ full-duplex; -+ }; -+ }; - }; - - &mdio { --- a/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4908.dtsi @@ -112,6 +112,14 @@ #size-cells = <1>; ranges = <0x00 0x00 0x80000000 0x281000>; -+ gmac: ethernet@2000 { -+ compatible = "brcm,bcm4908enet"; ++ enet: ethernet@2000 { ++ compatible = "brcm,bcm4908-enet"; + reg = <0x2000 0x1000>; + + interrupts = ; @@ -47,3 +27,22 @@ Signed-off-by: Rafał Miłecki usb_phy: usb-phy@c200 { compatible = "brcm,bcm4908-usb-phy"; reg = <0xc200 0x100>; +@@ -199,6 +207,18 @@ + phy-mode = "internal"; + phy-handle = <&phy11>; + }; ++ ++ port@8 { ++ reg = <8>; ++ phy-mode = "internal"; ++ brcm,use-bcm-hdr; ++ ethernet = <&enet>; ++ ++ fixed-link { ++ speed = <1000>; ++ full-duplex; ++ }; ++ }; + }; + }; + diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile index 16fe4f31c8..4ef8b9ace4 100644 --- a/target/linux/bcm53xx/Makefile +++ b/target/linux/bcm53xx/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/bcm53xx/image/Makefile b/target/linux/bcm53xx/image/Makefile index 4dc1affc3e..c3fe0e8525 100644 --- a/target/linux/bcm53xx/image/Makefile +++ b/target/linux/bcm53xx/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/bcm53xx/modules.mk b/target/linux/bcm53xx/modules.mk index 6432a7f577..e43231f376 100644 --- a/target/linux/bcm53xx/modules.mk +++ b/target/linux/bcm53xx/modules.mk @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 Rafał Miłecki -# -# This is free software, licensed under the GNU General Public License v2. -# define KernelPackage/phy-bcm-ns-usb2 TITLE:=Broadcom Northstar USB 2.0 PHY Driver diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch index b27cbcad9f..c160c6bf17 100644 --- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch +++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch @@ -19,7 +19,7 @@ it on BCM4708 family. --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c -@@ -67,6 +67,8 @@ static int xhci_priv_resume_quirk(struct +@@ -77,6 +77,8 @@ static int xhci_priv_resume_quirk(struct static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) { struct xhci_plat_priv *priv = xhci_to_priv(xhci); @@ -28,7 +28,7 @@ it on BCM4708 family. /* * As of now platform drivers don't provide MSI support so we ensure -@@ -74,6 +76,9 @@ static void xhci_plat_quirks(struct devi +@@ -84,6 +86,9 @@ static void xhci_plat_quirks(struct devi * dev struct in order to setup MSI */ xhci->quirks |= XHCI_PLAT | priv->quirks; @@ -132,6 +132,6 @@ it on BCM4708 family. #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_FAKE_DOORBELL BIT_ULL(36) + #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - unsigned int num_active_eps; diff --git a/target/linux/bcm53xx/profiles/100-Generic.mk b/target/linux/bcm53xx/profiles/100-Generic.mk index b57258666e..9dc60b0a76 100644 --- a/target/linux/bcm53xx/profiles/100-Generic.mk +++ b/target/linux/bcm53xx/profiles/100-Generic.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Generic NAME:=Broadcom SoC, BCM43xx WiFi (b43, brcmfmac, default) diff --git a/target/linux/bcm63xx/Makefile b/target/linux/bcm63xx/Makefile index d87918f0f5..e2fa6a5e23 100644 --- a/target/linux/bcm63xx/Makefile +++ b/target/linux/bcm63xx/Makefile @@ -1,10 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2019 OpenWrt.org # Copyright (C) 2016 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mips diff --git a/target/linux/bcm63xx/image/Makefile b/target/linux/bcm63xx/image/Makefile index d8e68862b3..822e26e993 100644 --- a/target/linux/bcm63xx/image/Makefile +++ b/target/linux/bcm63xx/image/Makefile @@ -1,10 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2015 OpenWrt.org # Copyright (C) 2016 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/bcm63xx/modules.mk b/target/linux/bcm63xx/modules.mk index bc244c8d7d..c329f3865a 100644 --- a/target/linux/bcm63xx/modules.mk +++ b/target/linux/bcm63xx/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/pcmcia-bcm63xx SUBMENU:=$(PCMCIA_MENU) diff --git a/target/linux/bcm63xx/profiles/default.mk b/target/linux/bcm63xx/profiles/default.mk index 2df9d062ff..6928cdb764 100644 --- a/target/linux/bcm63xx/profiles/default.mk +++ b/target/linux/bcm63xx/profiles/default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/gemini/Makefile b/target/linux/gemini/Makefile index d30b8d3ac8..d2acb52fac 100644 --- a/target/linux/gemini/Makefile +++ b/target/linux/gemini/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2009-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index 0eae4c6bd8..9906808c9e 100644 --- a/target/linux/gemini/image/Makefile +++ b/target/linux/gemini/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2009-2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch b/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch index 21424a3e4d..683178727c 100644 --- a/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch +++ b/target/linux/generic/backport-5.4/746-v5.5-net-dsa-mv88e6xxx-Split-monitor-port-configuration.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2380,7 +2380,14 @@ static int mv88e6xxx_setup_upstream_port +@@ -2384,7 +2384,14 @@ static int mv88e6xxx_setup_upstream_port if (chip->info->ops->set_egress_port) { err = chip->info->ops->set_egress_port(chip, diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch index 30ff8aeab6..a23f45075f 100644 --- a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch +++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch @@ -25,7 +25,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -4922,6 +4922,80 @@ static int mv88e6xxx_port_mdb_del(struct +@@ -4926,6 +4926,80 @@ static int mv88e6xxx_port_mdb_del(struct return err; } @@ -106,7 +106,7 @@ Signed-off-by: David S. Miller static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port, bool unicast, bool multicast) { -@@ -4976,6 +5050,8 @@ static const struct dsa_switch_ops mv88e +@@ -4980,6 +5054,8 @@ static const struct dsa_switch_ops mv88e .port_mdb_prepare = mv88e6xxx_port_mdb_prepare, .port_mdb_add = mv88e6xxx_port_mdb_add, .port_mdb_del = mv88e6xxx_port_mdb_del, diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch index d8ec1240f7..37e7a7f2a9 100644 --- a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch +++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch @@ -19,7 +19,7 @@ Signed-off-by: David S. Miller --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -4989,7 +4989,7 @@ static void mv88e6xxx_port_mirror_del(st +@@ -4993,7 +4993,7 @@ static void mv88e6xxx_port_mirror_del(st if (chip->info->ops->set_egress_port(chip, direction, dsa_upstream_port(ds, diff --git a/target/linux/generic/image/Makefile b/target/linux/generic/image/Makefile index e733e0a37a..56ea9f6f1e 100644 --- a/target/linux/generic/image/Makefile +++ b/target/linux/generic/image/Makefile @@ -1,9 +1,7 @@ -# +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch b/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch index 22cf41a8a7..a49b48f744 100644 --- a/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch +++ b/target/linux/generic/pending-5.4/760-net-dsa-mv88e6xxx-fix-vlan-setup.patch @@ -17,7 +17,7 @@ Signed-off-by: DENG Qingfang --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c -@@ -2659,6 +2659,7 @@ static int mv88e6xxx_setup(struct dsa_sw +@@ -2663,6 +2663,7 @@ static int mv88e6xxx_setup(struct dsa_sw chip->ds = ds; ds->slave_mii_bus = mv88e6xxx_default_mdio_bus(chip); diff --git a/target/linux/imx6/Makefile b/target/linux/imx6/Makefile index 2a18c44117..65fd92ed49 100644 --- a/target/linux/imx6/Makefile +++ b/target/linux/imx6/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/imx6/image/Makefile b/target/linux/imx6/image/Makefile index 2c9d03c039..f6dc461f7d 100644 --- a/target/linux/imx6/image/Makefile +++ b/target/linux/imx6/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/imx6/profiles/100-default.mk b/target/linux/imx6/profiles/100-default.mk index 60b3ef538b..28b0f4662c 100644 --- a/target/linux/imx6/profiles/100-default.mk +++ b/target/linux/imx6/profiles/100-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default PRIORITY:=1 diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile index c50c03b548..94bee8ba2d 100644 --- a/target/linux/kirkwood/Makefile +++ b/target/linux/kirkwood/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2009-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile index 9d2d60e55f..e06eb050ef 100644 --- a/target/linux/kirkwood/image/Makefile +++ b/target/linux/kirkwood/image/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2009-2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile index ee305e7ce2..fc8aad4265 100644 --- a/target/linux/lantiq/Makefile +++ b/target/linux/lantiq/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2007-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk BOARD:=lantiq diff --git a/target/linux/lantiq/ase/target.mk b/target/linux/lantiq/ase/target.mk index daabbfc74a..694fe6c2a7 100644 --- a/target/linux/lantiq/ase/target.mk +++ b/target/linux/lantiq/ase/target.mk @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 LEDE Project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + ARCH:=mips SUBTARGET:=ase BOARDNAME:=Amazon-SE diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index a4ba22dfc4..c90975d098 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # boards missing since devicetree update #EASY50712 ARV3527P diff --git a/target/linux/lantiq/modules.mk b/target/linux/lantiq/modules.mk index 8cd720093c..14140b1095 100644 --- a/target/linux/lantiq/modules.mk +++ b/target/linux/lantiq/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# I2C_LANTIQ_MODULES:= \ CONFIG_I2C_LANTIQ:drivers/i2c/busses/i2c-lantiq diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile index 9030747823..71034224ab 100644 --- a/target/linux/layerscape/Makefile +++ b/target/linux/layerscape/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk BOARD:=layerscape diff --git a/target/linux/layerscape/armv7/target.mk b/target/linux/layerscape/armv7/target.mk index bfc6c09d42..1730ca5637 100644 --- a/target/linux/layerscape/armv7/target.mk +++ b/target/linux/layerscape/armv7/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2018 NXP -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# ARCH:=arm BOARDNAME:=ARMv7 based boards diff --git a/target/linux/layerscape/armv8_64b/target.mk b/target/linux/layerscape/armv8_64b/target.mk index 274a729440..c9a61701a9 100644 --- a/target/linux/layerscape/armv8_64b/target.mk +++ b/target/linux/layerscape/armv8_64b/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# ARCH:=aarch64 BOARDNAME:=ARMv8 64-bit based boards diff --git a/target/linux/layerscape/image/Makefile b/target/linux/layerscape/image/Makefile index bfc4af4ca4..3c8bdea480 100644 --- a/target/linux/layerscape/image/Makefile +++ b/target/linux/layerscape/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/layerscape/image/armv7.mk b/target/linux/layerscape/image/armv7.mk index 62921a5ef9..4ab2cec224 100644 --- a/target/linux/layerscape/image/armv7.mk +++ b/target/linux/layerscape/image/armv7.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2018-2020 NXP -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/Default PROFILES := Default diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index a3f4428299..75d6885c6d 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2018-2020 NXP -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/Default PROFILES := Default diff --git a/target/linux/layerscape/image/gen_sdcard_head_img.sh b/target/linux/layerscape/image/gen_sdcard_head_img.sh index d3a8fd2d12..53997a39c1 100755 --- a/target/linux/layerscape/image/gen_sdcard_head_img.sh +++ b/target/linux/layerscape/image/gen_sdcard_head_img.sh @@ -1,10 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright 2018 NXP -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 5 ] || { diff --git a/target/linux/layerscape/image/mkits-multiple-config.sh b/target/linux/layerscape/image/mkits-multiple-config.sh index 5daee5458b..68870686c5 100755 --- a/target/linux/layerscape/image/mkits-multiple-config.sh +++ b/target/linux/layerscape/image/mkits-multiple-config.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -# -# Licensed under the terms of the GNU GPL License version 2 or later. +# SPDX-License-Identifier: GPL-2.0-or-later # # Author: Jason Wu # with modifications for multi-DTB-same-image by: diff --git a/target/linux/layerscape/modules.mk b/target/linux/layerscape/modules.mk index 4d713b597e..11e75ee749 100644 --- a/target/linux/layerscape/modules.mk +++ b/target/linux/layerscape/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) Jiang Yutang -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define KernelPackage/ahci-qoriq SUBMENU:=$(BLOCK_MENU) diff --git a/target/linux/layerscape/patches-5.4/302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch b/target/linux/layerscape/patches-5.4/302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch index ae46d592c7..5079a815c2 100644 --- a/target/linux/layerscape/patches-5.4/302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch +++ b/target/linux/layerscape/patches-5.4/302-dts-0008-arm64-dts-ls1046a-accumulated-change-to-ls1046a-boar.patch @@ -277,15 +277,6 @@ Date: Fri May 5 17:53:27 2017 +0800 compatible = "spansion,m25p80"; --- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi +++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi -@@ -304,7 +304,7 @@ - - dcfg: dcfg@1ee0000 { - compatible = "fsl,ls1046a-dcfg", "syscon"; -- reg = <0x0 0x1ee0000 0x0 0x10000>; -+ reg = <0x0 0x1ee0000 0x0 0x1000>; - big-endian; - }; - @@ -376,7 +376,7 @@ }; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch index 00706bc419..8ec95a9855 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch @@ -42,7 +42,7 @@ Signed-off-by: Peter Chen retval = xhci_enter_test_mode(xhci, test_mode, wIndex, --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -3582,6 +3582,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * +@@ -3591,6 +3591,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd * return 0; } @@ -184,7 +184,7 @@ Signed-off-by: Peter Chen void xhci_init_driver(struct hc_driver *drv, --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -2144,6 +2144,16 @@ int xhci_find_raw_port_number(struct usb +@@ -2149,6 +2149,16 @@ int xhci_find_raw_port_number(struct usb struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd); void xhci_hc_died(struct xhci_hcd *xhci); diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch index a934f289d8..6eb43e961e 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch @@ -37,6 +37,6 @@ Signed-off-by: Peter Chen #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) +#define XHCI_CDNS_HOST BIT_ULL(36) + #define XHCI_SKIP_PHY_INIT BIT_ULL(37) #define XHCI_DISABLE_SPARSE BIT_ULL(38) - unsigned int num_active_eps; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch index 9081959484..b08633eb88 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch @@ -22,7 +22,7 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c -@@ -2053,12 +2053,9 @@ static int process_ctrl_td(struct xhci_h +@@ -2058,12 +2058,9 @@ static int process_ctrl_td(struct xhci_h switch (trb_comp_code) { case COMP_SUCCESS: diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch index c74b2460b4..daef61c4d6 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch @@ -24,10 +24,10 @@ Signed-off-by: Peter Chen --- a/drivers/usb/host/xhci.c +++ b/drivers/usb/host/xhci.c -@@ -5381,6 +5381,8 @@ void xhci_init_driver(struct hc_driver * - drv->reset = over->reset; - if (over->start) - drv->start = over->start; +@@ -5385,6 +5385,8 @@ void xhci_init_driver(struct hc_driver * + drv->check_bandwidth = over->check_bandwidth; + if (over->reset_bandwidth) + drv->reset_bandwidth = over->reset_bandwidth; + if (over->bus_suspend) + drv->bus_suspend = over->bus_suspend; } @@ -35,10 +35,10 @@ Signed-off-by: Peter Chen EXPORT_SYMBOL_GPL(xhci_init_driver); --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h -@@ -1912,6 +1912,7 @@ struct xhci_driver_overrides { - size_t extra_priv_size; - int (*reset)(struct usb_hcd *hcd); +@@ -1915,6 +1915,7 @@ struct xhci_driver_overrides { int (*start)(struct usb_hcd *hcd); + int (*check_bandwidth)(struct usb_hcd *, struct usb_device *); + void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *); + int (*bus_suspend)(struct usb_hcd *hcd); }; diff --git a/target/linux/layerscape/patches-5.4/820-usb-0020-MLK-16604-1-usb-host-xhci-plat-add-XHCI_MISSING_CAS-.patch b/target/linux/layerscape/patches-5.4/820-usb-0020-MLK-16604-1-usb-host-xhci-plat-add-XHCI_MISSING_CAS-.patch index ff150319ed..9fae877942 100644 --- a/target/linux/layerscape/patches-5.4/820-usb-0020-MLK-16604-1-usb-host-xhci-plat-add-XHCI_MISSING_CAS-.patch +++ b/target/linux/layerscape/patches-5.4/820-usb-0020-MLK-16604-1-usb-host-xhci-plat-add-XHCI_MISSING_CAS-.patch @@ -16,7 +16,7 @@ Acked-by: Peter Chen --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c -@@ -291,6 +291,10 @@ static int xhci_plat_probe(struct platfo +@@ -303,6 +303,10 @@ static int xhci_plat_probe(struct platfo device_property_read_u32(tmpdev, "imod-interval-ns", &xhci->imod_interval); diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile index 4beeb64b8b..18b463f1ea 100644 --- a/target/linux/malta/Makefile +++ b/target/linux/malta/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk BOARD:=malta diff --git a/target/linux/malta/image/Makefile b/target/linux/malta/image/Makefile index 72e7eab807..514ff58427 100644 --- a/target/linux/malta/image/Makefile +++ b/target/linux/malta/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/mediatek/image/Makefile b/target/linux/mediatek/image/Makefile index 36ecdd5a9b..45e83cece5 100644 --- a/target/linux/mediatek/image/Makefile +++ b/target/linux/mediatek/image/Makefile @@ -1,10 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2015 OpenWrt.org # Copyright (C) 2016-2017 LEDE project -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/mediatek/image/gen_mtk_mmc_img.sh b/target/linux/mediatek/image/gen_mtk_mmc_img.sh index 2dacb9019d..7e19e1a39e 100755 --- a/target/linux/mediatek/image/gen_mtk_mmc_img.sh +++ b/target/linux/mediatek/image/gen_mtk_mmc_img.sh @@ -1,11 +1,8 @@ #!/bin/bash +# SPDX-License-Identifier: GPL-2.0-only # # Copyright © 2019 Alexey Loukianov # Copyright © 2020 David Woodhouse -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # Generates a bootable SD card image for Banana Pi R2 (and probably # other similar boards) as documented at diff --git a/target/linux/mediatek/image/gen_scatterfile.sh b/target/linux/mediatek/image/gen_scatterfile.sh index f23cf819b8..15fc0bc84c 100755 --- a/target/linux/mediatek/image/gen_scatterfile.sh +++ b/target/linux/mediatek/image/gen_scatterfile.sh @@ -1,10 +1,8 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright © 2020 David Woodhouse # -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# # Generate as "scatter file" for use with the MediaTek SP Flash tool for # writing images to MediaTek boards. This can be used to write images # even on a bricked board which has no preloader installed, or broken diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index 94384a8866..b1771dfd8e 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=powerpc diff --git a/target/linux/mpc85xx/image/Makefile b/target/linux/mpc85xx/image/Makefile index 618b8c7135..b9582a2552 100644 --- a/target/linux/mpc85xx/image/Makefile +++ b/target/linux/mpc85xx/image/Makefile @@ -1,7 +1,5 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/mpc85xx/p1010/profiles/00-default.mk b/target/linux/mpc85xx/p1010/profiles/00-default.mk index 5356aaa939..32cf2627f5 100644 --- a/target/linux/mpc85xx/p1010/profiles/00-default.mk +++ b/target/linux/mpc85xx/p1010/profiles/00-default.mk @@ -1,7 +1,4 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only define Profile/Default NAME:=Default Profile diff --git a/target/linux/mpc85xx/p1020/profiles/00-default.mk b/target/linux/mpc85xx/p1020/profiles/00-default.mk index 67d43020a2..4235421457 100644 --- a/target/linux/mpc85xx/p1020/profiles/00-default.mk +++ b/target/linux/mpc85xx/p1020/profiles/00-default.mk @@ -1,7 +1,4 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only define Profile/Default NAME:=Default Profile diff --git a/target/linux/mpc85xx/p2020/profiles/00-default.mk b/target/linux/mpc85xx/p2020/profiles/00-default.mk index c9ea67df08..711997d422 100644 --- a/target/linux/mpc85xx/p2020/profiles/00-default.mk +++ b/target/linux/mpc85xx/p2020/profiles/00-default.mk @@ -1,7 +1,4 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only define Profile/Default NAME:=Default Profile diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index b8055891ec..f30369298e 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk BOARD:=mvebu diff --git a/target/linux/mvebu/cortexa53/target.mk b/target/linux/mvebu/cortexa53/target.mk index fe89d08ffa..fcf658c398 100644 --- a/target/linux/mvebu/cortexa53/target.mk +++ b/target/linux/mvebu/cortexa53/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/mvebu/cortexa72/target.mk b/target/linux/mvebu/cortexa72/target.mk index 540ef1104f..8601077b38 100644 --- a/target/linux/mvebu/cortexa72/target.mk +++ b/target/linux/mvebu/cortexa72/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2018 Sartura Ltd. -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/mvebu/cortexa9/target.mk b/target/linux/mvebu/cortexa9/target.mk index cdd4d86e49..02697fa62d 100644 --- a/target/linux/mvebu/cortexa9/target.mk +++ b/target/linux/mvebu/cortexa9/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 77548d683e..871b622ae2 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2016 OpenWrt.org # Copyright (C) 2016 LEDE-project.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# JFFS2_BLOCKSIZE = 128k diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk index 968e2a38f4..61f4d17813 100644 --- a/target/linux/mvebu/image/cortexa9.mk +++ b/target/linux/mvebu/image/cortexa9.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2016 OpenWrt.org # Copyright (C) 2016 LEDE-project.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/dsa-migration DEVICE_COMPAT_VERSION := 1.1 diff --git a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh index 842e591026..d6f895d09d 100755 --- a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh +++ b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh @@ -1,21 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-or-later # # Copyright (C) 2016 Josua Mayer -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# usage() { echo "$0 [ ]?" diff --git a/target/linux/mvebu/patches-5.4/316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch b/target/linux/mvebu/patches-5.4/316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch deleted file mode 100644 index 44e9a9237b..0000000000 --- a/target/linux/mvebu/patches-5.4/316-arm64-dts-marvell-espressobin-remove-COMPHY-nodes-as.patch +++ /dev/null @@ -1,53 +0,0 @@ -From e928880bd8b26fd704231549456ae7da88cecda6 Mon Sep 17 00:00:00 2001 -From: Tomasz Maciej Nowak -Date: Mon, 20 Apr 2020 14:35:34 +0200 -Subject: [PATCH] arm64: dts: marvell: espressobin: remove COMPHY nodes - assignmet - -This commit removes changes from upstream commits: -8e18c8e58da6 arm64: dts: marvell: armada-3720-espressobin: declare SATA -PHY property -bd3d25b07342 arm64: dts: marvell: armada-37xx: link USB hosts with their -PHYs -For most boards which have factory bootloader this caused that devices -connected to USB 3.0 and SATA port were not detected. For them to -function users would need to upgrade the bootloader to version with ARM -Trusted Firmware 2.1 or later. Unfortunately there is no official -bootloader image with updated ATF component, therefore drop these -properties from nodes. This change was also tested briefly with -bootloader with updated ATF and the ports functioned properly. - -Signed-off-by: Tomasz Maciej Nowak ---- - arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - ---- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -64,8 +64,6 @@ - /* J6 */ - &sata { - status = "okay"; -- phys = <&comphy2 0>; -- phy-names = "sata-phy"; - }; - - /* J1 */ -@@ -131,11 +129,17 @@ - /* J7 */ - &usb3 { - status = "okay"; -+ -+ /delete-property/ phys; -+ /delete-property/ phy-names; - }; - - /* J8 */ - &usb2 { - status = "okay"; -+ -+ /delete-property/ phys; -+ /delete-property/ phy-names; - }; - - &mdio { diff --git a/target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch b/target/linux/mvebu/patches-5.4/316-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch similarity index 100% rename from target/linux/mvebu/patches-5.4/317-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch rename to target/linux/mvebu/patches-5.4/316-arm64-dts-uDPU-switch-PHY-operation-mode-to-2500base.patch diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile index 291322f2bd..c8c97d827d 100644 --- a/target/linux/mxs/Makefile +++ b/target/linux/mxs/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile index 7c332cd7c2..bcb6001bac 100644 --- a/target/linux/mxs/image/Makefile +++ b/target/linux/mxs/image/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/mxs/image/gen_sdcard_ext4_ext4.sh b/target/linux/mxs/image/gen_sdcard_ext4_ext4.sh index 20f3331bed..fcddc00b38 100755 --- a/target/linux/mxs/image/gen_sdcard_ext4_ext4.sh +++ b/target/linux/mxs/image/gen_sdcard_ext4_ext4.sh @@ -1,10 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 4 ] || { diff --git a/target/linux/mxs/image/gen_sdcard_vfat_ext4.sh b/target/linux/mxs/image/gen_sdcard_vfat_ext4.sh index 9d2b7c46a8..5a56a516a9 100755 --- a/target/linux/mxs/image/gen_sdcard_vfat_ext4.sh +++ b/target/linux/mxs/image/gen_sdcard_vfat_ext4.sh @@ -1,10 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 6 ] || { diff --git a/target/linux/mxs/profiles/01-duckbill.mk b/target/linux/mxs/profiles/01-duckbill.mk index 5224c3cfed..d7202a4422 100644 --- a/target/linux/mxs/profiles/01-duckbill.mk +++ b/target/linux/mxs/profiles/01-duckbill.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/duckbill NAME:=I2SE Duckbill boards diff --git a/target/linux/mxs/profiles/02-olinuxino-maxi.mk b/target/linux/mxs/profiles/02-olinuxino-maxi.mk index 5c8ab287dd..662c9f2254 100644 --- a/target/linux/mxs/profiles/02-olinuxino-maxi.mk +++ b/target/linux/mxs/profiles/02-olinuxino-maxi.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/olinuxino-maxi NAME:=Olimex OLinuXino Maxi/Mini boards diff --git a/target/linux/mxs/profiles/03-olinuxino-micro.mk b/target/linux/mxs/profiles/03-olinuxino-micro.mk index 62de50151d..31a767188c 100644 --- a/target/linux/mxs/profiles/03-olinuxino-micro.mk +++ b/target/linux/mxs/profiles/03-olinuxino-micro.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/olinuxino-micro NAME:=Olimex OLinuXino Micro/Nano boards diff --git a/target/linux/octeon/Makefile b/target/linux/octeon/Makefile index bd8dc80d07..5c4c12a4ef 100644 --- a/target/linux/octeon/Makefile +++ b/target/linux/octeon/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mips64 diff --git a/target/linux/octeon/image/Makefile b/target/linux/octeon/image/Makefile index b91c262447..8e97280479 100644 --- a/target/linux/octeon/image/Makefile +++ b/target/linux/octeon/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2009-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/octeon/profiles/000-Generic.mk b/target/linux/octeon/profiles/000-Generic.mk index d4c5767577..6d5aa4e2bd 100644 --- a/target/linux/octeon/profiles/000-Generic.mk +++ b/target/linux/octeon/profiles/000-Generic.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/octeontx/Makefile b/target/linux/octeontx/Makefile index 67addbd424..c30799b744 100644 --- a/target/linux/octeontx/Makefile +++ b/target/linux/octeontx/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=aarch64 diff --git a/target/linux/octeontx/image/Makefile b/target/linux/octeontx/image/Makefile index 203f0ea5c6..c564e6f4bc 100644 --- a/target/linux/octeontx/image/Makefile +++ b/target/linux/octeontx/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2018 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile index a674bfb2ca..0643d3ad84 100644 --- a/target/linux/omap/Makefile +++ b/target/linux/omap/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/omap/image/Makefile b/target/linux/omap/image/Makefile index 24c22165c2..10c6d0ad68 100644 --- a/target/linux/omap/image/Makefile +++ b/target/linux/omap/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2012-2014 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/omap/image/gen_omap_sdcard_img.sh b/target/linux/omap/image/gen_omap_sdcard_img.sh index dbb50cbff4..b2d096acc0 100755 --- a/target/linux/omap/image/gen_omap_sdcard_img.sh +++ b/target/linux/omap/image/gen_omap_sdcard_img.sh @@ -1,11 +1,7 @@ #!/bin/sh - +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -x [ $# -eq 5 ] || { diff --git a/target/linux/omap/profiles/00-default.mk b/target/linux/omap/profiles/00-default.mk index 56e7a34c75..73338d8652 100644 --- a/target/linux/omap/profiles/00-default.mk +++ b/target/linux/omap/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/oxnas/ox820/profiles/00-default.mk b/target/linux/oxnas/ox820/profiles/00-default.mk index c68d7cd9d6..c785dd29b3 100644 --- a/target/linux/oxnas/ox820/profiles/00-default.mk +++ b/target/linux/oxnas/ox820/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile index 672cd3f629..962871af13 100644 --- a/target/linux/pistachio/Makefile +++ b/target/linux/pistachio/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mipsel diff --git a/target/linux/pistachio/base-files/etc/board.d/02_network b/target/linux/pistachio/base-files/etc/board.d/02_network index e7e0a9a930..8de2c8c38d 100755 --- a/target/linux/pistachio/base-files/etc/board.d/02_network +++ b/target/linux/pistachio/base-files/etc/board.d/02_network @@ -1,14 +1,10 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# . /lib/functions/uci-defaults.sh - board_config_update ucidef_set_interface_lan 'eth0' 'dhcp' diff --git a/target/linux/pistachio/base-files/lib/upgrade/platform.sh b/target/linux/pistachio/base-files/lib/upgrade/platform.sh index 16ab341fb5..f64fe7d30d 100644 --- a/target/linux/pistachio/base-files/lib/upgrade/platform.sh +++ b/target/linux/pistachio/base-files/lib/upgrade/platform.sh @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# RAMFS_COPY_BIN='fw_printenv fw_setenv dmesg' RAMFS_COPY_DATA="/etc/fw_env.config" diff --git a/target/linux/pistachio/image/Makefile b/target/linux/pistachio/image/Makefile index 5d2e42f139..7f4e2236c5 100644 --- a/target/linux/pistachio/image/Makefile +++ b/target/linux/pistachio/image/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/pistachio/profiles/00-default.mk b/target/linux/pistachio/profiles/00-default.mk index f40be3d667..db6fb28845 100644 --- a/target/linux/pistachio/profiles/00-default.mk +++ b/target/linux/pistachio/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile index c3d118b2ab..2cfb3c5cef 100644 --- a/target/linux/ramips/Makefile +++ b/target/linux/ramips/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2008-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=mipsel diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 8fce1d7d6d..2bf858b226 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -86,6 +86,7 @@ label = "AP/Extender toggle"; gpios = <&gpio 48 GPIO_ACTIVE_LOW>; linux,code = ; + linux,input-type = ; /* Active when switch is set to "Access Point" */ }; }; diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts new file mode 100644 index 0000000000..aa60b8a2c6 --- /dev/null +++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "elecom,wrc-1167fs", "mediatek,mt7628an-soc"; + model = "ELECOM WRC-1167FS"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wps { + label = "red:wps"; + gpios = <&gpio 37 GPIO_ACTIVE_LOW>; + }; + + internet { + label = "green:internet"; + gpios = <&gpio 39 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "green:lan"; + gpios = <&gpio 40 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 44 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys"; + + ap { + label = "ap"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio 38 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x730000>; + }; + + partition@780000 { + label = "storage"; + reg = <0x780000 0x80000>; + read-only; + }; + }; + }; +}; + +&ehci { + status = "disabled"; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,portdisable = <0x27>; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&ohci { + status = "disabled"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&state_default { + gpio { + groups = "wled_an", "p3led_an", "p4led_an", "wdt", "refclk", "i2c", "i2s"; + function = "gpio"; + }; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 21bd135a62..5937970a37 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2008-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 2d0050f986..7f649aff88 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -996,6 +996,7 @@ define Device/tplink_archer-c2-v1 TPLINK_FLASHLAYOUT := 8Mmtk TPLINK_HWID := 0xc7500001 TPLINK_HWREV := 50 + IMAGES := sysupgrade.bin DEVICE_MODEL := Archer C2 DEVICE_VARIANT := v1 DEVICE_PACKAGES := kmod-mt76x0e kmod-usb2 kmod-usb-ohci \ diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 00976f6044..7ba2acacb8 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -6,6 +6,21 @@ include ./common-tp-link.mk DEFAULT_SOC := mt7628an +define Build/elecom-header + $(eval model_id=$(1)) + ( \ + fw_size="$$(printf '%08x' $$(stat -c%s $@))"; \ + echo -ne "$$(echo "031d6129$${fw_size}06000000$(model_id)" | \ + sed 's/../\\x&/g')"; \ + dd if=/dev/zero bs=92 count=1; \ + data_crc="$$(dd if=$@ | gzip -c | tail -c 8 | \ + od -An -N4 -tx4 --endian little | tr -d ' \n')"; \ + echo -ne "$$(echo "$${data_crc}00000000" | sed 's/../\\x&/g')"; \ + dd if=$@; \ + ) > $@.new + mv $@.new $@ +endef + define Build/ravpower-wd009-factory mkimage -A mips -T standalone -C none -a 0x80010000 -e 0x80010000 \ -n "OpenWrt Bootloader" -d $(UBOOT_PATH) $@.new @@ -93,6 +108,18 @@ define Device/duzun_dm06 endef TARGET_DEVICES += duzun_dm06 +define Device/elecom_wrc-1167fs + IMAGE_SIZE := 7360k + DEVICE_VENDOR := ELECOM + DEVICE_MODEL := WRC-1167FS + IMAGES += factory.bin + IMAGE/factory.bin := $$(sysupgrade_bin) | pad-to 64k | check-size | \ + xor-image -p 29944A25 -x | elecom-header 00228000 | \ + elecom-product-header WRC-1167FS + DEVICE_PACKAGES := kmod-mt76x2 +endef +TARGET_DEVICES += elecom_wrc-1167fs + define Device/glinet_gl-mt300n-v2 IMAGE_SIZE := 16064k DEVICE_VENDOR := GL.iNet diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index ae5e6822de..96e3d91a83 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# OTHER_MENU:=Other modules diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds index bcbc2ed1e6..47b73e01a2 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds @@ -25,6 +25,10 @@ cudy,wr1000) ucidef_set_led_switch "lan1" "lan1" "blue:lan1" "switch0" "0x08" ucidef_set_led_switch "lan2" "lan2" "blue:lan2" "switch0" "0x04" ;; +elecom,wrc-1167fs) + ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0x8" + ucidef_set_led_switch "internet" "internet" "green:internet" "switch0" "0x10" + ;; glinet,gl-mt300n-v2) ucidef_set_led_netdev "wifi_led" "wifi" "red:wlan" "wlan0" ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x1" diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network index 8bbcbb2190..b741b4f9b4 100755 --- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; buffalo,wcr-1166ds|\ + elecom,wrc-1167fs|\ wavlink,wl-wn577a2) ucidef_add_switch "switch0" \ "3:lan" "4:wan" "6@eth0" @@ -181,6 +182,10 @@ ramips_setup_macs() zyxel,keenetic-extra-ii) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1) ;; + elecom,wrc-1167fs) + wan_mac=$(mtd_get_mac_binary factory 0x22) + label_mac=$wan_mac + ;; hilink,hlk-7628n) lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/ramips/patches-5.4/0123-mips-ralink-manage-low-reset-lines.patch b/target/linux/ramips/patches-5.4/0123-mips-ralink-manage-low-reset-lines.patch new file mode 100644 index 0000000000..e59044dd96 --- /dev/null +++ b/target/linux/ramips/patches-5.4/0123-mips-ralink-manage-low-reset-lines.patch @@ -0,0 +1,47 @@ +From 3f9ef7785a9cd69cb75f5e2ea4ca79a24752e496 Mon Sep 17 00:00:00 2001 +From: Sander Vanheule +Date: Wed, 3 Feb 2021 10:21:41 +0100 +Subject: MIPS: ralink: manage low reset lines + +Reset lines with indices smaller than 8 are currently considered invalid +by the rt2880-reset reset controller. + +The MT7621 SoC uses a number of these low reset lines. The DTS defines +reset lines "hsdma", "fe", and "mcm" with respective values 5, 6, and 2. +As a result of the above restriction, these resets cannot be asserted or +de-asserted by the reset controller. In cases where the bootloader does +not de-assert these lines, this results in e.g. the MT7621's internal +switch staying in reset. + +Change the reset controller to only ignore the system reset, so all +reset lines with index greater than 0 are considered valid. + +Signed-off-by: Sander Vanheule +Acked-by: John Crispin +Signed-off-by: Thomas Bogendoerfer +--- + arch/mips/ralink/reset.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/mips/ralink/reset.c b/arch/mips/ralink/reset.c +index 8126f12604071..274d33078c5eb 100644 +--- a/arch/mips/ralink/reset.c ++++ b/arch/mips/ralink/reset.c +@@ -27,7 +27,7 @@ static int ralink_assert_device(struct reset_controller_dev *rcdev, + { + u32 val; + +- if (id < 8) ++ if (id == 0) + return -1; + + val = rt_sysc_r32(SYSC_REG_RESET_CTRL); +@@ -42,7 +42,7 @@ static int ralink_deassert_device(struct reset_controller_dev *rcdev, + { + u32 val; + +- if (id < 8) ++ if (id == 0) + return -1; + + val = rt_sysc_r32(SYSC_REG_RESET_CTRL); diff --git a/target/linux/realtek/Makefile b/target/linux/realtek/Makefile index 02eefe26fb..5159a40c4c 100644 --- a/target/linux/realtek/Makefile +++ b/target/linux/realtek/Makefile @@ -1,6 +1,5 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk ARCH:=mips diff --git a/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi new file mode 100644 index 0000000000..2cda3c15a3 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_netgear_gigabit.dtsi @@ -0,0 +1,137 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl838x.dtsi" + +#include +#include + +/ { + compatible = "realtek,rtl838x-soc"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + mode { + label = "reset"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&gpio0 { + indirect-access-bus-id = <0>; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "loader"; + reg = <0x0000000 0x00e0000>; + read-only; + }; + + partition@e0000 { + label = "bdinfo"; + reg = <0x00e0000 0x0010000>; + read-only; + }; + + partition@f0000 { + label = "sysinfo"; + reg = <0x00f0000 0x0010000>; + read-only; + }; + + partition@100000 { + label = "jffs2_cfg"; + reg = <0x0100000 0x0100000>; + read-only; + }; + + partition@200000 { + label = "jffs2_log"; + reg = <0x0200000 0x0100000>; + read-only; + }; + + partition@300000 { + label = "firmware"; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = <0x4e474520>; + reg = <0x0300000 0x0e80000>; + }; + + partition@1180000 { + label = "runtime2"; + reg = <0x1180000 0x0e80000>; + read-only; + }; + }; + }; +}; + +ðernet0 { + mdio: mdio-bus { + compatible = "realtek,rtl838x-mdio"; + regmap = <ðernet0>; + #address-cells = <1>; + #size-cells = <0>; + + INTERNAL_PHY(8) + INTERNAL_PHY(9) + INTERNAL_PHY(10) + INTERNAL_PHY(11) + INTERNAL_PHY(12) + INTERNAL_PHY(13) + INTERNAL_PHY(14) + INTERNAL_PHY(15) + }; +}; + +&switch0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT(8, 1, internal) + SWITCH_PORT(9, 2, internal) + SWITCH_PORT(10, 3, internal) + SWITCH_PORT(11, 4, internal) + SWITCH_PORT(12, 5, internal) + SWITCH_PORT(13, 6, internal) + SWITCH_PORT(14, 7, internal) + SWITCH_PORT(15, 8, internal) + + port@28 { + ethernet = <ðernet0>; + reg = <28>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs108t-v3.dts b/target/linux/realtek/dts/rtl8380_netgear_gs108t-v3.dts new file mode 100644 index 0000000000..080fee6107 --- /dev/null +++ b/target/linux/realtek/dts/rtl8380_netgear_gs108t-v3.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "rtl8380_netgear_gigabit.dtsi" + +/ { + compatible = "netgear,gs108t-v3", "realtek,rtl838x-soc"; + model = "Netgear GS108T v3"; +}; diff --git a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts index cd9342f3f1..265cc51c30 100644 --- a/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts +++ b/target/linux/realtek/dts/rtl8380_netgear_gs110tpp-v1.dts @@ -1,231 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include "rtl838x.dtsi" - -#include -#include +#include "rtl8380_netgear_gigabit.dtsi" / { compatible = "netgear,gs110tpp-v1", "realtek,rtl838x-soc"; - model = "Netgear GS110TPP"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - mode { - label = "reset"; - gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&gpio0 { - indirect-access-bus-id = <0>; -}; - -&spi0 { - status = "okay"; - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - partition@0 { - label = "u-boot"; - reg = <0x0000000 0x0e0000>; - read-only; - }; - partition@e0000 { - label = "u-boot-env"; - reg = <0x00e0000 0x010000>; - }; - partition@f0000 { - label = "sysinfo"; - reg = <0x00f0000 0x010000>; - read-only; - }; - partition@100000{ - label = "jffs2_cfg"; - reg = <0x0100000 0x100000>; - read-only; - }; - partition@200000{ - label = "jffs2_log"; - reg = <0x0200000 0x100000>; - }; - partition@300000{ - label = "firmware"; - compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = <0x4e474520>; - reg = <0x0300000 0x1d00000>; - }; - }; - }; -}; - -ðernet0 { - mdio: mdio-bus { - compatible = "realtek,rtl838x-mdio"; - regmap = <ðernet0>; - #address-cells = <1>; - #size-cells = <0>; - - /* Internal phy */ - phy8: ethernet-phy@8 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <8>; - }; - phy9: ethernet-phy@9 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <9>; - }; - phy10: ethernet-phy@10 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <10>; - }; - phy11: ethernet-phy@11 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <11>; - }; - phy12: ethernet-phy@12 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <12>; - }; - phy13: ethernet-phy@13 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <13>; - }; - phy14: ethernet-phy@14 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <14>; - }; - phy15: ethernet-phy@15 { - compatible = "ethernet-phy-ieee802.3-c22"; - reg = <15>; - }; -/* phy10: ethernet-phy@10 { - compatible = "ethernet-phy-ieee802.3-c22"; - phy-is-integrated; - reg = <10>; - }; - phy11: ethernet-phy@11 { - compatible = "ethernet-phy-ieee802.3-c22"; - phy-is-integrated; - reg = <11>; - }; - phy12: ethernet-phy@12 { - compatible = "ethernet-phy-ieee802.3-c22"; - phy-is-integrated; - reg = <12>; - }; - phy13: ethernet-phy@13 { - compatible = "ethernet-phy-ieee802.3-c22"; - phy-is-integrated; - reg = <13>; - };*/ - }; -}; - -&switch0 { - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@8 { - reg = <8>; - label = "lan1"; - phy-handle = <&phy8>; - phy-mode = "internal"; - }; - port@9 { - reg = <9>; - label = "lan2"; - phy-handle = <&phy9>; - phy-mode = "internal"; - }; - port@10 { - reg = <10>; - label = "lan3"; - phy-handle = <&phy10>; - phy-mode = "internal"; - }; - port@11 { - reg = <11>; - label = "lan4"; - phy-handle = <&phy11>; - phy-mode = "internal"; - }; - port@12 { - reg = <12>; - label = "lan5"; - phy-handle = <&phy12>; - phy-mode = "internal"; - }; - port@13 { - reg = <13>; - label = "lan6"; - phy-handle = <&phy13>; - phy-mode = "internal"; - }; - port@14 { - reg = <14>; - label = "lan7"; - phy-handle = <&phy14>; - phy-mode = "internal"; - }; - port@15 { - reg = <15>; - label = "lan8"; - phy-handle = <&phy15>; - phy-mode = "internal"; - }; -/* port@10 { - reg = <10>; - label = "lan9"; - phy-mode = "internal"; - phy-handle = <&phy10>; - }; - port@11 { - reg = <11>; - label = "lan10"; - phy-mode = "internal"; - phy-handle = <&phy11>; - }; - port@12 { - reg = <12>; - label = "lan11"; - phy-mode = "internal"; - phy-handle = <&phy12>; - }; - port@13 { - reg = <13>; - label = "lan12"; - phy-mode = "internal"; - phy-handle = <&phy13>; - };*/ - port@28 { - ethernet = <ðernet0>; - reg = <28>; - phy-mode = "internal"; - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - }; + model = "Netgear GS110TPP v1"; }; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 8ad7ad1b5d..424726c8a9 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -1,6 +1,5 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk @@ -26,6 +25,16 @@ define Device/Default append-metadata | check-size endef +# "NGE" refers to the uImage magic +define Device/netgear_nge + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma + SOC := rtl8380 + IMAGE_SIZE := 14848k + UIMAGE_MAGIC := 0x4e474520 + DEVICE_VENDOR := NETGEAR +endef + define Device/allnet_all-sg8208m SOC := rtl8382 IMAGE_SIZE := 7168k @@ -61,13 +70,16 @@ define Device/d-link_dgs-1210-28 endef TARGET_DEVICES += d-link_dgs-1210-28 +define Device/netgear_gs108t-v3 + $(Device/netgear_nge) + DEVICE_MODEL := GS108T + DEVICE_VARIANT := v3 +endef +TARGET_DEVICES += netgear_gs108t-v3 + define Device/netgear_gs110tpp-v1 - $(Device/Default) - SOC := rtl8380 - IMAGE_SIZE := 14848k - UIMAGE_MAGIC := 0x4e474520 - DEVICE_VENDOR := NETGEAR - DEVICE_MODEL := GS110TP + $(Device/netgear_nge) + DEVICE_MODEL := GS110TPP DEVICE_VARIANT := v1 endef TARGET_DEVICES += netgear_gs110tpp-v1 diff --git a/target/linux/realtek/profiles/00-default.mk b/target/linux/realtek/profiles/00-default.mk index 7f2053da55..942b0f1496 100644 --- a/target/linux/realtek/profiles/00-default.mk +++ b/target/linux/realtek/profiles/00-default.mk @@ -1,6 +1,4 @@ -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only define Profile/Default NAME:=Default Profile diff --git a/target/linux/rockchip/Makefile b/target/linux/rockchip/Makefile index 0c016d7b72..da07f0b3f9 100644 --- a/target/linux/rockchip/Makefile +++ b/target/linux/rockchip/Makefile @@ -1,7 +1,5 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk BOARD:=rockchip diff --git a/target/linux/rockchip/image/Makefile b/target/linux/rockchip/image/Makefile index ea6d78ac86..46a57b07d4 100644 --- a/target/linux/rockchip/image/Makefile +++ b/target/linux/rockchip/image/Makefile @@ -1,7 +1,5 @@ -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# +# SPDX-License-Identifier: GPL-2.0-only + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 80e5359e58..ecee301be7 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -1,9 +1,6 @@ -# +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2020 Tobias Maedel -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/friendlyarm_nanopi-r2s DEVICE_VENDOR := FriendlyARM diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile index 78789695ef..fd32830969 100644 --- a/target/linux/sunxi/Makefile +++ b/target/linux/sunxi/Makefile @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/sunxi/cortexa53/target.mk b/target/linux/sunxi/cortexa53/target.mk index 435d88f5f4..9e3a4064be 100644 --- a/target/linux/sunxi/cortexa53/target.mk +++ b/target/linux/sunxi/cortexa53/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/sunxi/cortexa7/target.mk b/target/linux/sunxi/cortexa7/target.mk index 238eb17ac1..95315fd4a4 100644 --- a/target/linux/sunxi/cortexa7/target.mk +++ b/target/linux/sunxi/cortexa7/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/sunxi/cortexa8/target.mk b/target/linux/sunxi/cortexa8/target.mk index d7d18f6ca4..cf30ca7877 100644 --- a/target/linux/sunxi/cortexa8/target.mk +++ b/target/linux/sunxi/cortexa8/target.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Hauke Mehrtens -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# include $(TOPDIR)/rules.mk diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 572c0597e8..738585accc 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -1,10 +1,8 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/sunxi/image/cortexa53.mk b/target/linux/sunxi/image/cortexa53.mk index 536fa2417a..117d25ea90 100644 --- a/target/linux/sunxi/image/cortexa53.mk +++ b/target/linux/sunxi/image/cortexa53.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/sun50i SUNXI_DTS_DIR := allwinner/ diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk index baa3e56b44..b55e93b7fb 100644 --- a/target/linux/sunxi/image/cortexa7.mk +++ b/target/linux/sunxi/image/cortexa7.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2019 OpenWrt.org # Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/cubietech_cubieboard2 DEVICE_VENDOR := Cubietech diff --git a/target/linux/sunxi/image/cortexa8.mk b/target/linux/sunxi/image/cortexa8.mk index 643b3d4b1e..9f55774379 100644 --- a/target/linux/sunxi/image/cortexa8.mk +++ b/target/linux/sunxi/image/cortexa8.mk @@ -1,10 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2016 OpenWrt.org # Copyright (C) 2016 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Device/cubietech_a10-cubieboard DEVICE_VENDOR := Cubietech diff --git a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh index 7dc22761dd..2c627a7193 100755 --- a/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh +++ b/target/linux/sunxi/image/gen_sunxi_sdcard_img.sh @@ -1,10 +1,7 @@ #!/bin/sh +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# set -ex [ $# -eq 6 ] || { diff --git a/target/linux/sunxi/modules.mk b/target/linux/sunxi/modules.mk index 6d2de98658..99f4db7604 100644 --- a/target/linux/sunxi/modules.mk +++ b/target/linux/sunxi/modules.mk @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2013-2016 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. define KernelPackage/rtc-sunxi SUBMENU:=$(OTHER_MENU) diff --git a/target/linux/sunxi/profiles/00-default.mk b/target/linux/sunxi/profiles/00-default.mk index 7dc791ecde..0541087a48 100644 --- a/target/linux/sunxi/profiles/00-default.mk +++ b/target/linux/sunxi/profiles/00-default.mk @@ -1,9 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Yousong Zhou -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# define Profile/Default NAME:=Default Profile (all drivers) diff --git a/target/linux/tegra/Makefile b/target/linux/tegra/Makefile index cf929fb0f1..4d4b0e5ea4 100644 --- a/target/linux/tegra/Makefile +++ b/target/linux/tegra/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017-2019 Tomasz Maciej Nowak -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH := arm diff --git a/target/linux/tegra/image/Makefile b/target/linux/tegra/image/Makefile index 97f97e3cc2..58c2fe74f8 100644 --- a/target/linux/tegra/image/Makefile +++ b/target/linux/tegra/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017-2019 Tomasz Maciej Nowak -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/uml/Makefile b/target/linux/uml/Makefile index 275d3cf3bd..ae8ea5d309 100644 --- a/target/linux/uml/Makefile +++ b/target/linux/uml/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk # UML only makes sense on linux diff --git a/target/linux/uml/image/Makefile b/target/linux/uml/image/Makefile index c8ed874d15..45ab0cfbcd 100644 --- a/target/linux/uml/image/Makefile +++ b/target/linux/uml/image/Makefile @@ -1,9 +1,7 @@ -# +# SPDX-License-Identifier: GPL-2.0-only +# # Copyright (C) 2006-2010 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile index c696c35312..cb8969288f 100644 --- a/target/linux/x86/Makefile +++ b/target/linux/x86/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2011 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=i386 diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index 81aab20666..f61e4ff802 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2006-2020 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/linux/x86/modules.mk b/target/linux/x86/modules.mk index 61ab400dc9..24a4384577 100644 --- a/target/linux/x86/modules.mk +++ b/target/linux/x86/modules.mk @@ -1,8 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2017 Cezary Jackiewicz -# -# This is free software, licensed under the GNU General Public License v2. -# define KernelPackage/sound-cs5535audio TITLE:=CS5535/CS5536 Audio Controller diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile index 3119187c37..b5988c9e05 100644 --- a/target/linux/zynq/Makefile +++ b/target/linux/zynq/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk ARCH:=arm diff --git a/target/linux/zynq/image/Makefile b/target/linux/zynq/image/Makefile index 7cec38ca68..3eb508d7c7 100644 --- a/target/linux/zynq/image/Makefile +++ b/target/linux/zynq/image/Makefile @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Copyright (C) 2015 OpenWrt.org -# -# This is free software, licensed under the GNU General Public License v2. -# See /LICENSE for more information. -# + include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk diff --git a/target/sdk/Makefile b/target/sdk/Makefile index d7e10a9bd8..0606621192 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -130,7 +130,8 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean $(SDK_BUILD_DIR)/target/linux/*/patches* ./convert-config.pl $(TOPDIR)/.config > $(SDK_BUILD_DIR)/Config-build.in $(CP) -L \ - $(TOPDIR)/LICENSE \ + $(TOPDIR)/LICENSES \ + $(TOPDIR)/COPYING \ $(TOPDIR)/rules.mk \ ./files/Config.in \ ./files/Makefile \ diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile index 5002ff7835..c3ba70db04 100644 --- a/target/toolchain/Makefile +++ b/target/toolchain/Makefile @@ -33,7 +33,10 @@ $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.bz2: clean toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX) | \ $(TAR) -xf - -C $(TOOLCHAIN_BUILD_DIR) - $(CP) $(TOPDIR)/LICENSE ./files/README.TOOLCHAIN \ + $(CP) \ + $(TOPDIR)/LICENSES \ + $(TOPDIR)/COPYING \ + ./files/README.TOOLCHAIN \ $(TOOLCHAIN_BUILD_DIR)/ $(CP) ./files/wrapper.sh $(TOOLCHAIN_PREFIX)/bin/$(REAL_GNU_TARGET_NAME)-wrapper.sh diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk index aaeb253353..40a1781412 100644 --- a/toolchain/glibc/common.mk +++ b/toolchain/glibc/common.mk @@ -7,13 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=glibc -PKG_VERSION:=2.32 +PKG_VERSION:=2.33 PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE_VERSION:=760e1d287825fa91d4d5a0cc921340c740d803e2 -PKG_MIRROR_HASH:=3ea50e679a241faec8d0e90c9db84a19a42e03dd08328aee406a9ec56393104d +PKG_SOURCE_VERSION:=c5e354589729c0ca63899923f18783fa6803462d +PKG_MIRROR_HASH:=f6f691f1d0f8789f2f143d9e0e785e96dc44cbf7b07bb41aff792f327a5dcb97 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz