Commit Graph

289 Commits

Author SHA1 Message Date
proski 0a63a44b94 Don't call dump_stack() for mere debugging, without major errors
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3941 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-02-04 21:43:58 +00:00
proski e0b577bb5d Replace __FUNCTION__ with __func__
__FUNCTION__ is an old GNU extension, __func__ is C99.  Use of
__FUNCTION__ is discouraged.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3930 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-01-23 18:23:19 +00:00
proski 3e70e4f8c1 Compile fixes for Linux 2.6.29
Use netdev_priv() for Linux 2.4.27 and newer.  Provide compatibility
wrapper for older kernels.

Imply CONFIG_KMOD for Linux 2.6.27 and newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3902 0192ed92-7a03-0410-a25b-9323aeb14dbd
2009-01-14 02:36:53 +00:00
proski 5113fc8d80 Remove unused function ieee80211_dfs_test_return()
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3849 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-08-27 17:18:39 +00:00
proski 9fb3122e7a Reduce difference with the DFS branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3820 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-24 01:46:25 +00:00
benoit b1f30fd47a Added proper phytype definitions for XR and HT
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3813 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-19 20:36:28 +00:00
proski 02bac30645 More typo fixes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3809 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-18 22:00:42 +00:00
proski 65b2749123 Typo fixes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3808 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-18 21:50:53 +00:00
proski d818daa1f2 Merge some comment changes from madwifi-dfs
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3787 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-17 04:50:29 +00:00
proski da7fdf05c1 Remove trailing whitespace where it's not in madwifi-dfs branch
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3783 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-17 03:44:41 +00:00
proski 4878463bdb Wireless extensions changes are for 2.6.27, not 2.6.26
Don't use compatibility code if IW_REQUEST_FLAG_COMPAT is defined, which
means that the kernel identifies itself as 2.6.26, but acts like 2.6.27
would.

Remove unneeded use of ellipsis in iwe_stream_lcp_len() definition.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3767 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-10 14:50:56 +00:00
mentor c4c202073b Use iwe_stream_lcp_len instead of IW_EV_LCP_LEN for 2.6.26+
Addendum to r3750
Ticket: #2022


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3760 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-07 19:28:08 +00:00
mentor caa352fdd2 Remove, rename, and move various mystery meat defines
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3756 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-06 02:31:09 +00:00
mentor 130324108b Update iwe_stream_add_* API usage for 2.6.26+.
Ticket: #2022


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3750 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-05 02:21:38 +00:00
mentor 9a2f6efd63 Correctly name Data type Null subtype frame.
Do not try to process Null and QoS Null frames as data.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3749 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-07-05 01:00:32 +00:00
mentor 70e6e83fc8 Add an informational message when debug flags are changed.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3744 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-22 05:32:29 +00:00
mentor 78cbb40469 Convert various _debug style char *func and int line passing to use dump_stack. This may possibly be a tad noisy still.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3743 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-22 02:12:53 +00:00
mentor 03dbd3568d Make module loading and unloading much less noisy. I don't believe any of this ifnromation is particularly useful for dbeugging, and definitely not for operational use.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3742 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-21 14:40:43 +00:00
proski 941d62b043 KASSERT should add newline at the end to match FreeBSD behavior
Fix KASSERT calls that add their own newline.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3734 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-19 16:58:07 +00:00
mentor 717cb96dd8 Update roaming iwpriv names to reflect actual format of rate data (i.e., increments of 0.5).
Also, update comments and token names to reflect reality/actual usage. Remove some entirely purposeless padding bytes.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3733 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-19 02:34:23 +00:00
kelmo 0a1bf29ca4 Fix format string bugs.
Closes: #1999


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3726 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-16 08:50:30 +00:00
benoit 3ecbaecf60 Fix needed for wpa_supplicant. It might not be the best fix.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3724 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-13 15:09:58 +00:00
mentor a3c603b875 Reference the VAP's node in injection/raw output frames. Makes injection work.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3720 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-12 05:22:37 +00:00
mentor be5b0e727a Move responsibility for removing padding in the RX path entirely to the driver. This allows it to be done once, and thus avoids extra copying of SKBs.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3713 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-08 01:43:53 +00:00
mentor 76cade5dac Make pointer declarations and casting consistent. Some other formatting changes are made in passing
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3710 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 20:32:29 +00:00
mentor 1a24cb141a Use vlan_hwaccel_rx instead of vlan_hwaccel_receive_skb, as this is the non-polling (non-NAPI) version.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3709 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 19:42:24 +00:00
mentor f259deab93 In some parts of Madwifi, SKBs are dispatched from the VAP device to the physical device using Linux kernel queuing, which does not understand our node reference system, so node references are carefully cleaned up if the packet is dropped.
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
2008-06-06 19:21:33 +00:00
mentor a5680de2b6 Remove sead ALIGNED_POINTER code
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3705 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-06 01:40:25 +00:00
kelmo 4b2cf1393a Remove modules.order files in Makefile clean targets.
Remove kbuild by-products in regression/Makefile. Also allow
regression/tkip/test_tkip.c to compile (too few arguments to function
ieee80211_crypto_demic).

Closes: #1973


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3699 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-06-04 12:25:31 +00:00
mentor bacb36738e Update some strings in ieee80211_dumppkt to be slightly more obvious/correct
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3680 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-25 18:44:50 +00:00
mentor 2cb3887369 Add lots of .PHONY to Makefiles and remove a duplicate rule definition
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3678 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-23 03:49:25 +00:00
benoit 99ead2121d Merge madwifi-dfs r3676
Fixed type of all variables storing jiffies
Converted add_timer() to mod_timer()


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3677 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-22 20:25:48 +00:00
mentor c0466a75a6 Record stat's before dispatch, and generally don't try to access NULL pointers
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3674 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-22 16:09:19 +00:00
mentor 18682f3d29 SKB handling code cleanup:
* 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
2008-05-22 12:58:24 +00:00
mentor 547147362c Random whitespace
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3652 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-20 15:58:00 +00:00
mentor 15abd8d1f1 Formatting - r3634
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3640 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-17 04:44:05 +00:00
br1 3b9f5d1b89 add IEEE80211_TSF_TO_TU macro again and explain it once there instead of
open coding >> 10 and putting notes all over the place.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3635 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-16 16:09:36 +00:00
br1 86d8de1785 let ieee80211_recv_mgmt() return 0 if the frame is to be discarded and don't
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
2008-05-16 16:09:28 +00:00
br1 6da523e4d6 enclose node_print_message() calls in #ifdef IEEE80211_DEBUG
preprocessor directives to avoid this function beeing called
(and allocating stack space) when debugging is disabled.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3631 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-16 11:34:59 +00:00
mentor 6abd8285aa Whitespace for control statements
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3627 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-14 19:11:57 +00:00
mentor a192279dd6 Only deliver frames to VAPs that are running.
This includes the reinstatement of the ieee80211_input_all function as this functionality should live in the net80211 layer. Unfortunately the code for this is a tad on the ugly side.

Thanks to OpenWRT/nbd: https://dev.openwrt.org/log/trunk/package/madwifi/patches/334-input.patch


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3621 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-10 06:03:52 +00:00
mentor ef47acefdd Convert tracked member of ieee80211_cb to be a flag
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3618 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-06 11:31:26 +00:00
mentor d3842998ca Remove now unused FF next field in ieee80211_cb. This makes ieee80211_cb under 48 bytes on 64-bit with IEEE80211_DEBUG_REFCNT
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3617 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-06 11:22:31 +00:00
mentor f577062ef7 Move the monitor physical parameter struct inside ieee80211_cb. Have same struct actually be an array. Add an evil struct definition that breaks if ieee80211_cb is bigger than 48 bytes; it serves no other purpose.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3615 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 23:51:16 +00:00
proski a49a973027 Use __skb_queue_after() instead of __skb_append()
Follow the rule of coding for the latest API.  Use __skb_queue_after()
in the code rather than __skb_append(), which is due to be removed in
Linux 2.6.26.  Provide compatibility definitions for __skb_queue_after()
in include/compat.h.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3605 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 12:12:43 +00:00
proski 2913278884 Adjust build system for Linux 2.6.26
During the second stage of the module build, Linux 2.6.26 does not
define $(obj).  Try using $(SUBDIRS) as $(obj) before falling back to
the current directory.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3603 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 02:00:56 +00:00
proski 32df5a67ce Provide __skb_append() replacement for Linux 2.6.26
__skb_append() will be removed in Linux 2.6.26.  __skb_queue_after()
should be used instead.  Use the new interface on Linux 2.6.25 and
newer.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3602 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-05 01:41:23 +00:00
mentor 380c55d9c9 Rename and move, into the right headers, the SKB and BF macros
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3596 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-04 17:48:59 +00:00
mentor 9538bc8243 Remove the skb_copy call from ieee80211_input. However, create a copied SKB for each call to ieee80211_input when we are sending to all VAPs. Effectively, this means that we are using the SKB from the ath_buf except when ieee80211_input is called multiple times.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3595 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-03 03:49:05 +00:00
mentor 1b318d3853 Tidy RX queue processing code:
* 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
2008-05-03 03:40:27 +00:00
mentor 2ecfeab07e Move the maximum monitor headroom definition to a nice header file
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3593 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-05-01 13:49:09 +00:00
mentor 65868884d2 Do not modify source packet in ieee80211_input_monitor if the headroom is not sufficient. Instead, make sure the copied skb is allocated with enough headroom.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3586 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-30 22:11:27 +00:00
mentor bbcacb393a Correct terminology in ieee80211_input skb_copy comment
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3585 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-30 22:04:38 +00:00
mentor ef6d84125b Convert as many things as possible to use kzalloc
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3573 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-24 14:10:42 +00:00
mtaylor dc1f1c8425 Fix non-debug compilation warnings about unused functions/variables
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3532 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 23:48:41 +00:00
mtaylor fd66cd648f Revert remaining portions of r3405 that broke wpa_supplicant compatibility.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3525 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 09:18:50 +00:00
mtaylor 71fd5b074a Add ssid matching to station lookup. Based on a patch from radiodriver.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3520 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-10 06:24:32 +00:00
mtaylor 7c6997619e This commit fixes problems with skbuff cloning and reference counting in input handling. The biggest problem with this code was corruption of memory.
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
2008-04-09 23:34:44 +00:00
mtaylor 366cfd8d28 Enable roaming. Fix another jiffies comparison bug.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3500 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:25:04 +00:00
mtaylor 017c006628 Improved debug tracing and support for cleaning up stalled CABQ.
When CABQ transfer finishes, HAL reports the queue as inactive.  Thus, if
we switch modes or change state the CABQ can be left with some ath_buf 
referenced by it.  The changes in this patch cause the CABQ to be checked
at DTIM even when no multicast is pending for the VAP and if "stalled"
then the queue is drained.  

A subsequent patch will fix the tx tasklet logic for CABQ.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3499 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 23:17:18 +00:00
mtaylor 43de3ce1a0 Debugging updates:
*  Updated register dump based on ath5k database (refresh the list)
*  Added a generic debug iwpriv delegation method to if_ath
*  Added some functions to help diagnose lost ath_buf pointers
	[resultant fixes will be checked in subsequent commits]



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3497 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 22:25:51 +00:00
mtaylor eaa447863a More SKB_NI
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3496 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 22:03:18 +00:00
mtaylor 44dfbc1d20 Another SKB_NI
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3494 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:24:26 +00:00
mtaylor e507ef4964 Another SKB_NI
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3493 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:23:40 +00:00
mtaylor 253f7e4d52 Add opmode names table. to be used in subsequent checkin
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3492 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:21:31 +00:00
mtaylor 2d91c1cb57 When power save queue overflows, we have to return NETDEV_TX_OK and free the SKB.
The convention for this function ieee80211_pwrsave is to consume the SKB and either
queue it or free it.  Also switch some SKB_CB(...)->ni to SKB_NI(...)



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3491 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:15:32 +00:00
mtaylor 54a9675cf9 Set subtype for re-association requests
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3490 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:03:43 +00:00
mtaylor 5b79921c17 Use long unsigned int for jiffies
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3489 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:03:08 +00:00
mtaylor 7c7c41a5e3 Updated roaming thresholds, for when automatic roaming is re-enabled.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3488 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:02:19 +00:00
mtaylor bd5f871a85 Switch to easier to read SKB_NI macros
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3487 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:01:03 +00:00
mtaylor 62bf94d5e6 Fix address used for find node for RTS frames, which also have only one address. Fix another jiffies time comparison to use rollover safe macro.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3486 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 21:00:17 +00:00
mtaylor 4957e2ea41 Additional macros to cleanup SKB CB data access, minor corrections to style of a couple of macros, and some additional missed locking macros.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3485 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 20:49:53 +00:00
mtaylor 3f17ff7335 Additional null check on iv_auth
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3484 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 20:48:50 +00:00
mtaylor a78d83bb0d Debugging function cleanup:
1) Move all debug preprocessor flags out into make files
2) Add support for remaining preprocessor flags to be set by ENV variables
3) Add support for HAL tracing to include device name



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3481 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 19:55:49 +00:00
mtaylor a48f3a9bdb if IFMEDIA_DEBUG is defined, also set ifmedia_debug as it is pointless otherwise.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3477 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 04:02:10 +00:00
mtaylor 80c58504d7 This patch cleans up the VAP creation API.
The need to use software instead of hardware for beacon timers in AP+STA mode (aka nosbeacon) is now just determined in software, as we always knew whether or not to enable this.

The confusing bssid and -bssid parameters are now deprecated.

The "uniquebssid" flag is equivalent to "bssid" and can be used to force IEEE80211_CLONE_BSSID flag.  If this is not specified, then the BSSID used will be the next unused BSSID in the sequence, which could very well be the parent device's MAC address.

"uniquebssid" equates directly to IEEE80211_CLONE_BSSID" flag therefore.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3476 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-09 03:24:05 +00:00
mentor 4be10b5ba8 Some cleaning. Mostly cosmetic, but:
* Restructure one set of control blocks into a more readable form
 * Add some additional debug output


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3456 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-04-06 03:02:25 +00:00
mentor 0a246c936d Similarly to r3315
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3412 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-30 00:08:36 +00:00
proski 131d17a1f1 Fix compilation on kernels prior to Linux 2.6.11
Copy Linux implementation of sort() into ieee80211_scan_ap.c


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3407 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-27 22:32:08 +00:00
mentor c6a1e81673 Change all broadcast address/SSID checks in ieee80211_wireless.c to use the same method.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3406 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-26 01:25:12 +00:00
mentor 5cbfbae447 Unify association request interface by having the madwifi private IOCTL translate to the wireless extensions interface.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3405 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-26 00:02:26 +00:00
mentor 3252f8852e Merge -dfs to trunk - r3366
This commit should have been in trunk all along. Also, make one codepath sligthly less verbose.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3367 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-03-01 07:59:04 +00:00
mentor 101b902062 Arbitrary whitespace cleanups
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3365 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-25 15:51:38 +00:00
nbd 39f4007bdd fix a merge bug that broke ap channel scanning for different modes
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3360 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-21 01:47:52 +00:00
mentor 3f4e3ddb40 Only have the Station PS handling routine run when we are actually in Station mode. This probably only affects IBSS.
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3341 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-06 21:29:06 +00:00
mentor c9cc0e7dee Correct pointer arithmetic in the SKB CB.
With thanks (but not copyright ;) to Alessandro Erta


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3337 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-05 06:22:32 +00:00
mentor ebc79fce38 Cleanup up de-MIC failure (in hardware) handling. Apparently, HW sometimes gets this wrong and spuriusly fails valid packets. In all cases, the packets are dropped, but we do extra processing to record statistics correctly.
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
2008-02-04 00:16:24 +00:00
mentor e906bf12da CCMP/AES Crypto module
So, ccmp_attach is called for each new key. Hence, only try to allocate a software context if IEEE80211_KEY_SWCRYPT is specified. Also, if we need a software context and fail, fail immediately; thus, the check in ccmp_setkey can be eleminated, as it is not actually a separate condition.

I think that when I touched this last, I was confused about the purpose of ccmp_attach.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3322 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-02-02 20:07:01 +00:00
mentor 877b7727d1 I think howmany(roundup()) should just be howmany() as roundup(x, y) is howmany(x, y) * y
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3315 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-31 03:42:51 +00:00
mtaylor 4d5de4b5a2 This patch adds iwpriv values for setting the
time in ms, or the number of beacons for the
beacon miss alarm.  If we haven't had a beacon
in this period, the alarm is sounded and 
action (i.e. roaming) is taken.

This patch changes the storage of the beacon
miss threshold to integral beacon count but 
corrects the previous intent.

The default beacon miss alarm is going to be
850ms which is half way between the two hard
coded limits that were there before.

The old hard coded limits assumed that the
beacon interval was 100ms and set the limit to
10 (1000ms) for software beacon miss timer 
and 7 for hardware beacon miss timer.

The new default is 850ms (the midpoint between
the two previous defaults).  This value is rounded
up to the next nearest beacon interval.

There is no upper bound on the beacon miss
threshold specified, since it may need to be
wildly inflated with 25ms beacon interval, or
wildly reduced with 1000ms beacon interval.

The minimum is still 2 beacons, regardless of
the beacon interval.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3314 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 23:50:16 +00:00
mentor 0ad2c8981a Linux 2.4 series compatibility fixes
* Based on patches from nbd
 * av_beacon_alloc code has been reimplemented using atomic bit operations; I think this is safe for SMP


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3310 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 20:23:49 +00:00
mtaylor 874abd03ab Reduce the maximum message length for node
messages from 1000 to 192 and drop the length
needed to display the [atomic] node count.

Slamming this much data on the stack can cause
stack overflows with 4k stacks quite easily,
especially when hard interrupts occur and 
extend a stack that is already almost full.



git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3307 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-30 19:26:13 +00:00
mentor b8e6b99d2c De-FAIL previous revisions
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3305 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 17:46:15 +00:00
mentor b0f92899f4 Formatting - calming...
git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3304 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 11:18:15 +00:00
mentor 3202c2a0de Change reset_bss semantics so that the node reference is passed to iv_bss, and then use the iv_bss reference.
I believe that this is semantically correct, and so have removed the comment.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3303 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 11:17:57 +00:00
mtaylor 2411a87efc During reset_bss we were incrementing the ref
count of the new bss node.  The allocation 
function gives us a reference.  With this extra
reference, every invocation of reset_bss was
causing a leak of one node ~4kb every time the
interface was brought back up (or the BSS was reset
for other reasons).

This fixes ticket #1682.  I can run ifconfig down/up
cycle for a long time.  I'll run it overnight next
to be sure.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3301 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 07:08:29 +00:00
mtaylor 602be360fc Move the node reference up that pins the WDS peer
node in the node table.  The node reference was
being taken in any path where the wds node was found
and not just when the wds node was first added.

This would have caused wds nodes to get inflated
reference counts, and be leaked on bss reset when
nodes were flushed from the node tables.


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3300 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-29 07:00:09 +00:00
mtaylor dead14502d Fix a few more leaked node references when a
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
2008-01-29 06:58:22 +00:00
mentor 8e8ba8882b Some extra SKB operation return code checks. This deviates from nbd's original patch, because I don't think that if the aligning operation fails that we should return the unaligned one.
Thanks nbd


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3297 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 23:49:26 +00:00
mentor 521e00a7c6 Turn on long pre-amble in ERP IE if we have non-ERP stations
Thanks NBD


git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3296 0192ed92-7a03-0410-a25b-9323aeb14dbd
2008-01-28 23:40:44 +00:00