• Home
  • Raw
  • Download

Lines Matching refs:local

79 	seq_printf(m, "auth_algs=%u\n", ap->local->auth_algs);  in ap_debug_proc_show()
126 if (sta->ap && sta->local) in ap_free_sta()
127 hostap_event_expired_sta(sta->local->dev, sta); in ap_free_sta()
157 static void hostap_set_tim(local_info_t *local, int aid, int set) in hostap_set_tim() argument
159 if (local->func->set_tim) in hostap_set_tim()
160 local->func->set_tim(local->dev, aid, set); in hostap_set_tim()
190 local_info_t *local; in ap_handle_timer() local
195 if (sta == NULL || sta->local == NULL || sta->local->ap == NULL) { in ap_handle_timer()
200 local = sta->local; in ap_handle_timer()
201 ap = local->ap; in ap_handle_timer()
239 hostap_event_expired_sta(local->dev, sta); in ap_handle_timer()
243 hostap_set_tim(local, sta->aid, 0); in ap_handle_timer()
251 local->dev->name, sta->addr); in ap_handle_timer()
252 hostap_wds_link_oper(local, sta->addr, WDS_DEL); in ap_handle_timer()
261 prism2_send_mgmt(local->dev, IEEE80211_FTYPE_DATA | in ap_handle_timer()
269 local->dev->name, in ap_handle_timer()
275 prism2_send_mgmt(local->dev, IEEE80211_FTYPE_MGMT | in ap_handle_timer()
286 local->dev->name, sta->addr); in ap_handle_timer()
539 if ((sta->flags & WLAN_STA_ASSOC) && !sta->ap && sta->local) in ap_control_kickall()
540 hostap_event_expired_sta(sta->local->dev, sta); in ap_control_kickall()
645 ap->local->dev->name); in hostap_check_sta_fw_version()
656 if (!ap->local->hostapd || !ap->local->apdev) { in hostap_ap_tx_cb()
668 skb->dev = ap->local->apdev; in hostap_ap_tx_cb()
682 struct net_device *dev = ap->local->dev; in hostap_ap_tx_cb_auth()
689 if (ap->local->hostapd) { in hostap_ap_tx_cb_auth()
750 struct net_device *dev = ap->local->dev; in hostap_ap_tx_cb_assoc()
757 if (ap->local->hostapd) { in hostap_ap_tx_cb_assoc()
830 ap->local->dev->name, hdr->addr1); in hostap_ap_tx_cb_poll()
839 void hostap_init_data(local_info_t *local) in hostap_init_data() argument
841 struct ap_data *ap = local->ap; in hostap_init_data()
848 ap->local = local; in hostap_init_data()
850 ap->ap_policy = GET_INT_PARM(other_ap_policy, local->card_idx); in hostap_init_data()
851 ap->bridge_packets = GET_INT_PARM(ap_bridge_packets, local->card_idx); in hostap_init_data()
853 GET_INT_PARM(ap_max_inactivity, local->card_idx) * HZ; in hostap_init_data()
854 ap->autom_ap_wds = GET_INT_PARM(autom_ap_wds, local->card_idx); in hostap_init_data()
860 INIT_WORK(&local->ap->add_sta_proc_queue, handle_add_proc_queue); in hostap_init_data()
863 hostap_tx_callback_register(local, hostap_ap_tx_cb, ap); in hostap_init_data()
866 "AP\n", local->dev->name); in hostap_init_data()
868 INIT_WORK(&local->ap->wds_oper_queue, handle_wds_oper_queue); in hostap_init_data()
871 hostap_tx_callback_register(local, hostap_ap_tx_cb_auth, ap); in hostap_init_data()
873 hostap_tx_callback_register(local, hostap_ap_tx_cb_assoc, ap); in hostap_init_data()
875 hostap_tx_callback_register(local, hostap_ap_tx_cb_poll, ap); in hostap_init_data()
879 "AP\n", local->dev->name); in hostap_init_data()
889 void hostap_init_ap_proc(local_info_t *local) in hostap_init_ap_proc() argument
891 struct ap_data *ap = local->ap; in hostap_init_ap_proc()
893 ap->proc = local->proc; in hostap_init_ap_proc()
931 if ((sta->flags & WLAN_STA_ASSOC) && !sta->ap && sta->local) in hostap_free_data()
932 hostap_event_expired_sta(sta->local->dev, sta); in hostap_free_data()
974 local_info_t *local; in prism2_send_mgmt() local
982 local = iface->local; in prism2_send_mgmt()
983 dev = local->dev; /* always use master radio device */ in prism2_send_mgmt()
1167 sta->local = ap->local; in ap_add_sta()
1197 if (!ap->local->hostapd) in ap_add_sta()
1206 local_info_t *local) in ap_tx_rate_ok() argument
1212 if (local->tx_rate_control != 0 && in ap_tx_rate_ok()
1213 !(local->tx_rate_control & (1 << rateidx))) in ap_tx_rate_ok()
1238 if (ap_tx_rate_ok(0, sta, sta->local)) { in prism2_check_tx_rates()
1245 if (ap_tx_rate_ok(1, sta, sta->local)) { in prism2_check_tx_rates()
1252 if (ap_tx_rate_ok(2, sta, sta->local)) { in prism2_check_tx_rates()
1259 if (ap_tx_rate_ok(3, sta, sta->local)) { in prism2_check_tx_rates()
1345 static void handle_authen(local_info_t *local, struct sk_buff *skb, in handle_authen() argument
1348 struct net_device *dev = local->dev; in handle_authen()
1351 struct ap_data *ap = local->ap; in handle_authen()
1371 spin_lock_bh(&local->ap->sta_table_lock); in handle_authen()
1372 sta = ap_get_sta(local->ap, hdr->addr2); in handle_authen()
1375 spin_unlock_bh(&local->ap->sta_table_lock); in handle_authen()
1383 crypt = local->crypt_info.crypt[idx]; in handle_authen()
1401 if (((local->auth_algs & PRISM2_AUTH_OPEN) && in handle_authen()
1403 ((local->auth_algs & PRISM2_AUTH_SHARED_KEY) && in handle_authen()
1458 if (local->ap->num_sta >= MAX_STA_COUNT) { in handle_authen()
1465 sta = ap_add_sta(local->ap, hdr->addr2); in handle_authen()
1488 ap_auth_make_challenge(local->ap); in handle_authen()
1558 static void handle_assoc(local_info_t *local, struct sk_buff *skb, in handle_assoc() argument
1561 struct net_device *dev = local->dev; in handle_assoc()
1581 spin_lock_bh(&local->ap->sta_table_lock); in handle_assoc()
1582 sta = ap_get_sta(local->ap, hdr->addr2); in handle_assoc()
1584 spin_unlock_bh(&local->ap->sta_table_lock); in handle_assoc()
1592 spin_unlock_bh(&local->ap->sta_table_lock); in handle_assoc()
1621 if (ileft != strlen(local->essid) || in handle_assoc()
1622 memcmp(local->essid, u, ileft) != 0) { in handle_assoc()
1673 spin_lock_bh(&local->ap->sta_table_lock); in handle_assoc()
1675 if (local->ap->sta_aid[sta->aid - 1] == NULL) in handle_assoc()
1679 spin_unlock_bh(&local->ap->sta_table_lock); in handle_assoc()
1683 local->ap->sta_aid[sta->aid - 1] = sta; in handle_assoc()
1684 spin_unlock_bh(&local->ap->sta_table_lock); in handle_assoc()
1716 if (local->tx_rate_control & WLAN_RATE_1M) { in handle_assoc()
1717 *p++ = local->basic_rates & WLAN_RATE_1M ? 0x82 : 0x02; in handle_assoc()
1720 if (local->tx_rate_control & WLAN_RATE_2M) { in handle_assoc()
1721 *p++ = local->basic_rates & WLAN_RATE_2M ? 0x84 : 0x04; in handle_assoc()
1724 if (local->tx_rate_control & WLAN_RATE_5M5) { in handle_assoc()
1725 *p++ = local->basic_rates & WLAN_RATE_5M5 ? in handle_assoc()
1729 if (local->tx_rate_control & WLAN_RATE_11M) { in handle_assoc()
1730 *p++ = local->basic_rates & WLAN_RATE_11M ? in handle_assoc()
1743 send_deauth ? 0 : local->ap->tx_callback_assoc); in handle_assoc()
1767 static void handle_deauth(local_info_t *local, struct sk_buff *skb, in handle_deauth() argument
1770 struct net_device *dev = local->dev; in handle_deauth()
1792 spin_lock_bh(&local->ap->sta_table_lock); in handle_deauth()
1793 sta = ap_get_sta(local->ap, hdr->addr2); in handle_deauth()
1796 hostap_event_expired_sta(local->dev, sta); in handle_deauth()
1799 spin_unlock_bh(&local->ap->sta_table_lock); in handle_deauth()
1809 static void handle_disassoc(local_info_t *local, struct sk_buff *skb, in handle_disassoc() argument
1812 struct net_device *dev = local->dev; in handle_disassoc()
1834 spin_lock_bh(&local->ap->sta_table_lock); in handle_disassoc()
1835 sta = ap_get_sta(local->ap, hdr->addr2); in handle_disassoc()
1838 hostap_event_expired_sta(local->dev, sta); in handle_disassoc()
1841 spin_unlock_bh(&local->ap->sta_table_lock); in handle_disassoc()
1851 static void ap_handle_data_nullfunc(local_info_t *local, in ap_handle_data_nullfunc() argument
1854 struct net_device *dev = local->dev; in ap_handle_data_nullfunc()
1868 static void ap_handle_dropped_data(local_info_t *local, in ap_handle_dropped_data() argument
1871 struct net_device *dev = local->dev; in ap_handle_dropped_data()
1875 spin_lock_bh(&local->ap->sta_table_lock); in ap_handle_dropped_data()
1876 sta = ap_get_sta(local->ap, hdr->addr2); in ap_handle_dropped_data()
1879 spin_unlock_bh(&local->ap->sta_table_lock); in ap_handle_dropped_data()
1901 static void pspoll_send_buffered(local_info_t *local, struct sta_info *sta, in pspoll_send_buffered() argument
1926 static void handle_pspoll(local_info_t *local, in handle_pspoll() argument
1930 struct net_device *dev = local->dev; in handle_pspoll()
1957 spin_lock_bh(&local->ap->sta_table_lock); in handle_pspoll()
1958 sta = ap_get_sta(local->ap, hdr->addr2); in handle_pspoll()
1961 spin_unlock_bh(&local->ap->sta_table_lock); in handle_pspoll()
1987 pspoll_send_buffered(local, sta, skb); in handle_pspoll()
2003 hostap_set_tim(local, aid, 0); in handle_pspoll()
2017 local_info_t *local = ap->local; in handle_wds_oper_queue() local
2020 spin_lock_bh(&local->lock); in handle_wds_oper_queue()
2021 entry = local->ap->wds_oper_entries; in handle_wds_oper_queue()
2022 local->ap->wds_oper_entries = NULL; in handle_wds_oper_queue()
2023 spin_unlock_bh(&local->lock); in handle_wds_oper_queue()
2028 local->dev->name, in handle_wds_oper_queue()
2032 prism2_wds_add(local, entry->addr, 0); in handle_wds_oper_queue()
2034 prism2_wds_del(local, entry->addr, 0, 1); in handle_wds_oper_queue()
2044 static void handle_beacon(local_info_t *local, struct sk_buff *skb, in handle_beacon() argument
2078 if (local->ap->ap_policy != AP_OTHER_AP_EVEN_IBSS && in handle_beacon()
2096 if (local->ap->ap_policy == AP_OTHER_AP_SAME_SSID && in handle_beacon()
2097 (ileft != strlen(local->essid) || in handle_beacon()
2098 memcmp(local->essid, u, ileft) != 0)) { in handle_beacon()
2144 spin_lock_bh(&local->ap->sta_table_lock); in handle_beacon()
2145 sta = ap_get_sta(local->ap, hdr->addr2); in handle_beacon()
2148 spin_unlock_bh(&local->ap->sta_table_lock); in handle_beacon()
2153 sta = ap_add_sta(local->ap, hdr->addr2); in handle_beacon()
2159 hostap_event_new_sta(local->dev, sta); in handle_beacon()
2165 if (local->ap->autom_ap_wds) { in handle_beacon()
2166 hostap_wds_link_oper(local, sta->addr, WDS_ADD); in handle_beacon()
2199 static void handle_ap_item(local_info_t *local, struct sk_buff *skb, in handle_ap_item() argument
2203 struct net_device *dev = local->dev; in handle_ap_item()
2216 if (!local->hostapd && type == IEEE80211_FTYPE_DATA) { in handle_ap_item()
2225 ap_handle_dropped_data(local, hdr); in handle_ap_item()
2239 if (local->ap->nullfunc_ack && in handle_ap_item()
2241 ap_handle_data_nullfunc(local, hdr); in handle_ap_item()
2243 ap_handle_dropped_data(local, hdr); in handle_ap_item()
2248 handle_beacon(local, skb, rx_stats); in handle_ap_item()
2254 handle_pspoll(local, hdr, rx_stats); in handle_ap_item()
2258 if (local->hostapd) { in handle_ap_item()
2284 handle_assoc(local, skb, rx_stats, 0); in handle_ap_item()
2290 handle_assoc(local, skb, rx_stats, 1); in handle_ap_item()
2299 handle_disassoc(local, skb, rx_stats); in handle_ap_item()
2302 handle_authen(local, skb, rx_stats); in handle_ap_item()
2305 handle_deauth(local, skb, rx_stats); in handle_ap_item()
2324 local_info_t *local; in hostap_rx() local
2328 local = iface->local; in hostap_rx()
2337 if (local->ap->ap_policy == AP_OTHER_AP_SKIP_ALL && in hostap_rx()
2342 handle_ap_item(local, skb, rx_stats); in hostap_rx()
2351 static void schedule_packet_send(local_info_t *local, struct sta_info *sta) in schedule_packet_send() argument
2363 "failed\n", local->dev->name); in schedule_packet_send()
2372 memcpy(hdr->addr1, local->dev->dev_addr, ETH_ALEN); in schedule_packet_send()
2378 local->dev->name, sta->addr); in schedule_packet_send()
2380 skb->dev = local->dev; in schedule_packet_send()
2383 hostap_rx(local->dev, skb, &rx_stats); in schedule_packet_send()
2387 int prism2_ap_get_sta_qual(local_info_t *local, struct sockaddr addr[], in prism2_ap_get_sta_qual() argument
2391 struct ap_data *ap = local->ap; in prism2_ap_get_sta_qual()
2433 local_info_t *local; in prism2_ap_translate_scan() local
2444 local = iface->local; in prism2_ap_translate_scan()
2445 ap = local->ap; in prism2_ap_translate_scan()
2561 if (!(sta->flags & WLAN_STA_ASSOC) && !sta->ap && sta->local) in prism2_hostapd_add_sta()
2562 hostap_event_new_sta(sta->local->dev, sta); in prism2_hostapd_add_sta()
2599 if ((sta->flags & WLAN_STA_ASSOC) && !sta->ap && sta->local) in prism2_hostapd_remove_sta()
2600 hostap_event_expired_sta(sta->local->dev, sta); in prism2_hostapd_remove_sta()
2704 local_info_t *local; in ap_update_sta_tx_rate() local
2707 local = iface->local; in ap_update_sta_tx_rate()
2719 if (ap_tx_rate_ok(new_rate, sta, local)) { in ap_update_sta_tx_rate()
2744 ap_tx_ret hostap_handle_sta_tx(local_info_t *local, struct hostap_tx_data *tx) in hostap_handle_sta_tx() argument
2754 if (local->ap == NULL || skb->len < 10 || in hostap_handle_sta_tx()
2762 if (local->ap->num_sta <= 0) in hostap_handle_sta_tx()
2768 spin_lock(&local->ap->sta_table_lock); in hostap_handle_sta_tx()
2769 sta = ap_get_sta(local->ap, hdr->addr1); in hostap_handle_sta_tx()
2772 spin_unlock(&local->ap->sta_table_lock); in hostap_handle_sta_tx()
2774 if (local->iw_mode == IW_MODE_MASTER && sta == NULL && in hostap_handle_sta_tx()
2789 local->ap->tx_drop_nonassoc++; in hostap_handle_sta_tx()
2801 if (!local->fw_tx_rate_control) in hostap_handle_sta_tx()
2802 local->ap->last_tx_rate = meta->rate = in hostap_handle_sta_tx()
2803 ap_update_sta_tx_rate(sta, local->dev); in hostap_handle_sta_tx()
2805 if (local->iw_mode != IW_MODE_MASTER) in hostap_handle_sta_tx()
2826 local->dev->name, sta->addr); in hostap_handle_sta_tx()
2831 hostap_set_tim(local, sta->aid, 1); in hostap_handle_sta_tx()
2847 hostap_set_tim(local, sta->aid, 1); in hostap_handle_sta_tx()
2885 void hostap_handle_sta_tx_exc(local_info_t *local, struct sk_buff *skb) in hostap_handle_sta_tx_exc() argument
2894 spin_lock(&local->ap->sta_table_lock); in hostap_handle_sta_tx_exc()
2895 sta = ap_get_sta(local->ap, hdr->addr1); in hostap_handle_sta_tx_exc()
2897 spin_unlock(&local->ap->sta_table_lock); in hostap_handle_sta_tx_exc()
2900 local->dev->name, hdr->addr1, jiffies); in hostap_handle_sta_tx_exc()
2914 if (ap_tx_rate_ok(rate, sta, local)) { in hostap_handle_sta_tx_exc()
2929 local->dev->name, sta->addr, sta->tx_rate); in hostap_handle_sta_tx_exc()
2933 spin_unlock(&local->ap->sta_table_lock); in hostap_handle_sta_tx_exc()
2937 static void hostap_update_sta_ps2(local_info_t *local, struct sta_info *sta, in hostap_update_sta_ps2() argument
2952 schedule_packet_send(local, sta); in hostap_update_sta_ps2()
2959 int hostap_update_sta_ps(local_info_t *local, struct ieee80211_hdr *hdr) in hostap_update_sta_ps() argument
2964 spin_lock(&local->ap->sta_table_lock); in hostap_update_sta_ps()
2965 sta = ap_get_sta(local->ap, hdr->addr2); in hostap_update_sta_ps()
2968 spin_unlock(&local->ap->sta_table_lock); in hostap_update_sta_ps()
2974 hostap_update_sta_ps2(local, sta, fc & IEEE80211_FCTL_PM, in hostap_update_sta_ps()
2985 ap_rx_ret hostap_handle_sta_rx(local_info_t *local, struct net_device *dev, in hostap_handle_sta_rx() argument
2995 if (local->ap == NULL) in hostap_handle_sta_rx()
3004 spin_lock(&local->ap->sta_table_lock); in hostap_handle_sta_rx()
3005 sta = ap_get_sta(local->ap, hdr->addr2); in hostap_handle_sta_rx()
3008 spin_unlock(&local->ap->sta_table_lock); in hostap_handle_sta_rx()
3018 if (local->hostapd) { in hostap_handle_sta_rx()
3019 prism2_rx_80211(local->apdev, skb, rx_stats, in hostap_handle_sta_rx()
3049 if (local->hostapd) { in hostap_handle_sta_rx()
3050 prism2_rx_80211(local->apdev, skb, rx_stats, in hostap_handle_sta_rx()
3088 hostap_update_sta_ps2(local, sta, fc & IEEE80211_FCTL_PM, in hostap_handle_sta_rx()
3096 if (local->ap->nullfunc_ack && stype == IEEE80211_STYPE_NULLFUNC && in hostap_handle_sta_rx()
3098 if (local->hostapd) { in hostap_handle_sta_rx()
3099 prism2_rx_80211(local->apdev, skb, rx_stats, in hostap_handle_sta_rx()
3124 int hostap_handle_sta_crypto(local_info_t *local, in hostap_handle_sta_crypto() argument
3131 spin_lock(&local->ap->sta_table_lock); in hostap_handle_sta_crypto()
3132 sta = ap_get_sta(local->ap, hdr->addr2); in hostap_handle_sta_crypto()
3135 spin_unlock(&local->ap->sta_table_lock); in hostap_handle_sta_crypto()
3178 ap->local->ieee_802_1x == 0)) in hostap_is_sta_authorized()
3257 void hostap_update_rates(local_info_t *local) in hostap_update_rates() argument
3260 struct ap_data *ap = local->ap; in hostap_update_rates()
3299 void hostap_add_wds_links(local_info_t *local) in hostap_add_wds_links() argument
3301 struct ap_data *ap = local->ap; in hostap_add_wds_links()
3307 hostap_wds_link_oper(local, sta->addr, WDS_ADD); in hostap_add_wds_links()
3311 schedule_work(&local->ap->wds_oper_queue); in hostap_add_wds_links()
3315 void hostap_wds_link_oper(local_info_t *local, u8 *addr, wds_oper_type type) in hostap_wds_link_oper() argument
3324 spin_lock_bh(&local->lock); in hostap_wds_link_oper()
3325 entry->next = local->ap->wds_oper_entries; in hostap_wds_link_oper()
3326 local->ap->wds_oper_entries = entry; in hostap_wds_link_oper()
3327 spin_unlock_bh(&local->lock); in hostap_wds_link_oper()
3329 schedule_work(&local->ap->wds_oper_queue); in hostap_wds_link_oper()