Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 239281f8 authored by Rostislav Lisovy's avatar Rostislav Lisovy Committed by Johannes Berg
Browse files

mac80211: 802.11p OCB mode support



This patch adds 802.11p OCB (Outside the Context of a BSS) mode
support.

When communicating in OCB mode a mandatory wildcard BSSID
(48 '1' bits) is used.

The EDCA parameters handling function was changed to support
802.11p specific values.

The insertion of a newly discovered STAs is done in the similar way
as in the IBSS mode -- through the deferred insertion.

The OCB mode uses a periodic 'housekeeping task' for expiration of
disconnected STAs (in the similar manner as in the MESH mode).

New Kconfig option for verbose OCB debugging outputs is added.

Signed-off-by: default avatarRostislav Lisovy <rostislav.lisovy@fel.cvut.cz>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 6e0bd6c3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ struct ieee80211_vif_chanctx_switch {
 * @BSS_CHANGED_BANDWIDTH: The bandwidth used by this interface changed,
 *	note that this is only called when it changes after the channel
 *	context had been assigned.
 * @BSS_CHANGED_OCB: OCB join status changed
 */
enum ieee80211_bss_change {
	BSS_CHANGED_ASSOC		= 1<<0,
@@ -287,6 +288,7 @@ enum ieee80211_bss_change {
	BSS_CHANGED_P2P_PS		= 1<<19,
	BSS_CHANGED_BEACON_INFO		= 1<<20,
	BSS_CHANGED_BANDWIDTH		= 1<<21,
	BSS_CHANGED_OCB                 = 1<<22,

	/* when adding here, make sure to change ieee80211_reconfig */
};
+11 −0
Original line number Diff line number Diff line
@@ -176,6 +176,17 @@ config MAC80211_HT_DEBUG

	  Do not select this option.

config MAC80211_OCB_DEBUG
	bool "Verbose OCB debugging"
	depends on MAC80211_DEBUG_MENU
	---help---
	  Selecting this option causes mac80211 to print out
	  very verbose OCB debugging messages. It should not
	  be selected on production systems as those messages
	  are remotely triggerable.

	  Do not select this option.

config MAC80211_IBSS_DEBUG
	bool "Verbose IBSS debugging"
	depends on MAC80211_DEBUG_MENU
+2 −1
Original line number Diff line number Diff line
@@ -27,7 +27,8 @@ mac80211-y := \
	event.o \
	chan.o \
	trace.o mlme.o \
	tdls.o
	tdls.o \
	ocb.o

mac80211-$(CONFIG_MAC80211_LEDS) += led.o
mac80211-$(CONFIG_MAC80211_DEBUGFS) += \
+13 −0
Original line number Diff line number Diff line
@@ -2019,6 +2019,17 @@ static int ieee80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
	return ieee80211_ibss_leave(IEEE80211_DEV_TO_SUB_IF(dev));
}

static int ieee80211_join_ocb(struct wiphy *wiphy, struct net_device *dev,
			      struct ocb_setup *setup)
{
	return ieee80211_ocb_join(IEEE80211_DEV_TO_SUB_IF(dev), setup);
}

static int ieee80211_leave_ocb(struct wiphy *wiphy, struct net_device *dev)
{
	return ieee80211_ocb_leave(IEEE80211_DEV_TO_SUB_IF(dev));
}

static int ieee80211_set_mcast_rate(struct wiphy *wiphy, struct net_device *dev,
				    int rate[IEEE80211_NUM_BANDS])
{
@@ -3693,6 +3704,8 @@ const struct cfg80211_ops mac80211_config_ops = {
	.join_mesh = ieee80211_join_mesh,
	.leave_mesh = ieee80211_leave_mesh,
#endif
	.join_ocb = ieee80211_join_ocb,
	.leave_ocb = ieee80211_leave_ocb,
	.change_bss = ieee80211_change_bss,
	.set_txq_params = ieee80211_set_txq_params,
	.set_monitor_channel = ieee80211_set_monitor_channel,
+1 −0
Original line number Diff line number Diff line
@@ -675,6 +675,7 @@ void ieee80211_recalc_smps_chanctx(struct ieee80211_local *local,
		case NL80211_IFTYPE_ADHOC:
		case NL80211_IFTYPE_WDS:
		case NL80211_IFTYPE_MESH_POINT:
		case NL80211_IFTYPE_OCB:
			break;
		default:
			WARN_ON_ONCE(1);
Loading