aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-19 15:44:42 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-10-26 12:57:06 +0200
commit1041638f2bba0f1de75e66086d50fb1251d64dcf (patch)
tree95d5ea3a83302d27887dcdc2d425682216937f3f /net/mac80211/driver-ops.h
parent7b20b8e8d70a0f4f18c254b42e5b157f93731e9f (diff)
mac80211: add explicit AP/GO driver operations
Depending on the driver, a lot of setup may be necessary to start operating as an AP, some of which may fail. Add an explicit AP start driver method to make such failures easier to handle, and add an AP stop driver method for symmetry. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/driver-ops.h')
-rw-r--r--net/mac80211/driver-ops.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 77407b31e1f..1701ad7013a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -936,4 +936,29 @@ static inline void drv_unassign_vif_chanctx(struct ieee80211_local *local,
trace_drv_return_void(local);
}
+static inline int drv_start_ap(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata)
+{
+ int ret = 0;
+
+ check_sdata_in_driver(sdata);
+
+ trace_drv_start_ap(local, sdata, &sdata->vif.bss_conf);
+ if (local->ops->start_ap)
+ ret = local->ops->start_ap(&local->hw, &sdata->vif);
+ trace_drv_return_int(local, ret);
+ return ret;
+}
+
+static inline void drv_stop_ap(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata)
+{
+ check_sdata_in_driver(sdata);
+
+ trace_drv_stop_ap(local, sdata);
+ if (local->ops->stop_ap)
+ local->ops->stop_ap(&local->hw, &sdata->vif);
+ trace_drv_return_void(local);
+}
+
#endif /* __MAC80211_DRIVER_OPS */