Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183567
b: refs/heads/master
c: 310bc67
h: refs/heads/master
i:
  183565: c197470
  183563: ceb8750
  183559: 7e6bda0
  183551: 6ab0706
v: v3
  • Loading branch information
Lukáš Turek authored and John W. Linville committed Jan 12, 2010
1 parent 7ea215a commit 704dba2
Show file tree
Hide file tree
Showing 5 changed files with 51 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: 81077e82c3f591578625805dd6464a27a9ff56ec
refs/heads/master: 310bc676e314e92c18257bfc916951879451ee32
5 changes: 5 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,10 @@ enum ieee80211_ampdu_mlme_action {
* and need to call wiphy_rfkill_set_hw_state() in the callback.
* The callback can sleep.
*
* @set_coverage_class: Set slot time for given coverage class as specified
* in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
* accordingly. This callback is not required and may sleep.
*
* @testmode_cmd: Implement a cfg80211 test mode command.
* The callback can sleep.
*
Expand Down Expand Up @@ -1592,6 +1596,7 @@ struct ieee80211_ops {
struct ieee80211_sta *sta, u16 tid, u16 *ssn);

void (*rfkill_poll)(struct ieee80211_hw *hw);
void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
#ifdef CONFIG_NL80211_TESTMODE
int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
#endif
Expand Down
7 changes: 7 additions & 0 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,13 @@ static int ieee80211_set_wiphy_params(struct wiphy *wiphy, u32 changed)
struct ieee80211_local *local = wiphy_priv(wiphy);
int err;

if (changed & WIPHY_PARAM_COVERAGE_CLASS) {
err = drv_set_coverage_class(local, wiphy->coverage_class);

if (err)
return err;
}

if (changed & WIPHY_PARAM_RTS_THRESHOLD) {
err = drv_set_rts_threshold(local, wiphy->rts_threshold);

Expand Down
15 changes: 15 additions & 0 deletions trunk/net/mac80211/driver-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,21 @@ static inline int drv_set_rts_threshold(struct ieee80211_local *local,
return ret;
}

static inline int drv_set_coverage_class(struct ieee80211_local *local,
u8 value)
{
int ret = 0;
might_sleep();

if (local->ops->set_coverage_class)
local->ops->set_coverage_class(&local->hw, value);
else
ret = -EOPNOTSUPP;

trace_drv_set_coverage_class(local, value, ret);
return ret;
}

static inline void drv_sta_notify(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
enum sta_notify_cmd cmd,
Expand Down
23 changes: 23 additions & 0 deletions trunk/net/mac80211/driver-trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,29 @@ TRACE_EVENT(drv_set_rts_threshold,
)
);

TRACE_EVENT(drv_set_coverage_class,
TP_PROTO(struct ieee80211_local *local, u8 value, int ret),

TP_ARGS(local, value, ret),

TP_STRUCT__entry(
LOCAL_ENTRY
__field(u8, value)
__field(int, ret)
),

TP_fast_assign(
LOCAL_ASSIGN;
__entry->ret = ret;
__entry->value = value;
),

TP_printk(
LOCAL_PR_FMT " value:%d ret:%d",
LOCAL_PR_ARG, __entry->value, __entry->ret
)
);

TRACE_EVENT(drv_sta_notify,
TP_PROTO(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
Expand Down

0 comments on commit 704dba2

Please sign in to comment.