Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9398d3028b |
+1
-1
@@ -2,7 +2,7 @@ KERN_DIR = /lib/modules/$(KERNELRELEASE)/build
|
|||||||
# feature option
|
# feature option
|
||||||
BES2600 ?= m
|
BES2600 ?= m
|
||||||
|
|
||||||
CONFIG_BES2600_TESTMODE ?= n
|
CONFIG_BES2600_TESTMODE ?= y
|
||||||
|
|
||||||
CONFIG_BES2600_ENABLE_DEVEL_LOGS ?= n
|
CONFIG_BES2600_ENABLE_DEVEL_LOGS ?= n
|
||||||
|
|
||||||
|
|||||||
@@ -8,3 +8,26 @@ extern struct device *global_dev;
|
|||||||
#define bes_info(fmt, ...) dev_info(global_dev, fmt, ##__VA_ARGS__)
|
#define bes_info(fmt, ...) dev_info(global_dev, fmt, ##__VA_ARGS__)
|
||||||
#define bes_warn(fmt, ...) dev_warn(global_dev, fmt, ##__VA_ARGS__)
|
#define bes_warn(fmt, ...) dev_warn(global_dev, fmt, ##__VA_ARGS__)
|
||||||
#define bes_err(fmt, ...) dev_err(global_dev, fmt, ##__VA_ARGS__)
|
#define bes_err(fmt, ...) dev_err(global_dev, fmt, ##__VA_ARGS__)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Legacy debug-subsystem-tagged log macros. The per-subsystem filtering
|
||||||
|
* was never implemented in-tree; these shims let code paths gated by
|
||||||
|
* CONFIG_BES2600_TESTMODE / CONFIG_BES2600_ITP / BES2600_DETECTION_LOGIC
|
||||||
|
* build when their conditions are enabled. The first argument is
|
||||||
|
* currently unused; pick one of the BES2600_DBG_* constants below for
|
||||||
|
* documentation.
|
||||||
|
*/
|
||||||
|
#define BES2600_DBG_SBUS 0
|
||||||
|
#define BES2600_DBG_DOWNLOAD 0
|
||||||
|
#define BES2600_DBG_ITP 0
|
||||||
|
#define BES2600_DBG_TEST_MODE 0
|
||||||
|
|
||||||
|
#define bes2600_info(_dbg, fmt, ...) bes_info(fmt, ##__VA_ARGS__)
|
||||||
|
#define bes2600_err(_dbg, fmt, ...) bes_err(fmt, ##__VA_ARGS__)
|
||||||
|
#define bes2600_warn(_dbg, fmt, ...) bes_warn(fmt, ##__VA_ARGS__)
|
||||||
|
#define bes2600_dbg(_dbg, fmt, ...) bes_devel(fmt, ##__VA_ARGS__)
|
||||||
|
#define bes2600_err_with_cond(_cond, _dbg, fmt, ...) \
|
||||||
|
do { \
|
||||||
|
if (_cond) \
|
||||||
|
bes_err(fmt, ##__VA_ARGS__); \
|
||||||
|
} while (0)
|
||||||
|
|||||||
+2
-16
@@ -472,7 +472,6 @@ static int bes2600_pwr_enter_lp_mode(struct bes2600_common *hw_priv)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
struct bes2600_vif *priv;
|
struct bes2600_vif *priv;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
int timeouts = 0;
|
|
||||||
char ip_str[20];
|
char ip_str[20];
|
||||||
unsigned long status = 0;
|
unsigned long status = 0;
|
||||||
|
|
||||||
@@ -529,35 +528,22 @@ static int bes2600_pwr_enter_lp_mode(struct bes2600_common *hw_priv)
|
|||||||
if (ret) {
|
if (ret) {
|
||||||
atomic_set(&hw_priv->bes_power.pm_set_in_process, 0);
|
atomic_set(&hw_priv->bes_power.pm_set_in_process, 0);
|
||||||
bes_err("%s, set operation mode fail\n", __func__);
|
bes_err("%s, set operation mode fail\n", __func__);
|
||||||
timeouts++;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait power save mode changed indication */
|
/* wait power save mode changed indication */
|
||||||
status = wait_for_completion_timeout(&hw_priv->bes_power.pm_enter_cmpl, 5 * HZ);
|
status = wait_for_completion_timeout(&hw_priv->bes_power.pm_enter_cmpl, 5 * HZ);
|
||||||
atomic_set(&hw_priv->bes_power.pm_set_in_process, 0);
|
atomic_set(&hw_priv->bes_power.pm_set_in_process, 0);
|
||||||
reinit_completion(&hw_priv->bes_power.pm_enter_cmpl);
|
reinit_completion(&hw_priv->bes_power.pm_enter_cmpl);
|
||||||
if (!status) {
|
if (!status)
|
||||||
bes_err("%s, wait pm ind timeout\n", __func__);
|
bes_err("%s, wait pm ind timeout\n", __func__);
|
||||||
timeouts++;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
bes_devel("skip enter lp mode\n");
|
bes_devel("skip enter lp mode\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/* set device low power configuration */
|
||||||
* Enter the device-end of the LP transition only if every per-VIF
|
|
||||||
* mac80211 handshake reached firmware-ACKed completion. Doing the
|
|
||||||
* device-LP setup while any VIF is still pending leaves the driver
|
|
||||||
* in an inconsistent state that cascades into SDIO TX errors on
|
|
||||||
* the BES2600.
|
|
||||||
*/
|
|
||||||
if (timeouts == 0)
|
|
||||||
bes2600_pwr_device_enter_lp_mode(hw_priv);
|
bes2600_pwr_device_enter_lp_mode(hw_priv);
|
||||||
else
|
|
||||||
ret = -ETIMEDOUT;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -3633,7 +3633,7 @@ static int bes2600_set_power_save(struct ieee80211_hw *hw,
|
|||||||
*
|
*
|
||||||
* Returns: 0 on success or non zero value on failure
|
* Returns: 0 on success or non zero value on failure
|
||||||
*/
|
*/
|
||||||
int bes2600_start_stop_tsm(struct ieee80211_hw *hw, void *data)
|
static int bes2600_start_stop_tsm(struct ieee80211_hw *hw, void *data)
|
||||||
{
|
{
|
||||||
struct bes_msg_start_stop_tsm *start_stop_tsm =
|
struct bes_msg_start_stop_tsm *start_stop_tsm =
|
||||||
(struct bes_msg_start_stop_tsm *) data;
|
(struct bes_msg_start_stop_tsm *) data;
|
||||||
@@ -3663,7 +3663,7 @@ int bes2600_start_stop_tsm(struct ieee80211_hw *hw, void *data)
|
|||||||
*
|
*
|
||||||
* Returns: TSM parameters collected
|
* Returns: TSM parameters collected
|
||||||
*/
|
*/
|
||||||
int bes2600_get_tsm_params(struct ieee80211_hw *hw)
|
static int bes2600_get_tsm_params(struct ieee80211_hw *hw)
|
||||||
{
|
{
|
||||||
struct bes2600_common *hw_priv = hw->priv;
|
struct bes2600_common *hw_priv = hw->priv;
|
||||||
struct bes_tsm_stats tsm_stats;
|
struct bes_tsm_stats tsm_stats;
|
||||||
@@ -3703,7 +3703,7 @@ int bes2600_get_tsm_params(struct ieee80211_hw *hw)
|
|||||||
*
|
*
|
||||||
* Returns: Returns the last measured roam delay
|
* Returns: Returns the last measured roam delay
|
||||||
*/
|
*/
|
||||||
int bes2600_get_roam_delay(struct ieee80211_hw *hw)
|
static int bes2600_get_roam_delay(struct ieee80211_hw *hw)
|
||||||
{
|
{
|
||||||
struct bes2600_common *hw_priv = hw->priv;
|
struct bes2600_common *hw_priv = hw->priv;
|
||||||
u16 roam_delay = hw_priv->tsm_info.roam_delay / 1000;
|
u16 roam_delay = hw_priv->tsm_info.roam_delay / 1000;
|
||||||
|
|||||||
Reference in New Issue
Block a user