Changeset 3634
- Timestamp:
- 05/16/08 18:09:28 (3 months ago)
- Files:
-
- madwifi/trunk/ath/if_ath.c (modified) (6 diffs)
- madwifi/trunk/ath/if_athvar.h (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_input.c (modified) (40 diffs)
- madwifi/trunk/net80211/ieee80211_node.c (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_proto.h (modified) (1 diff)
- madwifi/trunk/net80211/ieee80211_var.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
madwifi/trunk/ath/if_ath.c
r3630 r3634 182 182 static struct sk_buff *ath_rxbuf_take_skb(struct ath_softc *, struct ath_buf *); 183 183 static int ath_rxbuf_init(struct ath_softc *, struct ath_buf *); 184 static voidath_recv_mgmt(struct ieee80211vap *, struct ieee80211_node *,184 static int ath_recv_mgmt(struct ieee80211vap *, struct ieee80211_node *, 185 185 struct sk_buff *, int, int, u_int64_t); 186 186 static void ath_setdefantenna(struct ath_softc *, u_int); … … 6437 6437 * including those belonging to other BSS. 6438 6438 */ 6439 static void6439 static int 6440 6440 ath_recv_mgmt(struct ieee80211vap * vap, struct ieee80211_node *ni_or_null, 6441 6441 struct sk_buff *skb, int subtype, int rssi, u_int64_t rtsf) … … 6456 6456 /* Call up first so subsequent work can use information 6457 6457 * potentially stored in the node (e.g. for ibss merge). */ 6458 sc->sc_recv_mgmt(vap, ni_or_null, skb, subtype, rssi, rtsf); 6458 if (sc->sc_recv_mgmt(vap, ni_or_null, skb, subtype, rssi, rtsf) == 0) 6459 return 0; 6459 6460 6460 6461 /* Lookup the new node if any (this grabs a reference to it). */ … … 6463 6464 if (ni == NULL) { 6464 6465 DPRINTF(sc, ATH_DEBUG_BEACON, "Dropping; node unknown.\n"); 6465 return ;6466 return 0; 6466 6467 } 6467 6468 … … 6539 6540 6540 6541 ieee80211_unref_node(&ni); 6542 return 0; 6541 6543 } 6542 6544 … … 6838 6840 ath_hal_rxmonitor(ah, &sc->sc_halstats, &sc->sc_curchan); 6839 6841 if (!bf_processed) 6840 DPRINTF(sc, ATH_DEBUG_RX_PROC, 6841 "Warning: %s got scheduled when no rec ieve "6842 "buffers were ready. Were they cleared?\n",6842 DPRINTF(sc, ATH_DEBUG_RX_PROC, 6843 "Warning: %s got scheduled when no receive " 6844 "buffers were ready. Were they cleared?\n", 6843 6845 __func__); 6844 DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: cycle completed. "6845 " %d rx buf processed. %d were errors. %d skb accepted.\n",6846 DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: cycle completed. " 6847 " %d rx buf processed. %d were errors. %d skb accepted.\n", 6846 6848 __func__, bf_processed, errors, skb_accepted); 6847 6849 #undef PA2DESC madwifi/trunk/ath/if_athvar.h
r3627 r3634 642 642 int sc_debug; 643 643 int sc_default_ieee80211_debug; /* default debug flags for new VAPs */ 644 void(*sc_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *,644 int (*sc_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *, 645 645 struct sk_buff *, int, int, u_int64_t); 646 646 #ifdef IEEE80211_DEBUG_REFCNT madwifi/trunk/net80211/ieee80211_input.c
r3621 r3634 1679 1679 "%s", "no " #__elem); \ 1680 1680 vap->iv_stats.is_rx_elem_missing++; \ 1681 return ;\1681 return 0; \ 1682 1682 } \ 1683 1683 if ((__elem)[1] > (__maxlen)) { \ … … 1687 1687 "bad " #__elem " len %d", (__elem)[1]); \ 1688 1688 vap->iv_stats.is_rx_elem_toobig++; \ 1689 return ;\1689 return 0; \ 1690 1690 } \ 1691 1691 } while (0) … … 1698 1698 "%s", "ie too short"); \ 1699 1699 vap->iv_stats.is_rx_elem_toosmall++; \ 1700 return ;\1700 return 0; \ 1701 1701 } \ 1702 1702 } while (0) … … 1723 1723 wh->i_addr2, _ssid); \ 1724 1724 vap->iv_stats.is_rx_ssidmismatch++; \ 1725 return ;\1725 return 0; \ 1726 1726 } \ 1727 1727 } while (0) … … 1732 1732 memcmp((_ssid) + 2, (_ni)->ni_essid, (_ssid)[1]) != 0)) { \ 1733 1733 vap->iv_stats.is_rx_ssidmismatch++; \ 1734 return ;\1734 return 0; \ 1735 1735 } \ 1736 1736 } while (0) … … 3041 3041 * Context: SoftIRQ 3042 3042 */ 3043 void 3043 int 3044 3044 ieee80211_recv_mgmt(struct ieee80211vap *vap, 3045 3045 struct ieee80211_node *ni_or_null, struct sk_buff *skb, … … 3090 3090 vap->iv_opmode == IEEE80211_M_IBSS)) { 3091 3091 vap->iv_stats.is_rx_mgtdiscard++; 3092 return ;3092 return 0; 3093 3093 } 3094 3094 /* … … 3198 3198 } 3199 3199 if (frm > efrm) 3200 return;3200 return 0; /* reached past the end */ 3201 3201 IEEE80211_VERIFY_ELEMENT(scan.rates, IEEE80211_RATE_MAXSIZE); 3202 3202 IEEE80211_VERIFY_ELEMENT(scan.ssid, IEEE80211_NWID_LEN); … … 3208 3208 "invalid channel %u", scan.chan); 3209 3209 vap->iv_stats.is_rx_badchan++; 3210 return ;3210 return 0; 3211 3211 } 3212 3212 #endif … … 3228 3228 "for off-channel %u", scan.chan); 3229 3229 vap->iv_stats.is_rx_chanmismatch++; 3230 return ;3230 return 0; 3231 3231 } 3232 3232 … … 3240 3240 wh, "beacon", "invalid beacon interval (%u)", 3241 3241 scan.bintval); 3242 return ;3242 return 0; 3243 3243 } 3244 3244 … … 3407 3407 else if (contbgscan(vap) || startbgscan(vap)) 3408 3408 ieee80211_bg_scan(vap); 3409 return ;3409 return 0; 3410 3410 } 3411 3411 /* … … 3414 3414 if (ic->ic_flags & IEEE80211_F_SCAN) { 3415 3415 ieee80211_add_scan(vap, &scan, wh, subtype, rssi, rtsf); 3416 return ;3416 return 0; 3417 3417 } 3418 3418 if ((vap->iv_opmode == IEEE80211_M_IBSS) && … … 3421 3421 /* Create a new entry in the neighbor table. */ 3422 3422 ni = ieee80211_add_neighbor(vap, wh, &scan); 3423 if (ni == NULL) 3424 return 0; 3423 3425 } else { 3424 3426 /* … … 3468 3470 vap->iv_state != IEEE80211_S_RUN) { 3469 3471 vap->iv_stats.is_rx_mgtdiscard++; 3470 return ;3472 return 0; 3471 3473 } 3472 3474 if (IEEE80211_IS_MULTICAST(wh->i_addr2)) { 3473 3475 /* frame must be directed */ 3474 3476 vap->iv_stats.is_rx_mgtdiscard++; /* XXX: stat */ 3475 return ;3477 return 0; 3476 3478 } 3477 3479 … … 3481 3483 #ifdef ATH_SUPERG_XR 3482 3484 if (vap->iv_flags & IEEE80211_F_XR) 3483 return ;3485 return 0; 3484 3486 #endif 3485 3487 /* … … 3512 3514 } 3513 3515 if (frm > efrm) 3514 return;3516 return 0; /* reached past the end */ 3515 3517 IEEE80211_VERIFY_ELEMENT(rates, IEEE80211_RATE_MAXSIZE); 3516 3518 IEEE80211_VERIFY_ELEMENT(ssid, IEEE80211_NWID_LEN); … … 3522 3524 "%s", "no ssid with ssid suppression enabled"); 3523 3525 vap->iv_stats.is_rx_ssidmismatch++; /*XXX*/ 3524 return ;3526 return 0; 3525 3527 } 3526 3528 if (ni == vap->iv_bss) { … … 3538 3540 } 3539 3541 if (ni == NULL) 3540 return ;3542 return 0; 3541 3543 allocbs = 1; 3542 3544 } … … 3603 3605 IEEE80211_DISCARD(vap, IEEE80211_MSG_AUTH, 3604 3606 wh, "auth", "%s", "not to pier xr bssid"); 3605 return ;3607 return 0; 3606 3608 } 3607 3609 } … … 3615 3617 wh, "auth", "%s", "disallowed by ACL"); 3616 3618 vap->iv_stats.is_rx_acl++; 3617 return ;3619 return 0; 3618 3620 } 3619 3621 if (vap->iv_flags & IEEE80211_F_COUNTERM) { … … 3627 3629 IEEE80211_REASON_MIC_FAILURE); 3628 3630 } 3629 return ;3631 return 0; 3630 3632 } 3631 3633 if (algo == IEEE80211_AUTH_ALG_SHARED) … … 3645 3647 (IEEE80211_STATUS_ALG << 16)); 3646 3648 } 3647 return ;3649 return 0; 3648 3650 } 3649 3651 break; … … 3659 3661 vap->iv_state != IEEE80211_S_RUN) { 3660 3662 vap->iv_stats.is_rx_mgtdiscard++; 3661 return ;3663 return 0; 3662 3664 } 3663 3665 … … 3690 3692 "%s", "wrong bssid"); 3691 3693 vap->iv_stats.is_rx_assoc_bss++; 3692 return ;3694 return 0; 3693 3695 } 3694 3696 capinfo = le16toh(*(__le16 *)frm); … … 3746 3748 } 3747 3749 if (frm > efrm) 3748 return ;3750 return 0; /* reached past the end */ 3749 3751 3750 3752 IEEE80211_VERIFY_ELEMENT(rates, IEEE80211_RATE_MAXSIZE); … … 3760 3762 IEEE80211_REASON_ASSOC_NOT_AUTHED); 3761 3763 vap->iv_stats.is_rx_assoc_notauth++; 3762 return ;3764 return 0; 3763 3765 } 3764 3766 … … 3776 3778 ieee80211_node_leave(ni); /* XXX */ 3777 3779 vap->iv_stats.is_rx_assoc_badscie++; /* XXX */ 3778 return ;3780 return 0; 3779 3781 } 3780 3782 } … … 3793 3795 /* XXX distinguish WPA/RSN? */ 3794 3796 vap->iv_stats.is_rx_assoc_badwpaie++; 3795 return ;3797 return 0; 3796 3798 } 3797 3799 … … 3811 3813 /* XXX distinguish WPA/RSN? */ 3812 3814 vap->iv_stats.is_rx_assoc_badwpaie++; 3813 return ;3815 return 0; 3814 3816 } 3815 3817 IEEE80211_NOTE_MAC(vap, … … 3835 3837 ieee80211_node_leave(ni); 3836 3838 vap->iv_stats.is_rx_assoc_capmismatch++; 3837 return ;3839 return 0; 3838 3840 } 3839 3841 rate = ieee80211_setup_rates(ni, rates, xrates, … … 3855 3857 ieee80211_node_leave(ni); 3856 3858 vap->iv_stats.is_rx_assoc_norate++; 3857 return ;3859 return 0; 3858 3860 } 3859 3861 … … 3871 3873 ieee80211_node_leave(ni); 3872 3874 vap->iv_stats.is_rx_assoc_capmismatch++; 3873 return ;3875 return 0; 3874 3876 } 3875 3877 } … … 3925 3927 vap->iv_state != IEEE80211_S_ASSOC) { 3926 3928 vap->iv_stats.is_rx_mgtdiscard++; 3927 return ;3929 return 0; 3928 3930 } 3929 3931 … … 3951 3953 ieee80211_new_state(vap, IEEE80211_S_SCAN, 3952 3954 IEEE80211_SCAN_FAIL_STATUS); 3953 return ;3955 return 0; 3954 3956 } 3955 3957 associd = le16toh(*(__le16 *)frm); … … 3987 3989 } 3988 3990 if (frm > efrm) 3989 return ;3991 return 0; /* reached past the end */ 3990 3992 IEEE80211_VERIFY_ELEMENT(rates, IEEE80211_RATE_MAXSIZE); 3991 3993 rate = ieee80211_setup_rates(ni, rates, xrates, … … 4000 4002 ieee80211_new_state(vap, IEEE80211_S_SCAN, 4001 4003 IEEE80211_SCAN_FAIL_STATUS); 4002 return ;4004 return 0; 4003 4005 } 4004 4006 … … 4068 4070 if (vap->iv_state == IEEE80211_S_SCAN) { 4069 4071 vap->iv_stats.is_rx_mgtdiscard++; 4070 return ;4072 return 0; 4071 4073 } 4072 4074 /* … … 4104 4106 vap->iv_state != IEEE80211_S_AUTH) { 4105 4107 vap->iv_stats.is_rx_mgtdiscard++; 4106 return ;4108 return 0; 4107 4109 } 4108 4110 /* … … 4139 4141 #undef ISREASSOC 4140 4142 #undef ISPROBE 4143 return 1; 4141 4144 } 4142 4145 #undef IEEE80211_VERIFY_LENGTH madwifi/trunk/net80211/ieee80211_node.c
r3631 r3634 947 947 948 948 if (show_counter) { 949 snprintf(node_count, 950 sizeof(node_count), 951 "[#NODES=%05d] ", 949 snprintf(node_count, 950 sizeof(node_count), 951 "[#NODES=%05d] ", 952 952 atomic_read(&ni->ni_ic->ic_node_counter)); 953 953 } madwifi/trunk/net80211/ieee80211_proto.h
r3621 r3634 71 71 void ieee80211_saveie(u_int8_t **, const u_int8_t *); 72 72 void ieee80211_saveath(struct ieee80211_node *, u_int8_t *); 73 voidieee80211_recv_mgmt(struct ieee80211vap *, struct ieee80211_node *,73 int ieee80211_recv_mgmt(struct ieee80211vap *, struct ieee80211_node *, 74 74 struct sk_buff *, int, int, u_int64_t); 75 75 void ieee80211_sta_pwrsave(struct ieee80211vap *, int); madwifi/trunk/net80211/ieee80211_var.h
r3594 r3634 437 437 /* Send/recv 802.11 management frame */ 438 438 int (*ic_send_mgmt)(struct ieee80211_node *, int, int); 439 void(*ic_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *,439 int (*ic_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *, 440 440 struct sk_buff *, int, int, u_int64_t); 441 441
