Chinaunix首页 | 论坛 | 博客
  • 博客访问: 245195
  • 博文数量: 34
  • 博客积分: 791
  • 博客等级: 军士长
  • 技术积分: 352
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-24 21:45
文章分类

全部博文(34)

文章存档

2015年(2)

2013年(6)

2012年(16)

2011年(8)

2010年(2)

分类: LINUX

2013-08-16 14:53:18

/////////////////////////////////////////umac/mlme/ieee80211_mlme_sta.c
772 void
773 ieee80211_vap_iter_beacon_miss(void *arg, wlan_if_t vap)
774 {
897     IEEE80211_DPRINTF(vap, IEEE80211_MSG_ANY, "%s: Beacon miss, will indicate to OS!!\n", __func__);
898     /* indicate beacon miss */
899     IEEE80211_DELIVER_EVENT_BEACON_MISS(vap);
900 }
    
////////////////////////////////umac/include/ieee80211_mlme.h
253 #define IEEE80211_DELIVER_EVENT_BEACON_MISS( _vap)  do {                                      \
254         int i;                                                                                \
255         for(i=0;i 256             if ((_vap)->iv_misc_evtable[i] &&                                                 \
257                             (_vap)->iv_misc_evtable[i]->wlan_beacon_miss_indication) {        \
258                 (* (_vap)->iv_misc_evtable[i]->wlan_beacon_miss_indication)                   \
259                     ((_vap)->iv_misc_arg[i]);                                                 \
260              }                                                                                \
261         }                                                                                     \
262     } while(0)

//////////////////////////////umac/base/ieee80211_vap.c
 331 int
 332 ieee80211_vap_register_misc_events(struct ieee80211vap *vap, os_handle_t oshandle, wlan_misc_event_handler_table *evtab)
 333 {
 334     int i;
 335     /* unregister if there exists one already */
 336     ieee80211_vap_unregister_misc_events(vap,oshandle,evtab);
 337     IEEE80211_VAP_LOCK(vap);
 338     for (i=0;i  339         if ( vap->iv_misc_evtable[i] == NULL) {
 340             vap->iv_misc_evtable[i] = evtab;
 341             vap->iv_misc_arg[i] = oshandle;
 342             IEEE80211_VAP_UNLOCK(vap);
 343             return 0;
 344         }
 345     }
 346     IEEE80211_VAP_UNLOCK(vap);
 347     return ENOMEM;
 348 }  
///////////////////////////./umac/sme/ieee80211_assoc_sm.c

774 wlan_assoc_sm_t wlan_assoc_sm_create(osdev_t oshandle, wlan_if_t vaphandle)
775 {
811     wlan_vap_register_mlme_event_handlers(vaphandle,(os_if_t) sm, &sta_mlme_evt_handler);
812     wlan_vap_register_misc_event_handlers(vaphandle,(os_if_t)sm,&sta_misc_evt_handler);
}
758 static wlan_misc_event_handler_table sta_misc_evt_handler = {
759     NULL,
760     NULL,
761     NULL,
762     NULL,
763     NULL,
764     sm_beacon_miss,
765     NULL,
766     sm_clonemac,
767     NULL,                               /* wlan_sta_scan_entry_update */
768     NULL,                               /* wlan_ap_stopped */
769 #if ATH_SUPPORT_WAPI
770     NULL,                               /* wlan_sta_rekey_indication */
771 #endif
772 };

742 /*
743  * misc event handlers
744  */
745 static void sm_beacon_miss(os_handle_t osif)
746 {
747     wlan_assoc_sm_t sm = (wlan_assoc_sm_t) osif;
748     ieee80211_sm_dispatch(sm->hsm_handle,IEEE80211_ASSOC_EVENT_BEACON_MISS,0,NULL);
749 }

395 static bool ieee80211_assoc_state_run_event(void *ctx, u_int16_t event, u_int16_t event_data_len, void *event_data)
396 {
397     wlan_assoc_sm_t sm = (wlan_assoc_sm_t) ctx;
398     wlan_if_t vap = sm->vap_handle;
399     u_int32_t time_elapsed;
400
401     switch(event) {
402     case IEEE80211_ASSOC_EVENT_BEACON_MISS:
403         sm->last_failure = WLAN_ASSOC_SM_REASON_BEACON_MISS;    /* beacon miss */
404         ieee80211_sm_transition_to(sm->hsm_handle,IEEE80211_ASSOC_STATE_INIT);
405         return true;
406         break;

}
阅读(2880) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~