Skip to content

Commit

Permalink
mac80211: add function retrieve average rssi
Browse files Browse the repository at this point in the history
Add utility function to provide the average rssi per vif

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
wwguy authored and linvjw committed Apr 16, 2012
1 parent f11bbfd commit 1dae27f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -3801,4 +3801,7 @@ int ieee80211_add_srates_ie(struct ieee80211_vif *vif,

int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
struct sk_buff *skb, bool need_basic);

int ieee80211_ave_rssi(struct ieee80211_vif *vif);

#endif /* MAC80211_H */
8 changes: 8 additions & 0 deletions net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1793,3 +1793,11 @@ int ieee80211_add_ext_srates_ie(struct ieee80211_vif *vif,
}
return 0;
}

int ieee80211_ave_rssi(struct ieee80211_vif *vif)
{
struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;

return ifmgd->ave_beacon_signal;
}

0 comments on commit 1dae27f

Please sign in to comment.