Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369574
b: refs/heads/master
c: 1ce3e82
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg committed Apr 16, 2013
1 parent 55d9d1b commit df89489
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 37799e52a29af2268d1fbe18908a0d6b9f68af88
refs/heads/master: 1ce3e82b0eb472161313183be0033e46d5c4bbaf
11 changes: 11 additions & 0 deletions trunk/include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -4024,6 +4024,17 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
void cfg80211_ch_switch_notify(struct net_device *dev,
struct cfg80211_chan_def *chandef);

/**
* ieee80211_operating_class_to_band - convert operating class to band
*
* @operating_class: the operating class to convert
* @band: band pointer to fill
*
* Returns %true if the conversion was successful, %false otherwise.
*/
bool ieee80211_operating_class_to_band(u8 operating_class,
enum ieee80211_band *band);

/*
* cfg80211_tdls_oper_request - request userspace to perform TDLS operation
* @dev: the device on which the operation is requested
Expand Down
20 changes: 20 additions & 0 deletions trunk/net/wireless/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,26 @@ int cfg80211_get_p2p_attr(const u8 *ies, unsigned int len,
}
EXPORT_SYMBOL(cfg80211_get_p2p_attr);

bool ieee80211_operating_class_to_band(u8 operating_class,
enum ieee80211_band *band)
{
switch (operating_class) {
case 112:
case 115 ... 127:
*band = IEEE80211_BAND_5GHZ;
return true;
case 81:
case 82:
case 83:
case 84:
*band = IEEE80211_BAND_2GHZ;
return true;
}

return false;
}
EXPORT_SYMBOL(ieee80211_operating_class_to_band);

int cfg80211_validate_beacon_int(struct cfg80211_registered_device *rdev,
u32 beacon_int)
{
Expand Down

0 comments on commit df89489

Please sign in to comment.