diff options
author | David Gnedt <david.gnedt@davizone.at> | 2011-01-30 14:11:00 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-03 16:44:42 -0500 |
commit | 8964e492b5740dae0f4f68e08f4a9a45d4b57620 (patch) | |
tree | 8e7d58b7bf211b76469ffd7907d15df214d867ee /drivers/net/wireless/wl1251/event.c | |
parent | c3e334d29484423e78009790a3d3fa78da8b43a1 (diff) |
wl1251: implement connection quality monitoring
Implement connection quality monitoring similar to the wl1271 driver.
It triggers ieee80211_cqm_rssi_notify with the corresponding event when
RSSI drops blow RSSI threshold or rises again above the RSSI threshold.
It should be noted that wl1251 doesn't support RSSI hysteresis, instead it
uses RSSI averageing and delays events until a certain count of frames
proved RSSI change.
Signed-off-by: David Gnedt <david.gnedt@davizone.at>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl1251/event.c')
-rw-r--r-- | drivers/net/wireless/wl1251/event.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl1251/event.c b/drivers/net/wireless/wl1251/event.c index 712372e50a87..dfc4579acb06 100644 --- a/drivers/net/wireless/wl1251/event.c +++ b/drivers/net/wireless/wl1251/event.c | |||
@@ -90,6 +90,24 @@ static int wl1251_event_process(struct wl1251 *wl, struct event_mailbox *mbox) | |||
90 | } | 90 | } |
91 | } | 91 | } |
92 | 92 | ||
93 | if (wl->vif && wl->rssi_thold) { | ||
94 | if (vector & ROAMING_TRIGGER_LOW_RSSI_EVENT_ID) { | ||
95 | wl1251_debug(DEBUG_EVENT, | ||
96 | "ROAMING_TRIGGER_LOW_RSSI_EVENT"); | ||
97 | ieee80211_cqm_rssi_notify(wl->vif, | ||
98 | NL80211_CQM_RSSI_THRESHOLD_EVENT_LOW, | ||
99 | GFP_KERNEL); | ||
100 | } | ||
101 | |||
102 | if (vector & ROAMING_TRIGGER_REGAINED_RSSI_EVENT_ID) { | ||
103 | wl1251_debug(DEBUG_EVENT, | ||
104 | "ROAMING_TRIGGER_REGAINED_RSSI_EVENT"); | ||
105 | ieee80211_cqm_rssi_notify(wl->vif, | ||
106 | NL80211_CQM_RSSI_THRESHOLD_EVENT_HIGH, | ||
107 | GFP_KERNEL); | ||
108 | } | ||
109 | } | ||
110 | |||
93 | return 0; | 111 | return 0; |
94 | } | 112 | } |
95 | 113 | ||