The logic to prevent calling ieee80211_input() on inactive VAPs was
flawed. The first VAP was exempt from the check for no reason.
Rewrite to avoid having nested loops. Give the original skb to the
first VAP, not to the last one, as the first VAP is easier to find in a
loop. Process the first VAP after others.
Only collect the result from the first VAP. ieee80211_input() should
return the same value (frame type) for all VAPs except if we call it
incorrectly, e.g. on an inactive VAP.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@4081 0192ed92-7a03-0410-a25b-9323aeb14dbd
However, the netif_rx and vlan_hwaccel_receive_skb functions dispatch the SKB to the higher networking levels, out of our domain.
Therefore, handle node references as appropriate.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3708 0192ed92-7a03-0410-a25b-9323aeb14dbd
* Convert last SKB_CB()->ni to SKB_NI
* Lots of comments
* Refactor various pieces of code for consistency, readability, and removal of goto
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3666 0192ed92-7a03-0410-a25b-9323aeb14dbd
process discarded frames in ath_recv_mgmt(). this reduces the number of times
we attempt to merge IBSS to invalid beacons.
this patch is based on the work of Derek Smithies
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3634 0192ed92-7a03-0410-a25b-9323aeb14dbd
* Formatting
* Add a function to remove SKB from ath_buf.
* Call aforementioned function early if we are accepting a frame, so that there's not chance the data can get stomped on by DMA. We should probably do this for ignored frames as well, but I got fed up trying to sort out the stack of goto.
* Remove some KASSERT for skb users, as the SKB are always copied.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3594 0192ed92-7a03-0410-a25b-9323aeb14dbd
ieee80211_input can receive cloned skb from the bridge layer, and thus makes copies to modify and use. The original was being freed immediately upon copying. The problem is that when you issue ANY response other than NETDEV_TX_OK the skb is returned to the kernel queue. So, basically there were wild pointers to skb in the skb queue, and these skb were being re-used by other applications and drivers - resulting in crashes all over the place.
With this new logic, we keep the original around until we know whether or not we will requeue it NETDEV_TX_BUSY or consume it NETDEV_TX_OK and we correctly free the skb only when appropriate.
We also get rid of the net80211_input_all function which was doing a bunch of unnecessary (and broken) copies and noe updates.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3501 0192ed92-7a03-0410-a25b-9323aeb14dbd
This changeset adds a node statistic. If this is not liked, I encourage it to be fixed; I might learn something.
Thanks nbd.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3334 0192ed92-7a03-0410-a25b-9323aeb14dbd
copy of the bss node is used to send a message
we need to make sure all code paths release
it when done. This bug combined with repeated
auth failures would cause node references to
grow with every failure. Then, if you were
taking down the interface and bringing it back
up you would leak one page (4kb) every time the
the node table was flushed on transition to UP.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3299 0192ed92-7a03-0410-a25b-9323aeb14dbd
* Lots of coding style and formatting, tedious and annoying
* Quite a few bad merges as far as I can tell; at least one of which was serious - reintroduced a leak
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3202 0192ed92-7a03-0410-a25b-9323aeb14dbd
The symptom would be fragments of 802.11 header showing up in the ethernet header because of skb header offsets being corrupted by MadWifi devices on lower ports which then get forwarded as-is to wired ports.
Sorry for the lame explanation, but the short end of the story is that you have to copy the skb before you modify it if you are going to play nice with bridging.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3146 0192ed92-7a03-0410-a25b-9323aeb14dbd
I've fixed the logic so that multicast is dropped, with an error when disabled. I don't think this is a valid configuration. Also, we don't skip the filtering logic so that our own multicast traffic doesn't come back to us (looking like a bridging loop).
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3132 0192ed92-7a03-0410-a25b-9323aeb14dbd
hard_start_xmit() functions must either return NETDEV_TX_OK or
NETDEV_TX_BUSY (they might also return negative errno values as well,
like -ENETDOWN)
Correct a small missing static reported by sparse
This revert part of r3075
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3123 0192ed92-7a03-0410-a25b-9323aeb14dbd
from the madwifi-dfs branch (benoit) r3086
Added MAC_FMT & MAC_ADDR macros that can be used as a drop-in
replacement for ether_sprintf(). Fixed some use of ether_sprintf() that
uses the same static buffer twice.
- Without the functional changes.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3091 0192ed92-7a03-0410-a25b-9323aeb14dbd