summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorChaitanya T K <chaitanya.mgit@gmail.com>2015-10-30 20:46:15 +0300
committerJohannes Berg <johannes.berg@intel.com>2015-11-03 13:15:48 +0300
commitdcae9e0203dfd887a7413cd38d1f87aaac1127f4 (patch)
treec3a0d643ad47795a17d0890ac410025dffc623ff /net
parentef95d8ba384781ce574c10f87b97d6bab2659735 (diff)
downloadlinux-dcae9e0203dfd887a7413cd38d1f87aaac1127f4.tar.xz
mac80211: document sleep requirements for channel context ops
Channel context driver operations can sleep, so add might_sleep() and document this. Signed-off-by: Chaitanya T K <chaitanya.mgit@gmail.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/driver-ops.c2
-rw-r--r--net/mac80211/driver-ops.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index 9f97343f13fd..ca1fe5576103 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -236,6 +236,8 @@ int drv_switch_vif_chanctx(struct ieee80211_local *local,
int ret = 0;
int i;
+ might_sleep();
+
if (!local->ops->switch_vif_chanctx)
return -EOPNOTSUPP;
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index f82cfab615f2..154ce4b13406 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -843,6 +843,8 @@ static inline int drv_add_chanctx(struct ieee80211_local *local,
{
int ret = -EOPNOTSUPP;
+ might_sleep();
+
trace_drv_add_chanctx(local, ctx);
if (local->ops->add_chanctx)
ret = local->ops->add_chanctx(&local->hw, &ctx->conf);
@@ -856,6 +858,8 @@ static inline int drv_add_chanctx(struct ieee80211_local *local,
static inline void drv_remove_chanctx(struct ieee80211_local *local,
struct ieee80211_chanctx *ctx)
{
+ might_sleep();
+
if (WARN_ON(!ctx->driver_present))
return;
@@ -870,6 +874,8 @@ static inline void drv_change_chanctx(struct ieee80211_local *local,
struct ieee80211_chanctx *ctx,
u32 changed)
{
+ might_sleep();
+
trace_drv_change_chanctx(local, ctx, changed);
if (local->ops->change_chanctx) {
WARN_ON_ONCE(!ctx->driver_present);
@@ -903,6 +909,8 @@ static inline void drv_unassign_vif_chanctx(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata,
struct ieee80211_chanctx *ctx)
{
+ might_sleep();
+
if (!check_sdata_in_driver(sdata))
return;
@@ -925,6 +933,8 @@ static inline int drv_start_ap(struct ieee80211_local *local,
{
int ret = 0;
+ might_sleep();
+
if (!check_sdata_in_driver(sdata))
return -EIO;