mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-25 12:05:31 +00:00
7e2461910e
Currently the broadcast station is added after every RXON command. Change this to only add the broadcast station when interface is added by mac80211. With this we need some extra work to ensure broadcast station is always present since station table is cleared when RXON without ASSOC bit set is sent. To deal with this we re-add all driver known stations to uCode after such an RXON command is sent. We also do some cleanup and remove the various calls to clear the station table. We now only clear the station table in two scenarios: - only clear uCode portion of station table when RXON command without ASSOC bit is sent - clear uCode and driver portion when interface goes down or is removed. We need to do this clearing when interface goes down to deal with the device restart/reconfigure routines which do not remove the interface, but do add the interface during reconfiguration. Previously the keys were also cleared when station table in driver is cleared, this is not done anymore since mac80211 will take care that keys are set and cleared correctly. There is a known issue with this change. Associating with different AP without bringing interface down fails with a firmware error. This is because of the lack of full station notification support and the later patches in this series that complete the station notification support will fix this. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
80 lines
3.5 KiB
C
80 lines
3.5 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright(c) 2003 - 2010 Intel Corporation. All rights reserved.
|
|
*
|
|
* Portions of this file are derived from the ipw3945 project, as well
|
|
* as portions of the ieee80211 subsystem header files.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along with
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
*
|
|
* The full GNU General Public License is included in this distribution in the
|
|
* file called LICENSE.
|
|
*
|
|
* Contact Information:
|
|
* Intel Linux Wireless <ilw@linux.intel.com>
|
|
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
|
*
|
|
*****************************************************************************/
|
|
#ifndef __iwl_sta_h__
|
|
#define __iwl_sta_h__
|
|
|
|
#define HW_KEY_DYNAMIC 0
|
|
#define HW_KEY_DEFAULT 1
|
|
|
|
#define IWL_STA_DRIVER_ACTIVE BIT(0) /* driver entry is active */
|
|
#define IWL_STA_UCODE_ACTIVE BIT(1) /* ucode entry is active */
|
|
#define IWL_STA_UCODE_INPROGRESS BIT(2) /* ucode entry is in process of
|
|
being activated */
|
|
|
|
|
|
/**
|
|
* iwl_find_station - Find station id for a given BSSID
|
|
* @bssid: MAC address of station ID to find
|
|
*/
|
|
u8 iwl_find_station(struct iwl_priv *priv, const u8 *bssid);
|
|
|
|
int iwl_send_static_wepkey_cmd(struct iwl_priv *priv, u8 send_if_empty);
|
|
int iwl_remove_default_wep_key(struct iwl_priv *priv,
|
|
struct ieee80211_key_conf *key);
|
|
int iwl_set_default_wep_key(struct iwl_priv *priv,
|
|
struct ieee80211_key_conf *key);
|
|
int iwl_set_dynamic_key(struct iwl_priv *priv,
|
|
struct ieee80211_key_conf *key, u8 sta_id);
|
|
int iwl_remove_dynamic_key(struct iwl_priv *priv,
|
|
struct ieee80211_key_conf *key, u8 sta_id);
|
|
void iwl_update_tkip_key(struct iwl_priv *priv,
|
|
struct ieee80211_key_conf *keyconf,
|
|
const u8 *addr, u32 iv32, u16 *phase1key);
|
|
|
|
int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap);
|
|
void iwl_add_bcast_station(struct iwl_priv *priv);
|
|
void iwl3945_add_bcast_station(struct iwl_priv *priv);
|
|
int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, bool is_ap);
|
|
void iwl_restore_stations(struct iwl_priv *priv);
|
|
void iwl_clear_ucode_stations(struct iwl_priv *priv, bool force);
|
|
int iwl_get_free_ucode_key_index(struct iwl_priv *priv);
|
|
int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr);
|
|
int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr);
|
|
int iwl_send_add_sta(struct iwl_priv *priv,
|
|
struct iwl_addsta_cmd *sta, u8 flags);
|
|
u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, bool is_ap, u8 flags,
|
|
struct ieee80211_sta_ht_cap *ht_info);
|
|
void iwl_sta_tx_modify_enable_tid(struct iwl_priv *priv, int sta_id, int tid);
|
|
int iwl_sta_rx_agg_start(struct iwl_priv *priv,
|
|
const u8 *addr, int tid, u16 ssn);
|
|
int iwl_sta_rx_agg_stop(struct iwl_priv *priv, const u8 *addr, int tid);
|
|
void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id);
|
|
void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt);
|
|
#endif /* __iwl_sta_h__ */
|