H A D | mac80211_hwsim.c | 1777 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_testmode_cmd() local 1795 return hwsim_fops_ps_write(hwsim, ps); mac80211_hwsim_testmode_cmd() 1801 if (nla_put_u32(skb, HWSIM_TM_ATTR_PS, hwsim->ps)) mac80211_hwsim_testmode_cmd() 1856 struct mac80211_hwsim_data *hwsim = hw_scan_work() local 1858 struct cfg80211_scan_request *req = hwsim->hw_scan_request; hw_scan_work() 1861 mutex_lock(&hwsim->mutex); hw_scan_work() 1862 if (hwsim->scan_chan_idx >= req->n_channels) { hw_scan_work() 1863 wiphy_debug(hwsim->hw->wiphy, "hw scan complete\n"); hw_scan_work() 1864 ieee80211_scan_completed(hwsim->hw, false); hw_scan_work() 1865 hwsim->hw_scan_request = NULL; hw_scan_work() 1866 hwsim->hw_scan_vif = NULL; hw_scan_work() 1867 hwsim->tmp_chan = NULL; hw_scan_work() 1868 mutex_unlock(&hwsim->mutex); hw_scan_work() 1872 wiphy_debug(hwsim->hw->wiphy, "hw scan %d MHz\n", hw_scan_work() 1873 req->channels[hwsim->scan_chan_idx]->center_freq); hw_scan_work() 1875 hwsim->tmp_chan = req->channels[hwsim->scan_chan_idx]; hw_scan_work() 1876 if (hwsim->tmp_chan->flags & IEEE80211_CHAN_NO_IR || hw_scan_work() 1885 probe = ieee80211_probereq_get(hwsim->hw, hw_scan_work() 1886 hwsim->scan_addr, hw_scan_work() 1898 mac80211_hwsim_tx_frame(hwsim->hw, probe, hw_scan_work() 1899 hwsim->tmp_chan); hw_scan_work() 1903 ieee80211_queue_delayed_work(hwsim->hw, &hwsim->hw_scan, hw_scan_work() 1905 hwsim->scan_chan_idx++; hw_scan_work() 1906 mutex_unlock(&hwsim->mutex); hw_scan_work() 1913 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_hw_scan() local 1916 mutex_lock(&hwsim->mutex); mac80211_hwsim_hw_scan() 1917 if (WARN_ON(hwsim->tmp_chan || hwsim->hw_scan_request)) { mac80211_hwsim_hw_scan() 1918 mutex_unlock(&hwsim->mutex); mac80211_hwsim_hw_scan() 1921 hwsim->hw_scan_request = req; mac80211_hwsim_hw_scan() 1922 hwsim->hw_scan_vif = vif; mac80211_hwsim_hw_scan() 1923 hwsim->scan_chan_idx = 0; mac80211_hwsim_hw_scan() 1925 get_random_mask_addr(hwsim->scan_addr, mac80211_hwsim_hw_scan() 1929 memcpy(hwsim->scan_addr, vif->addr, ETH_ALEN); mac80211_hwsim_hw_scan() 1930 mutex_unlock(&hwsim->mutex); mac80211_hwsim_hw_scan() 1932 wiphy_debug(hw->wiphy, "hwsim hw_scan request\n"); mac80211_hwsim_hw_scan() 1934 ieee80211_queue_delayed_work(hwsim->hw, &hwsim->hw_scan, 0); mac80211_hwsim_hw_scan() 1942 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_cancel_hw_scan() local 1944 wiphy_debug(hw->wiphy, "hwsim cancel_hw_scan\n"); mac80211_hwsim_cancel_hw_scan() 1946 cancel_delayed_work_sync(&hwsim->hw_scan); mac80211_hwsim_cancel_hw_scan() 1948 mutex_lock(&hwsim->mutex); mac80211_hwsim_cancel_hw_scan() 1949 ieee80211_scan_completed(hwsim->hw, true); mac80211_hwsim_cancel_hw_scan() 1950 hwsim->tmp_chan = NULL; mac80211_hwsim_cancel_hw_scan() 1951 hwsim->hw_scan_request = NULL; mac80211_hwsim_cancel_hw_scan() 1952 hwsim->hw_scan_vif = NULL; mac80211_hwsim_cancel_hw_scan() 1953 mutex_unlock(&hwsim->mutex); mac80211_hwsim_cancel_hw_scan() 1960 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_sw_scan() local 1962 mutex_lock(&hwsim->mutex); mac80211_hwsim_sw_scan() 1964 if (hwsim->scanning) { mac80211_hwsim_sw_scan() 1965 printk(KERN_DEBUG "two hwsim sw_scans detected!\n"); mac80211_hwsim_sw_scan() 1969 printk(KERN_DEBUG "hwsim sw_scan request, prepping stuff\n"); mac80211_hwsim_sw_scan() 1971 memcpy(hwsim->scan_addr, mac_addr, ETH_ALEN); mac80211_hwsim_sw_scan() 1972 hwsim->scanning = true; mac80211_hwsim_sw_scan() 1975 mutex_unlock(&hwsim->mutex); mac80211_hwsim_sw_scan() 1981 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_sw_scan_complete() local 1983 mutex_lock(&hwsim->mutex); mac80211_hwsim_sw_scan_complete() 1985 printk(KERN_DEBUG "hwsim sw_scan_complete\n"); mac80211_hwsim_sw_scan_complete() 1986 hwsim->scanning = false; mac80211_hwsim_sw_scan_complete() 1987 eth_zero_addr(hwsim->scan_addr); mac80211_hwsim_sw_scan_complete() 1989 mutex_unlock(&hwsim->mutex); mac80211_hwsim_sw_scan_complete() 1994 struct mac80211_hwsim_data *hwsim = hw_roc_done() local 1997 mutex_lock(&hwsim->mutex); hw_roc_done() 1998 ieee80211_remain_on_channel_expired(hwsim->hw); hw_roc_done() 1999 hwsim->tmp_chan = NULL; hw_roc_done() 2000 mutex_unlock(&hwsim->mutex); hw_roc_done() 2002 wiphy_debug(hwsim->hw->wiphy, "hwsim ROC expired\n"); hw_roc_done() 2011 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_roc() local 2013 mutex_lock(&hwsim->mutex); mac80211_hwsim_roc() 2014 if (WARN_ON(hwsim->tmp_chan || hwsim->hw_scan_request)) { mac80211_hwsim_roc() 2015 mutex_unlock(&hwsim->mutex); mac80211_hwsim_roc() 2019 hwsim->tmp_chan = chan; mac80211_hwsim_roc() 2020 mutex_unlock(&hwsim->mutex); mac80211_hwsim_roc() 2022 wiphy_debug(hw->wiphy, "hwsim ROC (%d MHz, %d ms)\n", mac80211_hwsim_roc() 2027 ieee80211_queue_delayed_work(hw, &hwsim->roc_done, mac80211_hwsim_roc() 2034 struct mac80211_hwsim_data *hwsim = hw->priv; mac80211_hwsim_croc() local 2036 cancel_delayed_work_sync(&hwsim->roc_done); mac80211_hwsim_croc() 2038 mutex_lock(&hwsim->mutex); mac80211_hwsim_croc() 2039 hwsim->tmp_chan = NULL; mac80211_hwsim_croc() 2040 mutex_unlock(&hwsim->mutex); mac80211_hwsim_croc() 2042 wiphy_debug(hw->wiphy, "hwsim ROC canceled\n"); mac80211_hwsim_croc() 2324 data->dev = device_create(hwsim_class, NULL, 0, hw, "hwsim%d", idx); mac80211_hwsim_new_radio() 2530 data->debugfs = debugfs_create_dir("hwsim", hw->wiphy->debugfsdir); mac80211_hwsim_new_radio() 3263 hwsim_mon = alloc_netdev(0, "hwsim%d", NET_NAME_UNKNOWN, init_mac80211_hwsim()
|