Skip to content

Commit

Permalink
Merge branch 'for-john' of git://git.sipsolutions.net/mac80211-next
Browse files Browse the repository at this point in the history
  • Loading branch information
John W. Linville committed Jun 26, 2012
2 parents 5ea2769 + 371a255 commit 2c44344
Show file tree
Hide file tree
Showing 34 changed files with 768 additions and 562 deletions.
10 changes: 4 additions & 6 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,8 +678,7 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
continue;

if (data2->idle || !data2->started ||
!hwsim_ps_rx_ok(data2, skb) ||
!data->channel || !data2->channel ||
!hwsim_ps_rx_ok(data2, skb) || !data2->channel ||
data->channel->center_freq != data2->channel->center_freq ||
!(data->group & data2->group))
continue;
Expand Down Expand Up @@ -1486,7 +1485,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
struct mac80211_hwsim_data *data2;
struct ieee80211_tx_info *txi;
struct hwsim_tx_rate *tx_attempts;
struct sk_buff __user *ret_skb;
unsigned long ret_skb_ptr;
struct sk_buff *skb, *tmp;
struct mac_address *src;
unsigned int hwsim_flags;
Expand All @@ -1504,8 +1503,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
info->attrs[HWSIM_ATTR_ADDR_TRANSMITTER]);
hwsim_flags = nla_get_u32(info->attrs[HWSIM_ATTR_FLAGS]);

ret_skb = (struct sk_buff __user *)
(unsigned long) nla_get_u64(info->attrs[HWSIM_ATTR_COOKIE]);
ret_skb_ptr = nla_get_u64(info->attrs[HWSIM_ATTR_COOKIE]);

data2 = get_hwsim_data_ref_from_addr(src);

Expand All @@ -1514,7 +1512,7 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,

/* look for the skb matching the cookie passed back from user */
skb_queue_walk_safe(&data2->pending, skb, tmp) {
if (skb == ret_skb) {
if ((unsigned long)skb == ret_skb_ptr) {
skb_unlink(skb, &data2->pending);
found = true;
break;
Expand Down
2 changes: 2 additions & 0 deletions include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,8 @@ enum ieee80211_sa_query_action {
#define WLAN_OUI_TYPE_WFA_P2P 9
#define WLAN_OUI_MICROSOFT 0x0050f2
#define WLAN_OUI_TYPE_MICROSOFT_WPA 1
#define WLAN_OUI_TYPE_MICROSOFT_WMM 2
#define WLAN_OUI_TYPE_MICROSOFT_WPS 4

/*
* WMM/802.11e Tspec Element
Expand Down
6 changes: 6 additions & 0 deletions include/linux/nl80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,9 @@ enum nl80211_attrs {

#define NL80211_MIN_REMAIN_ON_CHANNEL_TIME 10

/* default RSSI threshold for scan results if none specified. */
#define NL80211_SCAN_RSSI_THOLD_OFF -300

/**
* enum nl80211_iftype - (virtual) interface types
*
Expand Down Expand Up @@ -1974,6 +1977,8 @@ enum nl80211_reg_rule_attr {
* @__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID: attribute number 0 is reserved
* @NL80211_SCHED_SCAN_MATCH_ATTR_SSID: SSID to be used for matching,
* only report BSS with matching SSID.
* @NL80211_SCHED_SCAN_MATCH_ATTR_RSSI: RSSI threshold (in dBm) for reporting a
* BSS in scan results. Filtering is turned off if not specified.
* @NL80211_SCHED_SCAN_MATCH_ATTR_MAX: highest scheduled scan filter
* attribute number currently defined
* @__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST: internal use
Expand All @@ -1982,6 +1987,7 @@ enum nl80211_sched_scan_match_attr {
__NL80211_SCHED_SCAN_MATCH_ATTR_INVALID,

NL80211_SCHED_SCAN_MATCH_ATTR_SSID,
NL80211_SCHED_SCAN_MATCH_ATTR_RSSI,

/* keep last */
__NL80211_SCHED_SCAN_MATCH_ATTR_AFTER_LAST,
Expand Down
2 changes: 2 additions & 0 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,7 @@ struct cfg80211_match_set {
* @wiphy: the wiphy this was for
* @dev: the interface
* @channels: channels to scan
* @rssi_thold: don't report scan results below this threshold (in s32 dBm)
*/
struct cfg80211_sched_scan_request {
struct cfg80211_ssid *ssids;
Expand All @@ -1037,6 +1038,7 @@ struct cfg80211_sched_scan_request {
size_t ie_len;
struct cfg80211_match_set *match_sets;
int n_match_sets;
s32 rssi_thold;

/* internal */
struct wiphy *wiphy;
Expand Down
29 changes: 5 additions & 24 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,9 @@ enum ieee80211_rate_control_changed {
* @get_et_strings: Ethtool API to get a set of strings to describe stats
* and perhaps other supported types of ethtool data-sets.
*
* @get_rssi: Get current signal strength in dBm, the function is optional
* and can sleep.
*
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
Expand Down Expand Up @@ -2393,6 +2396,8 @@ struct ieee80211_ops {
void (*get_et_strings)(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u32 sset, u8 *data);
int (*get_rssi)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct ieee80211_sta *sta, s8 *rssi_dbm);
};

/**
Expand Down Expand Up @@ -3843,28 +3848,4 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
*/
int ieee80211_ave_rssi(struct ieee80211_vif *vif);

/* Extra debugging macros */

#ifdef CONFIG_MAC80211_HT_DEBUG
#define ht_vdbg(fmt, ...) \
pr_debug(fmt, ##__VA_ARGS__)
#else
#define ht_vdbg(fmt, ...) \
do { \
if (0) \
pr_debug(fmt, ##__VA_ARGS__); \
} while (0)
#endif

#ifdef CONFIG_MAC80211_IBSS_DEBUG
#define ibss_vdbg(fmt, ...) \
pr_debug(fmt, ##__VA_ARGS__)
#else
#define ibss_vdbg(fmt, ...) \
do { \
if (0) \
pr_debug(fmt, ##__VA_ARGS__); \
} while (0)
#endif

#endif /* MAC80211_H */
56 changes: 39 additions & 17 deletions net/mac80211/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ config MAC80211_DEBUGFS

Say N unless you know you need this.

config MAC80211_MESSAGE_TRACING
bool "Trace all mac80211 debug messages"
depends on MAC80211
---help---
Select this option to have mac80211 register the
mac80211_msg trace subsystem with tracepoints to
collect all debugging messages, independent of
printing them into the kernel log.

The overhead in this option is that all the messages
need to be present in the binary and formatted at
runtime for tracing.

menuconfig MAC80211_DEBUG_MENU
bool "Select mac80211 debugging features"
depends on MAC80211
Expand Down Expand Up @@ -140,26 +153,35 @@ config MAC80211_VERBOSE_DEBUG

Do not select this option.

config MAC80211_HT_DEBUG
bool "Verbose HT debugging"
config MAC80211_MLME_DEBUG
bool "Verbose managed MLME output"
depends on MAC80211_DEBUG_MENU
---help---
This option enables 802.11n High Throughput features
debug tracing output.

It should not be selected on production systems as some
Selecting this option causes mac80211 to print out
debugging messages for the managed-mode MLME. It
should not be selected on production systems as some
of the messages are remotely triggerable.

Do not select this option.

config MAC80211_TKIP_DEBUG
bool "Verbose TKIP debugging"
config MAC80211_STA_DEBUG
bool "Verbose station debugging"
depends on MAC80211_DEBUG_MENU
---help---
Selecting this option causes mac80211 to print out
very verbose TKIP debugging messages. It should not
be selected on production systems as those messages
are remotely triggerable.
debugging messages for station addition/removal.

Do not select this option.

config MAC80211_HT_DEBUG
bool "Verbose HT debugging"
depends on MAC80211_DEBUG_MENU
---help---
This option enables 802.11n High Throughput features
debug tracing output.

It should not be selected on production systems as some
of the messages are remotely triggerable.

Do not select this option.

Expand All @@ -174,7 +196,7 @@ config MAC80211_IBSS_DEBUG

Do not select this option.

config MAC80211_VERBOSE_PS_DEBUG
config MAC80211_PS_DEBUG
bool "Verbose powersave mode debugging"
depends on MAC80211_DEBUG_MENU
---help---
Expand All @@ -186,7 +208,7 @@ config MAC80211_VERBOSE_PS_DEBUG

Do not select this option.

config MAC80211_VERBOSE_MPL_DEBUG
config MAC80211_MPL_DEBUG
bool "Verbose mesh peer link debugging"
depends on MAC80211_DEBUG_MENU
depends on MAC80211_MESH
Expand All @@ -199,7 +221,7 @@ config MAC80211_VERBOSE_MPL_DEBUG

Do not select this option.

config MAC80211_VERBOSE_MPATH_DEBUG
config MAC80211_MPATH_DEBUG
bool "Verbose mesh path debugging"
depends on MAC80211_DEBUG_MENU
depends on MAC80211_MESH
Expand All @@ -212,7 +234,7 @@ config MAC80211_VERBOSE_MPATH_DEBUG

Do not select this option.

config MAC80211_VERBOSE_MHWMP_DEBUG
config MAC80211_MHWMP_DEBUG
bool "Verbose mesh HWMP routing debugging"
depends on MAC80211_DEBUG_MENU
depends on MAC80211_MESH
Expand All @@ -225,7 +247,7 @@ config MAC80211_VERBOSE_MHWMP_DEBUG

Do not select this option.

config MAC80211_VERBOSE_MESH_SYNC_DEBUG
config MAC80211_MESH_SYNC_DEBUG
bool "Verbose mesh mesh synchronization debugging"
depends on MAC80211_DEBUG_MENU
depends on MAC80211_MESH
Expand All @@ -236,7 +258,7 @@ config MAC80211_VERBOSE_MESH_SYNC_DEBUG

Do not select this option.

config MAC80211_VERBOSE_TDLS_DEBUG
config MAC80211_TDLS_DEBUG
bool "Verbose TDLS debugging"
depends on MAC80211_DEBUG_MENU
---help---
Expand Down
6 changes: 3 additions & 3 deletions net/mac80211/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mac80211-y := \
wme.o \
event.o \
chan.o \
driver-trace.o mlme.o
trace.o mlme.o

mac80211-$(CONFIG_MAC80211_LEDS) += led.o
mac80211-$(CONFIG_MAC80211_DEBUGFS) += \
Expand All @@ -42,7 +42,7 @@ mac80211-$(CONFIG_MAC80211_MESH) += \

mac80211-$(CONFIG_PM) += pm.o

CFLAGS_driver-trace.o := -I$(src)
CFLAGS_trace.o := -I$(src)

# objects for PID algorithm
rc80211_pid-y := rc80211_pid_algo.o
Expand All @@ -58,4 +58,4 @@ mac80211-$(CONFIG_MAC80211_RC_PID) += $(rc80211_pid-y)
mac80211-$(CONFIG_MAC80211_RC_MINSTREL) += $(rc80211_minstrel-y)
mac80211-$(CONFIG_MAC80211_RC_MINSTREL_HT) += $(rc80211_minstrel_ht-y)

ccflags-y += -D__CHECK_ENDIAN__
ccflags-y += -D__CHECK_ENDIAN__ -DDEBUG
34 changes: 17 additions & 17 deletions net/mac80211/agg-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ void ___ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,

RCU_INIT_POINTER(sta->ampdu_mlme.tid_rx[tid], NULL);

ht_vdbg("Rx BA session stop requested for %pM tid %u %s reason: %d\n",
sta->sta.addr, tid,
initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator",
(int)reason);
ht_dbg(sta->sdata,
"Rx BA session stop requested for %pM tid %u %s reason: %d\n",
sta->sta.addr, tid,
initiator == WLAN_BACK_RECIPIENT ? "recipient" : "inititator",
(int)reason);

if (drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_STOP,
&sta->sta, tid, NULL, 0))
pr_debug("HW problem - can not stop rx aggregation for tid %d\n",
tid);
sdata_info(sta->sdata,
"HW problem - can not stop rx aggregation for tid %d\n",
tid);

/* check if this is a self generated aggregation halt */
if (initiator == WLAN_BACK_RECIPIENT && tx)
Expand Down Expand Up @@ -157,7 +159,7 @@ static void sta_rx_agg_session_timer_expired(unsigned long data)
}
rcu_read_unlock();

ht_vdbg("rx session timer expired on tid %d\n", (u16)*ptid);
ht_dbg(sta->sdata, "rx session timer expired on tid %d\n", (u16)*ptid);

set_bit(*ptid, sta->ampdu_mlme.tid_rx_timer_expired);
ieee80211_queue_work(&sta->local->hw, &sta->ampdu_mlme.work);
Expand Down Expand Up @@ -245,7 +247,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
status = WLAN_STATUS_REQUEST_DECLINED;

if (test_sta_flag(sta, WLAN_STA_BLOCK_BA)) {
ht_vdbg("Suspend in progress - Denying ADDBA request\n");
ht_dbg(sta->sdata, "Suspend in progress - Denying ADDBA request\n");
goto end_no_lock;
}

Expand All @@ -257,10 +259,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
(!(sta->sta.ht_cap.cap & IEEE80211_HT_CAP_DELAY_BA))) ||
(buf_size > IEEE80211_MAX_AMPDU_BUF)) {
status = WLAN_STATUS_INVALID_QOS_PARAM;
#ifdef CONFIG_MAC80211_HT_DEBUG
net_dbg_ratelimited("AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n",
mgmt->sa, tid, ba_policy, buf_size);
#endif /* CONFIG_MAC80211_HT_DEBUG */
ht_dbg_ratelimited(sta->sdata,
"AddBA Req with bad params from %pM on tid %u. policy %d, buffer size %d\n",
mgmt->sa, tid, ba_policy, buf_size);
goto end_no_lock;
}
/* determine default buffer size */
Expand All @@ -275,10 +276,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
mutex_lock(&sta->ampdu_mlme.mtx);

if (sta->ampdu_mlme.tid_rx[tid]) {
#ifdef CONFIG_MAC80211_HT_DEBUG
net_dbg_ratelimited("unexpected AddBA Req from %pM on tid %u\n",
mgmt->sa, tid);
#endif /* CONFIG_MAC80211_HT_DEBUG */
ht_dbg_ratelimited(sta->sdata,
"unexpected AddBA Req from %pM on tid %u\n",
mgmt->sa, tid);

/* delete existing Rx BA session on the same tid */
___ieee80211_stop_rx_ba_session(sta, tid, WLAN_BACK_RECIPIENT,
Expand Down Expand Up @@ -317,7 +317,7 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,

ret = drv_ampdu_action(local, sta->sdata, IEEE80211_AMPDU_RX_START,
&sta->sta, tid, &start_seq_num, 0);
ht_vdbg("Rx A-MPDU request on tid %d result %d\n", tid, ret);
ht_dbg(sta->sdata, "Rx A-MPDU request on tid %d result %d\n", tid, ret);
if (ret) {
kfree(tid_agg_rx->reorder_buf);
kfree(tid_agg_rx->reorder_time);
Expand Down
Loading

0 comments on commit 2c44344

Please sign in to comment.