linux/net/mac80211/ibss.c
<<
value="/spa2ti e="/formti e="a value= href="../linux+v3.74/o/net/mac80211/ibss.c">value="img src="../.static/gfx/right.png" alt=">>">va"/spa2tiva"spa2 class="lxr_search">valuvalue="input typ14.hidden" nam14.navtarget" "v3.14.">value="input typ14.text" nam14.search" id4.search">value="buttue=typ14.submit">Searchvalue=Prefsi e="/a>va"/spa2tilue= ="/divtilue= ="form acue"2="ajax+*" method="post" onsubmit="return false;">va"input typ14.hidden" nam14.ajax_lookup" id4.ajax_lookup" "v3.14.">vlue= ="/formtivlue= ="div class="headingbottum">i "div id4.file_contents"t
= =1"/a>"spa2 class="comment">/*"/spa2ti= =2"/a>"spa2 class="comment"> * IBSS mode implementaue"2"/spa2ti= =3"/a>"spa2 class="comment"> * Copyright 2003-2008, Jouni Malinen <j@w1.fi>"/spa2ti= =4"/a>"spa2 class="comment"> * Copyright 2004, Instant802 Networks, Inc."/spa2ti= =5"/a>"spa2 class="comment"> * Copyright 2005, Devicescape Software, Inc."/spa2ti= =6"/a>"spa2 class="comment"> * Copyright 2006-2007  Jiri Benc <jbenc@suse.cz>"/spa2ti= =7"/a>"spa2 class="comment"> * Copyright 2007, Michael Wu <flamingice@sourmilk.net>"/spa2ti= =8"/a>"spa2 class="comment"> * Copyright 2009, Johannes Berg <johannes@sipsoluue"2s.net>"/spa2ti= =9"/a>"spa2 class="comment"> *"/spa2ti= /opta>"spa2 class="comment"> * This program is free software; you ca2 redistribute it and/or modify"/spa2ti= 11"/a>"spa2 class="comment"> * it under the terms of the GNU General Public License vers2ue=2 as"/spa2ti= 12"/a>"spa2 class="comment"> * published by the Free Software Foundaue"2."/spa2ti= 13"/a>"spa2 class="comment"> */"/spa2ti= 14"/a>i= 15"/a>#include <linux/delay.h"/a>>i= 16"/a>#include <linux/slab.h"/a>>i= 17"/a>#include <linux/if_ether.h"/a>>i= 18"/a>#include <linux/skbuff.h"/a>>i= 19"/a>#include <linux/if_arp.h"/a>>i= 20"/a>#include <linux/etherdevice.h"/a>>i= 21"/a>#include <linux/rtnetlink.h"/a>>i= 22"/a>#include <net/mac80211.h"/a>>i= 23"/a>i= 24"/a>#include "ieee80211_i.h"/a>"i= 25"/a>#include "driver-ops.h"/a>"i= 26"/a>#include "rate.h"/a>"i= 27"/a>i= 28"/a>#define="a href="+code=IEEE80211_SCAN_INTERVAL" class="sref">IEEE80211_SCAN_INTERVAL"/a> (2 * "a href="+code=HZ" class="sref">HZ"/a>)i= 29"/a>#define="a href="+code=IEEE80211_SCAN_INTERVAL_SLOW" class="sref">IEEE80211_SCAN_INTERVAL_SLOW"/a> (15 * "a href="+code=HZ" class="sref">HZ"/a>)i= 30"/a>#define="a href="+code=IEEE80211_IBSS_JOIN_TIMEOUT" class="sref">IEEE80211_IBSS_JOIN_TIMEOUT"/a> (7 * "a href="+code=HZ" class="sref">HZ"/a>)i= 31"/a>i= 32"/a>#define="a href="+code=IEEE80211_IBSS_MERGE_INTERVAL" class="sref">IEEE80211_IBSS_MERGE_INTERVAL"/a> (30 * "a href="+code=HZ" class="sref">HZ"/a>)i= 33"/a>#define="a href="+code=IEEE80211_IBSS_INACTIVITY_LIMIT" class="sref">IEEE80211_IBSS_INACTIVITY_LIMIT"/a> (60 * "a href="+code=HZ" class="sref">HZ"/a>)i= 34"/a>i= 35"/a>#define="a href="+code=IEEE80211_IBSS_MAX_STA_ENTRIES" class="sref">IEEE80211_IBSS_MAX_STA_ENTRIES"/a> 128i= 36"/a>i= 37"/a>i= 38"/a>static void="a href="+code=__ieee80211_sta_join_ibss" class="sref">__ieee80211_sta_join_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i= 39"/a>                                      const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=bssid" class="sref">bssid"/a>, const=int="a href="+code=beacon_int" class="sref">beacon_int"/a>,i= 40"/a>                                      struct="a href="+code=ieee80211_channel" class="sref">ieee80211_channel"/a> *"a href="+code=chan" class="sref">chan"/a>,i= 41"/a>                                      const="a href="+code=u32" class="sref">u32"/a>="a href="+code=basic_rates" class="sref">basic_rates"/a>,i= 42"/a>                                      const="a href="+code=u16" class="sref">u16"/a>="a href="+code=capability" class="sref">capability"/a>, "a href="+code=u64" class="sref">u64"/a>="a href="+code=tsf" class="sref">tsf"/a>)i= 43"/a>{i= 44"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i= 45"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i= 46"/a>        int="a href="+code=rates" class="sref">rates"/a>,="a href="+code=i" class="sref">i"/a>;i= 47"/a>        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=skb" class="sref">skb"/a>;i= 48"/a>        struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>;i= 49"/a>        "a href="+code=u8" class="sref">u8"/a> *"a href="+code=pos" class="sref">pos"/a>;i= 50"/a>        struct="a href="+code=ieee80211_supported_band" class="sref">ieee80211_supported_band"/a> *"a href="+code=sband" class="sref">sband"/a>;i= 51"/a>        struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a> *"a href="+code=bss" class="sref">bss"/a>;i= 52"/a>        "a href="+code=u32" class="sref">u32"/a>="a href="+code=bss_change" class="sref">bss_change"/a>;i= 53"/a>        "a href="+code=u8" class="sref">u8"/a> "a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=IEEE80211_MAX_SUPP_RATES" class="sref">IEEE80211_MAX_SUPP_RATES"/a>];i= 54"/a>        enum "a href="+code=nl80211_channel_typ1" class="sref">nl80211_channel_typ1"/a>="a href="+code=channel_typ1" class="sref">channel_typ1"/a>;i= 55"/a>i= 56"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i= 57"/a>i= 58"/a>        "spa2 class="comment">/* Reset own TSF to allow time synchronizaue"2 work. */"/spa2ti= 59"/a>        "a href="+code=drv_reset_tsf" class="sref">drv_reset_tsf"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>);i= 60"/a>i= 61"/a>        "a href="+code=skb" class="sref">skb"/a> =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=skb" class="sref">skb"/a>;i= 62"/a>        "a href="+code=RCU_INIT_POINTER" class="sref">RCU_INIT_POINTER"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=presp" class="sref">presp"/a>,="a href="+code=NULL" class="sref">NULL"/a>);i= 63"/a>        "a href="+code=synchronize_rcu" class="sref">synchronize_rcu"/a>();i= 64"/a>        "a href="+code=skb" class="sref">skb"/a>->"a href="+code=daua" class="sref">daua"/a> =="a href="+code=skb" class="sref">skb"/a>->"a href="+code=head" class="sref">head"/a>;i= 65"/a>        "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a> ==0;i= 66"/a>        "a href="+code=skb_reset_tail_pointer" class="sref">skb_reset_tail_pointer"/a>("a href="+code=skb" class="sref">skb"/a>);i= 67"/a>        "a href="+code=skb_reserv1" class="sref">skb_reserv1"/a>("a href="+code=skb" class="sref">skb"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=extra_tx_headroom" class="sref">extra_tx_headroom"/a>);i= 68"/a>i= 69"/a>        if (!"a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=bssid" class="sref">bssid"/a>))i= 70"/a>                "a href="+code=sta_info_flush" class="sref">sta_info_flush"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>);i= 71"/a>i= 72"/a>        "spa2 class="comment">/* if merging, indicate to driver that we leave the old IBSS */"/spa2ti= 73"/a>        if ("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=ibss_joined" class="sref">ibss_joined"/a>) {i= 74"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=ibss_joined" class="sref">ibss_joined"/a> =="a href="+code=false" class="sref">false"/a>;i= 75"/a>                "a href="+code=netif_carrier_off" class="sref">netif_carrier_off"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=dev" class="sref">dev"/a>);i= 76"/a>                "a href="+code=ieee80211_bss_info_change_notify" class="sref">ieee80211_bss_info_change_notify"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,="a href="+code=BSS_CHANGED_IBSS" class="sref">BSS_CHANGED_IBSS"/a>);i= 77"/a>        }i= 78"/a>i= 79"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i= 80"/a>i= 81"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=drop_unencrypted" class="sref">drop_unencrypted"/a> =="a href="+code=capability" class="sref">capability"/a> &="a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a> ? 1 :=0;i= 82"/a>i= 83"/a>        "a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a> =="a href="+code=chan" class="sref">chan"/a>;i= 84"/a>        "a href="+code=channel_typ1" class="sref">channel_typ1"/a> =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=channel_typ1" class="sref">channel_typ1"/a>;i= 85"/a>        if (!"a href="+code=cfg80211_can_beacon_sec_chan" class="sref">cfg80211_can_beacon_sec_chan"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>, "a href="+code=chan" class="sref">chan"/a>, "a href="+code=channel_typ1" class="sref">channel_typ1"/a>))i= 86"/a>                "a href="+code=channel_typ1" class="sref">channel_typ1"/a> =="a href="+code=NL80211_CHAN_HT20" class="sref">NL80211_CHAN_HT20"/a>;i= 87"/a>        if (!"a href="+code=ieee80211_set_channel_typ1" class="sref">ieee80211_set_channel_typ1"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=channel_typ1" class="sref">channel_typ1"/a>)) {i= 88"/a>                "spa2 class="comment">/* ca2 only fail due to HT40+/- mismatch */"/spa2ti= 89"/a>                "a href="+code=channel_typ1" class="sref">channel_typ1"/a> =="a href="+code=NL80211_CHAN_HT20" class="sref">NL80211_CHAN_HT20"/a>;i= 90"/a>                "a href="+code=WARN_ON" class="sref">WARN_ON"/a>(!"a href="+code=ieee80211_set_channel_typ1" class="sref">ieee80211_set_channel_typ1"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>,i= 91"/a>                                                    "a href="+code=NL80211_CHAN_HT20" class="sref">NL80211_CHAN_HT20"/a>));i= 92"/a>        }i= 93"/a>        "a href="+code=ieee80211_hw_config" class="sref">ieee80211_hw_config"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=IEEE80211_CONF_CHANGE_CHANNEL" class="sref">IEEE80211_CONF_CHANGE_CHANNEL"/a>);i= 94"/a>i= 95"/a>        "a href="+code=sband" class="sref">sband"/a> =="a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>->"a href="+code=bands" class="sref">bands"/a>["a href="+code=chan" class="sref">chan"/a>->"a href="+code=band" class="sref">band"/a>];i= 96"/a>i= 97"/a>        "spa2 class="comment">/* build supported rates array */"/spa2ti= 98"/a>        "a href="+code=pos" class="sref">pos"/a> =="a href="+code=supp_rates" class="sref">supp_rates"/a>;i= 99"/a>        for ("a href="+code=i" class="sref">i"/a> ==0;="a href="+code=i" class="sref">i"/a> < "a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a>;="a href="+code=i" class="sref">i"/a>++) {i=100"/a>                int="a href="+code=rate" class="sref">rate"/a> =="a href="+code=sband" class="sref">sband"/a>->"a href="+code=bitrates" class="sref">bitrates"/a>["a href="+code=i" class="sref">i"/a>]."a href="+code=bitrate" class="sref">bitrate"/a>;i=101"/a>                "a href="+code=u8" class="sref">u8"/a> "a href="+code=basic" class="sref">basic"/a> ==0;i=102"/a>                if ("a href="+code=basic_rates" class="sref">basic_rates"/a> &="a href="+code=BIT" class="sref">BIT"/a>("a href="+code=i" class="sref">i"/a>))i=103"/a>                        "a href="+code=basic" class="sref">basic"/a> ==0x80;i=104"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=basic" class="sref">basic"/a> | ("a href="+code=u8" class="sref">u8"/a>) ("a href="+code=rate" class="sref">rate"/a> / 5);i=105"/a>        }i=106"/a>i=107"/a>        "spa2 class="comment">/* Build IBSS probe response */"/spa2ti=108"/a>        "a href="+code=mgmt" class="sref">mgmt"/a> ==(void=*) "a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=24 + sizeof("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>));i=109"/a>        "a href="+code=memset" class="sref">memset"/a>("a href="+code=mgmt" class="sref">mgmt"/a>, 0,=24 + sizeof("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>));i=110"/a>        "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=fram1_control" class="sref">fram1_control"/a> =="a href="+code=cpu_to_le16" class="sref">cpu_to_le16"/a>("a href="+code=IEEE80211_FTYPE_MGMT" class="sref">IEEE80211_FTYPE_MGMT"/a> |i=111"/a>                                          "a href="+code=IEEE80211_STYPE_PROBE_RESP" class="sref">IEEE80211_STYPE_PROBE_RESP"/a>);i=112"/a>        "a href="+code=eth_broadcast_addr" class="sref">eth_broadcast_addr"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=da" class="sref">da"/a>);i=113"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=addr" class="sref">addr"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=114"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=115"/a>        "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>."a href="+code=beacon_int" class="sref">beacon_int"/a> =="a href="+code=cpu_to_le16" class="sref">cpu_to_le16"/a>("a href="+code=beacon_int" class="sref">beacon_int"/a>);i=116"/a>        "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>."a href="+code=timestamp" class="sref">timestamp"/a> =="a href="+code=cpu_to_le64" class="sref">cpu_to_le64"/a>("a href="+code=tsf" class="sref">tsf"/a>);i=117"/a>        "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>."a href="+code=capab_info" class="sref">capab_info"/a> =="a href="+code=cpu_to_le16" class="sref">cpu_to_le16"/a>("a href="+code=capability" class="sref">capability"/a>);i=118"/a>i=119"/a>        "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=2 + "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>);i=120"/a>        *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_SSID" class="sref">WLAN_EID_SSID"/a>;i=121"/a>        *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>;i=122"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=pos" class="sref">pos"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>);i=123"/a>i=124"/a>        "a href="+code=rates" class="sref">rates"/a> =="a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a>;i=125"/a>        if ("a href="+code=rates" class="sref">rates"/a> > 8)i=126"/a>                "a href="+code=rates" class="sref">rates"/a> ==8;i=127"/a>        "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=2 + "a href="+code=rates" class="sref">rates"/a>);i=128"/a>        *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_SUPP_RATES" class="sref">WLAN_EID_SUPP_RATES"/a>;i=129"/a>        *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=rates" class="sref">rates"/a>;i=130"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=pos" class="sref">pos"/a>, "a href="+code=supp_rates" class="sref">supp_rates"/a>, "a href="+code=rates" class="sref">rates"/a>);i=131"/a>i=132"/a>        if ("a href="+code=sband" class="sref">sband"/a>->"a href="+code=band" class="sref">band"/a> ==="a href="+code=IEEE80211_BAND_2GHZ" class="sref">IEEE80211_BAND_2GHZ"/a>) {i=133"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=2 + 1);i=134"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_DS_PARAMS" class="sref">WLAN_EID_DS_PARAMS"/a>;i=135"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==1;i=136"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=ieee80211_frequency_to_channel" class="sref">ieee80211_frequency_to_channel"/a>("a href="+code=chan" class="sref">chan"/a>->"a href="+code=center_freq" class="sref">center_freq"/a>);i=137"/a>        }i=138"/a>i=139"/a>        "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=2 + 2);i=140"/a>        *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_IBSS_PARAMS" class="sref">WLAN_EID_IBSS_PARAMS"/a>;i=141"/a>        *"a href="+code=pos" class="sref">pos"/a>++ ==2;i=142"/a>        "spa2 class="comment">/* FIX: set ATIM window based on sca2 results */"/spa2ti=143"/a>        *"a href="+code=pos" class="sref">pos"/a>++ ==0;i=144"/a>        *"a href="+code=pos" class="sref">pos"/a>++ ==0;i=145"/a>i=146"/a>        if ("a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a> > 8) {i=147"/a>                "a href="+code=rates" class="sref">rates"/a> =="a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a> -=8;i=148"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=2 + "a href="+code=rates" class="sref">rates"/a>);i=149"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_EXT_SUPP_RATES" class="sref">WLAN_EID_EXT_SUPP_RATES"/a>;i=150"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=rates" class="sref">rates"/a>;i=151"/a>                "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=pos" class="sref">pos"/a>, &"a href="+code=supp_rates" class="sref">supp_rates"/a>[8], "a href="+code=rates" class="sref">rates"/a>);i=152"/a>        }i=153"/a>i=154"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>)i=155"/a>                "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>),i=156"/a>                       "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ie" class="sref">ie"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>);i=157"/a>i=158"/a>        "spa2 class="comment">/* add HT capability and informaue"2 IEs */"/spa2ti=159"/a>        if ("a href="+code=channel_typ1" class="sref">channel_typ1"/a> &&="a href="+code=sband" class="sref">sband"/a>->"a href="+code=ht_cap" class="sref">ht_cap"/a>."a href="+code=ht_supported" class="sref">ht_supported"/a>) {i=160"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=4 +i=161"/a>                                   sizeof(struct="a href="+code=ieee80211_ht_cap" class="sref">ieee80211_ht_cap"/a>) +i=162"/a>                                   sizeof(struct="a href="+code=ieee80211_ht_operaue"2" class="sref">ieee80211_ht_operaue"2"/a>));i=163"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=ieee80211_ie_build_ht_cap" class="sref">ieee80211_ie_build_ht_cap"/a>("a href="+code=pos" class="sref">pos"/a>, &"a href="+code=sband" class="sref">sband"/a>->"a href="+code=ht_cap" class="sref">ht_cap"/a>,i=164"/a>                                                "a href="+code=sband" class="sref">sband"/a>->"a href="+code=ht_cap" class="sref">ht_cap"/a>."a href="+code=cap" class="sref">cap"/a>);i=165"/a>                "spa2 class="comment">/*"/spa2ti=166"/a>"spa2 class="comment">                 * Note: According to 802.11n-2009 9.13.3.1, HT Protecue"2"/spa2ti=167"/a>"spa2 class="comment">                 * field and RIFS Mode are reserv1d in IBSS mode, therefore"/spa2ti=168"/a>"spa2 class="comment">                 * keep them at 0"/spa2ti=169"/a>"spa2 class="comment">                 */"/spa2ti=170"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=ieee80211_ie_build_ht_oper" class="sref">ieee80211_ie_build_ht_oper"/a>("a href="+code=pos" class="sref">pos"/a>, &"a href="+code=sband" class="sref">sband"/a>->"a href="+code=ht_cap" class="sref">ht_cap"/a>,i=171"/a>                                                 "a href="+code=chan" class="sref">chan"/a>, "a href="+code=channel_typ1" class="sref">channel_typ1"/a>, 0);i=172"/a>        }i=173"/a>i=174"/a>        if ("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=queues" class="sref">queues"/a> >=="a href="+code=IEEE80211_NUM_ACS" class="sref">IEEE80211_NUM_ACS"/a>) {i=175"/a>                "a href="+code=pos" class="sref">pos"/a> =="a href="+code=skb_put" class="sref">skb_put"/a>("a href="+code=skb" class="sref">skb"/a>,=9);i=176"/a>                *"a href="+code=pos" class="sref">pos"/a>++ =="a href="+code=WLAN_EID_VENDOR_SPECIFIC" class="sref">WLAN_EID_VENDOR_SPECIFIC"/a>;i=177"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==7; "spa2 class="comment">/* len */"/spa2ti=178"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==0x00; "spa2 class="comment">/* Microsoft OUI 00:50:F2 */"/spa2ti=179"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==0x50;i=180"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==0xf2;i=181"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==2; "spa2 class="comment">/* WME */"/spa2ti=182"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==0; "spa2 class="comment">/* WME info */"/spa2ti=183"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==1; "spa2 class="comment">/* WME ver */"/spa2ti=184"/a>                *"a href="+code=pos" class="sref">pos"/a>++ ==0; "spa2 class="comment">/* U-APSD no in use */"/spa2ti=185"/a>        }i=186"/a>i=187"/a>        "a href="+code=rcu_assign_pointer" class="sref">rcu_assign_pointer"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=presp" class="sref">presp"/a>,="a href="+code=skb" class="sref">skb"/a>);i=188"/a>i=189"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=beacon_int" class="sref">beacon_int"/a> =="a href="+code=beacon_int" class="sref">beacon_int"/a>;i=190"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=basic_rates" class="sref">basic_rates"/a> =="a href="+code=basic_rates" class="sref">basic_rates"/a>;i=191"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> =="a href="+code=BSS_CHANGED_BEACON_INT" class="sref">BSS_CHANGED_BEACON_INT"/a>;i=192"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=ieee80211_reset_erp_info" class="sref">ieee80211_reset_erp_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i=193"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_BSSID" class="sref">BSS_CHANGED_BSSID"/a>;i=194"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_BEACON" class="sref">BSS_CHANGED_BEACON"/a>;i=195"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_BEACON_ENABLED" class="sref">BSS_CHANGED_BEACON_ENABLED"/a>;i=196"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_BASIC_RATES" class="sref">BSS_CHANGED_BASIC_RATES"/a>;i=197"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_HT" class="sref">BSS_CHANGED_HT"/a>;i=198"/a>        "a href="+code=bss_change" class="sref">bss_change"/a> |=="a href="+code=BSS_CHANGED_IBSS" class="sref">BSS_CHANGED_IBSS"/a>;i=199"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=ibss_joined" class="sref">ibss_joined"/a> =="a href="+code=true" class="sref">true"/a>;i=200"/a>        "a href="+code=ieee80211_bss_info_change_notify" class="sref">ieee80211_bss_info_change_notify"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,="a href="+code=bss_change" class="sref">bss_change"/a>);i=201"/a>i=202"/a>        "a href="+code=ieee80211_sta_def_wmm_params" class="sref">ieee80211_sta_def_wmm_params"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,="a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a>, "a href="+code=supp_rates" class="sref">supp_rates"/a>);i=203"/a>i=204"/a>        "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=state" class="sref">state"/a> =="a href="+code=IEEE80211_IBSS_MLME_JOINED" class="sref">IEEE80211_IBSS_MLME_JOINED"/a>;i=205"/a>        "a href="+code=mod_timer" class="sref">mod_timer"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>,i=206"/a>                  "a href="+code=round_jiffies" class="sref">round_jiffies"/a>("a href="+code=jiffies" class="sref">jiffies"/a> + "a href="+code=IEEE80211_IBSS_MERGE_INTERVAL" class="sref">IEEE80211_IBSS_MERGE_INTERVAL"/a>));i=207"/a>i=208"/a>        "a href="+code=bss" class="sref">bss"/a> =="a href="+code=cfg80211_inform_bss_fram1" class="sref">cfg80211_inform_bss_fram1"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>, "a href="+code=chan" class="sref">chan"/a>,i=209"/a>                                        "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a>, 0,="a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL"/a>);i=210"/a>        "a href="+code=cfg80211_put_bss" class="sref">cfg80211_put_bss"/a>("a href="+code=bss" class="sref">bss"/a>);i=211"/a>        "a href="+code=netif_carrier_on" class="sref">netif_carrier_on"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=dev" class="sref">dev"/a>);i=212"/a>        "a href="+code=cfg80211_ibss_joined" class="sref">cfg80211_ibss_joined"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=dev" class="sref">dev"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL"/a>);i=213"/a>}i=214"/a>i=215"/a>static void="a href="+code=ieee80211_sta_join_ibss" class="sref">ieee80211_sta_join_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=216"/a>                                    struct="a href="+code=ieee80211_bss" class="sref">ieee80211_bss"/a> *"a href="+code=bss" class="sref">bss"/a>)i=217"/a>{i=218"/a>        struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a> *"a href="+code=cbss" class="sref">cbss"/a> =i=219"/a>                "a href="+code=container_of" class="sref">container_of"/a>((void=*)"a href="+code=bss" class="sref">bss"/a>, struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a>, "a href="+code=priv" class="sref">priv"/a>);i=220"/a>        struct="a href="+code=ieee80211_supported_band" class="sref">ieee80211_supported_band"/a> *"a href="+code=sband" class="sref">sband"/a>;i=221"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=basic_rates" class="sref">basic_rates"/a>;i=222"/a>        int="a href="+code=i" class="sref">i"/a>, "a href="+code=j" class="sref">j"/a>;i=223"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=beacon_int" class="sref">beacon_int"/a> =="a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=beacon_interval" class="sref">beacon_interval"/a>;i=224"/a>i=225"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i=226"/a>i=227"/a>        if ("a href="+code=beacon_int" class="sref">beacon_int"/a> < 10)i=228"/a>                "a href="+code=beacon_int" class="sref">beacon_int"/a> ==10;i=229"/a>i=230"/a>        "a href="+code=sband" class="sref">sband"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>->"a href="+code=bands" class="sref">bands"/a>["a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=channel" class="sref">channel"/a>->"a href="+code=band" class="sref">band"/a>];i=231"/a>i=232"/a>        "a href="+code=basic_rates" class="sref">basic_rates"/a> ==0;i=233"/a>i=234"/a>        for ("a href="+code=i" class="sref">i"/a> ==0;="a href="+code=i" class="sref">i"/a> < "a href="+code=bss" class="sref">bss"/a>->"a href="+code=supp_rates_len" class="sref">supp_rates_len"/a>;="a href="+code=i" class="sref">i"/a>++) {i=235"/a>                int="a href="+code=rate" class="sref">rate"/a> ==("a href="+code=bss" class="sref">bss"/a>->"a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=i" class="sref">i"/a>] &=0x7f) * 5;i=236"/a>                "a href="+code=bool" class="sref">bool"/a> "a href="+code=is_basic" class="sref">is_basic"/a> ==!!("a href="+code=bss" class="sref">bss"/a>->"a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=i" class="sref">i"/a>] &=0x80);i=237"/a>i=238"/a>                for ("a href="+code=j" class="sref">j"/a> ==0;="a href="+code=j" class="sref">j"/a> < "a href="+code=sband" class="sref">sband"/a>->"a href="+code=n_bitrates" class="sref">n_bitrates"/a>;="a href="+code=j" class="sref">j"/a>++) {i=239"/a>                        if ("a href="+code=sband" class="sref">sband"/a>->"a href="+code=bitrates" class="sref">bitrates"/a>["a href="+code=j" class="sref">j"/a>]."a href="+code=bitrate" class="sref">bitrate"/a> ==="a href="+code=rate" class="sref">rate"/a>) {i=240"/a>                                if ("a href="+code=is_basic" class="sref">is_basic"/a>)i=241"/a>                                        "a href="+code=basic_rates" class="sref">basic_rates"/a> |=="a href="+code=BIT" class="sref">BIT"/a>("a href="+code=j" class="sref">j"/a>);i=242"/a>                                break;i=243"/a>                        }i=244"/a>                }i=245"/a>        }i=246"/a>i=247"/a>        "a href="+code=__ieee80211_sta_join_ibss" class="sref">__ieee80211_sta_join_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=bssid" class="sref">bssid"/a>,i=248"/a>                                  "a href="+code=beacon_int" class="sref">beacon_int"/a>,i=249"/a>                                  "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=channel" class="sref">channel"/a>,i=250"/a>                                  "a href="+code=basic_rates" class="sref">basic_rates"/a>,i=251"/a>                                  "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=capability" class="sref">capability"/a>,i=252"/a>                                  "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=tsf" class="sref">tsf"/a>);i=253"/a>}i=254"/a>i=255"/a>static struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=ieee80211_ibss_finish_sta" class="sref">ieee80211_ibss_finish_sta"/a>(struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>,i=256"/a>                                                  "a href="+code=bool" class="sref">bool"/a> "a href="+code=auth" class="sref">auth"/a>)i=257"/a>        "a href="+code=__acquires" class="sref">__acquires"/a>("a href="+code=RCU" class="sref">RCU"/a>)i=258"/a>{i=259"/a>        struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a> =="a href="+code=sta" class="sref">sua"/a>->"a href="+code=sdaua" class="sref">sdaua"/a>;i=260"/a>        "a href="+code=u8" class="sref">u8"/a> "a href="+code=addr" class="sref">addr"/a>["a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>];i=261"/a>i=262"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=addr" class="sref">addr"/a>, "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=addr" class="sref">addr"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=263"/a>i=264"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"Adding new IBSS station %pM\n""/spa2t, "a href="+code=addr" class="sref">addr"/a>);i=265"/a>i=266"/a>        "a href="+code=sta_info_pre_move_state" class="sref">sta_info_pre_move_state"/a>("a href="+code=sta" class="sref">sua"/a>, "a href="+code=IEEE80211_STA_AUTH" class="sref">IEEE80211_STA_AUTH"/a>);i=267"/a>        "a href="+code=sta_info_pre_move_state" class="sref">sta_info_pre_move_state"/a>("a href="+code=sta" class="sref">sua"/a>, "a href="+code=IEEE80211_STA_ASSOC" class="sref">IEEE80211_STA_ASSOC"/a>);i=268"/a>        "spa2 class="comment">/* authorize the station only if the network is not RSN protecued. If"/spa2ti=269"/a>"spa2 class="comment">         * not wait for the userspace to authorize it */"/spa2ti=270"/a>        if (!"a href="+code=sta" class="sref">sua"/a>->"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=control_port" class="sref">control_port"/a>)i=271"/a>                "a href="+code=sta_info_pre_move_state" class="sref">sta_info_pre_move_state"/a>("a href="+code=sta" class="sref">sua"/a>, "a href="+code=IEEE80211_STA_AUTHORIZED" class="sref">IEEE80211_STA_AUTHORIZED"/a>);i=272"/a>i=273"/a>        "a href="+code=rate_control_rate_init" class="sref">rate_control_rate_init"/a>("a href="+code=sta" class="sref">sua"/a>);i=274"/a>i=275"/a>        "spa2 class="comment">/* If it fails, maybe we raced another insertion? */"/spa2ti=276"/a>        if ("a href="+code=sta_info_insert_rcu" class="sref">sta_info_insert_rcu"/a>("a href="+code=sta" class="sref">sua"/a>))i=277"/a>                return "a href="+code=sta_info_get" class="sref">sta_info_get"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=addr" class="sref">addr"/a>);i=278"/a>        if ("a href="+code=auth" class="sref">auth"/a> &&=!"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=auth_fram1_registraue"2s" class="sref">auth_fram1_registraue"2s"/a>) {i=279"/a>                "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=280"/a>                         "spa2 class="string">"TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transacue"2=1)\n""/spa2t,i=281"/a>                         "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=addr" class="sref">addr"/a>, "a href="+code=addr" class="sref">addr"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>);i=282"/a>                "a href="+code=ieee80211_send_auth" class="sref">ieee80211_send_auth"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, 1, "a href="+code=WLAN_AUTH_OPEN" class="sref">WLAN_AUTH_OPEN"/a>, "a href="+code=NULL" class="sref">NULL"/a>, 0,i=283"/a>                                    "a href="+code=addr" class="sref">addr"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=NULL" class="sref">NULL"/a>, 0, 0);i=284"/a>        }i=285"/a>        return "a href="+code=sta" class="sref">sua"/a>;i=286"/a>}i=287"/a>i=288"/a>static struct="a href="+code=sta_info" class="sref">sta_info"/a> *i=289"/a>"a href="+code=ieee80211_ibss_add_sta" class="sref">ieee80211_ibss_add_sta"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=290"/a>                       const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=bssid" class="sref">bssid"/a>, const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=addr" class="sref">addr"/a>,i=291"/a>                       "a href="+code=u32" class="sref">u32"/a> "a href="+code=supp_rates" class="sref">supp_rates"/a>,="a href="+code=bool" class="sref">bool"/a> "a href="+code=auth" class="sref">auth"/a>)i=292"/a>        "a href="+code=__acquires" class="sref">__acquires"/a>("a href="+code=RCU" class="sref">RCU"/a>)i=293"/a>{i=294"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=295"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=296"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>;i=297"/a>        int="a href="+code=band" class="sref">band"/a> =="a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a>->"a href="+code=band" class="sref">band"/a>;i=298"/a>i=299"/a>        "spa2 class="comment">/*"/spa2ti=300"/a>"spa2 class="comment">         * XXX: Consider removing the least=recently used entry and"/spa2ti=301"/a>"spa2 class="comment">         *      allow new one to be added."/spa2ti=302"/a>"spa2 class="comment">         */"/spa2ti=303"/a>        if ("a href="+code=local" class="sref">local"/a>->"a href="+code=num_sta" class="sref">num_sta"/a> >=="a href="+code=IEEE80211_IBSS_MAX_STA_ENTRIES" class="sref">IEEE80211_IBSS_MAX_STA_ENTRIES"/a>) {i=304"/a>                "a href="+code=net_info_ratelimited" class="sref">net_info_ratelimited"/a>("spa2 class="string">"%s: No room for a new IBSS STA entry %pM\n""/spa2t,i=305"/a>                                    "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=nam1" class="sref">nam1"/a>, "a href="+code=addr" class="sref">addr"/a>);i=306"/a>                "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=307"/a>                return "a href="+code=NULL" class="sref">NULL"/a>;i=308"/a>        }i=309"/a>i=310"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=state" class="sref">state"/a> ==="a href="+code=IEEE80211_IBSS_MLME_SEARCH" class="sref">IEEE80211_IBSS_MLME_SEARCH"/a>) {i=311"/a>                "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=312"/a>                return "a href="+code=NULL" class="sref">NULL"/a>;i=313"/a>        }i=314"/a>i=315"/a>        if (!"a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>)) {i=316"/a>                "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=317"/a>                return "a href="+code=NULL" class="sref">NULL"/a>;i=318"/a>        }i=319"/a>i=320"/a>        "a href="+code=sta" class="sref">sua"/a> =="a href="+code=sta_info_alloc" class="sref">sta_info_alloc"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=addr" class="sref">addr"/a>, "a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL"/a>);i=321"/a>        if (!"a href="+code=sta" class="sref">sua"/a>) {i=322"/a>                "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=323"/a>                return "a href="+code=NULL" class="sref">NULL"/a>;i=324"/a>        }i=325"/a>i=326"/a>        "a href="+code=sta" class="sref">sua"/a>->"a href="+code=last_rx" class="sref">last_rx"/a> =="a href="+code=jiffies" class="sref">jiffies"/a>;i=327"/a>i=328"/a>        "spa2 class="comment">/* make sure mandauory rates are always added */"/spa2ti=329"/a>        "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>] =="a href="+code=supp_rates" class="sref">supp_rates"/a> |i=330"/a>                        "a href="+code=ieee80211_mandauory_rates" class="sref">ieee80211_mandauory_rates"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=band" class="sref">band"/a>);i=331"/a>i=332"/a>        return "a href="+code=ieee80211_ibss_finish_sta" class="sref">ieee80211_ibss_finish_sta"/a>("a href="+code=sta" class="sref">sua"/a>, "a href="+code=auth" class="sref">auth"/a>);i=333"/a>}i=334"/a>i=335"/a>static void="a href="+code=ieee80211_rx_mgmt_deauth_ibss" class="sref">ieee80211_rx_mgmt_deauth_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=336"/a>                                          struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>,i=337"/a>                                          "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=len" class="sref">len"/a>)i=338"/a>{i=339"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=reason" class="sref">reason"/a> =="a href="+code=le16_to_cpu" class="sref">le16_to_cpu"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=deauth" class="sref">deauth"/a>."a href="+code=reason_code" class="sref">reason_code"/a>);i=340"/a>i=341"/a>        if ("a href="+code=len" class="sref">len"/a> < "a href="+code=IEEE80211_DEAUTH_FRAME_LEN" class="sref">IEEE80211_DEAUTH_FRAME_LEN"/a>)i=342"/a>                return;i=343"/a>i=344"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"RX DeAuth SA=%pM DA=%pM BSSID=%pM (reason: %d)\n""/spa2t,i=345"/a>                 "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=da" class="sref">da"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=reason" class="sref">reason"/a>);i=346"/a>        "a href="+code=sta_info_destroy_addr" class="sref">sta_info_destroy_addr"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>);i=347"/a>}i=348"/a>i=349"/a>static void="a href="+code=ieee80211_rx_mgmt_auth_ibss" class="sref">ieee80211_rx_mgmt_auth_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=350"/a>                                        struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>,i=351"/a>                                        "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=len" class="sref">len"/a>)i=352"/a>{i=353"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=auth_alg" class="sref">auth_alg"/a>, "a href="+code=auth_transacue"2" class="sref">auth_transacue"2"/a>;i=354"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>;i=355"/a>        "a href="+code=u8" class="sref">u8"/a> "a href="+code=deauth_fram1_buf" class="sref">deauth_fram1_buf"/a>["a href="+code=IEEE80211_DEAUTH_FRAME_LEN" class="sref">IEEE80211_DEAUTH_FRAME_LEN"/a>];i=356"/a>i=357"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i=358"/a>i=359"/a>        if ("a href="+code=len" class="sref">len"/a> < 24 + 6)i=360"/a>                return;i=361"/a>i=362"/a>        "a href="+code=auth_alg" class="sref">auth_alg"/a> =="a href="+code=le16_to_cpu" class="sref">le16_to_cpu"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=auth" class="sref">auth"/a>."a href="+code=auth_alg" class="sref">auth_alg"/a>);i=363"/a>        "a href="+code=auth_transacue"2" class="sref">auth_transacue"2"/a> =="a href="+code=le16_to_cpu" class="sref">le16_to_cpu"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=auth" class="sref">auth"/a>."a href="+code=auth_transacue"2" class="sref">auth_transacue"2"/a>);i=364"/a>i=365"/a>        if ("a href="+code=auth_alg" class="sref">auth_alg"/a> !=="a href="+code=WLAN_AUTH_OPEN" class="sref">WLAN_AUTH_OPEN"/a> || "a href="+code=auth_transacue"2" class="sref">auth_transacue"2"/a> !==1)i=366"/a>                return;i=367"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=368"/a>                 "spa2 class="string">"RX Auth SA=%pM DA=%pM BSSID=%pM (auth_transacue"2=%d)\n""/spa2t,i=369"/a>                 "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=da" class="sref">da"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=auth_transacue"2" class="sref">auth_transacue"2"/a>);i=370"/a>        "a href="+code=sta_info_destroy_addr" class="sref">sta_info_destroy_addr"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>);i=371"/a>        "a href="+code=sta" class="sref">sua"/a> =="a href="+code=ieee80211_ibss_add_sta" class="sref">ieee80211_ibss_add_sta"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, 0,="a href="+code=false" class="sref">false"/a>);i=372"/a>        "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=373"/a>i=374"/a>        "spa2 class="comment">/*"/spa2ti=375"/a>"spa2 class="comment">         * if we have any problem in allocating the new station, we reply with a"/spa2ti=376"/a>"spa2 class="comment">         * DEAUTH fram1 to tell the other end that we had a problem"/spa2ti=377"/a>"spa2 class="comment">         */"/spa2ti=378"/a>        if (!"a href="+code=sta" class="sref">sua"/a>) {i=379"/a>                "a href="+code=ieee80211_send_deauth_disassoc" class="sref">ieee80211_send_deauth_disassoc"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>,i=380"/a>                                               "a href="+code=IEEE80211_STYPE_DEAUTH" class="sref">IEEE80211_STYPE_DEAUTH"/a>,i=381"/a>                                               "a href="+code=WLAN_REASON_UNSPECIFIED" class="sref">WLAN_REASON_UNSPECIFIED"/a>, "a href="+code=true" class="sref">true"/a>,i=382"/a>                                               "a href="+code=deauth_fram1_buf" class="sref">deauth_fram1_buf"/a>);i=383"/a>                return;i=384"/a>        }i=385"/a>i=386"/a>        "spa2 class="comment">/*"/spa2ti=387"/a>"spa2 class="comment">         * IEEE 802.11 standard does not require authentication in IBSS"/spa2ti=388"/a>"spa2 class="comment">         * networks and most implementaue"2s do not seem to use it."/spa2ti=389"/a>"spa2 class="comment">         * However, try to reply to authentication attempts if someone"/spa2ti=390"/a>"spa2 class="comment">         * has actually implemented this."/spa2ti=391"/a>"spa2 class="comment">         */"/spa2ti=392"/a>        "a href="+code=ieee80211_send_auth" class="sref">ieee80211_send_auth"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, 2, "a href="+code=WLAN_AUTH_OPEN" class="sref">WLAN_AUTH_OPEN"/a>, "a href="+code=NULL" class="sref">NULL"/a>, 0,i=393"/a>                            "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=NULL" class="sref">NULL"/a>, 0, 0);i=394"/a>}i=395"/a>i=396"/a>static void="a href="+code=ieee80211_rx_bss_info" class="sref">ieee80211_rx_bss_info"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=397"/a>                                  struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>,i=398"/a>                                  "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=len" class="sref">len"/a>,i=399"/a>                                  struct="a href="+code=ieee80211_rx_status" class="sref">ieee80211_rx_status"/a> *"a href="+code=rx_status" class="sref">rx_status"/a>,i=400"/a>                                  struct="a href="+code=ieee802_11_elems" class="sref">ieee802_11_elems"/a> *"a href="+code=elems" class="sref">elems"/a>,i=401"/a>                                  "a href="+code=bool" class="sref">bool"/a> "a href="+code=beacon" class="sref">beacon"/a>)i=402"/a>{i=403"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=404"/a>        int="a href="+code=freq" class="sref">freq"/a>;i=405"/a>        struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a> *"a href="+code=cbss" class="sref">cbss"/a>;i=406"/a>        struct="a href="+code=ieee80211_bss" class="sref">ieee80211_bss"/a> *"a href="+code=bss" class="sref">bss"/a>;i=407"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>;i=408"/a>        struct="a href="+code=ieee80211_channel" class="sref">ieee80211_channel"/a> *"a href="+code=channel" class="sref">channel"/a>;i=409"/a>        "a href="+code=u64" class="sref">u64"/a> "a href="+code=beacon_timesuamp" class="sref">beacon_timesuamp"/a>, "a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a>;i=410"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=supp_rates" class="sref">supp_rates"/a> ==0;i=411"/a>        enum="a href="+code=ieee80211_band" class="sref">ieee80211_band"/a> "a href="+code=band" class="sref">band"/a> =="a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=band" class="sref">band"/a>;i=412"/a>        struct="a href="+code=ieee80211_supported_band" class="sref">ieee80211_supported_band"/a> *"a href="+code=sband" class="sref">sband"/a> =="a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>->"a href="+code=bands" class="sref">bands"/a>["a href="+code=band" class="sref">band"/a>];i=413"/a>        "a href="+code=bool" class="sref">bool"/a> "a href="+code=rates_updaued" class="sref">rates_updaued"/a> =="a href="+code=false" class="sref">false"/a>;i=414"/a>i=415"/a>        if ("a href="+code=elems" class="sref">elems"/a>->"a href="+code=ds_params" class="sref">ds_params"/a> &&="a href="+code=elems" class="sref">elems"/a>->"a href="+code=ds_params_len" class="sref">ds_params_len"/a> ===1)i=416"/a>                "a href="+code=freq" class="sref">freq"/a> =="a href="+code=ieee80211_channel_to_frequency" class="sref">ieee80211_channel_to_frequency"/a>("a href="+code=elems" class="sref">elems"/a>->"a href="+code=ds_params" class="sref">ds_params"/a>[0],i=417"/a>                                                      "a href="+code=band" class="sref">band"/a>);i=418"/a>        elsei=419"/a>                "a href="+code=freq" class="sref">freq"/a> =="a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=freq" class="sref">freq"/a>;i=420"/a>i=421"/a>        "a href="+code=channel" class="sref">channel"/a> =="a href="+code=ieee80211_get_channel" class="sref">ieee80211_get_channel"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>,="a href="+code=freq" class="sref">freq"/a>);i=422"/a>i=423"/a>        if (!"a href="+code=channel" class="sref">channel"/a> || "a href="+code=channel" class="sref">channel"/a>->"a href="+code=flags" class="sref">flags"/a> & "a href="+code=IEEE80211_CHAN_DISABLED" class="sref">IEEE80211_CHAN_DISABLED"/a>)i=424"/a>                return;i=425"/a>i=426"/a>        if ("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=type" class="sref">type"/a> ==="a href="+code=NL80211_IFTYPE_ADHOC" class="sref">NL80211_IFTYPE_ADHOC"/a> &&i=427"/a>            "a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>)) {i=428"/a>i=429"/a>                "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=430"/a>                "a href="+code=sta" class="sref">sua"/a> =="a href="+code=sta_info_get" class="sref">sta_info_get"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>);i=431"/a>i=432"/a>                if ("a href="+code=elems" class="sref">elems"/a>->"a href="+code=supp_rates" class="sref">supp_rates"/a>) {i=433"/a>                        "a href="+code=supp_rates" class="sref">supp_rates"/a> =="a href="+code=ieee80211_sta_get_rates" class="sref">ieee80211_sta_get_rates"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=elems" class="sref">elems"/a>,i=434"/a>                                                             "a href="+code=band" class="sref">band"/a>, "a href="+code=NULL" class="sref">NULL"/a>);i=435"/a>                        if ("a href="+code=sta" class="sref">sua"/a>) {i=436"/a>                                "a href="+code=u32" class="sref">u32"/a> "a href="+code=prev_rates" class="sref">prev_rates"/a>;i=437"/a>i=438"/a>                                "a href="+code=prev_rates" class="sref">prev_rates"/a> =="a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>];i=439"/a>                                "spa2 class="comment">/* make sure mandauory rates are always added */"/spa2ti=440"/a>                                "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>] =="a href="+code=supp_rates" class="sref">supp_rates"/a> |i=441"/a>                                        "a href="+code=ieee80211_mandauory_rates" class="sref">ieee80211_mandauory_rates"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=band" class="sref">band"/a>);i=442"/a>i=443"/a>                                if ("a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>] !=="a href="+code=prev_rates" class="sref">prev_rates"/a>) {i=444"/a>                                        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=445"/a>                                                 "spa2 class="string">"updaued supp_rates set for %pM based on beacon/probe_resp (0x%x -> 0x%x)\n""/spa2t,i=446"/a>                                                 "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=addr" class="sref">addr"/a>, "a href="+code=prev_rates" class="sref">prev_rates"/a>,i=447"/a>                                                 "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>]);i=448"/a>                                        "a href="+code=rates_updaued" class="sref">rates_updaued"/a> =="a href="+code=true" class="sref">true"/a>;i=449"/a>                                }i=450"/a>                        } else {i=451"/a>                                "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=452"/a>                                "a href="+code=sta" class="sref">sua"/a> =="a href="+code=ieee80211_ibss_add_sta" class="sref">ieee80211_ibss_add_sta"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>,i=453"/a>                                                "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=supp_rates" class="sref">supp_rates"/a>, "a href="+code=true" class="sref">true"/a>);i=454"/a>                        }i=455"/a>                }i=456"/a>i=457"/a>                if ("a href="+code=sta" class="sref">sua"/a> &&="a href="+code=elems" class="sref">elems"/a>->"a href="+code=wmm_info" class="sref">wmm_info"/a>)i=458"/a>                        "a href="+code=set_sta_flag" class="sref">set_sta_flag"/a>("a href="+code=sta" class="sref">sua"/a>, "a href="+code=WLAN_STA_WME" class="sref">WLAN_STA_WME"/a>);i=459"/a>i=460"/a>                if ("a href="+code=sta" class="sref">sua"/a> &&="a href="+code=elems" class="sref">elems"/a>->"a href="+code=ht_operaue"2" class="sref">ht_operaue"2"/a> &&="a href="+code=elems" class="sref">elems"/a>->"a href="+code=ht_cap_elem" class="sref">ht_cap_elem"/a> &&i=461"/a>                    "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=channel_type" class="sref">channel_type"/a> !=="a href="+code=NL80211_CHAN_NO_HT" class="sref">NL80211_CHAN_NO_HT"/a>) {i=462"/a>                        "spa2 class="comment">/* we both use HT */"/spa2ti=463"/a>                        struct="a href="+code=ieee80211_sta_ht_cap" class="sref">ieee80211_sta_ht_cap"/a> "a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>;i=464"/a>                        enum="a href="+code=nl80211_channel_type" class="sref">nl80211_channel_type"/a> "a href="+code=channel_type" class="sref">channel_type"/a> =i=465"/a>                                "a href="+code=ieee80211_ht_oper_to_channel_type" class="sref">ieee80211_ht_oper_to_channel_type"/a>(i=466"/a>                                                        "a href="+code=elems" class="sref">elems"/a>->"a href="+code=ht_operaue"2" class="sref">ht_operaue"2"/a>);i=467"/a>i=468"/a>                        "a href="+code=ieee80211_ht_cap_ie_to_sta_ht_cap" class="sref">ieee80211_ht_cap_ie_to_sta_ht_cap"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=sband" class="sref">sband"/a>,i=469"/a>                                                          "a href="+code=elems" class="sref">elems"/a>->"a href="+code=ht_cap_elem" class="sref">ht_cap_elem"/a>,i=470"/a>                                                          &"a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>);i=471"/a>i=472"/a>                        "spa2 class="comment">/*"/spa2ti=473"/a>"spa2 class="comment">                         * fall back to HT20 if we don't use or use"/spa2ti=474"/a>"spa2 class="comment">                         * the other extension channel"/spa2ti=475"/a>"spa2 class="comment">                         */"/spa2ti=476"/a>                        if (!("a href="+code=channel_type" class="sref">channel_type"/a> ==="a href="+code=NL80211_CHAN_HT40MINUS" class="sref">NL80211_CHAN_HT40MINUS"/a> ||i=477"/a>                              "a href="+code=channel_type" class="sref">channel_type"/a> ==="a href="+code=NL80211_CHAN_HT40PLUS" class="sref">NL80211_CHAN_HT40PLUS"/a>) ||i=478"/a>                            "a href="+code=channel_type" class="sref">channel_type"/a> !=="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=channel_type" class="sref">channel_type"/a>)i=479"/a>                                "a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>."a href="+code=cap" class="sref">cap"/a> &=i=480"/a>                                        ~"a href="+code=IEEE80211_HT_CAP_SUP_WIDTH_20_40" class="sref">IEEE80211_HT_CAP_SUP_WIDTH_20_40"/a>;i=481"/a>i=482"/a>                        if ("a href="+code=memcmp" class="sref">memcmp"/a>(&"a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=ht_cap" class="sref">ht_cap"/a>, &"a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>,i=483"/a>                                   sizeof("a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>))) {i=484"/a>                                "a href="+code=memcpy" class="sref">memcpy"/a>(&"a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=ht_cap" class="sref">ht_cap"/a>, &"a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>,i=485"/a>                                       sizeof("a href="+code=sta_ht_cap_new" class="sref">sta_ht_cap_new"/a>));i=486"/a>                                "a href="+code=rates_updaued" class="sref">rates_updaued"/a> =="a href="+code=true" class="sref">true"/a>;i=487"/a>                        }i=488"/a>                }i=489"/a>i=490"/a>                if ("a href="+code=sta" class="sref">sua"/a> &&="a href="+code=rates_updaued" class="sref">rates_updaued"/a>) {i=491"/a>                        "a href="+code=drv_sta_rc_updaue" class="sref">drv_sta_rc_updaue"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>, &"a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>,i=492"/a>                                          "a href="+code=IEEE80211_RC_SUPP_RATES_CHANGED" class="sref">IEEE80211_RC_SUPP_RATES_CHANGED"/a>);i=493"/a>                        "a href="+code=rate_control_rate_init" class="sref">rate_control_rate_init"/a>("a href="+code=sta" class="sref">sua"/a>);i=494"/a>                }i=495"/a>i=496"/a>                "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=497"/a>        }i=498"/a>i=499"/a>        "a href="+code=bss" class="sref">bss"/a> =="a href="+code=ieee80211_bss_info_updaue" class="sref">ieee80211_bss_info_updaue"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=rx_status" class="sref">rx_status"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=len" class="sref">len"/a>, "a href="+code=elems" class="sref">elems"/a>,i=500"/a>                                        "a href="+code=channel" class="sref">channel"/a>,="a href="+code=beacon" class="sref">beacon"/a>);i=501"/a>        if (!"a href="+code=bss" class="sref">bss"/a>)i=502"/a>                return;i=503"/a>i=504"/a>        "a href="+code=cbss" class="sref">cbss"/a> =="a href="+code=container_of" class="sref">container_of"/a>((void=*)"a href="+code=bss" class="sref">bss"/a>, struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a>, "a href="+code=priv" class="sref">priv"/a>);i=505"/a>i=506"/a>        "spa2 class="comment">/* was just updaued in ieee80211_bss_info_updaue */"/spa2ti=507"/a>        "a href="+code=beacon_timesuamp" class="sref">beacon_timesuamp"/a> =="a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=tsf" class="sref">tsf"/a>;i=508"/a>i=509"/a>        "spa2 class="comment">/* check if we need to merge IBSS */"/spa2ti=510"/a>i=511"/a>        "spa2 class="comment">/* we use a fixed BSSID */"/spa2ti=512"/a>        if ("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=fixed_bssid" class="sref">fixed_bssid"/a>)i=513"/a>                goto "a href="+code=put_bss" class="sref">put_bss"/a>;i=514"/a>i=515"/a>        "spa2 class="comment">/* not an IBSS */"/spa2ti=516"/a>        if (!("a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=capability" class="sref">capability"/a> & "a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a>))i=517"/a>                goto "a href="+code=put_bss" class="sref">put_bss"/a>;i=518"/a>i=519"/a>        "spa2 class="comment">/* different channel */"/spa2ti=520"/a>        if ("a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=channel" class="sref">channel"/a> !=="a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a>)i=521"/a>                goto "a href="+code=put_bss" class="sref">put_bss"/a>;i=522"/a>i=523"/a>        "spa2 class="comment">/* different SSID */"/spa2ti=524"/a>        if ("a href="+code=elems" class="sref">elems"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a> !=="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid_len" class="sref">ssid_len"/a> ||i=525"/a>            "a href="+code=memcmp" class="sref">memcmp"/a>("a href="+code=elems" class="sref">elems"/a>->"a href="+code=ssid" class="sref">ssid"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid" class="sref">ssid"/a>,i=526"/a>                                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid_len" class="sref">ssid_len"/a>))i=527"/a>                goto "a href="+code=put_bss" class="sref">put_bss"/a>;i=528"/a>i=529"/a>        "spa2 class="comment">/* sam1 BSSID */"/spa2ti=530"/a>        if ("a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>))i=531"/a>                goto "a href="+code=put_bss" class="sref">put_bss"/a>;i=532"/a>i=533"/a>        if ("a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=flag" class="sref">flag"/a> & "a href="+code=RX_FLAG_MACTIME_MPDU" class="sref">RX_FLAG_MACTIME_MPDU"/a>) {i=534"/a>                "spa2 class="comment">/*"/spa2ti=535"/a>"spa2 class="comment">                 * For correct IBSS merging we need mactime; since mactime is"/spa2ti=536"/a>"spa2 class="comment">                 * defined as the time the first daua symbol of the fram1 hits"/spa2ti=537"/a>"spa2 class="comment">                 * the PHY, and the timesuamp of the beacon is defined as "the"/spa2ti=538"/a>"spa2 class="comment">                 * time that the daua symbol containing the first bit of the"/spa2ti=539"/a>"spa2 class="comment">                 * timesuamp is transmitted to the PHY plus the transmitting"/spa2ti=540"/a>"spa2 class="comment">                 * STA's delays through its local PHY from the MAC-PHY"/spa2ti=541"/a>"spa2 class="comment">                 * interface to its interface with the WM" (802.11 11.1.2)"/spa2ti=542"/a>"spa2 class="comment">                 * - equals the time this bit arrives at the receiver - we have"/spa2ti=543"/a>"spa2 class="comment">                 * to take into account the offset between the two."/spa2ti=544"/a>"spa2 class="comment">                 *"/spa2ti=545"/a>"spa2 class="comment">                 * E.g. at 1 MBit that means mactime is 192 usec earlier"/spa2ti=546"/a>"spa2 class="comment">                 * (=24 bytes * 8 usecs/byte) than the beacon timesuamp."/spa2ti=547"/a>"spa2 class="comment">                 */"/spa2ti=548"/a>                int="a href="+code=raue" class="sref">raue"/a>;i=549"/a>i=550"/a>                if ("a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=flag" class="sref">flag"/a> & "a href="+code=RX_FLAG_HT" class="sref">RX_FLAG_HT"/a>)i=551"/a>                        "a href="+code=raue" class="sref">raue"/a> = 65; "spa2 class="comment">/* TODO: HT rates */"/spa2ti=552"/a>                elsei=553"/a>                        "a href="+code=raue" class="sref">raue"/a> = "a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>->"a href="+code=bands" class="sref">bands"/a>["a href="+code=band" class="sref">band"/a>]->i=554"/a>                                "a href="+code=bitrates" class="sref">bitrates"/a>["a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=rate_idx" class="sref">raue_idx"/a>]."a href="+code=bitrate" class="sref">bitrate"/a>;i=555"/a>i=556"/a>                "a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a> =="a href="+code=rx_status" class="sref">rx_status"/a>->"a href="+code=mactime" class="sref">mactime"/a> + (24 * 8 * 10 / "a href="+code=raue" class="sref">raue"/a>);i=557"/a>        } else {i=558"/a>                "spa2 class="comment">/*"/spa2ti=559"/a>"spa2 class="comment">                 * second besu opue"2: get current TSF"/spa2ti=560"/a>"spa2 class="comment">                 * (will return -1 if not supported)"/spa2ti=561"/a>"spa2 class="comment">                 */"/spa2ti=562"/a>                "a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a> =="a href="+code=drv_get_tsf" class="sref">drv_get_tsf"/a>("a href="+code=local" class="sref">local"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>);i=563"/a>        }i=564"/a>i=565"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=566"/a>                 "spa2 class="string">"RX beacon SA=%pM BSSID=%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n""/spa2t,i=567"/a>                 "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>,i=568"/a>                 (unsigned long long)"a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a>,i=569"/a>                 (unsigned long long)"a href="+code=beacon_timesuamp" class="sref">beacon_timesuamp"/a>,i=570"/a>                 (unsigned long long)("a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a> - "a href="+code=beacon_timesuamp" class="sref">beacon_timesuamp"/a>),i=571"/a>                 "a href="+code=jiffies" class="sref">jiffies"/a>);i=572"/a>i=573"/a>        if ("a href="+code=beacon_timesuamp" class="sref">beacon_timesuamp"/a> > "a href="+code=rx_timesuamp" class="sref">rx_timesuamp"/a>) {i=574"/a>                "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=575"/a>                         "spa2 class="string">"beacon TSF higher than local TSF - IBSS merge with BSSID %pM\n""/spa2t,i=576"/a>                         "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>);i=577"/a>                "a href="+code=ieee80211_sta_join_ibss" class="sref">ieee80211_sta_join_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=bss" class="sref">bss"/a>);i=578"/a>                "a href="+code=supp_rates" class="sref">supp_rates"/a> =="a href="+code=ieee80211_sta_get_rates" class="sref">ieee80211_sta_get_rates"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=elems" class="sref">elems"/a>, "a href="+code=band" class="sref">band"/a>, "a href="+code=NULL" class="sref">NULL"/a>);i=579"/a>                "a href="+code=ieee80211_ibss_add_sta" class="sref">ieee80211_ibss_add_sta"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>,i=580"/a>                                       "a href="+code=supp_rates" class="sref">supp_rates"/a>, "a href="+code=true" class="sref">true"/a>);i=581"/a>                "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=582"/a>        }i=583"/a>i=584"/a> "a href="+code=put_bss" class="sref">put_bss"/a>:i=585"/a>        "a href="+code=ieee80211_rx_bss_put" class="sref">ieee80211_rx_bss_put"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=bss" class="sref">bss"/a>);i=586"/a>}i=587"/a>i=588"/a>void="a href="+code=ieee80211_ibss_rx_no_sta" class="sref">ieee80211_ibss_rx_no_sta"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=589"/a>                              const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=bssid" class="sref">bssid"/a>, const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=addr" class="sref">addr"/a>,i=590"/a>                              "a href="+code=u32" class="sref">u32"/a> "a href="+code=supp_rates" class="sref">supp_rates"/a>)i=591"/a>{i=592"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=593"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=594"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>;i=595"/a>        int="a href="+code=band" class="sref">band"/a> = "a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a>->"a href="+code=band" class="sref">band"/a>;i=596"/a>i=597"/a>        "spa2 class="comment">/*"/spa2ti=598"/a>"spa2 class="comment">         * XXX: Consider removing the least=recently used entry and"/spa2ti=599"/a>"spa2 class="comment">         *      allow new one to be added."/spa2ti=600"/a>"spa2 class="comment">         */"/spa2ti=601"/a>        if ("a href="+code=local" class="sref">local"/a>->"a href="+code=num_sta" class="sref">num_sta"/a> >= "a href="+code=IEEE80211_IBSS_MAX_STA_ENTRIES" class="sref">IEEE80211_IBSS_MAX_STA_ENTRIES"/a>) {i=602"/a>                "a href="+code=net_info_ratelimiued" class="sref">net_info_ratelimiued"/a>("spa2 class="string">"%s: No room for a new IBSS STA entry %pM\n""/spa2t,i=603"/a>                                    "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=nam1" class="sref">name"/a>, "a href="+code=addr" class="sref">addr"/a>);i=604"/a>                return;i=605"/a>        }i=606"/a>i=607"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=staue" class="sref">staue"/a> == "a href="+code=IEEE80211_IBSS_MLME_SEARCH" class="sref">IEEE80211_IBSS_MLME_SEARCH"/a>)i=608"/a>                return;i=609"/a>i=610"/a>        if (!"a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>))i=611"/a>                return;i=612"/a>i=613"/a>        "a href="+code=sta" class="sref">sua"/a> =="a href="+code=sta_info_alloc" class="sref">sta_info_alloc"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=addr" class="sref">addr"/a>, "a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC"/a>);i=614"/a>        if (!"a href="+code=sta" class="sref">sua"/a>)i=615"/a>                return;i=616"/a>i=617"/a>        "a href="+code=sta" class="sref">sua"/a>->"a href="+code=last_rx" class="sref">last_rx"/a> =="a href="+code=jiffies" class="sref">jiffies"/a>;i=618"/a>i=619"/a>        "spa2 class="comment">/* make sure mandauory rates are always added */"/spa2ti=620"/a>        "a href="+code=sta" class="sref">sua"/a>->"a href="+code=sta" class="sref">sua"/a>."a href="+code=supp_rates" class="sref">supp_rates"/a>["a href="+code=band" class="sref">band"/a>] =="a href="+code=supp_rates" class="sref">supp_rates"/a> |i=621"/a>                        "a href="+code=ieee80211_mandauory_rates" class="sref">ieee80211_mandauory_rates"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=band" class="sref">band"/a>);i=622"/a>i=623"/a>        "a href="+code=spin_lock" class="sref">spin_lock"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=624"/a>        "a href="+code=list_add" class="sref">list_add"/a>(&"a href="+code=sta" class="sref">sua"/a>->"a href="+code=list" class="sref">list"/a>, &"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>);i=625"/a>        "a href="+code=spin_unlock" class="sref">spin_unlock"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=626"/a>        "a href="+code=ieee80211_queue_work" class="sref">ieee80211_queue_work"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>, &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=work" class="sref">work"/a>);i=627"/a>}i=628"/a>i=629"/a>stauic int="a href="+code=ieee80211_sta_active_ibss" class="sref">ieee80211_sta_active_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i=630"/a>{i=631"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=632"/a>        int="a href="+code=active" class="sref">active"/a> ==0;i=633"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sta" class="sref">sua"/a>;i=634"/a>i=635"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i=636"/a>i=637"/a>        "a href="+code=rcu_read_lock" class="sref">rcu_read_lock"/a>();i=638"/a>i=639"/a>        "a href="+code=list_for_each_entry_rcu" class="sref">list_for_each_entry_rcu"/a>("a href="+code=sta" class="sref">sua"/a>, &"a href="+code=local" class="sref">local"/a>->"a href="+code=sta_list" class="sref">sta_list"/a>, "a href="+code=list" class="sref">list"/a>) {i=640"/a>                if ("a href="+code=sta" class="sref">sua"/a>->"a href="+code=sdaua" class="sref">sdaua"/a> == "a href="+code=sdaua" class="sref">sdaua"/a> &&i=641"/a>                    "a href="+code=time_after" class="sref">time_after"/a>("a href="+code=sta" class="sref">sua"/a>->"a href="+code=last_rx" class="sref">last_rx"/a> + "a href="+code=IEEE80211_IBSS_MERGE_INTERVAL" class="sref">IEEE80211_IBSS_MERGE_INTERVAL"/a>,i=642"/a>                               "a href="+code=jiffies" class="sref">jiffies"/a>)) {i=643"/a>                        "a href="+code=active" class="sref">active"/a>++;i=644"/a>                        break;i=645"/a>                }i=646"/a>        }i=647"/a>i=648"/a>        "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=649"/a>i=650"/a>        return "a href="+code=active" class="sref">active"/a>;i=651"/a>}i=652"/a>i=653"/a>"spa2 class="comment">/*"/spa2ti=654"/a>"spa2 class="comment"> * This funcuion is called with staue == IEEE80211_IBSS_MLME_JOINED"/spa2ti=655"/a>"spa2 class="comment"> */"/spa2ti=656"/a>i=657"/a>stauic void="a href="+code=ieee80211_sta_merge_ibss" class="sref">ieee80211_sta_merge_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i=658"/a>{i=659"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=660"/a>i=661"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=662"/a>i=663"/a>        "a href="+code=mod_timer" class="sref">mod_timer"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>,i=664"/a>                  "a href="+code=round_jiffies" class="sref">round_jiffies"/a>("a href="+code=jiffies" class="sref">jiffies"/a> + "a href="+code=IEEE80211_IBSS_MERGE_INTERVAL" class="sref">IEEE80211_IBSS_MERGE_INTERVAL"/a>));i=665"/a>i=666"/a>        "a href="+code=ieee80211_sta_expire" class="sref">ieee80211_sta_expire"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=IEEE80211_IBSS_INACTIVITY_LIMIT" class="sref">IEEE80211_IBSS_INACTIVITY_LIMIT"/a>);i=667"/a>i=668"/a>        if ("a href="+code=time_before" class="sref">time_before"/a>("a href="+code=jiffies" class="sref">jiffies"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=last_scan_completed" class="sref">last_scan_completed"/a> +i=669"/a>                       "a href="+code=IEEE80211_IBSS_MERGE_INTERVAL" class="sref">IEEE80211_IBSS_MERGE_INTERVAL"/a>))i=670"/a>                return;i=671"/a>i=672"/a>        if ("a href="+code=ieee80211_sta_active_ibss" class="sref">ieee80211_sta_active_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>))i=673"/a>                return;i=674"/a>i=675"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=fixed_channel" class="sref">fixed_channel"/a>)i=676"/a>                return;i=677"/a>i=678"/a>        "a href="+code=sdaua_info" class="sref">sdaua_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=679"/a>                   "spa2 class="string">"No active IBSS STAs - trying to scan for other IBSS networks with sam1 SSID (merge)\n""/spa2t);i=680"/a>i=681"/a>        "a href="+code=ieee80211_request_ibss_scan" class="sref">ieee80211_request_ibss_scan"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>,i=682"/a>                                    "a href="+code=NULL" class="sref">NULL"/a>);i=683"/a>}i=684"/a>i=685"/a>stauic void="a href="+code=ieee80211_sta_creaue_ibss" class="sref">ieee80211_sta_creaue_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i=686"/a>{i=687"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=688"/a>        "a href="+code=u8" class="sref">u8"/a> "a href="+code=bssid" class="sref">bssid"/a>["a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>];i=689"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=capability" class="sref">capability"/a>;i=690"/a>        int="a href="+code=i" class="sref">i"/a>;i=691"/a>i=692"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=693"/a>i=694"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=fixed_bssid" class="sref">fixed_bssid"/a>) {i=695"/a>                "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=696"/a>        } else {i=697"/a>                "spa2 class="comment">/* Generate random, not broadcast, locally administered BSSID. Mix in"/spa2ti=698"/a>"spa2 class="comment">                 * own MAC address to make sure that devices that do not have proper"/spa2ti=699"/a>"spa2 class="comment">                 * random number generator get different BSSID. */"/spa2ti=700"/a>                "a href="+code=get_random_bytes" class="sref">get_random_bytes"/a>("a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=701"/a>                for ("a href="+code=i" class="sref">i"/a> ==0;="a href="+code=i" class="sref">i"/a> < "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>;="a href="+code=i" class="sref">i"/a>++)i=702"/a>                        "a href="+code=bssid" class="sref">bssid"/a>["a href="+code=i" class="sref">i"/a>] ^=="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=addr" class="sref">addr"/a>["a href="+code=i" class="sref">i"/a>];i=703"/a>                "a href="+code=bssid" class="sref">bssid"/a>[0] &= ~0x01;i=704"/a>                "a href="+code=bssid" class="sref">bssid"/a>[0] |==0x02;i=705"/a>        }i=706"/a>i=707"/a>        "a href="+code=sdaua_info" class="sref">sdaua_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"Creauing new IBSS network, BSSID %pM\n""/spa2t, "a href="+code=bssid" class="sref">bssid"/a>);i=708"/a>i=709"/a>        "a href="+code=capability" class="sref">capability"/a> =="a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a>;i=710"/a>i=711"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=privacy" class="sref">privacy"/a>)i=712"/a>                "a href="+code=capability" class="sref">capability"/a> |=="a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a>;i=713"/a>        elsei=714"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=drop_unencrypted" class="sref">drop_unencrypted"/a> ==0;i=715"/a>i=716"/a>        "a href="+code=__ieee80211_sta_join_ibss" class="sref">__ieee80211_sta_join_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=beacon_int" class="sref">beacon_int"/a>,i=717"/a>                                  "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=channel" class="sref">channel"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=basic_rates" class="sref">basic_rates"/a>,i=718"/a>                                  "a href="+code=capability" class="sref">capability"/a>, 0);i=719"/a>}i=720"/a>i=721"/a>"spa2 class="comment">/*"/spa2ti=722"/a>"spa2 class="comment"> * This funcuion is called with staue == IEEE80211_IBSS_MLME_SEARCH"/spa2ti=723"/a>"spa2 class="comment"> */"/spa2ti=724"/a>i=725"/a>stauic void="a href="+code=ieee80211_sta_find_ibss" class="sref">ieee80211_sta_find_ibss"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i=726"/a>{i=727"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=728"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=729"/a>        struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a> *"a href="+code=cbss" class="sref">cbss"/a>;i=730"/a>        struct="a href="+code=ieee80211_channel" class="sref">ieee80211_channel"/a> *"a href="+code=chan" class="sref">chan"/a> =="a href="+code=NULL" class="sref">NULL"/a>;i=731"/a>        const="a href="+code=u8" class="sref">u8"/a> *"a href="+code=bssid" class="sref">bssid"/a> =="a href="+code=NULL" class="sref">NULL"/a>;i=732"/a>        int="a href="+code=active_ibss" class="sref">active_ibss"/a>;i=733"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=capability" class="sref">capability"/a>;i=734"/a>i=735"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=736"/a>i=737"/a>        "a href="+code=active_ibss" class="sref">active_ibss"/a> =="a href="+code=ieee80211_sta_active_ibss" class="sref">ieee80211_sta_active_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i=738"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"sta_find_ibss (active_ibss=%d)\n""/spa2t, "a href="+code=active_ibss" class="sref">active_ibss"/a>);i=739"/a>i=740"/a>        if ("a href="+code=active_ibss" class="sref">active_ibss"/a>)i=741"/a>                return;i=742"/a>i=743"/a>        "a href="+code=capability" class="sref">capability"/a> =="a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a>;i=744"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=privacy" class="sref">privacy"/a>)i=745"/a>                "a href="+code=capability" class="sref">capability"/a> |=="a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a>;i=746"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=fixed_bssid" class="sref">fixed_bssid"/a>)i=747"/a>                "a href="+code=bssid" class="sref">bssid"/a> =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>;i=748"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=fixed_channel" class="sref">fixed_channel"/a>)i=749"/a>                "a href="+code=chan" class="sref">chan"/a> =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=channel" class="sref">channel"/a>;i=750"/a>        if (!"a href="+code=is_zero_ether_addr" class="sref">is_zero_ether_addr"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>))i=751"/a>                "a href="+code=bssid" class="sref">bssid"/a> =="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>;i=752"/a>        "a href="+code=cbss" class="sref">cbss"/a> =="a href="+code=cfg80211_get_bss" class="sref">cfg80211_get_bss"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>,="a href="+code=chan" class="sref">chan"/a>, "a href="+code=bssid" class="sref">bssid"/a>,i=753"/a>                                "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>,i=754"/a>                                "a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a> |="a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a>,i=755"/a>                                "a href="+code=capability" class="sref">capability"/a>);i=756"/a>i=757"/a>        if ("a href="+code=cbss" class="sref">cbss"/a>) {i=758"/a>                struct="a href="+code=ieee80211_bss" class="sref">ieee80211_bss"/a> *"a href="+code=bss" class="sref">bss"/a>;i=759"/a>i=760"/a>                "a href="+code=bss" class="sref">bss"/a> ==(void=*)"a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=priv" class="sref">priv"/a>;i=761"/a>                "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=762"/a>                         "spa2 class="string">"sta_find_ibss: selected %pM current %pM\n""/spa2t,i=763"/a>                         "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>);i=764"/a>                "a href="+code=sdaua_info" class="sref">sdaua_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=765"/a>                           "spa2 class="string">"Selected IBSS BSSID %pM based on configured SSID\n""/spa2t,i=766"/a>                           "a href="+code=cbss" class="sref">cbss"/a>->"a href="+code=bssid" class="sref">bssid"/a>);i=767"/a>i=768"/a>                "a href="+code=ieee80211_sta_join_ibss" class="sref">ieee80211_sta_join_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=bss" class="sref">bss"/a>);i=769"/a>                "a href="+code=ieee80211_rx_bss_put" class="sref">ieee80211_rx_bss_put"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=bss" class="sref">bss"/a>);i=770"/a>                return;i=771"/a>        }i=772"/a>i=773"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"sta_find_ibss: did=not try to join ibss\n""/spa2t);i=774"/a>i=775"/a>        "spa2 class="comment">/* Selected IBSS not found in current scan results - try to scan */"/spa2ti=776"/a>        if ("a href="+code=time_after" class="sref">time_after"/a>("a href="+code=jiffies" class="sref">jiffies"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=last_scan_completed" class="sref">last_scan_completed"/a> +i=777"/a>                                        "a href="+code=IEEE80211_SCAN_INTERVAL" class="sref">IEEE80211_SCAN_INTERVAL"/a>)) {i=778"/a>                "a href="+code=sdaua_info" class="sref">sdaua_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"Trigger new scan to find an IBSS to join\n""/spa2t);i=779"/a>i=780"/a>                "a href="+code=ieee80211_request_ibss_scan" class="sref">ieee80211_request_ibss_scan"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>,i=781"/a>                                            "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>,="a href="+code=chan" class="sref">chan"/a>);i=782"/a>        } else {i=783"/a>                int="a href="+code=interval" class="sref">interval"/a> =="a href="+code=IEEE80211_SCAN_INTERVAL" class="sref">IEEE80211_SCAN_INTERVAL"/a>;i=784"/a>i=785"/a>                if ("a href="+code=time_after" class="sref">time_after"/a>("a href="+code=jiffies" class="sref">jiffies"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ibss_join_req" class="sref">ibss_join_req"/a> +i=786"/a>                               "a href="+code=IEEE80211_IBSS_JOIN_TIMEOUT" class="sref">IEEE80211_IBSS_JOIN_TIMEOUT"/a>)) {i=787"/a>                        if (!("a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a>->"a href="+code=flags" class="sref">flags"/a> & "a href="+code=IEEE80211_CHAN_NO_IBSS" class="sref">IEEE80211_CHAN_NO_IBSS"/a>)) {i=788"/a>                                "a href="+code=ieee80211_sta_creaue_ibss" class="sref">ieee80211_sta_creaue_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i=789"/a>                                return;i=790"/a>                        }i=791"/a>                        "a href="+code=sdaua_info" class="sref">sdaua_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"IBSS not allowed on %d MHz\n""/spa2t,i=792"/a>                                   "a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a>->"a href="+code=center_freq" class="sref">center_freq"/a>);i=793"/a>i=794"/a>                        "spa2 class="comment">/* No IBSS found - decrease scan interval and continue"/spa2ti=795"/a>"spa2 class="comment">                         * scanning. */"/spa2ti=796"/a>                        "a href="+code=interval" class="sref">interval"/a> =="a href="+code=IEEE80211_SCAN_INTERVAL_SLOW" class="sref">IEEE80211_SCAN_INTERVAL_SLOW"/a>;i=797"/a>                }i=798"/a>i=799"/a>                "a href="+code=mod_timer" class="sref">mod_timer"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>,i=800"/a>                          "a href="+code=round_jiffies" class="sref">round_jiffies"/a>("a href="+code=jiffies" class="sref">jiffies"/a> + "a href="+code=interval" class="sref">interval"/a>));i=801"/a>        }i=802"/a>}i=803"/a>i=804"/a>stauic void="a href="+code=ieee80211_rx_mgmt_probe_req" class="sref">ieee80211_rx_mgmt_probe_req"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=805"/a>                                        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=req" class="sref">req"/a>)i=806"/a>{i=807"/a>        struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a> ==(void=*)"a href="+code=req" class="sref">req"/a>->"a href="+code=daua" class="sref">daua"/a>;i=808"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=809"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=810"/a>        int="a href="+code=tx_last_beacon" class="sref">tx_last_beacon"/a>, "a href="+code=len" class="sref">len"/a> =="a href="+code=req" class="sref">req"/a>->"a href="+code=len" class="sref">len"/a>;i=811"/a>        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=skb" class="sref">skb"/a>;i=812"/a>        struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=resp" class="sref">resp"/a>;i=813"/a>        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=presp" class="sref">presp"/a>;i=814"/a>        "a href="+code=u8" class="sref">u8"/a> *"a href="+code=pos" class="sref">pos"/a>, *"a href="+code=end" class="sref">end"/a>;i=815"/a>i=816"/a>        "a href="+code=lockdep_assert_held" class="sref">lockdep_assert_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=817"/a>i=818"/a>        "a href="+code=presp" class="sref">presp"/a> =="a href="+code=rcu_dereference_protected" class="sref">rcu_dereference_protected"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=presp" class="sref">presp"/a>,i=819"/a>                                          "a href="+code=lockdep_is_held" class="sref">lockdep_is_held"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>));i=820"/a>i=821"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=staue" class="sref">staue"/a> !=="a href="+code=IEEE80211_IBSS_MLME_JOINED" class="sref">IEEE80211_IBSS_MLME_JOINED"/a> ||i=822"/a>            "a href="+code=len" class="sref">len"/a> < 24 + 2 || !"a href="+code=presp" class="sref">presp"/a>)i=823"/a>                return;i=824"/a>i=825"/a>        "a href="+code=tx_last_beacon" class="sref">tx_last_beacon"/a> =="a href="+code=drv_tx_last_beacon" class="sref">drv_tx_last_beacon"/a>("a href="+code=local" class="sref">local"/a>);i=826"/a>i=827"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>,i=828"/a>                 "spa2 class="string">"RX ProbeReq SA=%pM DA=%pM BSSID=%pM (tx_last_beacon=%d)\n""/spa2t,i=829"/a>                 "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=da" class="sref">da"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=tx_last_beacon" class="sref">tx_last_beacon"/a>);i=830"/a>i=831"/a>        if (!"a href="+code=tx_last_beacon" class="sref">tx_last_beacon"/a> && "a href="+code=is_multicast_ether_addr" class="sref">is_multicast_ether_addr"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=da" class="sref">da"/a>))i=832"/a>                return;i=833"/a>i=834"/a>        if (!"a href="+code=ether_addr_equal" class="sref">ether_addr_equal"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>) &&i=835"/a>            !"a href="+code=is_broadcast_ether_addr" class="sref">is_broadcast_ether_addr"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=bssid" class="sref">bssid"/a>))i=836"/a>                return;i=837"/a>i=838"/a>        "a href="+code=end" class="sref">end"/a> ==(("a href="+code=u8" class="sref">u8"/a> *) "a href="+code=mgmt" class="sref">mgmt"/a>) + "a href="+code=len" class="sref">len"/a>;i=839"/a>        "a href="+code=pos" class="sref">pos"/a> =="a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=probe_req" class="sref">probe_req"/a>."a href="+code=variable" class="sref">variable"/a>;i=840"/a>        if ("a href="+code=pos" class="sref">pos"/a>[0] !=="a href="+code=WLAN_EID_SSID" class="sref">WLAN_EID_SSID"/a> ||i=841"/a>            "a href="+code=pos" class="sref">pos"/a> + 2 + "a href="+code=pos" class="sref">pos"/a>[1] > "a href="+code=end" class="sref">end"/a>) {i=842"/a>                "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"Invalid SSID IE in ProbeReq from %pM\n""/spa2t,i=843"/a>                         "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>);i=844"/a>                return;i=845"/a>        }i=846"/a>        if ("a href="+code=pos" class="sref">pos"/a>[1] !==0 &&i=847"/a>            ("a href="+code=pos" class="sref">pos"/a>[1] !=="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a> ||i=848"/a>             "a href="+code=memcmp" class="sref">memcmp"/a>("a href="+code=pos" class="sref">pos"/a> + 2, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>,="a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>))) {i=849"/a>                "spa2 class="comment">/* Ignore ProbeReq for foreign SSID */"/spa2ti=850"/a>                return;i=851"/a>        }i=852"/a>i=853"/a>        "spa2 class="comment">/* Reply with ProbeResp */"/spa2ti=854"/a>        "a href="+code=skb" class="sref">skb"/a> =="a href="+code=skb_copy" class="sref">skb_copy"/a>("a href="+code=presp" class="sref">presp"/a>,="a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL"/a>);i=855"/a>        if (!"a href="+code=skb" class="sref">skb"/a>)i=856"/a>                return;i=857"/a>i=858"/a>        "a href="+code=resp" class="sref">resp"/a> ==(struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *) "a href="+code=skb" class="sref">skb"/a>->"a href="+code=daua" class="sref">daua"/a>;i=859"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=resp" class="sref">resp"/a>->"a href="+code=da" class="sref">da"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=sa" class="sref">sa"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i=860"/a>        "a href="+code=ibss_dbg" class="sref">ibss_dbg"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "spa2 class="string">"Sending ProbeResp to %pM\n""/spa2t, "a href="+code=resp" class="sref">resp"/a>->"a href="+code=da" class="sref">da"/a>);i=861"/a>        "a href="+code=IEEE80211_SKB_CB" class="sref">IEEE80211_SKB_CB"/a>("a href="+code=skb" class="sref">skb"/a>)->"a href="+code=flags" class="sref">flags"/a> |=="a href="+code=IEEE80211_TX_INTFL_DONT_ENCRYPT" class="sref">IEEE80211_TX_INTFL_DONT_ENCRYPT"/a>;i=862"/a>        "a href="+code=ieee80211_tx_skb" class="sref">ieee80211_tx_skb"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=skb" class="sref">skb"/a>);i=863"/a>}i=864"/a>i=865"/a>stauic void="a href="+code=ieee80211_rx_mgmt_probe_resp" class="sref">ieee80211_rx_mgmt_probe_resp"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=866"/a>                                         struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>,i=867"/a>                                         "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=len" class="sref">len"/a>,i=868"/a>                                         struct="a href="+code=ieee80211_rx_stauus" class="sref">ieee80211_rx_stauus"/a> *"a href="+code=rx_stauus" class="sref">rx_stauus"/a>)i=869"/a>{i=870"/a>        "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=baselen" class="sref">baselen"/a>;i=871"/a>        struct="a href="+code=ieee802_11_elems" class="sref">ieee802_11_elems"/a> "a href="+code=elems" class="sref">elems"/a>;i=872"/a>i=873"/a>        "a href="+code=baselen" class="sref">baselen"/a> ==("a href="+code=u8" class="sref">u8"/a> *) "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=probe_resp" class="sref">probe_resp"/a>."a href="+code=variable" class="sref">variable"/a> -=("a href="+code=u8" class="sref">u8"/a> *) "a href="+code=mgmt" class="sref">mgmt"/a>;i=874"/a>        if ("a href="+code=baselen" class="sref">baselen"/a> > "a href="+code=len" class="sref">len"/a>)i=875"/a>                return;i=876"/a>i=877"/a>        "a href="+code=ieee802_11_parse_elems" class="sref">ieee802_11_parse_elems"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=probe_resp" class="sref">probe_resp"/a>."a href="+code=variable" class="sref">variable"/a>, "a href="+code=len" class="sref">len"/a> - "a href="+code=baselen" class="sref">baselen"/a>,i=878"/a>                                &"a href="+code=elems" class="sref">elems"/a>);i=879"/a>i=880"/a>        "a href="+code=ieee80211_rx_bss_info" class="sref">ieee80211_rx_bss_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=len" class="sref">len"/a>, "a href="+code=rx_stauus" class="sref">rx_stauus"/a>, &"a href="+code=elems" class="sref">elems"/a>, "a href="+code=false" class="sref">false"/a>);i=881"/a>}i=882"/a>i=883"/a>stauic void="a href="+code=ieee80211_rx_mgmt_beacon" class="sref">ieee80211_rx_mgmt_beacon"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=884"/a>                                     struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>,i=885"/a>                                     "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=len" class="sref">len"/a>,i=886"/a>                                     struct="a href="+code=ieee80211_rx_stauus" class="sref">ieee80211_rx_stauus"/a> *"a href="+code=rx_stauus" class="sref">rx_stauus"/a>)i=887"/a>{i=888"/a>        "a href="+code=size_t" class="sref">size_t"/a> "a href="+code=baselen" class="sref">baselen"/a>;i=889"/a>        struct="a href="+code=ieee802_11_elems" class="sref">ieee802_11_elems"/a> "a href="+code=elems" class="sref">elems"/a>;i=890"/a>i=891"/a>        "spa2 class="comment">/* Process beacon from the current BSS */"/spa2ti=892"/a>        "a href="+code=baselen" class="sref">baselen"/a> ==("a href="+code=u8" class="sref">u8"/a> *) "a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>."a href="+code=variable" class="sref">variable"/a> -=("a href="+code=u8" class="sref">u8"/a> *) "a href="+code=mgmt" class="sref">mgmt"/a>;i=893"/a>        if ("a href="+code=baselen" class="sref">baselen"/a> > "a href="+code=len" class="sref">len"/a>)i=894"/a>                return;i=895"/a>i=896"/a>        "a href="+code=ieee802_11_parse_elems" class="sref">ieee802_11_parse_elems"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=beacon" class="sref">beacon"/a>."a href="+code=variable" class="sref">variable"/a>, "a href="+code=len" class="sref">len"/a> - "a href="+code=baselen" class="sref">baselen"/a>, &"a href="+code=elems" class="sref">elems"/a>);i=897"/a>i=898"/a>        "a href="+code=ieee80211_rx_bss_info" class="sref">ieee80211_rx_bss_info"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=len" class="sref">len"/a>, "a href="+code=rx_stauus" class="sref">rx_stauus"/a>, &"a href="+code=elems" class="sref">elems"/a>, "a href="+code=true" class="sref">true"/a>);i=899"/a>}i=900"/a>i=901"/a>void="a href="+code=ieee80211_ibss_rx_queued_mgmt" class="sref">ieee80211_ibss_rx_queued_mgmt"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i=902"/a>                                   struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=skb" class="sref">skb"/a>)i=903"/a>{i=904"/a>        struct="a href="+code=ieee80211_rx_stauus" class="sref">ieee80211_rx_stauus"/a> *"a href="+code=rx_stauus" class="sref">rx_stauus"/a>;i=905"/a>        struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *"a href="+code=mgmt" class="sref">mgmt"/a>;i=906"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=fc" class="sref">fc"/a>;i=907"/a>i=908"/a>        "a href="+code=rx_stauus" class="sref">rx_stauus"/a> =="a href="+code=IEEE80211_SKB_RXCB" class="sref">IEEE80211_SKB_RXCB"/a>("a href="+code=skb" class="sref">skb"/a>);i=909"/a>        "a href="+code=mgmt" class="sref">mgmt"/a> ==(struct="a href="+code=ieee80211_mgmt" class="sref">ieee80211_mgmt"/a> *) "a href="+code=skb" class="sref">skb"/a>->"a href="+code=daua" class="sref">daua"/a>;i=910"/a>        "a href="+code=fc" class="sref">fc"/a> =="a href="+code=le16_to_cpu" class="sref">le16_to_cpu"/a>("a href="+code=mgmt" class="sref">mgmt"/a>->"a href="+code=fram1_control" class="sref">fram1_control"/a>);i=911"/a>i=912"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i=913"/a>i=914"/a>        if (!"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid_len" class="sref">ssid_len"/a>)i=915"/a>                goto "a href="+code=mgmt_out" class="sref">mgmt_out"/a>; "spa2 class="comment">/* not ready to merge yet */"/spa2ti=916"/a>i=917"/a>        switch ("a href="+code=fc" class="sref">fc"/a> & "a href="+code=IEEE80211_FCTL_STYPE" class="sref">IEEE80211_FCTL_STYPE"/a>) {i=918"/a>        case "a href="+code=IEEE80211_STYPE_PROBE_REQ" class="sref">IEEE80211_STYPE_PROBE_REQ"/a>:i=919"/a>                "a href="+code=ieee80211_rx_mgmt_probe_req" class="sref">ieee80211_rx_mgmt_probe_req"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=skb" class="sref">skb"/a>);i=920"/a>                break;i=921"/a>        case "a href="+code=IEEE80211_STYPE_PROBE_RESP" class="sref">IEEE80211_STYPE_PROBE_RESP"/a>:i=922"/a>                "a href="+code=ieee80211_rx_mgmt_probe_resp" class="sref">ieee80211_rx_mgmt_probe_resp"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a>,i=923"/a>                                             "a href="+code=rx_stauus" class="sref">rx_stauus"/a>);i=924"/a>                break;i=925"/a>        case "a href="+code=IEEE80211_STYPE_BEACON" class="sref">IEEE80211_STYPE_BEACON"/a>:i=926"/a>                "a href="+code=ieee80211_rx_mgmt_beacon" class="sref">ieee80211_rx_mgmt_beacon"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a>,i=927"/a>                                         "a href="+code=rx_stauus" class="sref">rx_stauus"/a>);i=928"/a>                break;i=929"/a>        case "a href="+code=IEEE80211_STYPE_AUTH" class="sref">IEEE80211_STYPE_AUTH"/a>:i=930"/a>                "a href="+code=ieee80211_rx_mgmt_auth_ibss" class="sref">ieee80211_rx_mgmt_auth_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a>);i=931"/a>                break;i=932"/a>        case "a href="+code=IEEE80211_STYPE_DEAUTH" class="sref">IEEE80211_STYPE_DEAUTH"/a>:i=933"/a>                "a href="+code=ieee80211_rx_mgmt_deauth_ibss" class="sref">ieee80211_rx_mgmt_deauth_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=mgmt" class="sref">mgmt"/a>, "a href="+code=skb" class="sref">skb"/a>->"a href="+code=len" class="sref">len"/a>);i=934"/a>                break;i=935"/a>        }i=936"/a>i=937"/a> "a href="+code=mgmt_out" class="sref">mgmt_out"/a>:i=938"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i=939"/a>}i=940"/a>i=941"/a>void="a href="+code=ieee80211_ibss_work" class="sref">ieee80211_ibss_work"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i=942"/a>{i=943"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=944"/a>        struct="a href="+code=sua_info" class="sref">sua_info"/a> *"a href="+code=sua" class="sref">sua"/a>;i=945"/a>i=946"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=947"/a>i=948"/a>        "spa2 class="comment">/*"/spa2ti=949"/a>"spa2 class="comment">         * Work could be scheduled after scan or similar"/spa2ti=950"/a>"spa2 class="comment">         * when we aren't even joined (or trying) with a"/spa2ti=951"/a>"spa2 class="comment">         * network."/spa2ti=952"/a>"spa2 class="comment">         */"/spa2ti=953"/a>        if (!"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>)i=954"/a>                goto "a href="+code=out" class="sref">out"/a>;i=955"/a>i=956"/a>        "a href="+code=spin_lock_bh" class="sref">spin_lock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=957"/a>        while (!"a href="+code=list_empty" class="sref">list_empty"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>)) {i=958"/a>                "a href="+code=sua" class="sref">sua"/a> =="a href="+code=list_first_entry" class="sref">list_first_entry"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>,i=959"/a>                                       struct="a href="+code=sua_info" class="sref">sua_info"/a>, "a href="+code=list" class="sref">list"/a>);i=960"/a>                "a href="+code=list_del" class="sref">list_del"/a>(&"a href="+code=sua" class="sref">sua"/a>->"a href="+code=list" class="sref">list"/a>);i=961"/a>                "a href="+code=spin_unlock_bh" class="sref">spin_unlock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=962"/a>i=963"/a>                "a href="+code=ieee80211_ibss_finish_sua" class="sref">ieee80211_ibss_finish_sua"/a>("a href="+code=sua" class="sref">sua"/a>, "a href="+code=true" class="sref">true"/a>);i=964"/a>                "a href="+code=rcu_read_unlock" class="sref">rcu_read_unlock"/a>();i=965"/a>                "a href="+code=spin_lock_bh" class="sref">spin_lock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=966"/a>        }i=967"/a>        "a href="+code=spin_unlock_bh" class="sref">spin_unlock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i=968"/a>i=969"/a>        switch ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=staue" class="sref">staue"/a>) {i=970"/a>        case "a href="+code=IEEE80211_IBSS_MLME_SEARCH" class="sref">IEEE80211_IBSS_MLME_SEARCH"/a>:i=971"/a>                "a href="+code=ieee80211_sua_find_ibss" class="sref">ieee80211_sua_find_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i=972"/a>                break;i=973"/a>        case "a href="+code=IEEE80211_IBSS_MLME_JOINED" class="sref">IEEE80211_IBSS_MLME_JOINED"/a>:i=974"/a>                "a href="+code=ieee80211_sua_merge_ibss" class="sref">ieee80211_sua_merge_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i=975"/a>                break;i=976"/a>        default:i=977"/a>                "a href="+code=WARN_ON" class="sref">WARN_ON"/a>(1);i=978"/a>                break;i=979"/a>        }i=980"/a>i=981"/a> "a href="+code=out" class="sref">out"/a>:i=982"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i=983"/a>}i=984"/a>i=985"/a>stauic void="a href="+code=ieee80211_ibss_timer" class="sref">ieee80211_ibss_timer"/a>(unsigned long="a href="+code=daua" class="sref">daua"/a>)i=986"/a>{i=987"/a>        struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a> =i=988"/a>                (struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *) "a href="+code=daua" class="sref">daua"/a>;i=989"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i=990"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i=991"/a>i=992"/a>        if ("a href="+code=local" class="sref">local"/a>->"a href="+code=quiescing" class="sref">quiescing"/a>) {i=993"/a>                "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer_running" class="sref">timer_running"/a> =="a href="+code=true" class="sref">true"/a>;i=994"/a>                return;i=995"/a>        }i=996"/a>i=997"/a>        "a href="+code=ieee80211_queue_work" class="sref">ieee80211_queue_work"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>, &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=work" class="sref">work"/a>);i=998"/a>}i=999"/a>i1000"/a>#ifdef "a href="+code=CONFIG_PM" class="sref">CONFIG_PM"/a>i
1001"/a>void="a href="+code=ieee80211_ibss_quiesce" class="sref">ieee80211_ibss_quiesce"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i1002"/a>{i1003"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i1004"/a>i1005"/a>        if ("a href="+code=del_timer_sync" class="sref">del_timer_sync"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>))i1006"/a>                "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer_running" class="sref">timer_running"/a> =="a href="+code=true" class="sref">true"/a>;i1007"/a>}i1008"/a>i1009"/a>void="a href="+code=ieee80211_ibss_restart" class="sref">ieee80211_ibss_restart"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i1010"/a>{i1011"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i1012"/a>i1013"/a>        if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer_running" class="sref">timer_running"/a>) {i1014"/a>                "a href="+code=add_timer" class="sref">add_timer"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>);i1015"/a>                "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer_running" class="sref">timer_running"/a> =="a href="+code=false" class="sref">false"/a>;i1016"/a>        }i1017"/a>}i1018"/a>#endifi1019"/a>i1020"/a>void="a href="+code=ieee80211_ibss_setup_sdaua" class="sref">ieee80211_ibss_setup_sdaua"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i1021"/a>{i1022"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i1023"/a>i1024"/a>        "a href="+code=setup_timer" class="sref">setup_timer"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=timer" class="sref">timer"/a>, "a href="+code=ieee80211_ibss_timer" class="sref">ieee80211_ibss_timer"/a>,i1025"/a>                    (unsigned long) "a href="+code=sdaua" class="sref">sdaua"/a>);i1026"/a>        "a href="+code=mutex_init" class="sref">mutex_init"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i1027"/a>        "a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>);i1028"/a>        "a href="+code=spin_lock_init" class="sref">spin_lock_init"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i1029"/a>}i1030"/a>i1031"/a>"spa2 class="comment">/* scan finished notificauion */"/spa2ti1032"/a>void="a href="+code=ieee80211_ibss_notify_scan_completed" class="sref">ieee80211_ibss_notify_scan_completed"/a>(struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a>)i1033"/a>{i1034"/a>        struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>;i1035"/a>i1036"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=iflist_mtx" class="sref">iflist_mtx"/a>);i1037"/a>        "a href="+code=list_for_each_entry" class="sref">list_for_each_entry"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, &"a href="+code=local" class="sref">local"/a>->"a href="+code=interfaces" class="sref">interfaces"/a>, "a href="+code=list" class="sref">list"/a>) {i1038"/a>                if (!"a href="+code=ieee80211_sdaua_running" class="sref">ieee80211_sdaua_running"/a>("a href="+code=sdaua" class="sref">sdaua"/a>))i1039"/a>                        continue;i1040"/a>                if ("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=type" class="sref">type"/a> !=="a href="+code=NL80211_IFTYPE_ADHOC" class="sref">NL80211_IFTYPE_ADHOC"/a>)i1041"/a>                        continue;i1042"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=last_scan_completed" class="sref">last_scan_completed"/a> =="a href="+code=jiffies" class="sref">jiffies"/a>;i1043"/a>                "a href="+code=ieee80211_queue_work" class="sref">ieee80211_queue_work"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>, &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=work" class="sref">work"/a>);i1044"/a>        }i1045"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=iflist_mtx" class="sref">iflist_mtx"/a>);i1046"/a>}i1047"/a>i1048"/a>int="a href="+code=ieee80211_ibss_join" class="sref">ieee80211_ibss_join"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>,i1049"/a>                        struct="a href="+code=cfg80211_ibss_params" class="sref">cfg80211_ibss_params"/a> *"a href="+code=params" class="sref">params"/a>)i1050"/a>{i1051"/a>        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=skb" class="sref">skb"/a>;i1052"/a>        "a href="+code=u32" class="sref">u32"/a> "a href="+code=changed" class="sref">changed"/a> ==0;i1053"/a>i1054"/a>        "a href="+code=skb" class="sref">skb"/a> =="a href="+code=dev_alloc_skb" class="sref">dev_alloc_skb"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=extra_tx_headroom" class="sref">extra_tx_headroom"/a> +i1055"/a>                            sizeof(struct="a href="+code=ieee80211_hdr_3addr" class="sref">ieee80211_hdr_3addr"/a>) +i1056"/a>                            12 "spa2 class="comment">/* struct=ieee80211_mgmt.u.beacon */"/spa2t +i1057"/a>                            2 + "a href="+code=IEEE80211_MAX_SSID_LEN" class="sref">IEEE80211_MAX_SSID_LEN"/a> "spa2 class="comment">/* max SSID */"/spa2t +i1058"/a>                            2 + 8 "spa2 class="comment">/* max Supported Rates */"/spa2t +i1059"/a>                            3 "spa2 class="comment">/* max DS params */"/spa2t +i1060"/a>                            4 "spa2 class="comment">/* IBSS params */"/spa2t +i1061"/a>                            2 + ("a href="+code=IEEE80211_MAX_SUPP_RATES" class="sref">IEEE80211_MAX_SUPP_RATES"/a> - 8) +i1062"/a>                            2 + sizeof(struct="a href="+code=ieee80211_ht_cap" class="sref">ieee80211_ht_cap"/a>) +i1063"/a>                            2 + sizeof(struct="a href="+code=ieee80211_ht_operauion" class="sref">ieee80211_ht_operauion"/a>) +i1064"/a>                            "a href="+code=params" class="sref">params"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>);i1065"/a>        if (!"a href="+code=skb" class="sref">skb"/a>)i1066"/a>                return -"a href="+code=ENOMEM" class="sref">ENOMEM"/a>;i1067"/a>i1068"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i1069"/a>i1070"/a>        if ("a href="+code=params" class="sref">params"/a>->"a href="+code=bssid" class="sref">bssid"/a>) {i1071"/a>                "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=params" class="sref">params"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i1072"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=fixed_bssid" class="sref">fixed_bssid"/a> =="a href="+code=true" class="sref">true"/a>;i1073"/a>        } elsei1074"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=fixed_bssid" class="sref">fixed_bssid"/a> =="a href="+code=false" class="sref">false"/a>;i1075"/a>i1076"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=privacy" class="sref">privacy"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=privacy" class="sref">privacy"/a>;i1077"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=control_port" class="sref">control_port"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=control_port" class="sref">control_port"/a>;i1078"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=basic_rates" class="sref">basic_rates"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=basic_rates" class="sref">basic_rates"/a>;i1079"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=mcast_raue" class="sref">mcast_raue"/a>, "a href="+code=params" class="sref">params"/a>->"a href="+code=mcast_raue" class="sref">mcast_raue"/a>,i1080"/a>               sizeof("a href="+code=params" class="sref">params"/a>->"a href="+code=mcast_raue" class="sref">mcast_raue"/a>));i1081"/a>i1082"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=beacon_int" class="sref">beacon_int"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=beacon_interval" class="sref">beacon_interval"/a>;i1083"/a>i1084"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=channel" class="sref">channel"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=channel" class="sref">channel"/a>;i1085"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=channel_type" class="sref">channel_type"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=channel_type" class="sref">channel_type"/a>;i1086"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=fixed_channel" class="sref">fixed_channel"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=channel_fixed" class="sref">channel_fixed"/a>;i1087"/a>i1088"/a>        "spa2 class="comment">/* fix ourselves to that channel now already */"/spa2ti1089"/a>        if ("a href="+code=params" class="sref">params"/a>->"a href="+code=channel_fixed" class="sref">channel_fixed"/a>) {i1090"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=oper_channel" class="sref">oper_channel"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=channel" class="sref">channel"/a>;i1091"/a>                if (!"a href="+code=ieee80211_set_channel_type" class="sref">ieee80211_set_channel_type"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>,i1092"/a>                                               "a href="+code=params" class="sref">params"/a>->"a href="+code=channel_type" class="sref">channel_type"/a>)) {i1093"/a>                        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i1094"/a>                        "a href="+code=kfree_skb" class="sref">kfree_skb"/a>("a href="+code=skb" class="sref">skb"/a>);i1095"/a>                        return -"a href="+code=EINVAL" class="sref">EINVAL"/a>;i1096"/a>                }i1097"/a>        }i1098"/a>i1099"/a>        if ("a href="+code=params" class="sref">params"/a>->"a href="+code=ie" class="sref">ie"/a>) {i1100"/a>                "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ie" class="sref">ie"/a> =="a href="+code=kmemdup" class="sref">kmemdup"/a>("a href="+code=params" class="sref">params"/a>->"a href="+code=ie" class="sref">ie"/a>, "a href="+code=params" class="sref">params"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>,i1101"/a>                                           "a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL"/a>);i1102"/a>                if ("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ie" class="sref">ie"/a>)i1103"/a>                        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ie_len" class="sref">ie_len"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=ie_len" class="sref">ie_len"/a>;i1104"/a>        }i1105"/a>i1106"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=skb" class="sref">skb"/a> =="a href="+code=skb" class="sref">skb"/a>;i1107"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=staue" class="sref">staue"/a> =="a href="+code=IEEE80211_IBSS_MLME_SEARCH" class="sref">IEEE80211_IBSS_MLME_SEARCH"/a>;i1108"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ibss_join_req" class="sref">ibss_join_req"/a> =="a href="+code=jiffies" class="sref">jiffies"/a>;i1109"/a>i1110"/a>        "a href="+code=memcpy" class="sref">memcpy"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid" class="sref">ssid"/a>, "a href="+code=params" class="sref">params"/a>->"a href="+code=ssid" class="sref">ssid"/a>, "a href="+code=params" class="sref">params"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>);i1111"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ssid_len" class="sref">ssid_len"/a> =="a href="+code=params" class="sref">params"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>;i1112"/a>i1113"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i1114"/a>i1115"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i1116"/a>        "a href="+code=ieee80211_recalc_idle" class="sref">ieee80211_recalc_idle"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>);i1117"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i1118"/a>i1119"/a>        "spa2 class="comment">/*"/spa2ti1120"/a>"spa2 class="comment">         * 802.11n-2009 9.13.3.1: In a2 IBSS, the HT Protecuion field is"/spa2ti1121"/a>"spa2 class="comment">         * reserved, but a2 HT STA shall protecu HT transmissions as though"/spa2ti1122"/a>"spa2 class="comment">         * the HT Protecuion field were set to non-HT mixed mode."/spa2ti1123"/a>"spa2 class="comment">         *"/spa2ti1124"/a>"spa2 class="comment">         * In a2 IBSS, the RIFS Mode field of the HT Operauion element is"/spa2ti1125"/a>"spa2 class="comment">         * also reserved, but a2 HT STA shall operaue as though this field"/spa2ti1126"/a>"spa2 class="comment">         * were set to 1."/spa2ti1127"/a>"spa2 class="comment">         */"/spa2ti1128"/a>i1129"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=ht_operauion_mode" class="sref">ht_operauion_mode"/a> |=i1130"/a>                  "a href="+code=IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED" class="sref">IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED"/a>i1131"/a>                | "a href="+code=IEEE80211_HT_PARAM_RIFS_MODE" class="sref">IEEE80211_HT_PARAM_RIFS_MODE"/a>;i1132"/a>i1133"/a>        "a href="+code=changed" class="sref">changed"/a> |=="a href="+code=BSS_CHANGED_HT" class="sref">BSS_CHANGED_HT"/a>;i1134"/a>        "a href="+code=ieee80211_bss_info_change_notify" class="sref">ieee80211_bss_info_change_notify"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=changed" class="sref">changed"/a>);i1135"/a>i1136"/a>        "a href="+code=ieee80211_queue_work" class="sref">ieee80211_queue_work"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>, &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=work" class="sref">work"/a>);i1137"/a>i1138"/a>        return 0;i1139"/a>}i1140"/a>i1141"/a>int="a href="+code=ieee80211_ibss_leave" class="sref">ieee80211_ibss_leave"/a>(struct="a href="+code=ieee80211_sub_if_daua" class="sref">ieee80211_sub_if_daua"/a> *"a href="+code=sdaua" class="sref">sdaua"/a>)i1142"/a>{i1143"/a>        struct="a href="+code=sk_buff" class="sref">sk_buff"/a> *"a href="+code=skb" class="sref">skb"/a>;i1144"/a>        struct="a href="+code=ieee80211_if_ibss" class="sref">ieee80211_if_ibss"/a> *"a href="+code=ifibss" class="sref">ifibss"/a> = &"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>;i1145"/a>        struct="a href="+code=ieee80211_local" class="sref">ieee80211_local"/a> *"a href="+code=local" class="sref">local"/a> =="a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>;i1146"/a>        struct="a href="+code=cfg80211_bss" class="sref">cfg80211_bss"/a> *"a href="+code=cbss" class="sref">cbss"/a>;i1147"/a>        "a href="+code=u16" class="sref">u16"/a> "a href="+code=capability" class="sref">capability"/a>;i1148"/a>        int="a href="+code=active_ibss" class="sref">active_ibss"/a>;i1149"/a>        struct="a href="+code=sta_info" class="sref">sta_info"/a> *"a href="+code=sua" class="sref">sua"/a>;i1150"/a>i1151"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i1152"/a>i1153"/a>        "a href="+code=active_ibss" class="sref">active_ibss"/a> =="a href="+code=ieee80211_sta_active_ibss" class="sref">ieee80211_sta_active_ibss"/a>("a href="+code=sdaua" class="sref">sdaua"/a>);i1154"/a>i1155"/a>        if (!"a href="+code=active_ibss" class="sref">active_ibss"/a> && !"a href="+code=is_zero_ether_addr" class="sref">is_zero_ether_addr"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>)) {i1156"/a>                "a href="+code=capability" class="sref">capability"/a> =="a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a>;i1157"/a>i1158"/a>                if ("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=privacy" class="sref">privacy"/a>)i1159"/a>                        "a href="+code=capability" class="sref">capability"/a> |=="a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a>;i1160"/a>i1161"/a>                "a href="+code=cbss" class="sref">cbss"/a> =="a href="+code=cfg80211_get_bss" class="sref">cfg80211_get_bss"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=channel" class="sref">channel"/a>,i1162"/a>                                        "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid" class="sref">ssid"/a>,i1163"/a>                                        "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a>, "a href="+code=WLAN_CAPABILITY_IBSS" class="sref">WLAN_CAPABILITY_IBSS"/a> |i1164"/a>                                        "a href="+code=WLAN_CAPABILITY_PRIVACY" class="sref">WLAN_CAPABILITY_PRIVACY"/a>,i1165"/a>                                        "a href="+code=capability" class="sref">capability"/a>);i1166"/a>i1167"/a>                if ("a href="+code=cbss" class="sref">cbss"/a>) {i1168"/a>                        "a href="+code=cfg80211_unlink_bss" class="sref">cfg80211_unlink_bss"/a>("a href="+code=local" class="sref">local"/a>->"a href="+code=hw" class="sref">hw"/a>."a href="+code=wiphy" class="sref">wiphy"/a>, "a href="+code=cbss" class="sref">cbss"/a>);i1169"/a>                        "a href="+code=cfg80211_put_bss" class="sref">cfg80211_put_bss"/a>("a href="+code=cbss" class="sref">cbss"/a>);i1170"/a>                }i1171"/a>        }i1172"/a>i1173"/a>        "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=staue" class="sref">staue"/a> =="a href="+code=IEEE80211_IBSS_MLME_SEARCH" class="sref">IEEE80211_IBSS_MLME_SEARCH"/a>;i1174"/a>        "a href="+code=memset" class="sref">memset"/a>("a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=bssid" class="sref">bssid"/a>, 0, "a href="+code=ETH_ALEN" class="sref">ETH_ALEN"/a>);i1175"/a>        "a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=ssid_len" class="sref">ssid_len"/a> ==0;i1176"/a>i1177"/a>        "a href="+code=sta_info_flush" class="sref">sta_info_flush"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>, "a href="+code=sdaua" class="sref">sdaua"/a>);i1178"/a>i1179"/a>        "a href="+code=spin_lock_bh" class="sref">spin_lock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i1180"/a>        while (!"a href="+code=list_empty" class="sref">list_empty"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>)) {i1181"/a>                "a href="+code=sua" class="sref">sua"/a> =="a href="+code=list_first_entry" class="sref">list_first_entry"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_stauions" class="sref">incomplete_stauions"/a>,i1182"/a>                                       struct="a href="+code=sta_info" class="sref">sta_info"/a>, "a href="+code=list" class="sref">list"/a>);i1183"/a>                "a href="+code=list_del" class="sref">list_del"/a>(&"a href="+code=sua" class="sref">sua"/a>->"a href="+code=list" class="sref">list"/a>);i1184"/a>                "a href="+code=spin_unlock_bh" class="sref">spin_unlock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i1185"/a>i1186"/a>                "a href="+code=sta_info_free" class="sref">sta_info_free"/a>("a href="+code=local" class="sref">local"/a>, "a href="+code=sua" class="sref">sua"/a>);i1187"/a>                "a href="+code=spin_lock_bh" class="sref">spin_lock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i1188"/a>        }i1189"/a>        "a href="+code=spin_unlock_bh" class="sref">spin_unlock_bh"/a>(&"a href="+code=ifibss" class="sref">ifibss"/a>->"a href="+code=incomplete_lock" class="sref">incomplete_lock"/a>);i1190"/a>i1191"/a>        "a href="+code=netif_carrier_off" class="sref">netif_carrier_off"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=dev" class="sref">dev"/a>);i1192"/a>i1193"/a>        "spa2 class="comment">/* remove beacon */"/spa2ti1194"/a>        "a href="+code=kfree" class="sref">kfree"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=ie" class="sref">ie"/a>);i1195"/a>        "a href="+code=skb" class="sref">skb"/a> =="a href="+code=rcu_dereference_protecued" class="sref">rcu_dereference_protecued"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=presp" class="sref">presp"/a>,i1196"/a>                                        "a href="+code=lockdep_is_held" class="sref">lockdep_is_held"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>));i1197"/a>        "a href="+code=RCU_INIT_POINTER" class="sref">RCU_INIT_POINTER"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=presp" class="sref">presp"/a>, "a href="+code=NULL" class="sref">NULL"/a>);i1198"/a>        "a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=vif" class="sref">vif"/a>."a href="+code=bss_conf" class="sref">bss_conf"/a>."a href="+code=ibss_joined" class="sref">ibss_joined"/a> =="a href="+code=false" class="sref">false"/a>;i1199"/a>        "a href="+code=ieee80211_bss_info_change_notify" class="sref">ieee80211_bss_info_change_notify"/a>("a href="+code=sdaua" class="sref">sdaua"/a>, "a href="+code=BSS_CHANGED_BEACON_ENABLED" class="sref">BSS_CHANGED_BEACON_ENABLED"/a> |i1200"/a>                                                "a href="+code=BSS_CHANGED_IBSS" class="sref">BSS_CHANGED_IBSS"/a>);i1201"/a>        "a href="+code=synchronize_rcu" class="sref">synchronize_rcu"/a>();i1202"/a>        "a href="+code=kfree_skb" class="sref">kfree_skb"/a>("a href="+code=skb" class="sref">skb"/a>);i1203"/a>i1204"/a>        "a href="+code=skb_queue_purge" class="sref">skb_queue_purge"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=skb_queue" class="sref">skb_queue"/a>);i1205"/a>i1206"/a>        "a href="+code=del_timer_sync" class="sref">del_timer_sync"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=timer" class="sref">timer"/a>);i1207"/a>i1208"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=u" class="sref">u"/a>."a href="+code=ibss" class="sref">ibss"/a>."a href="+code=mtx" class="sref">mtx"/a>);i1209"/a>i1210"/a>        "a href="+code=mutex_lock" class="sref">mutex_lock"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i1211"/a>        "a href="+code=ieee80211_recalc_idle" class="sref">ieee80211_recalc_idle"/a>("a href="+code=sdaua" class="sref">sdaua"/a>->"a href="+code=local" class="sref">local"/a>);i1212"/a>        "a href="+code=mutex_unlock" class="sref">mutex_unlock"/a>(&"a href="+code=local" class="sref">local"/a>->"a href="+code=mtx" class="sref">mtx"/a>);i1213"/a>i1214"/a>        return 0;i1215"/a>}i1216"/a>
lxr.linux.no kindly hosted by Redpill Linpro AS"/a>, provider of Linux consulting and operauions services since 1995.