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

Commit 7b6ddeaf authored by Johannes Berg's avatar Johannes Berg
Browse files

mac80211: use QoS NDP for AP probing



When connected to a QoS/WMM AP, mac80211 should use a QoS NDP
for probing it, instead of a regular non-QoS one, fix this.

Change all the drivers to *not* allow QoS NDP for now, even
though it looks like most of them should be OK with that.

Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 01a95b21
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1113,7 +1113,7 @@ ath_chanctx_send_vif_ps_frame(struct ath_softc *sc, struct ath_vif *avp,
		if (!avp->assoc)
			return false;

		skb = ieee80211_nullfunc_get(sc->hw, vif);
		skb = ieee80211_nullfunc_get(sc->hw, vif, false);
		if (!skb)
			return false;

+2 −2
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ void __cw1200_cqm_bssloss_sm(struct cw1200_common *priv,

		priv->bss_loss_state++;

		skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
		skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
		WARN_ON(!skb);
		if (skb)
			cw1200_tx(priv->hw, NULL, skb);
@@ -2265,7 +2265,7 @@ static int cw1200_upload_null(struct cw1200_common *priv)
		.rate = 0xFF,
	};

	frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif);
	frame.skb = ieee80211_nullfunc_get(priv->hw, priv->vif, false);
	if (!frame.skb)
		return -ENOMEM;

+1 −1
Original line number Diff line number Diff line
@@ -566,7 +566,7 @@ static int wl1251_build_null_data(struct wl1251 *wl)
		size = sizeof(struct wl12xx_null_data_template);
		ptr = NULL;
	} else {
		skb = ieee80211_nullfunc_get(wl->hw, wl->vif);
		skb = ieee80211_nullfunc_get(wl->hw, wl->vif, false);
		if (!skb)
			goto out;
		size = skb->len;
+3 −2
Original line number Diff line number Diff line
@@ -1069,7 +1069,8 @@ int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif)
		ptr = NULL;
	} else {
		skb = ieee80211_nullfunc_get(wl->hw,
					     wl12xx_wlvif_to_vif(wlvif));
					     wl12xx_wlvif_to_vif(wlvif),
					     false);
		if (!skb)
			goto out;
		size = skb->len;
@@ -1096,7 +1097,7 @@ int wl12xx_cmd_build_klv_null_data(struct wl1271 *wl,
	struct sk_buff *skb = NULL;
	int ret = -ENOMEM;

	skb = ieee80211_nullfunc_get(wl->hw, vif);
	skb = ieee80211_nullfunc_get(wl->hw, vif, false);
	if (!skb)
		goto out;

+7 −1
Original line number Diff line number Diff line
@@ -4470,18 +4470,24 @@ struct sk_buff *ieee80211_pspoll_get(struct ieee80211_hw *hw,
 * ieee80211_nullfunc_get - retrieve a nullfunc template
 * @hw: pointer obtained from ieee80211_alloc_hw().
 * @vif: &struct ieee80211_vif pointer from the add_interface callback.
 * @qos_ok: QoS NDP is acceptable to the caller, this should be set
 *	if at all possible
 *
 * Creates a Nullfunc template which can, for example, uploaded to
 * hardware. The template must be updated after association so that correct
 * BSSID and address is used.
 *
 * If @qos_ndp is set and the association is to an AP with QoS/WMM, the
 * returned packet will be QoS NDP.
 *
 * Note: Caller (or hardware) is responsible for setting the
 * &IEEE80211_FCTL_PM bit as well as Duration and Sequence Control fields.
 *
 * Return: The nullfunc template. %NULL on error.
 */
struct sk_buff *ieee80211_nullfunc_get(struct ieee80211_hw *hw,
				       struct ieee80211_vif *vif);
				       struct ieee80211_vif *vif,
				       bool qos_ok);

/**
 * ieee80211_probereq_get - retrieve a Probe Request template
Loading