aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/driver-ops.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-19 09:44:42 -0400
committerJohannes Berg <johannes.berg@intel.com>2012-10-26 06:57:06 -0400
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 77407b31e1ff..1701ad7013a4 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,
936 trace_drv_return_void(local); 936 trace_drv_return_void(local);
937} 937}
938 938
939static inline int drv_start_ap(struct ieee80211_local *local,
940 struct ieee80211_sub_if_data *sdata)
941{
942 int ret = 0;
943
944 check_sdata_in_driver(sdata);
945
946 trace_drv_start_ap(local, sdata, &sdata->vif.bss_conf);
947 if (local->ops->start_ap)
948 ret = local->ops->start_ap(&local->hw, &sdata->vif);
949 trace_drv_return_int(local, ret);
950 return ret;
951}
952
953static inline void drv_stop_ap(struct ieee80211_local *local,
954 struct ieee80211_sub_if_data *sdata)
955{
956 check_sdata_in_driver(sdata);
957
958 trace_drv_stop_ap(local, sdata);
959 if (local->ops->stop_ap)
960 local->ops->stop_ap(&local->hw, &sdata->vif);
961 trace_drv_return_void(local);
962}
963
939#endif /* __MAC80211_DRIVER_OPS */ 964#endif /* __MAC80211_DRIVER_OPS */