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

rsi: Host to device command frame vap_capabilites modified with new field vap status

* Command frame vap_capabilites is modified to use for vap add, vap delete
  and vap update in firmware, hence new filed vap status is added.
* When interface is down this frame needs to be send with vap status delete.
  Otherwise it is considered as wrong frame for the same interface in firmware.
* vap_update status is reserved for future.
Signed-off-by: default avatarPrameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent b022539d
...@@ -315,7 +315,9 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw, ...@@ -315,7 +315,9 @@ static int rsi_mac80211_add_interface(struct ieee80211_hw *hw,
if (!adapter->sc_nvifs) { if (!adapter->sc_nvifs) {
++adapter->sc_nvifs; ++adapter->sc_nvifs;
adapter->vifs[0] = vif; adapter->vifs[0] = vif;
ret = rsi_set_vap_capabilities(common, STA_OPMODE); ret = rsi_set_vap_capabilities(common,
STA_OPMODE,
VAP_ADD);
} }
break; break;
default: default:
...@@ -343,8 +345,10 @@ static void rsi_mac80211_remove_interface(struct ieee80211_hw *hw, ...@@ -343,8 +345,10 @@ static void rsi_mac80211_remove_interface(struct ieee80211_hw *hw,
struct rsi_common *common = adapter->priv; struct rsi_common *common = adapter->priv;
mutex_lock(&common->mutex); mutex_lock(&common->mutex);
if (vif->type == NL80211_IFTYPE_STATION) if (vif->type == NL80211_IFTYPE_STATION) {
adapter->sc_nvifs--; adapter->sc_nvifs--;
rsi_set_vap_capabilities(common, STA_OPMODE, VAP_DELETE);
}
if (!memcmp(adapter->vifs[0], vif, sizeof(struct ieee80211_vif))) if (!memcmp(adapter->vifs[0], vif, sizeof(struct ieee80211_vif)))
adapter->vifs[0] = NULL; adapter->vifs[0] = NULL;
......
...@@ -617,7 +617,9 @@ static int rsi_program_bb_rf(struct rsi_common *common) ...@@ -617,7 +617,9 @@ static int rsi_program_bb_rf(struct rsi_common *common)
* *
* Return: 0 on success, corresponding negative error code on failure. * Return: 0 on success, corresponding negative error code on failure.
*/ */
int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode) int rsi_set_vap_capabilities(struct rsi_common *common,
enum opmode mode,
u8 vap_status)
{ {
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
struct rsi_vap_caps *vap_caps; struct rsi_vap_caps *vap_caps;
...@@ -642,6 +644,7 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode) ...@@ -642,6 +644,7 @@ int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode)
FRAME_DESC_SZ) | FRAME_DESC_SZ) |
(RSI_WIFI_MGMT_Q << 12)); (RSI_WIFI_MGMT_Q << 12));
vap_caps->desc_word[1] = cpu_to_le16(VAP_CAPABILITIES); vap_caps->desc_word[1] = cpu_to_le16(VAP_CAPABILITIES);
vap_caps->desc_word[2] = cpu_to_le16(vap_status << 8);
vap_caps->desc_word[4] = cpu_to_le16(mode | vap_caps->desc_word[4] = cpu_to_le16(mode |
(common->channel_width << 8)); (common->channel_width << 8));
vap_caps->desc_word[7] = cpu_to_le16((vap_id << 8) | vap_caps->desc_word[7] = cpu_to_le16((vap_id << 8) |
......
...@@ -145,6 +145,12 @@ enum opmode { ...@@ -145,6 +145,12 @@ enum opmode {
AP_OPMODE = 2 AP_OPMODE = 2
}; };
enum vap_status {
VAP_ADD = 1,
VAP_DELETE = 2,
VAP_UPDATE = 3
};
extern struct ieee80211_rate rsi_rates[12]; extern struct ieee80211_rate rsi_rates[12];
extern const u16 rsi_mcsrates[8]; extern const u16 rsi_mcsrates[8];
...@@ -287,7 +293,8 @@ static inline u8 rsi_get_channel(u8 *addr) ...@@ -287,7 +293,8 @@ static inline u8 rsi_get_channel(u8 *addr)
} }
int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg); int rsi_mgmt_pkt_recv(struct rsi_common *common, u8 *msg);
int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode); int rsi_set_vap_capabilities(struct rsi_common *common, enum opmode mode,
u8 vap_status);
int rsi_send_aggregation_params_frame(struct rsi_common *common, u16 tid, int rsi_send_aggregation_params_frame(struct rsi_common *common, u16 tid,
u16 ssn, u8 buf_size, u8 event); u16 ssn, u8 buf_size, u8 event);
int rsi_hal_load_key(struct rsi_common *common, u8 *data, u16 key_len, int rsi_hal_load_key(struct rsi_common *common, u8 *data, u16 key_len,
......
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