diff options
author | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-23 03:31:06 -0500 |
commit | 51c24aaacaea90c8e87f1dec75a2ac7622b593f8 (patch) | |
tree | 9f54936c87764bef75e97395cb56b7d1e0df24c6 /net/mac80211 | |
parent | 4276e47e2d1c85a2477caf0d22b91c4f2377fba8 (diff) | |
parent | 6be325719b3e54624397e413efd4b33a997e55a3 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 3 | ||||
-rw-r--r-- | net/mac80211/iface.c | 10 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 4 | ||||
-rw-r--r-- | net/mac80211/rc80211_pid_algo.c | 2 | ||||
-rw-r--r-- | net/mac80211/rx.c | 4 |
5 files changed, 18 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index b0102c538b30..facf233843e0 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1389,6 +1389,9 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
1389 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 1389 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
1390 | struct ieee80211_conf *conf = &local->hw.conf; | 1390 | struct ieee80211_conf *conf = &local->hw.conf; |
1391 | 1391 | ||
1392 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
1393 | return -EOPNOTSUPP; | ||
1394 | |||
1392 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) | 1395 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) |
1393 | return -EOPNOTSUPP; | 1396 | return -EOPNOTSUPP; |
1394 | 1397 | ||
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index fe140bf033f9..edf21cebeee8 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -684,21 +684,25 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev, | |||
684 | struct ieee80211_local *local = sdata->local; | 684 | struct ieee80211_local *local = sdata->local; |
685 | struct ieee80211_hdr *hdr; | 685 | struct ieee80211_hdr *hdr; |
686 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; | 686 | struct ieee80211_radiotap_header *rtap = (void *)skb->data; |
687 | u8 *p; | ||
687 | 688 | ||
688 | if (local->hw.queues < 4) | 689 | if (local->hw.queues < 4) |
689 | return 0; | 690 | return 0; |
690 | 691 | ||
691 | if (skb->len < 4 || | 692 | if (skb->len < 4 || |
692 | skb->len < rtap->it_len + 2 /* frame control */) | 693 | skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */) |
693 | return 0; /* doesn't matter, frame will be dropped */ | 694 | return 0; /* doesn't matter, frame will be dropped */ |
694 | 695 | ||
695 | hdr = (void *)((u8 *)skb->data + rtap->it_len); | 696 | hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len)); |
696 | 697 | ||
697 | if (!ieee80211_is_data(hdr->frame_control)) { | 698 | if (!ieee80211_is_data_qos(hdr->frame_control)) { |
698 | skb->priority = 7; | 699 | skb->priority = 7; |
699 | return ieee802_1d_to_ac[skb->priority]; | 700 | return ieee802_1d_to_ac[skb->priority]; |
700 | } | 701 | } |
701 | 702 | ||
703 | p = ieee80211_get_qos_ctl(hdr); | ||
704 | skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK; | ||
705 | |||
702 | return ieee80211_downgrade_queue(local, skb); | 706 | return ieee80211_downgrade_queue(local, skb); |
703 | } | 707 | } |
704 | 708 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index a82564e73d91..1e1d16c55ee5 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1478,7 +1478,9 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1478 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); | 1478 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); |
1479 | break; | 1479 | break; |
1480 | case IEEE80211_STYPE_ACTION: | 1480 | case IEEE80211_STYPE_ACTION: |
1481 | /* XXX: differentiate, can only happen for CSA now! */ | 1481 | if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) |
1482 | break; | ||
1483 | |||
1482 | ieee80211_sta_process_chanswitch(sdata, | 1484 | ieee80211_sta_process_chanswitch(sdata, |
1483 | &mgmt->u.action.u.chan_switch.sw_elem, | 1485 | &mgmt->u.action.u.chan_switch.sw_elem, |
1484 | (void *)ifmgd->associated->priv); | 1486 | (void *)ifmgd->associated->priv); |
diff --git a/net/mac80211/rc80211_pid_algo.c b/net/mac80211/rc80211_pid_algo.c index 699d3ed869c4..29bc4c516238 100644 --- a/net/mac80211/rc80211_pid_algo.c +++ b/net/mac80211/rc80211_pid_algo.c | |||
@@ -190,7 +190,7 @@ static void rate_control_pid_sample(struct rc_pid_info *pinfo, | |||
190 | rate_control_pid_normalize(pinfo, sband->n_bitrates); | 190 | rate_control_pid_normalize(pinfo, sband->n_bitrates); |
191 | 191 | ||
192 | /* Compute the proportional, integral and derivative errors. */ | 192 | /* Compute the proportional, integral and derivative errors. */ |
193 | err_prop = (pinfo->target << RC_PID_ARITH_SHIFT) - pf; | 193 | err_prop = (pinfo->target - pf) << RC_PID_ARITH_SHIFT; |
194 | 194 | ||
195 | err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; | 195 | err_avg = spinfo->err_avg_sc >> pinfo->smoothing_shift; |
196 | spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; | 196 | spinfo->err_avg_sc = spinfo->err_avg_sc - err_avg + err_prop; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index efa6d3689c5e..a8e15b84c05b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1946,6 +1946,10 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
1946 | } | 1946 | } |
1947 | break; | 1947 | break; |
1948 | default: | 1948 | default: |
1949 | /* do not process rejected action frames */ | ||
1950 | if (mgmt->u.action.category & 0x80) | ||
1951 | return RX_DROP_MONITOR; | ||
1952 | |||
1949 | return RX_CONTINUE; | 1953 | return RX_CONTINUE; |
1950 | } | 1954 | } |
1951 | 1955 | ||