Blame view
net/mac80211/spectmgmt.c
2.82 KB
39192c0bc mac80211: move sp... |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/* * spectrum management * * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> * Copyright 2002-2005, Instant802 Networks, Inc. * Copyright 2005-2006, Devicescape Software, Inc. * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> * Copyright 2007, Michael Wu <flamingice@sourmilk.net> * Copyright 2007-2008, Intel Corporation * Copyright 2008, Johannes Berg <johannes@sipsolutions.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/ieee80211.h> |
d32365537 cfg80211: clean u... |
18 |
#include <net/cfg80211.h> |
39192c0bc mac80211: move sp... |
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
#include <net/mac80211.h> #include "ieee80211_i.h" #include "sta_info.h" #include "wme.h" static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_data *sdata, struct ieee80211_msrment_ie *request_ie, const u8 *da, const u8 *bssid, u8 dialog_token) { struct ieee80211_local *local = sdata->local; struct sk_buff *skb; struct ieee80211_mgmt *msr_report; skb = dev_alloc_skb(sizeof(*msr_report) + local->hw.extra_tx_headroom + sizeof(struct ieee80211_msrment_ie)); |
d15b84590 mac80211: Remove ... |
35 |
if (!skb) |
39192c0bc mac80211: move sp... |
36 |
return; |
39192c0bc mac80211: move sp... |
37 38 39 40 41 |
skb_reserve(skb, local->hw.extra_tx_headroom); msr_report = (struct ieee80211_mgmt *)skb_put(skb, 24); memset(msr_report, 0, 24); memcpy(msr_report->da, da, ETH_ALEN); |
47846c9b0 mac80211: reduce ... |
42 |
memcpy(msr_report->sa, sdata->vif.addr, ETH_ALEN); |
39192c0bc mac80211: move sp... |
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
memcpy(msr_report->bssid, bssid, ETH_ALEN); msr_report->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION); skb_put(skb, 1 + sizeof(msr_report->u.action.u.measurement)); msr_report->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT; msr_report->u.action.u.measurement.action_code = WLAN_ACTION_SPCT_MSR_RPRT; msr_report->u.action.u.measurement.dialog_token = dialog_token; msr_report->u.action.u.measurement.element_id = WLAN_EID_MEASURE_REPORT; msr_report->u.action.u.measurement.length = sizeof(struct ieee80211_msrment_ie); memset(&msr_report->u.action.u.measurement.msr_elem, 0, sizeof(struct ieee80211_msrment_ie)); msr_report->u.action.u.measurement.msr_elem.token = request_ie->token; msr_report->u.action.u.measurement.msr_elem.mode |= IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED; msr_report->u.action.u.measurement.msr_elem.type = request_ie->type; |
62ae67be3 mac80211: remove ... |
63 |
ieee80211_tx_skb(sdata, skb); |
39192c0bc mac80211: move sp... |
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
} void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt, size_t len) { /* * Ignoring measurement request is spec violation. * Mandatory measurements must be reported optional * measurements might be refused or reported incapable * For now just refuse * TODO: Answer basic measurement as unmeasured */ ieee80211_send_refuse_measurement_request(sdata, &mgmt->u.action.u.measurement.msr_elem, mgmt->sa, mgmt->bssid, mgmt->u.action.u.measurement.dialog_token); } |