Skip to content

Commit

Permalink
cfg80211: Add stub for cfg80211_get_station()
Browse files Browse the repository at this point in the history
This allows modules using this function (currently: batman-adv) to
compile even if cfg80211 is not built at all, thus relaxing
dependencies.

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Linus Lüssing authored and Johannes Berg committed Aug 30, 2016
1 parent 554d072 commit 61aaa0e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,7 @@ struct station_info {
struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1];
};

#if IS_ENABLED(CONFIG_CFG80211)
/**
* cfg80211_get_station - retrieve information about a given station
* @dev: the device where the station is supposed to be connected to
Expand All @@ -1114,6 +1115,14 @@ struct station_info {
*/
int cfg80211_get_station(struct net_device *dev, const u8 *mac_addr,
struct station_info *sinfo);
#else
static inline int cfg80211_get_station(struct net_device *dev,
const u8 *mac_addr,
struct station_info *sinfo)
{
return -ENOENT;
}
#endif

/**
* enum monitor_flags - monitor flags
Expand Down

0 comments on commit 61aaa0e

Please sign in to comment.