|
@@ -2747,6 +2747,21 @@ static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
+/* Check if SSID length is greater than DIRECT- */
|
|
|
+static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
|
|
|
+{
|
|
|
+ const struct ieee80211_mgmt *mgmt;
|
|
|
+ mgmt = (const struct ieee80211_mgmt *) buf;
|
|
|
+
|
|
|
+ /* variable[1] contains the SSID tag length */
|
|
|
+ if (buf + len >= &mgmt->u.probe_resp.variable[1] &&
|
|
|
+ (mgmt->u.probe_resp.variable[1] > P2P_WILDCARD_SSID_LEN)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
|
|
|
struct ieee80211_channel *chan, bool offchan,
|
|
|
enum nl80211_channel_type channel_type,
|
|
@@ -2761,11 +2776,11 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
|
|
|
bool more_data, queued;
|
|
|
|
|
|
mgmt = (const struct ieee80211_mgmt *) buf;
|
|
|
- if (buf + len >= mgmt->u.probe_resp.variable &&
|
|
|
- vif->nw_type == AP_NETWORK && test_bit(CONNECTED, &vif->flags) &&
|
|
|
- ieee80211_is_probe_resp(mgmt->frame_control)) {
|
|
|
+ if (vif->nw_type == AP_NETWORK && test_bit(CONNECTED, &vif->flags) &&
|
|
|
+ ieee80211_is_probe_resp(mgmt->frame_control) &&
|
|
|
+ ath6kl_is_p2p_go_ssid(buf, len)) {
|
|
|
/*
|
|
|
- * Send Probe Response frame in AP mode using a separate WMI
|
|
|
+ * Send Probe Response frame in GO mode using a separate WMI
|
|
|
* command to allow the target to fill in the generic IEs.
|
|
|
*/
|
|
|
*cookie = 0; /* TX status not supported */
|