aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-09-04 13:41:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-09-04 13:41:33 -0400
commitef4ead3f29256ed83991cd77b39334aadd25672a (patch)
treea164b021488a7b1dc869c093886cada1ff07fde4 /drivers/net/wireless/ath/ath6kl
parent6a5d088a923854569e20eac4f3f569926d5911ec (diff)
parentd0616613d9cf17919fbd46fa0274db4b0084ad62 (diff)
Merge tag 'mac80211-next-for-john-2014-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg <johannes@sipsolutions.net> says: "Not that much content this time. Some RCU cleanups, crypto performance improvements, and various patches all over, rather than listing them one might as well look into the git log instead." Signed-off-by: John W. Linville <linville@tuxdriver.com> Conflicts: drivers/net/wireless/ath/wil6210/wmi.c
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c1
-rw-r--r--drivers/net/wireless/ath/ath6kl/wmi.c48
2 files changed, 12 insertions, 37 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index e535807c3d89..ba60e37213eb 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -717,6 +717,7 @@ ath6kl_add_bss_if_needed(struct ath6kl_vif *vif,
717 memcpy(ie + 2, vif->ssid, vif->ssid_len); 717 memcpy(ie + 2, vif->ssid, vif->ssid_len);
718 memcpy(ie + 2 + vif->ssid_len, beacon_ie, beacon_ie_len); 718 memcpy(ie + 2 + vif->ssid_len, beacon_ie, beacon_ie_len);
719 bss = cfg80211_inform_bss(ar->wiphy, chan, 719 bss = cfg80211_inform_bss(ar->wiphy, chan,
720 CFG80211_BSS_FTYPE_UNKNOWN,
720 bssid, 0, cap_val, 100, 721 bssid, 0, cap_val, 100,
721 ie, 2 + vif->ssid_len + beacon_ie_len, 722 ie, 2 + vif->ssid_len + beacon_ie_len,
722 0, GFP_KERNEL); 723 0, GFP_KERNEL);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 94df345d08c2..b921005ad7ee 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -619,8 +619,7 @@ static int ath6kl_wmi_rx_probe_req_event_rx(struct wmi *wmi, u8 *datap, int len,
619 dlen, freq, vif->probe_req_report); 619 dlen, freq, vif->probe_req_report);
620 620
621 if (vif->probe_req_report || vif->nw_type == AP_NETWORK) 621 if (vif->probe_req_report || vif->nw_type == AP_NETWORK)
622 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0, 622 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0);
623 GFP_ATOMIC);
624 623
625 return 0; 624 return 0;
626} 625}
@@ -659,7 +658,7 @@ static int ath6kl_wmi_rx_action_event_rx(struct wmi *wmi, u8 *datap, int len,
659 return -EINVAL; 658 return -EINVAL;
660 } 659 }
661 ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq); 660 ath6kl_dbg(ATH6KL_DBG_WMI, "rx_action: len=%u freq=%u\n", dlen, freq);
662 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0, GFP_ATOMIC); 661 cfg80211_rx_mgmt(&vif->wdev, freq, 0, ev->data, dlen, 0);
663 662
664 return 0; 663 return 0;
665} 664}
@@ -1093,7 +1092,6 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len,
1093 u8 *buf; 1092 u8 *buf;
1094 struct ieee80211_channel *channel; 1093 struct ieee80211_channel *channel;
1095 struct ath6kl *ar = wmi->parent_dev; 1094 struct ath6kl *ar = wmi->parent_dev;
1096 struct ieee80211_mgmt *mgmt;
1097 struct cfg80211_bss *bss; 1095 struct cfg80211_bss *bss;
1098 1096
1099 if (len <= sizeof(struct wmi_bss_info_hdr2)) 1097 if (len <= sizeof(struct wmi_bss_info_hdr2))
@@ -1139,39 +1137,15 @@ static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len,
1139 } 1137 }
1140 } 1138 }
1141 1139
1142 /* 1140 bss = cfg80211_inform_bss(ar->wiphy, channel,
1143 * In theory, use of cfg80211_inform_bss() would be more natural here 1141 bih->frame_type == BEACON_FTYPE ?
1144 * since we do not have the full frame. However, at least for now, 1142 CFG80211_BSS_FTYPE_BEACON :
1145 * cfg80211 can only distinguish Beacon and Probe Response frames from 1143 CFG80211_BSS_FTYPE_PRESP,
1146 * each other when using cfg80211_inform_bss_frame(), so let's build a 1144 bih->bssid, get_unaligned_le64((__le64 *)buf),
1147 * fake IEEE 802.11 header to be able to take benefit of this. 1145 get_unaligned_le16(((__le16 *)buf) + 5),
1148 */ 1146 get_unaligned_le16(((__le16 *)buf) + 4),
1149 mgmt = kmalloc(24 + len, GFP_ATOMIC); 1147 buf + 8 + 2 + 2, len - 8 - 2 - 2,
1150 if (mgmt == NULL) 1148 (bih->snr - 95) * 100, GFP_ATOMIC);
1151 return -EINVAL;
1152
1153 if (bih->frame_type == BEACON_FTYPE) {
1154 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
1155 IEEE80211_STYPE_BEACON);
1156 memset(mgmt->da, 0xff, ETH_ALEN);
1157 } else {
1158 struct net_device *dev = vif->ndev;
1159
1160 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
1161 IEEE80211_STYPE_PROBE_RESP);
1162 memcpy(mgmt->da, dev->dev_addr, ETH_ALEN);
1163 }
1164 mgmt->duration = cpu_to_le16(0);
1165 memcpy(mgmt->sa, bih->bssid, ETH_ALEN);
1166 memcpy(mgmt->bssid, bih->bssid, ETH_ALEN);
1167 mgmt->seq_ctrl = cpu_to_le16(0);
1168
1169 memcpy(&mgmt->u.beacon, buf, len);
1170
1171 bss = cfg80211_inform_bss_frame(ar->wiphy, channel, mgmt,
1172 24 + len, (bih->snr - 95) * 100,
1173 GFP_ATOMIC);
1174 kfree(mgmt);
1175 if (bss == NULL) 1149 if (bss == NULL)
1176 return -ENOMEM; 1150 return -ENOMEM;
1177 cfg80211_put_bss(ar->wiphy, bss); 1151 cfg80211_put_bss(ar->wiphy, bss);