@@ -594,7 +594,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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
sig,
GFP_KERNEL);
@@ -604,7 +604,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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig,
GFP_KERNEL);
@@ -822,7 +822,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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
@@ -837,7 +837,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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
0, GFP_KERNEL);
mwifiex_send_cmd(priv, HostCmd_CMD_RSSI_INFO,
@@ -3194,7 +3194,7 @@ 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, NULL, event, rssi, GFP_KERNEL);
}
#define DEVICE_POLLER_JIFFIES (HZ)
@@ -877,7 +877,8 @@ 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(adapter->vifs[0], event, rssi, GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(adapter->vifs[0], NULL, event,
+ rssi, GFP_KERNEL);
return;
}
@@ -1019,8 +1019,8 @@ 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,
- GFP_KERNEL);
+ ieee80211_cqm_rssi_notify(priv->vif, NULL, cqm_evt,
+ rcpi_rssi, GFP_KERNEL);
break;
}
case WSM_EVENT_BT_INACTIVE:
@@ -148,7 +148,7 @@ 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,
+ ieee80211_cqm_rssi_notify(wl->vif, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW,
0, GFP_KERNEL);
}
@@ -156,7 +156,7 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox)
if (vector & ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID) {
wl1251_debug(DEBUG_EVENT,
"ROAMING_TRIGGER_REGAINED_RSSI_EVENT");
- ieee80211_cqm_rssi_notify(wl->vif,
+ ieee80211_cqm_rssi_notify(wl->vif, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
0, GFP_KERNEL);
}
@@ -129,8 +129,8 @@ 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, NULL, event,
+ metric, GFP_KERNEL);
wlvif->last_rssi_event = event;
}
}
@@ -5612,6 +5612,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
@@ -5619,7 +5620,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);
@@ -5342,6 +5342,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
@@ -5350,7 +5351,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);
@@ -3429,14 +3429,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, NULL,
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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig, GFP_KERNEL);
}
@@ -3453,14 +3453,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, NULL,
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, NULL,
NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH,
sig, GFP_KERNEL);
}
@@ -5085,16 +5085,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);
@@ -1998,26 +1998,28 @@ 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
+ MAC_ENTRY(peer)
__field(u32, rssi_event)
__field(s32, rssi_level)
),
TP_fast_assign(
VIF_ASSIGN;
+ MAC_ASSIGN(peer, peer);
__entry->rssi_event = rssi_event;
__entry->rssi_level = rssi_level;
),
TP_printk(
- VIF_PR_FMT " event:%d rssi:%d",
+ VIF_PR_FMT ", peer: " MAC_PR_FMT " event:%d rssi:%d",
VIF_PR_ARG, __entry->rssi_event, __entry->rssi_level
)
);
@@ -14395,7 +14395,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)
{
@@ -14403,7 +14403,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))
@@ -14418,7 +14418,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;
@@ -2577,21 +2577,24 @@
);
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",
+ TP_printk(NETDEV_PR_FMT ", peer: "
+ MAC_PR_FMT ", rssi event: %d, level: %d",
NETDEV_PR_ARG, __entry->rssi_event, __entry->rssi_level)
);
Extend cqm rssi notifier apis to include peer mac address. Currently netlink cqm msg already accepts the mac. With this change just passing the mac address as an argument to cfg and mac80211 apis. Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> --- drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 4 ++-- drivers/net/wireless/marvell/mwifiex/sta_event.c | 4 ++-- drivers/net/wireless/rndis_wlan.c | 2 +- drivers/net/wireless/rsi/rsi_91x_mac80211.c | 3 ++- drivers/net/wireless/st/cw1200/sta.c | 4 ++-- drivers/net/wireless/ti/wl1251/event.c | 4 ++-- drivers/net/wireless/ti/wlcore/event.c | 4 ++-- include/net/cfg80211.h | 3 ++- include/net/mac80211.h | 3 ++- net/mac80211/mlme.c | 14 +++++++------- net/mac80211/trace.h | 8 +++++--- net/wireless/nl80211.c | 6 +++--- net/wireless/trace.h | 9 ++++++--- 13 files changed, 38 insertions(+), 30 deletions(-)