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

Commit d5aedd7e authored by John W. Linville's avatar John W. Linville
Browse files
parents 517543fd 24d47300
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -383,6 +383,14 @@ struct hwsim_radiotap_hdr {
	__le16 rt_chbitmask;
} __packed;

struct hwsim_radiotap_ack_hdr {
	struct ieee80211_radiotap_header hdr;
	u8 rt_flags;
	u8 pad;
	__le16 rt_channel;
	__le16 rt_chbitmask;
} __packed;

/* MAC80211_HWSIM netlinf family */
static struct genl_family hwsim_genl_family = {
	.id = GENL_ID_GENERATE,
@@ -500,7 +508,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
				       const u8 *addr)
{
	struct sk_buff *skb;
	struct hwsim_radiotap_hdr *hdr;
	struct hwsim_radiotap_ack_hdr *hdr;
	u16 flags;
	struct ieee80211_hdr *hdr11;

@@ -511,14 +519,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan,
	if (skb == NULL)
		return;

	hdr = (struct hwsim_radiotap_hdr *) skb_put(skb, sizeof(*hdr));
	hdr = (struct hwsim_radiotap_ack_hdr *) skb_put(skb, sizeof(*hdr));
	hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION;
	hdr->hdr.it_pad = 0;
	hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr));
	hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) |
					  (1 << IEEE80211_RADIOTAP_CHANNEL));
	hdr->rt_flags = 0;
	hdr->rt_rate = 0;
	hdr->pad = 0;
	hdr->rt_channel = cpu_to_le16(chan->center_freq);
	flags = IEEE80211_CHAN_2GHZ;
	hdr->rt_chbitmask = cpu_to_le16(flags);
@@ -1230,7 +1238,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw,
					      HRTIMER_MODE_REL);
		} else if (!info->enable_beacon) {
			unsigned int count = 0;
			ieee80211_iterate_active_interfaces(
			ieee80211_iterate_active_interfaces_atomic(
				data->hw, IEEE80211_IFACE_ITER_NORMAL,
				mac80211_hwsim_bcn_en_iter, &count);
			wiphy_debug(hw->wiphy, "  beaconing vifs remaining: %u",
+11 −4
Original line number Diff line number Diff line
@@ -1368,7 +1368,7 @@ static int sta_apply_parameters(struct ieee80211_local *local,
			changed |=
			      ieee80211_mps_set_sta_local_pm(sta,
							     params->local_pm);
		ieee80211_bss_info_change_notify(sdata, changed);
		ieee80211_mbss_info_change_notify(sdata, changed);
#endif
	}

@@ -2488,8 +2488,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
	struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);

	if (sdata->vif.type != NL80211_IFTYPE_STATION &&
	    sdata->vif.type != NL80211_IFTYPE_MESH_POINT)
	if (sdata->vif.type != NL80211_IFTYPE_STATION)
		return -EOPNOTSUPP;

	if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS))
@@ -3120,9 +3119,17 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
		    params->chandef.chan->band)
			return -EINVAL;

		ifmsh->chsw_init = true;
		if (!ifmsh->pre_value)
			ifmsh->pre_value = 1;
		else
			ifmsh->pre_value++;

		err = ieee80211_mesh_csa_beacon(sdata, params, true);
		if (err < 0)
		if (err < 0) {
			ifmsh->chsw_init = false;
			return err;
		}
		break;
#endif
	default:
+1 −0
Original line number Diff line number Diff line
@@ -1228,6 +1228,7 @@ struct ieee80211_csa_ie {
	u8 mode;
	u8 count;
	u8 ttl;
	u16 pre_value;
};

/* Parsed Information Elements */
+0 −1
Original line number Diff line number Diff line
@@ -1325,7 +1325,6 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
		sdata->vif.bss_conf.bssid = NULL;
		break;
	case NL80211_IFTYPE_AP_VLAN:
		break;
	case NL80211_IFTYPE_P2P_DEVICE:
		sdata->vif.bss_conf.bssid = sdata->vif.addr;
		break;
+3 −0
Original line number Diff line number Diff line
@@ -940,6 +940,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
		wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
			    result);

	local->hw.conf.flags = IEEE80211_CONF_IDLE;

	ieee80211_led_init(local);

	rtnl_lock();
@@ -1047,6 +1049,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)

	cancel_work_sync(&local->restart_work);
	cancel_work_sync(&local->reconfig_filter);
	flush_work(&local->sched_scan_stopped_work);

	ieee80211_clear_tx_pending(local);
	rate_control_deinitialize(local);
Loading