@@ -600,7 +600,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
IWL_DEBUG_RX(mvm, "cqm_iterator cqm low %d\n",
sig);
ieee80211_cqm_rssi_notify(
- vif,
+ vif, vif->bss_conf.bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig,
GFP_KERNEL);
@@ -610,7 +610,7 @@ static void iwl_mvm_stat_iterator(void *_data, u8 *mac,
IWL_DEBUG_RX(mvm, "cqm_iterator cqm high %d\n",
sig);
ieee80211_cqm_rssi_notify(
- vif,
+ vif, vif->bss_conf.bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig,
GFP_KERNEL);
@@ -877,7 +877,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
break;
case EVENT_RSSI_LOW:
- cfg80211_cqm_rssi_notify(priv->netdev,
+ cfg80211_cqm_rssi_notify(priv->netdev, priv->cfg_bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
@@ -892,7 +892,7 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
mwifiex_dbg(adapter, EVENT, "event: MAX_FAIL\n");
break;
case EVENT_RSSI_HIGH:
- cfg80211_cqm_rssi_notify(priv->netdev,
+ cfg80211_cqm_rssi_notify(priv->netdev, priv->cfg_bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
@@ -3194,7 +3194,8 @@ static void rndis_do_cqm(struct usbnet *usbdev, s32 rssi)
return;
priv->last_cqm_event_rssi = rssi;
- cfg80211_cqm_rssi_notify(usbdev->net, event, rssi, GFP_KERNEL);
+ cfg80211_cqm_rssi_notify(usbdev->net, priv->bssid, event, rssi,
+ GFP_KERNEL);
}
#define DEVICE_POLLER_JIFFIES (HZ)
@@ -1172,7 +1172,7 @@ static void rsi_perform_cqm(struct rsi_common *common,
common->cqm_info.last_cqm_event_rssi = rssi;
rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
- ieee80211_cqm_rssi_notify(vif, event, rssi, GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(vif, bssid, event, rssi, GFP_KERNEL);
return;
}
@@ -1019,7 +1019,9 @@ void cw1200_event_handler(struct work_struct *work)
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW :
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH;
pr_debug("[CQM] RSSI event: %d.\n", rcpi_rssi);
- ieee80211_cqm_rssi_notify(priv->vif, cqm_evt, rcpi_rssi,
+ ieee80211_cqm_rssi_notify(priv->vif,
+ priv->vif->bss_conf.bssid,
+ cqm_evt, rcpi_rssi,
GFP_KERNEL);
break;
}
@@ -148,17 +148,19 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
if (vector & ROAMING_TRIGGER_LOW_RSSI_EVENT_ID) {
wl1251_debug(DEBUG_EVENT,
"ROAMING_TRIGGER_LOW_RSSI_EVENT");
- ieee80211_cqm_rssi_notify(wl->vif,
- NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
- 0, GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(
+ wl->vif, wl->bssid,
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
+ 0, GFP_KERNEL);
}
if (vector & ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID) {
wl1251_debug(DEBUG_EVENT,
"ROAMING_TRIGGER_REGAINED_RSSI_EVENT");
- ieee80211_cqm_rssi_notify(wl->vif,
- NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
- 0, GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(
+ wl->vif, wl->bssid,
+ NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
+ 0, GFP_KERNEL);
}
}
@@ -129,8 +129,9 @@ void wlcore_event_rssi_trigger(struct wl1271 *wl, s8 *metric_arr)
vif = wl12xx_wlvif_to_vif(wlvif);
if (event != wlvif->last_rssi_event)
- ieee80211_cqm_rssi_notify(vif, event, metric,
- GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(vif,
+ wl->roc_vif->bss_conf.bssid,
+ event, metric, GFP_KERNEL);
wlvif->last_rssi_event = event;
}
}
@@ -5626,6 +5626,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
/**
* cfg80211_cqm_rssi_notify - connection quality monitoring rssi event
* @dev: network device
+ * @peer: peer's MAC address
* @rssi_event: the triggered RSSI event
* @rssi_level: new RSSI level value or 0 if not available
* @gfp: context flags
@@ -5633,7 +5634,7 @@ void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
* This function is called when a configured connection quality monitoring
* rssi threshold reached event occurs.
*/
-void cfg80211_cqm_rssi_notify(struct net_device *dev,
+void cfg80211_cqm_rssi_notify(struct net_device *dev, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level, gfp_t gfp);
@@ -5345,6 +5345,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
* rssi threshold triggered
*
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ * @peer: peer's MAC address
* @rssi_event: the RSSI trigger event type
* @rssi_level: new RSSI level value or 0 if not available
* @gfp: context flags
@@ -5353,7 +5354,7 @@ struct sk_buff *ieee80211_ap_probereq_get(struct ieee80211_hw *hw,
* monitoring is configured with an rssi threshold, the driver will inform
* whenever the rssi level reaches the threshold.
*/
-void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
+void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level,
gfp_t gfp);
@@ -3418,14 +3418,14 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
(last_event == 0 || sig < last_event - hyst)) {
ifmgd->last_cqm_event_signal = sig;
ieee80211_cqm_rssi_notify(
- &sdata->vif,
+ &sdata->vif, bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig, GFP_KERNEL);
} else if (sig > thold &&
(last_event == 0 || sig > last_event + hyst)) {
ifmgd->last_cqm_event_signal = sig;
ieee80211_cqm_rssi_notify(
- &sdata->vif,
+ &sdata->vif, bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig, GFP_KERNEL);
}
@@ -3442,14 +3442,14 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
(last_event == 0 || last_event >= low)) {
ifmgd->last_cqm_event_signal = sig;
ieee80211_cqm_rssi_notify(
- &sdata->vif,
+ &sdata->vif, bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig, GFP_KERNEL);
} else if (sig > high &&
(last_event == 0 || last_event <= high)) {
ifmgd->last_cqm_event_signal = sig;
ieee80211_cqm_rssi_notify(
- &sdata->vif,
+ &sdata->vif, bssid,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig, GFP_KERNEL);
}
@@ -5070,16 +5070,16 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata)
sdata_unlock(sdata);
}
-void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif,
+void ieee80211_cqm_rssi_notify(struct ieee80211_vif *vif, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level,
gfp_t gfp)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
- trace_api_cqm_rssi_notify(sdata, rssi_event, rssi_level);
+ trace_api_cqm_rssi_notify(sdata, peer, rssi_event, rssi_level);
- cfg80211_cqm_rssi_notify(sdata->dev, rssi_event, rssi_level, gfp);
+ cfg80211_cqm_rssi_notify(sdata->dev, peer, rssi_event, rssi_level, gfp);
}
EXPORT_SYMBOL(ieee80211_cqm_rssi_notify);
@@ -1999,27 +1999,30 @@ struct trace_switch_entry {
);
TRACE_EVENT(api_cqm_rssi_notify,
- TP_PROTO(struct ieee80211_sub_if_data *sdata,
+ TP_PROTO(struct ieee80211_sub_if_data *sdata, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level),
- TP_ARGS(sdata, rssi_event, rssi_level),
+ TP_ARGS(sdata, peer, rssi_event, rssi_level),
TP_STRUCT__entry(
VIF_ENTRY
+ __array(char, peer, ETH_ALEN)
__field(u32, rssi_event)
__field(s32, rssi_level)
),
TP_fast_assign(
VIF_ASSIGN;
+ memcpy(__entry->peer, peer, ETH_ALEN);
__entry->rssi_event = rssi_event;
__entry->rssi_level = rssi_level;
),
TP_printk(
- VIF_PR_FMT " event:%d rssi:%d",
- VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
+ VIF_PR_FMT " peer :%pM event:%d rssi:%d",
+ VIF_PR_ARG, __entry->peer, __entry->rssi_event,
+ __entry->rssi_level
)
);
@@ -14538,7 +14538,7 @@ static void cfg80211_send_cqm(struct sk_buff *msg, gfp_t gfp)
NL80211_MCGRP_MLME, gfp);
}
-void cfg80211_cqm_rssi_notify(struct net_device *dev,
+void cfg80211_cqm_rssi_notify(struct net_device *dev, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level, gfp_t gfp)
{
@@ -14546,7 +14546,7 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
struct wireless_dev *wdev = dev->ieee80211_ptr;
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
- trace_cfg80211_cqm_rssi_notify(dev, rssi_event, rssi_level);
+ trace_cfg80211_cqm_rssi_notify(dev, peer, rssi_event, rssi_level);
if (WARN_ON(rssi_event != NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW &&
rssi_event != NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH))
@@ -14561,7 +14561,7 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev,
rssi_level = wdev->cqm_config->last_rssi_event_value;
}
- msg = cfg80211_prepare_cqm(dev, NULL, gfp);
+ msg = cfg80211_prepare_cqm(dev, peer, gfp);
if (!msg)
return;
@@ -2578,22 +2578,26 @@
);
TRACE_EVENT(cfg80211_cqm_rssi_notify,
- TP_PROTO(struct net_device *netdev,
+ TP_PROTO(struct net_device *netdev, const u8 *peer,
enum nl80211_cqm_rssi_threshold_event rssi_event,
s32 rssi_level),
- TP_ARGS(netdev, rssi_event, rssi_level),
+ TP_ARGS(netdev, peer, rssi_event, rssi_level),
TP_STRUCT__entry(
NETDEV_ENTRY
+ MAC_ENTRY(peer)
__field(enum nl80211_cqm_rssi_threshold_event, rssi_event)
__field(s32, rssi_level)
),
TP_fast_assign(
NETDEV_ASSIGN;
+ MAC_ASSIGN(peer, peer);
__entry->rssi_event = rssi_event;
__entry->rssi_level = rssi_level;
),
- TP_printk(NETDEV_PR_FMT ", rssi event: %d, level: %d",
- NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
+ TP_printk(NETDEV_PR_FMT ", peer: "
+ MAC_PR_FMT ", rssi event: %d, level: %d",
+ NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->rssi_event,
+ __entry->rssi_level)
);
TRACE_EVENT(cfg80211_reg_can_beacon,