Applying a patch
This guide assumes that you have a clean copy of the kernel source-code unpacked in the /usr/src/linux folder. If you're unsure about the same, please make your way to this article and follow the guide upto the "Downloading and unpacking..." stage. If you've done this correctly, you can now proceed towards downloading your patches and applying them.
But wait! Before you start patching your kernel source-code, here are a couple of things which you should keep in mind:
Patches are almost always built against a specific version of the kernel. So if you're thinking of using the 2.6.28 kernel, and the patch has been made for version 2.6.24, chances are that the patch might not work the way it should. Try to make sure that the patch is for the same kernel version as the one you're going to compile.
Patches are built against a clean vanilla kernel. So if you're thinking of applying patches to a distro-specific kernel package, the result could be unexpected. Always use a clean copy of the kernel source-code from kernel.org to patch.
Always keep a backup of the kernel source-code. If the patch doesn't work the way it should, you don't want to go and download the source-code again and unpack it. A simple backup of the source-code folder will save time if you fail.
The patches that you download will be compressed in gz/bzip2 archives. To apply them, you need to copy them to the /usr/src/linux folder. Once that's done, simply type in this command to integrate the patch into the source-code.
patch -p0 < name-of-patch-file
This will take the patch file as input and feed it to the patch utility, which will integrate it. In case you have an error, chances are that the patch hasn't been written with the complete folder path. Thus, it could be trying to patch a file called wireless.c which is inside another folder. Since it cannot find this file to patch, the job would fail. An easy way to make sure of this is to simply open the patch file and look at the first few lines. The start of the file will have the name of the file it's going to patch. All you have to do is find this file within the source-code folder tree and run the patch command from there. That should do it!