Commit af756872 authored by Prameela Rani Garnepudi's avatar Prameela Rani Garnepudi Committed by Kalle Valo

rsi: miscellaneous changes for p2p mode

Add P2P_GO condition as well when handling BEACON_ENABLE
from mac80211. Also passing 'vif' for auto rate request.
Signed-off-by: default avatarPrameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: default avatarAmitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent c7245c09
...@@ -756,7 +756,8 @@ static void rsi_mac80211_bss_info_changed(struct ieee80211_hw *hw, ...@@ -756,7 +756,8 @@ static void rsi_mac80211_bss_info_changed(struct ieee80211_hw *hw,
} }
if ((changed & BSS_CHANGED_BEACON_ENABLED) && if ((changed & BSS_CHANGED_BEACON_ENABLED) &&
(vif->type == NL80211_IFTYPE_AP)) { ((vif->type == NL80211_IFTYPE_AP) ||
(vif->type == NL80211_IFTYPE_P2P_GO))) {
if (bss->enable_beacon) { if (bss->enable_beacon) {
rsi_dbg(INFO_ZONE, "===> BEACON ENABLED <===\n"); rsi_dbg(INFO_ZONE, "===> BEACON ENABLED <===\n");
common->beacon_enabled = 1; common->beacon_enabled = 1;
...@@ -1147,9 +1148,9 @@ static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw, ...@@ -1147,9 +1148,9 @@ static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw,
*/ */
static void rsi_perform_cqm(struct rsi_common *common, static void rsi_perform_cqm(struct rsi_common *common,
u8 *bssid, u8 *bssid,
s8 rssi) s8 rssi,
struct ieee80211_vif *vif)
{ {
struct rsi_hw *adapter = common->priv;
s8 last_event = common->cqm_info.last_cqm_event_rssi; s8 last_event = common->cqm_info.last_cqm_event_rssi;
int thold = common->cqm_info.rssi_thold; int thold = common->cqm_info.rssi_thold;
u32 hyst = common->cqm_info.rssi_hyst; u32 hyst = common->cqm_info.rssi_hyst;
...@@ -1165,7 +1166,7 @@ static void rsi_perform_cqm(struct rsi_common *common, ...@@ -1165,7 +1166,7 @@ static void rsi_perform_cqm(struct rsi_common *common,
common->cqm_info.last_cqm_event_rssi = rssi; common->cqm_info.last_cqm_event_rssi = rssi;
rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event); rsi_dbg(INFO_ZONE, "CQM: Notifying event: %d\n", event);
ieee80211_cqm_rssi_notify(adapter->vifs[0], event, rssi, GFP_KERNEL); ieee80211_cqm_rssi_notify(vif, event, rssi, GFP_KERNEL);
return; return;
} }
...@@ -1228,15 +1229,17 @@ static void rsi_fill_rx_status(struct ieee80211_hw *hw, ...@@ -1228,15 +1229,17 @@ static void rsi_fill_rx_status(struct ieee80211_hw *hw,
vif = adapter->vifs[i]; vif = adapter->vifs[i];
if (!vif) if (!vif)
continue; continue;
if (vif->type == NL80211_IFTYPE_STATION) if (vif->type == NL80211_IFTYPE_STATION) {
bss = &vif->bss_conf; bss = &vif->bss_conf;
break;
}
} }
if (!bss) if (!bss)
return; return;
/* CQM only for connected AP beacons, the RSSI is a weighted avg */ /* CQM only for connected AP beacons, the RSSI is a weighted avg */
if (bss->assoc && !(memcmp(bss->bssid, hdr->addr2, ETH_ALEN))) { if (bss->assoc && !(memcmp(bss->bssid, hdr->addr2, ETH_ALEN))) {
if (ieee80211_is_beacon(hdr->frame_control)) if (ieee80211_is_beacon(hdr->frame_control))
rsi_perform_cqm(common, hdr->addr2, rxs->signal); rsi_perform_cqm(common, hdr->addr2, rxs->signal, vif);
} }
return; return;
......
...@@ -1160,9 +1160,9 @@ static bool rsi_map_rates(u16 rate, int *offset) ...@@ -1160,9 +1160,9 @@ static bool rsi_map_rates(u16 rate, int *offset)
*/ */
static int rsi_send_auto_rate_request(struct rsi_common *common, static int rsi_send_auto_rate_request(struct rsi_common *common,
struct ieee80211_sta *sta, struct ieee80211_sta *sta,
u16 sta_id) u16 sta_id,
struct ieee80211_vif *vif)
{ {
struct ieee80211_vif *vif = common->priv->vifs[0];
struct sk_buff *skb; struct sk_buff *skb;
struct rsi_auto_rate *auto_rate; struct rsi_auto_rate *auto_rate;
int ii = 0, jj = 0, kk = 0; int ii = 0, jj = 0, kk = 0;
...@@ -1332,7 +1332,7 @@ void rsi_inform_bss_status(struct rsi_common *common, ...@@ -1332,7 +1332,7 @@ void rsi_inform_bss_status(struct rsi_common *common,
aid, sta_id, aid, sta_id,
vif); vif);
if (common->min_rate == 0xffff) if (common->min_rate == 0xffff)
rsi_send_auto_rate_request(common, sta, sta_id); rsi_send_auto_rate_request(common, sta, sta_id, vif);
if (opmode == RSI_OPMODE_STA) { if (opmode == RSI_OPMODE_STA) {
if (!rsi_send_block_unblock_frame(common, false)) if (!rsi_send_block_unblock_frame(common, false))
common->hw_data_qs_blocked = false; common->hw_data_qs_blocked = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment