forked from Minki/linux
6b70e7eb70
In 18xx the calibration process of the PHY Cortex domain requires to perform an active calibration of the channel before it can be used for transmission. To fulfill world wide regulatory restrictions, fw should be always synchronized/updated with current CRDA configuration. Add a new "CMD_DFS_CHANNEL_CONFIG" command to update the fw with current reg-domain, this command passes a bit map of channels that are allowed to be used for transmission. The driver shall update the fw during initialization and after each change in the current reg-domain configuration. The driver will save the channel number of incoming beacons during the scan process, as they might be a result of the passive scan on "IEEE80211_CHAN_PASSIVE_SCAN" channel and will update the fw accordingly once the scan is finished, the purpose of this is to be ready in case of the authentication request on one of these disabled (uncalibrated) channels. The new command requires to wait for the fw completion event "DFS_CHANNELS_CONFIG_COMPLETE_EVENT". No scan commands (including the sched scan) can be executed concurrently with the "CMD_DFS_CHANNEL_CONFIG", wl->mutex ensures that. [Arik - move reset of reg_ch_conf_last to safe place inside op_stop_locked] [Eliad - adjust to new event waiting api] Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
90 lines
3.1 KiB
C
90 lines
3.1 KiB
C
/*
|
|
* This file is part of wl1271
|
|
*
|
|
* Copyright (C) 1998-2009 Texas Instruments. All rights reserved.
|
|
* Copyright (C) 2008-2009 Nokia Corporation
|
|
*
|
|
* Contact: Luciano Coelho <luciano.coelho@nokia.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* version 2 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 St, Fifth Floor, Boston, MA
|
|
* 02110-1301 USA
|
|
*
|
|
*/
|
|
|
|
#ifndef __EVENT_H__
|
|
#define __EVENT_H__
|
|
|
|
/*
|
|
* Mbox events
|
|
*
|
|
* The event mechanism is based on a pair of event buffers (buffers A and
|
|
* B) at fixed locations in the target's memory. The host processes one
|
|
* buffer while the other buffer continues to collect events. If the host
|
|
* is not processing events, an interrupt is issued to signal that a buffer
|
|
* is ready. Once the host is done with processing events from one buffer,
|
|
* it signals the target (with an ACK interrupt) that the event buffer is
|
|
* free.
|
|
*/
|
|
|
|
enum {
|
|
RSSI_SNR_TRIGGER_0_EVENT_ID = BIT(0),
|
|
RSSI_SNR_TRIGGER_1_EVENT_ID = BIT(1),
|
|
RSSI_SNR_TRIGGER_2_EVENT_ID = BIT(2),
|
|
RSSI_SNR_TRIGGER_3_EVENT_ID = BIT(3),
|
|
RSSI_SNR_TRIGGER_4_EVENT_ID = BIT(4),
|
|
RSSI_SNR_TRIGGER_5_EVENT_ID = BIT(5),
|
|
RSSI_SNR_TRIGGER_6_EVENT_ID = BIT(6),
|
|
RSSI_SNR_TRIGGER_7_EVENT_ID = BIT(7),
|
|
|
|
EVENT_MBOX_ALL_EVENT_ID = 0x7fffffff,
|
|
};
|
|
|
|
/* events the driver might want to wait for */
|
|
enum wlcore_wait_event {
|
|
WLCORE_EVENT_ROLE_STOP_COMPLETE,
|
|
WLCORE_EVENT_PEER_REMOVE_COMPLETE,
|
|
WLCORE_EVENT_DFS_CONFIG_COMPLETE
|
|
};
|
|
|
|
enum {
|
|
EVENT_ENTER_POWER_SAVE_FAIL = 0,
|
|
EVENT_ENTER_POWER_SAVE_SUCCESS,
|
|
};
|
|
|
|
#define NUM_OF_RSSI_SNR_TRIGGERS 8
|
|
|
|
struct wl1271;
|
|
|
|
int wl1271_event_unmask(struct wl1271 *wl);
|
|
int wl1271_event_handle(struct wl1271 *wl, u8 mbox);
|
|
|
|
void wlcore_event_soft_gemini_sense(struct wl1271 *wl, u8 enable);
|
|
void wlcore_event_sched_scan_report(struct wl1271 *wl,
|
|
u8 status);
|
|
void wlcore_event_sched_scan_completed(struct wl1271 *wl,
|
|
u8 status);
|
|
void wlcore_event_ba_rx_constraint(struct wl1271 *wl,
|
|
unsigned long roles_bitmap,
|
|
unsigned long allowed_bitmap);
|
|
void wlcore_event_channel_switch(struct wl1271 *wl,
|
|
unsigned long roles_bitmap,
|
|
bool success);
|
|
void wlcore_event_beacon_loss(struct wl1271 *wl, unsigned long roles_bitmap);
|
|
void wlcore_event_dummy_packet(struct wl1271 *wl);
|
|
void wlcore_event_max_tx_failure(struct wl1271 *wl, unsigned long sta_bitmap);
|
|
void wlcore_event_inactive_sta(struct wl1271 *wl, unsigned long sta_bitmap);
|
|
void wlcore_event_roc_complete(struct wl1271 *wl);
|
|
void wlcore_event_rssi_trigger(struct wl1271 *wl, s8 *metric_arr);
|
|
#endif
|