This repository has been archived by the owner on Oct 13, 2022. It is now read-only.
Fixes a few bugs I ran into while trying to port to TL-WR1043ND (AP83) #82
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Returning NULL leads to subtle corruption and malloc returning memory addresses in the user mode space range (0x00000000-0x7fffffff). This in turn also breaks everything that implicitly relies on malloc()ed memory to be zeroed at the beginning (since the malloc arena is initially zeroed).
Only the first sizeof(ptr) bytes were initialized correctly. This leads to a crash in ag7250_send() if mac->next_tx is uninitialized (if the memory returned by malloc() is not nulled).
The code only checks for existance, so -DCOMPRESSED_UBOOT=0 leads to "#ifdef COMPRESSED_UBOOT" protected sections to be wrongly included.
Adds compatibility-macro for crc32. Setting first arg (crc) to anything but 0 is not supported, but all callers already conform to this. This is asserted at compile time through macro trickery. Reduces uncompressed code size by ~1KB: Without this change: Data Size: 127348 Bytes = 124.36 kB = 0.12 MB After this change: Data Size: 126084 Bytes = 123.13 kB = 0.12 MB
Tested to compile & work on MR3020 as of 2d3f5ed: |
Hello @ranma, Thanks for your contribution! I have already included your changes in my local repository. Cheers, |
@pepe2k - Is with this patch, TL-WR1043ND supported? |
@leleobhz nope |
Do you have some intention to support it? |
Only >= v2. |
Hi @pepe2k! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a few bugs I ran into while trying to port to TL-WR1043ND (AP83) and followed up with a few other improvements that will make the code-merge for TL-WR1043ND easier or are independent of the TL-WR1043ND port.