Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to apply custom patches to wireless kernel drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
abduct
Apprentice
Apprentice


Joined: 19 Mar 2015
Posts: 203

PostPosted: Fri Jun 24, 2016 2:48 am    Post subject: How to apply custom patches to wireless kernel drivers Reply with quote

Hi, I build my kernel (3.18.x) with all related drivers pre-built and with loadable modules disabled.

I am wanting to build and use the ath9k_ht driver for my external wireless card with the Atheros AR9271 chipset. I've also found a few patches I would like to include, namely:

http://patches.aircrack-ng.org/channel-negative-one-maxim.patch and http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch

I have searched the unpatched files and these changes are not present. Can/Do I simply copy paste the changes or is there a specific patching tool to do this. Is this okay to do? All the sources link to downloading the compat-wireless drivers from orbit-lab.org, which I can no longer find working links to. Even if I did since loadable module support is disabled it wouldn't be of much use.

So:

1) Can I use these patches on the Linux kernel itself
2) How do I apply such patches in a safe manner? (there must be some kind of automated patching utility I am not aware of).

Thanks for the help.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Fri Jun 24, 2016 3:51 am    Post subject: Re: How to apply custom patches to wireless kernel drivers Reply with quote

abduct wrote:
I have searched the unpatched files and these changes are not present. Can/Do I simply copy paste the changes or is there a specific patching tool to do this. Is this okay to do? All the sources link to downloading the compat-wireless drivers from orbit-lab.org, which I can no longer find working links to. Even if I did since loadable module support is disabled it wouldn't be of much use.

abduct ... you should be aware that much can happen in the 6 years since these patches were released, and that the method, or issue, such a patch was addressing may nolonger be used, or present. In the case of the two patches above only the later will apply, and given its age you don't know what other components of NL80211/MAC80211 have since changed, and so what effect the patch may have (and note the "FIXME" provided in the frag+ack patch).

Code:
# patch -p1 --dry-run -d /usr/src/linux <channel-negative-one-maxim.patch
checking file net/wireless/chan.c
Hunk #1 FAILED at 49.
Hunk #2 FAILED at 76.
2 out of 2 hunks FAILED
# patch -p1 --dry-run -d /usr/src/linux <mac80211.compat08082009.wl_frag+ack_v1.patch
checking file net/mac80211/tx.c
Hunk #1 succeeded at 778 (offset 101 lines).

Also, aircrack-ng functions perfectly fine without them, so I expect (and as my memory serves) there is no need for them.

Note, the above code should provide an answer to the question re patch tool.

best ... khay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum