diff options
Diffstat (limited to 'drivers/net/wireless/ti/wl18xx/main.c')
| -rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index de5b4fa5d166..7af1936719eb 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
| @@ -992,7 +992,10 @@ static int wl18xx_boot(struct wl1271 *wl) | |||
| 992 | REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | | 992 | REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID | |
| 993 | INACTIVE_STA_EVENT_ID | | 993 | INACTIVE_STA_EVENT_ID | |
| 994 | CHANNEL_SWITCH_COMPLETE_EVENT_ID | | 994 | CHANNEL_SWITCH_COMPLETE_EVENT_ID | |
| 995 | DFS_CHANNELS_CONFIG_COMPLETE_EVENT; | 995 | DFS_CHANNELS_CONFIG_COMPLETE_EVENT | |
| 996 | SMART_CONFIG_SYNC_EVENT_ID | | ||
| 997 | SMART_CONFIG_DECODE_EVENT_ID; | ||
| 998 | ; | ||
| 996 | 999 | ||
| 997 | wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID; | 1000 | wl->ap_event_mask = MAX_TX_FAILURE_EVENT_ID; |
| 998 | 1001 | ||
| @@ -1606,15 +1609,20 @@ static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid, | |||
| 1606 | u8 thold; | 1609 | u8 thold; |
| 1607 | struct wl18xx_fw_status_priv *status_priv = | 1610 | struct wl18xx_fw_status_priv *status_priv = |
| 1608 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; | 1611 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
| 1609 | u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); | 1612 | unsigned long suspend_bitmap; |
| 1613 | |||
| 1614 | /* if we don't have the link map yet, assume they all low prio */ | ||
| 1615 | if (!status_priv) | ||
| 1616 | return false; | ||
| 1610 | 1617 | ||
| 1611 | /* suspended links are never high priority */ | 1618 | /* suspended links are never high priority */ |
| 1612 | if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) | 1619 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); |
| 1620 | if (test_bit(hlid, &suspend_bitmap)) | ||
| 1613 | return false; | 1621 | return false; |
| 1614 | 1622 | ||
| 1615 | /* the priority thresholds are taken from FW */ | 1623 | /* the priority thresholds are taken from FW */ |
| 1616 | if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && | 1624 | if (test_bit(hlid, &wl->fw_fast_lnk_map) && |
| 1617 | !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) | 1625 | !test_bit(hlid, &wl->ap_fw_ps_map)) |
| 1618 | thold = status_priv->tx_fast_link_prio_threshold; | 1626 | thold = status_priv->tx_fast_link_prio_threshold; |
| 1619 | else | 1627 | else |
| 1620 | thold = status_priv->tx_slow_link_prio_threshold; | 1628 | thold = status_priv->tx_slow_link_prio_threshold; |
| @@ -1628,12 +1636,17 @@ static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid, | |||
| 1628 | u8 thold; | 1636 | u8 thold; |
| 1629 | struct wl18xx_fw_status_priv *status_priv = | 1637 | struct wl18xx_fw_status_priv *status_priv = |
| 1630 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; | 1638 | (struct wl18xx_fw_status_priv *)wl->fw_status->priv; |
| 1631 | u32 suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); | 1639 | unsigned long suspend_bitmap; |
| 1640 | |||
| 1641 | /* if we don't have the link map yet, assume they all low prio */ | ||
| 1642 | if (!status_priv) | ||
| 1643 | return true; | ||
| 1632 | 1644 | ||
| 1633 | if (test_bit(hlid, (unsigned long *)&suspend_bitmap)) | 1645 | suspend_bitmap = le32_to_cpu(status_priv->link_suspend_bitmap); |
| 1646 | if (test_bit(hlid, &suspend_bitmap)) | ||
| 1634 | thold = status_priv->tx_suspend_threshold; | 1647 | thold = status_priv->tx_suspend_threshold; |
| 1635 | else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) && | 1648 | else if (test_bit(hlid, &wl->fw_fast_lnk_map) && |
| 1636 | !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map)) | 1649 | !test_bit(hlid, &wl->ap_fw_ps_map)) |
| 1637 | thold = status_priv->tx_fast_stop_threshold; | 1650 | thold = status_priv->tx_fast_stop_threshold; |
| 1638 | else | 1651 | else |
| 1639 | thold = status_priv->tx_slow_stop_threshold; | 1652 | thold = status_priv->tx_slow_stop_threshold; |
| @@ -1687,6 +1700,9 @@ static struct wlcore_ops wl18xx_ops = { | |||
| 1687 | .convert_hwaddr = wl18xx_convert_hwaddr, | 1700 | .convert_hwaddr = wl18xx_convert_hwaddr, |
| 1688 | .lnk_high_prio = wl18xx_lnk_high_prio, | 1701 | .lnk_high_prio = wl18xx_lnk_high_prio, |
| 1689 | .lnk_low_prio = wl18xx_lnk_low_prio, | 1702 | .lnk_low_prio = wl18xx_lnk_low_prio, |
| 1703 | .smart_config_start = wl18xx_cmd_smart_config_start, | ||
| 1704 | .smart_config_stop = wl18xx_cmd_smart_config_stop, | ||
| 1705 | .smart_config_set_group_key = wl18xx_cmd_smart_config_set_group_key, | ||
| 1690 | }; | 1706 | }; |
| 1691 | 1707 | ||
| 1692 | /* HT cap appropriate for wide channels in 2Ghz */ | 1708 | /* HT cap appropriate for wide channels in 2Ghz */ |
