Merge ra.kernel.org:/pub/scm/linux/kernel/git/netdev/net
This commit is contained in:
@@ -10843,6 +10843,7 @@ static int cfg80211_cqm_rssi_update(struct cfg80211_registered_device *rdev,
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
cfg80211_sinfo_release_content(&sinfo);
|
||||
if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG))
|
||||
wdev->cqm_config->last_rssi_event_value =
|
||||
(s8) sinfo.rx_beacon_signal_avg;
|
||||
@@ -13795,6 +13796,8 @@ static int nl80211_probe_mesh_link(struct sk_buff *skb, struct genl_info *info)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
cfg80211_sinfo_release_content(&sinfo);
|
||||
|
||||
return rdev_probe_mesh_link(rdev, dev, dest, buf, len);
|
||||
}
|
||||
|
||||
|
@@ -538,6 +538,10 @@ static inline int
|
||||
rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (!rdev->ops->set_wiphy_params)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
trace_rdev_set_wiphy_params(&rdev->wiphy, changed);
|
||||
ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed);
|
||||
trace_rdev_return_int(&rdev->wiphy, ret);
|
||||
@@ -1167,6 +1171,16 @@ rdev_start_radar_detection(struct cfg80211_registered_device *rdev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
rdev_end_cac(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev)
|
||||
{
|
||||
trace_rdev_end_cac(&rdev->wiphy, dev);
|
||||
if (rdev->ops->end_cac)
|
||||
rdev->ops->end_cac(&rdev->wiphy, dev);
|
||||
trace_rdev_return_void(&rdev->wiphy);
|
||||
}
|
||||
|
||||
static inline int
|
||||
rdev_set_mcast_rate(struct cfg80211_registered_device *rdev,
|
||||
struct net_device *dev,
|
||||
|
@@ -2261,14 +2261,15 @@ static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
|
||||
|
||||
static void handle_channel_custom(struct wiphy *wiphy,
|
||||
struct ieee80211_channel *chan,
|
||||
const struct ieee80211_regdomain *regd)
|
||||
const struct ieee80211_regdomain *regd,
|
||||
u32 min_bw)
|
||||
{
|
||||
u32 bw_flags = 0;
|
||||
const struct ieee80211_reg_rule *reg_rule = NULL;
|
||||
const struct ieee80211_power_rule *power_rule = NULL;
|
||||
u32 bw;
|
||||
|
||||
for (bw = MHZ_TO_KHZ(20); bw >= MHZ_TO_KHZ(5); bw = bw / 2) {
|
||||
for (bw = MHZ_TO_KHZ(20); bw >= min_bw; bw = bw / 2) {
|
||||
reg_rule = freq_reg_info_regd(MHZ_TO_KHZ(chan->center_freq),
|
||||
regd, bw);
|
||||
if (!IS_ERR(reg_rule))
|
||||
@@ -2324,8 +2325,14 @@ static void handle_band_custom(struct wiphy *wiphy,
|
||||
if (!sband)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We currently assume that you always want at least 20 MHz,
|
||||
* otherwise channel 12 might get enabled if this rule is
|
||||
* compatible to US, which permits 2402 - 2472 MHz.
|
||||
*/
|
||||
for (i = 0; i < sband->n_channels; i++)
|
||||
handle_channel_custom(wiphy, &sband->channels[i], regd);
|
||||
handle_channel_custom(wiphy, &sband->channels[i], regd,
|
||||
MHZ_TO_KHZ(20));
|
||||
}
|
||||
|
||||
/* Used by drivers prior to wiphy registration */
|
||||
@@ -3885,6 +3892,25 @@ bool regulatory_pre_cac_allowed(struct wiphy *wiphy)
|
||||
}
|
||||
EXPORT_SYMBOL(regulatory_pre_cac_allowed);
|
||||
|
||||
static void cfg80211_check_and_end_cac(struct cfg80211_registered_device *rdev)
|
||||
{
|
||||
struct wireless_dev *wdev;
|
||||
/* If we finished CAC or received radar, we should end any
|
||||
* CAC running on the same channels.
|
||||
* the check !cfg80211_chandef_dfs_usable contain 2 options:
|
||||
* either all channels are available - those the CAC_FINISHED
|
||||
* event has effected another wdev state, or there is a channel
|
||||
* in unavailable state in wdev chandef - those the RADAR_DETECTED
|
||||
* event has effected another wdev state.
|
||||
* In both cases we should end the CAC on the wdev.
|
||||
*/
|
||||
list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) {
|
||||
if (wdev->cac_started &&
|
||||
!cfg80211_chandef_dfs_usable(&rdev->wiphy, &wdev->chandef))
|
||||
rdev_end_cac(rdev, wdev->netdev);
|
||||
}
|
||||
}
|
||||
|
||||
void regulatory_propagate_dfs_state(struct wiphy *wiphy,
|
||||
struct cfg80211_chan_def *chandef,
|
||||
enum nl80211_dfs_state dfs_state,
|
||||
@@ -3911,8 +3937,10 @@ void regulatory_propagate_dfs_state(struct wiphy *wiphy,
|
||||
cfg80211_set_dfs_state(&rdev->wiphy, chandef, dfs_state);
|
||||
|
||||
if (event == NL80211_RADAR_DETECTED ||
|
||||
event == NL80211_RADAR_CAC_FINISHED)
|
||||
event == NL80211_RADAR_CAC_FINISHED) {
|
||||
cfg80211_sched_dfs_chan_update(rdev);
|
||||
cfg80211_check_and_end_cac(rdev);
|
||||
}
|
||||
|
||||
nl80211_radar_notify(rdev, chandef, event, NULL, GFP_KERNEL);
|
||||
}
|
||||
|
@@ -1307,14 +1307,14 @@ void cfg80211_autodisconnect_wk(struct work_struct *work)
|
||||
if (wdev->conn_owner_nlportid) {
|
||||
switch (wdev->iftype) {
|
||||
case NL80211_IFTYPE_ADHOC:
|
||||
cfg80211_leave_ibss(rdev, wdev->netdev, false);
|
||||
__cfg80211_leave_ibss(rdev, wdev->netdev, false);
|
||||
break;
|
||||
case NL80211_IFTYPE_AP:
|
||||
case NL80211_IFTYPE_P2P_GO:
|
||||
cfg80211_stop_ap(rdev, wdev->netdev, false);
|
||||
__cfg80211_stop_ap(rdev, wdev->netdev, false);
|
||||
break;
|
||||
case NL80211_IFTYPE_MESH_POINT:
|
||||
cfg80211_leave_mesh(rdev, wdev->netdev);
|
||||
__cfg80211_leave_mesh(rdev, wdev->netdev);
|
||||
break;
|
||||
case NL80211_IFTYPE_STATION:
|
||||
case NL80211_IFTYPE_P2P_CLIENT:
|
||||
|
@@ -646,6 +646,11 @@ DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa,
|
||||
TP_ARGS(wiphy, netdev)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(wiphy_netdev_evt, rdev_end_cac,
|
||||
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev),
|
||||
TP_ARGS(wiphy, netdev)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(station_add_change,
|
||||
TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac,
|
||||
struct station_parameters *params),
|
||||
|
@@ -564,7 +564,7 @@ __frame_add_frag(struct sk_buff *skb, struct page *page,
|
||||
struct skb_shared_info *sh = skb_shinfo(skb);
|
||||
int page_offset;
|
||||
|
||||
page_ref_inc(page);
|
||||
get_page(page);
|
||||
page_offset = ptr - page_address(page);
|
||||
skb_add_rx_frag(skb, sh->nr_frags, page, page_offset, len, size);
|
||||
}
|
||||
|
@@ -657,7 +657,8 @@ struct iw_statistics *get_wireless_stats(struct net_device *dev)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int iw_handler_get_iwstats(struct net_device * dev,
|
||||
/* noinline to avoid a bogus warning with -O3 */
|
||||
static noinline int iw_handler_get_iwstats(struct net_device * dev,
|
||||
struct iw_request_info * info,
|
||||
union iwreq_data * wrqu,
|
||||
char * extra)
|
||||
|
Reference in New Issue
Block a user