ieee80211_i.h (fe57d9f5c0a2c1ef97ba8cdc42cfda5743f287b8) | ieee80211_i.h (55de908ab292c03f1eb280f51170ddb9c6b57e31) |
---|---|
1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 759 unchanged lines hidden (view full) --- 768}; 769 770static inline 771struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p) 772{ 773 return container_of(p, struct ieee80211_sub_if_data, vif); 774} 775 | 1/* 2 * Copyright 2002-2005, Instant802 Networks, Inc. 3 * Copyright 2005, Devicescape Software, Inc. 4 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 5 * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 759 unchanged lines hidden (view full) --- 768}; 769 770static inline 771struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p) 772{ 773 return container_of(p, struct ieee80211_sub_if_data, vif); 774} 775 |
776static inline enum ieee80211_band 777ieee80211_get_sdata_band(struct ieee80211_sub_if_data *sdata) 778{ 779 enum ieee80211_band band = IEEE80211_BAND_2GHZ; 780 struct ieee80211_chanctx_conf *chanctx_conf; 781 782 rcu_read_lock(); 783 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 784 if (!WARN_ON(!chanctx_conf)) 785 band = chanctx_conf->channel->band; 786 rcu_read_unlock(); 787 788 return band; 789} 790 |
|
776enum sdata_queue_type { 777 IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, 778 IEEE80211_SDATA_QUEUE_AGG_START = 1, 779 IEEE80211_SDATA_QUEUE_AGG_STOP = 2, 780}; 781 782enum { 783 IEEE80211_RX_MSG = 1, --- 217 unchanged lines hidden (view full) --- 1001 1002 struct work_struct sched_scan_stopped_work; 1003 struct ieee80211_sub_if_data __rcu *sched_scan_sdata; 1004 1005 unsigned long leave_oper_channel_time; 1006 enum mac80211_scan_state next_scan_state; 1007 struct delayed_work scan_work; 1008 struct ieee80211_sub_if_data __rcu *scan_sdata; | 791enum sdata_queue_type { 792 IEEE80211_SDATA_QUEUE_TYPE_FRAME = 0, 793 IEEE80211_SDATA_QUEUE_AGG_START = 1, 794 IEEE80211_SDATA_QUEUE_AGG_STOP = 2, 795}; 796 797enum { 798 IEEE80211_RX_MSG = 1, --- 217 unchanged lines hidden (view full) --- 1016 1017 struct work_struct sched_scan_stopped_work; 1018 struct ieee80211_sub_if_data __rcu *sched_scan_sdata; 1019 1020 unsigned long leave_oper_channel_time; 1021 enum mac80211_scan_state next_scan_state; 1022 struct delayed_work scan_work; 1023 struct ieee80211_sub_if_data __rcu *scan_sdata; |
1024 struct ieee80211_channel *csa_channel; 1025 /* For backward compatibility only -- do not use */ 1026 struct ieee80211_channel *_oper_channel; |
|
1009 enum nl80211_channel_type _oper_channel_type; | 1027 enum nl80211_channel_type _oper_channel_type; |
1010 struct ieee80211_channel *oper_channel, *csa_channel; | |
1011 1012 /* Temporary remain-on-channel for off-channel operations */ 1013 struct ieee80211_channel *tmp_channel; 1014 enum nl80211_channel_type tmp_channel_type; 1015 1016 /* channel contexts */ 1017 struct list_head chanctx_list; 1018 struct mutex chanctx_mtx; --- 97 unchanged lines hidden (view full) --- 1116 1117 /* dummy netdev for use w/ NAPI */ 1118 struct net_device napi_dev; 1119 1120 struct napi_struct napi; 1121 1122 /* virtual monitor interface */ 1123 struct ieee80211_sub_if_data __rcu *monitor_sdata; | 1028 1029 /* Temporary remain-on-channel for off-channel operations */ 1030 struct ieee80211_channel *tmp_channel; 1031 enum nl80211_channel_type tmp_channel_type; 1032 1033 /* channel contexts */ 1034 struct list_head chanctx_list; 1035 struct mutex chanctx_mtx; --- 97 unchanged lines hidden (view full) --- 1133 1134 /* dummy netdev for use w/ NAPI */ 1135 struct net_device napi_dev; 1136 1137 struct napi_struct napi; 1138 1139 /* virtual monitor interface */ 1140 struct ieee80211_sub_if_data __rcu *monitor_sdata; |
1141 struct ieee80211_channel *monitor_channel; 1142 enum nl80211_channel_type monitor_channel_type; |
|
1124}; 1125 1126static inline struct ieee80211_sub_if_data * 1127IEEE80211_DEV_TO_SUB_IF(struct net_device *dev) 1128{ 1129 return netdev_priv(dev); 1130} 1131 --- 286 unchanged lines hidden (view full) --- 1418 enum nl80211_iftype type); 1419int ieee80211_frame_duration(enum ieee80211_band band, size_t len, 1420 int rate, int erp, int short_preamble); 1421void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, 1422 struct ieee80211_hdr *hdr, const u8 *tsc, 1423 gfp_t gfp); 1424void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, 1425 bool bss_notify); | 1143}; 1144 1145static inline struct ieee80211_sub_if_data * 1146IEEE80211_DEV_TO_SUB_IF(struct net_device *dev) 1147{ 1148 return netdev_priv(dev); 1149} 1150 --- 286 unchanged lines hidden (view full) --- 1437 enum nl80211_iftype type); 1438int ieee80211_frame_duration(enum ieee80211_band band, size_t len, 1439 int rate, int erp, int short_preamble); 1440void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, 1441 struct ieee80211_hdr *hdr, const u8 *tsc, 1442 gfp_t gfp); 1443void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata, 1444 bool bss_notify); |
1426void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb); | 1445void ieee80211_xmit(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 1446 enum ieee80211_band band); |
1427 | 1447 |
1428void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, 1429 struct sk_buff *skb, int tid); 1430static void inline ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, | 1448void __ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata, 1449 struct sk_buff *skb, int tid, 1450 enum ieee80211_band band); 1451 1452static inline void 1453ieee80211_tx_skb_tid_band(struct ieee80211_sub_if_data *sdata, 1454 struct sk_buff *skb, int tid, 1455 enum ieee80211_band band) 1456{ 1457 rcu_read_lock(); 1458 __ieee80211_tx_skb_tid_band(sdata, skb, tid, band); 1459 rcu_read_unlock(); 1460} 1461 1462static inline void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata, 1463 struct sk_buff *skb, int tid) 1464{ 1465 struct ieee80211_chanctx_conf *chanctx_conf; 1466 1467 rcu_read_lock(); 1468 chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf); 1469 if (WARN_ON(!chanctx_conf)) { 1470 rcu_read_unlock(); 1471 kfree_skb(skb); 1472 return; 1473 } 1474 1475 __ieee80211_tx_skb_tid_band(sdata, skb, tid, 1476 chanctx_conf->channel->band); 1477 rcu_read_unlock(); 1478} 1479 1480static inline void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, |
1431 struct sk_buff *skb) 1432{ 1433 /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */ 1434 ieee80211_tx_skb_tid(sdata, skb, 7); 1435} 1436 1437void ieee802_11_parse_elems(u8 *start, size_t len, 1438 struct ieee802_11_elems *elems); --- 50 unchanged lines hidden (view full) --- 1489 struct ieee80211_channel *chan, 1490 const u8 *ssid, size_t ssid_len, 1491 const u8 *ie, size_t ie_len, 1492 bool directed); 1493void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 1494 const u8 *ssid, size_t ssid_len, 1495 const u8 *ie, size_t ie_len, 1496 u32 ratemask, bool directed, bool no_cck, | 1481 struct sk_buff *skb) 1482{ 1483 /* Send all internal mgmt frames on VO. Accordingly set TID to 7. */ 1484 ieee80211_tx_skb_tid(sdata, skb, 7); 1485} 1486 1487void ieee802_11_parse_elems(u8 *start, size_t len, 1488 struct ieee802_11_elems *elems); --- 50 unchanged lines hidden (view full) --- 1539 struct ieee80211_channel *chan, 1540 const u8 *ssid, size_t ssid_len, 1541 const u8 *ie, size_t ie_len, 1542 bool directed); 1543void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 1544 const u8 *ssid, size_t ssid_len, 1545 const u8 *ie, size_t ie_len, 1546 u32 ratemask, bool directed, bool no_cck, |
1497 struct ieee80211_channel *channel); | 1547 struct ieee80211_channel *channel, bool scan); |
1498 1499void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, 1500 const size_t supp_rates_len, 1501 const u8 *supp_rates); 1502u32 ieee80211_sta_get_rates(struct ieee80211_local *local, 1503 struct ieee802_11_elems *elems, 1504 enum ieee80211_band band, u32 *basic_rates); 1505int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, --- 14 unchanged lines hidden (view full) --- 1520int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, 1521 struct sk_buff *skb, bool need_basic, 1522 enum ieee80211_band band); 1523int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, 1524 struct sk_buff *skb, bool need_basic, 1525 enum ieee80211_band band); 1526 1527/* channel management */ | 1548 1549void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata, 1550 const size_t supp_rates_len, 1551 const u8 *supp_rates); 1552u32 ieee80211_sta_get_rates(struct ieee80211_local *local, 1553 struct ieee802_11_elems *elems, 1554 enum ieee80211_band band, u32 *basic_rates); 1555int __ieee80211_request_smps(struct ieee80211_sub_if_data *sdata, --- 14 unchanged lines hidden (view full) --- 1570int ieee80211_add_srates_ie(struct ieee80211_sub_if_data *sdata, 1571 struct sk_buff *skb, bool need_basic, 1572 enum ieee80211_band band); 1573int ieee80211_add_ext_srates_ie(struct ieee80211_sub_if_data *sdata, 1574 struct sk_buff *skb, bool need_basic, 1575 enum ieee80211_band band); 1576 1577/* channel management */ |
1528enum ieee80211_chan_mode { 1529 CHAN_MODE_UNDEFINED, 1530 CHAN_MODE_HOPPING, 1531 CHAN_MODE_FIXED, 1532}; 1533 1534enum ieee80211_chan_mode 1535ieee80211_get_channel_mode(struct ieee80211_local *local, 1536 struct ieee80211_sub_if_data *ignore); 1537bool ieee80211_set_channel_type(struct ieee80211_local *local, 1538 struct ieee80211_sub_if_data *sdata, 1539 enum nl80211_channel_type chantype); | |
1540enum nl80211_channel_type 1541ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper); 1542 1543int __must_check 1544ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, 1545 struct ieee80211_channel *channel, 1546 enum nl80211_channel_type channel_type, 1547 enum ieee80211_chanctx_mode mode); 1548void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); 1549 1550#ifdef CONFIG_MAC80211_NOINLINE 1551#define debug_noinline noinline 1552#else 1553#define debug_noinline 1554#endif 1555 1556#endif /* IEEE80211_I_H */ | 1578enum nl80211_channel_type 1579ieee80211_ht_oper_to_channel_type(struct ieee80211_ht_operation *ht_oper); 1580 1581int __must_check 1582ieee80211_vif_use_channel(struct ieee80211_sub_if_data *sdata, 1583 struct ieee80211_channel *channel, 1584 enum nl80211_channel_type channel_type, 1585 enum ieee80211_chanctx_mode mode); 1586void ieee80211_vif_release_channel(struct ieee80211_sub_if_data *sdata); 1587 1588#ifdef CONFIG_MAC80211_NOINLINE 1589#define debug_noinline noinline 1590#else 1591#define debug_noinline 1592#endif 1593 1594#endif /* IEEE80211_I_H */ |