diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-09-11 04:34:46 -0300 |
commit | 863981e96738983919de841ec669e157e6bdaeb0 (patch) | |
tree | d6d89a12e7eb8017837c057935a2271290907f76 /drivers/net/wireless/ti/wlcore | |
parent | 8dec7c70575785729a6a9e6719a955e9c545bcab (diff) |
Linux-libre 4.7.1-gnupck-4.7.1-gnu
Diffstat (limited to 'drivers/net/wireless/ti/wlcore')
-rw-r--r-- | drivers/net/wireless/ti/wlcore/cmd.c | 36 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/cmd.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/io.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/io.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/main.c | 42 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/ps.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/rx.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/rx.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/scan.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/spi.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/tx.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wlcore/wlcore_i.h | 2 |
14 files changed, 80 insertions, 68 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c index f01d24baf..33153565a 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.c +++ b/drivers/net/wireless/ti/wlcore/cmd.c @@ -423,7 +423,7 @@ EXPORT_SYMBOL_GPL(wlcore_get_native_channel_type); static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, - enum ieee80211_band band, + enum nl80211_band band, int channel) { struct wl12xx_cmd_role_start *cmd; @@ -438,7 +438,7 @@ static int wl12xx_cmd_role_start_dev(struct wl1271 *wl, wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); cmd->role_id = wlvif->dev_role_id; - if (band == IEEE80211_BAND_5GHZ) + if (band == NL80211_BAND_5GHZ) cmd->band = WLCORE_BAND_5GHZ; cmd->channel = channel; @@ -524,7 +524,7 @@ int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); cmd->role_id = wlvif->role_id; - if (wlvif->band == IEEE80211_BAND_5GHZ) + if (wlvif->band == NL80211_BAND_5GHZ) cmd->band = WLCORE_BAND_5GHZ; cmd->channel = wlvif->channel; cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); @@ -693,10 +693,10 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) cmd->ap.local_rates = cpu_to_le32(supported_rates); switch (wlvif->band) { - case IEEE80211_BAND_2GHZ: + case NL80211_BAND_2GHZ: cmd->band = WLCORE_BAND_2_4GHZ; break; - case IEEE80211_BAND_5GHZ: + case NL80211_BAND_5GHZ: cmd->band = WLCORE_BAND_5GHZ; break; default: @@ -773,7 +773,7 @@ int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); cmd->role_id = wlvif->role_id; - if (wlvif->band == IEEE80211_BAND_5GHZ) + if (wlvif->band == NL80211_BAND_5GHZ) cmd->band = WLCORE_BAND_5GHZ; cmd->channel = wlvif->channel; cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); @@ -1164,7 +1164,7 @@ int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif, } rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); - if (band == IEEE80211_BAND_2GHZ) + if (band == NL80211_BAND_2GHZ) ret = wl1271_cmd_template_set(wl, role_id, template_id_2_4, skb->data, skb->len, 0, rate); @@ -1195,7 +1195,7 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl, wl1271_debug(DEBUG_SCAN, "set ap probe request template"); rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[wlvif->band]); - if (wlvif->band == IEEE80211_BAND_2GHZ) + if (wlvif->band == NL80211_BAND_2GHZ) ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_CFG_PROBE_REQ_2_4, skb->data, skb->len, 0, rate); @@ -1628,19 +1628,19 @@ out: return ret; } -static int wlcore_get_reg_conf_ch_idx(enum ieee80211_band band, u16 ch) +static int wlcore_get_reg_conf_ch_idx(enum nl80211_band band, u16 ch) { /* * map the given band/channel to the respective predefined * bit expected by the fw */ switch (band) { - case IEEE80211_BAND_2GHZ: + case NL80211_BAND_2GHZ: /* channels 1..14 are mapped to 0..13 */ if (ch >= 1 && ch <= 14) return ch - 1; break; - case IEEE80211_BAND_5GHZ: + case NL80211_BAND_5GHZ: switch (ch) { case 8 ... 16: /* channels 8,12,16 are mapped to 18,19,20 */ @@ -1670,7 +1670,7 @@ static int wlcore_get_reg_conf_ch_idx(enum ieee80211_band band, u16 ch) } void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, - enum ieee80211_band band) + enum nl80211_band band) { int ch_bit_idx = 0; @@ -1699,7 +1699,7 @@ int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl) memset(tmp_ch_bitmap, 0, sizeof(tmp_ch_bitmap)); - for (b = IEEE80211_BAND_2GHZ; b <= IEEE80211_BAND_5GHZ; b++) { + for (b = NL80211_BAND_2GHZ; b <= NL80211_BAND_5GHZ; b++) { band = wiphy->bands[b]; for (i = 0; i < band->n_channels; i++) { struct ieee80211_channel *channel = &band->channels[i]; @@ -1851,7 +1851,7 @@ out: } static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, - u8 role_id, enum ieee80211_band band, u8 channel) + u8 role_id, enum nl80211_band band, u8 channel) { struct wl12xx_cmd_roc *cmd; int ret = 0; @@ -1870,10 +1870,10 @@ static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, cmd->role_id = role_id; cmd->channel = channel; switch (band) { - case IEEE80211_BAND_2GHZ: + case NL80211_BAND_2GHZ: cmd->band = WLCORE_BAND_2_4GHZ; break; - case IEEE80211_BAND_5GHZ: + case NL80211_BAND_5GHZ: cmd->band = WLCORE_BAND_5GHZ; break; default: @@ -1925,7 +1925,7 @@ out: } int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, - enum ieee80211_band band, u8 channel) + enum nl80211_band band, u8 channel) { int ret = 0; @@ -1995,7 +1995,7 @@ out: /* start dev role and roc on its channel */ int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, - enum ieee80211_band band, int channel) + enum nl80211_band band, int channel) { int ret; diff --git a/drivers/net/wireless/ti/wlcore/cmd.h b/drivers/net/wireless/ti/wlcore/cmd.h index e28e2f230..52c3b4860 100644 --- a/drivers/net/wireless/ti/wlcore/cmd.h +++ b/drivers/net/wireless/ti/wlcore/cmd.h @@ -40,7 +40,7 @@ int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif); int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif); int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, - enum ieee80211_band band, int channel); + enum nl80211_band band, int channel); int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif); int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, @@ -83,14 +83,14 @@ int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid); int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, - enum ieee80211_band band, u8 channel); + enum nl80211_band band, u8 channel); int wl12xx_croc(struct wl1271 *wl, u8 role_id); int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct ieee80211_sta *sta, u8 hlid); int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 hlid); void wlcore_set_pending_regdomain_ch(struct wl1271 *wl, u16 channel, - enum ieee80211_band band); + enum nl80211_band band); int wlcore_cmd_regdomain_config_locked(struct wl1271 *wl); int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 feature, u8 enable, u8 value); diff --git a/drivers/net/wireless/ti/wlcore/io.c b/drivers/net/wireless/ti/wlcore/io.c index 564ca750c..1cc6d5ab0 100644 --- a/drivers/net/wireless/ti/wlcore/io.c +++ b/drivers/net/wireless/ti/wlcore/io.c @@ -175,14 +175,25 @@ int wlcore_set_partition(struct wl1271 *wl, if (ret < 0) goto out; - /* We don't need the size of the last partition, as it is - * automatically calculated based on the total memory size and - * the sizes of the previous partitions. + /* wl12xx only: We don't need the size of the last partition, + * as it is automatically calculated based on the total memory + * size and the sizes of the previous partitions. + * + * wl18xx re-defines the HW_PART3 addresses for logger over + * SDIO support. wl12xx is expecting the write to + * HW_PART3_START_ADDR at offset 24. This creates conflict + * between the addresses. + * In order to fix this the expected value is written to + * HW_PART3_SIZE_ADDR instead which is at offset 24 after changes. */ ret = wlcore_raw_write32(wl, HW_PART3_START_ADDR, p->mem3.start); if (ret < 0) goto out; + ret = wlcore_raw_write32(wl, HW_PART3_SIZE_ADDR, p->mem3.size); + if (ret < 0) + goto out; + out: return ret; } diff --git a/drivers/net/wireless/ti/wlcore/io.h b/drivers/net/wireless/ti/wlcore/io.h index 10cf37476..704ce6467 100644 --- a/drivers/net/wireless/ti/wlcore/io.h +++ b/drivers/net/wireless/ti/wlcore/io.h @@ -36,7 +36,8 @@ #define HW_PART1_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 12) #define HW_PART2_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 16) #define HW_PART2_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 20) -#define HW_PART3_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 24) +#define HW_PART3_SIZE_ADDR (HW_PARTITION_REGISTERS_ADDR + 24) +#define HW_PART3_START_ADDR (HW_PARTITION_REGISTERS_ADDR + 28) #define HW_ACCESS_REGISTER_SIZE 4 diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c index 1edf6eed7..2509c0050 100644 --- a/drivers/net/wireless/ti/wlcore/main.c +++ b/drivers/net/wireless/ti/wlcore/main.c @@ -243,7 +243,7 @@ static void wl12xx_tx_watchdog_work(struct work_struct *work) struct delayed_work *dwork; struct wl1271 *wl; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wl = container_of(dwork, struct wl1271, tx_watchdog_work); mutex_lock(&wl->mutex); @@ -1930,7 +1930,7 @@ static void wlcore_op_stop_locked(struct wl1271 *wl) if (test_and_clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) wlcore_enable_interrupts(wl); - wl->band = IEEE80211_BAND_2GHZ; + wl->band = NL80211_BAND_2GHZ; wl->rx_counter = 0; wl->power_level = WL1271_DEFAULT_POWER_LEVEL; @@ -2011,7 +2011,7 @@ static void wlcore_channel_switch_work(struct work_struct *work) struct wl12xx_vif *wlvif; int ret; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wlvif = container_of(dwork, struct wl12xx_vif, channel_switch_work); wl = wlvif->wl; @@ -2047,7 +2047,7 @@ static void wlcore_connection_loss_work(struct work_struct *work) struct ieee80211_vif *vif; struct wl12xx_vif *wlvif; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wlvif = container_of(dwork, struct wl12xx_vif, connection_loss_work); wl = wlvif->wl; @@ -2076,7 +2076,7 @@ static void wlcore_pending_auth_complete_work(struct work_struct *work) unsigned long time_spare; int ret; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wlvif = container_of(dwork, struct wl12xx_vif, pending_auth_complete_work); wl = wlvif->wl; @@ -2240,8 +2240,8 @@ static int wl12xx_init_vif_data(struct wl1271 *wl, struct ieee80211_vif *vif) wlvif->rate_set = CONF_TX_ENABLED_RATES; } - wlvif->bitrate_masks[IEEE80211_BAND_2GHZ] = wl->conf.tx.basic_rate; - wlvif->bitrate_masks[IEEE80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5; + wlvif->bitrate_masks[NL80211_BAND_2GHZ] = wl->conf.tx.basic_rate; + wlvif->bitrate_masks[NL80211_BAND_5GHZ] = wl->conf.tx.basic_rate_5; wlvif->beacon_int = WL1271_DEFAULT_BEACON_INT; /* @@ -2330,7 +2330,7 @@ power_off: * 11a channels if not supported */ if (!wl->enable_11a) - wiphy->bands[IEEE80211_BAND_5GHZ]->n_channels = 0; + wiphy->bands[NL80211_BAND_5GHZ]->n_channels = 0; wl1271_debug(DEBUG_MAC80211, "11a is %ssupported", wl->enable_11a ? "" : "not "); @@ -5588,7 +5588,7 @@ static void wlcore_roc_complete_work(struct work_struct *work) struct wl1271 *wl; int ret; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wl = container_of(dwork, struct wl1271, roc_complete_work); ret = wlcore_roc_completed(wl); @@ -5871,7 +5871,7 @@ static const struct ieee80211_ops wl1271_ops = { }; -u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band) +u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum nl80211_band band) { u8 idx; @@ -6096,21 +6096,21 @@ static int wl1271_init_ieee80211(struct wl1271 *wl) * We keep local copies of the band structs because we need to * modify them on a per-device basis. */ - memcpy(&wl->bands[IEEE80211_BAND_2GHZ], &wl1271_band_2ghz, + memcpy(&wl->bands[NL80211_BAND_2GHZ], &wl1271_band_2ghz, sizeof(wl1271_band_2ghz)); - memcpy(&wl->bands[IEEE80211_BAND_2GHZ].ht_cap, - &wl->ht_cap[IEEE80211_BAND_2GHZ], + memcpy(&wl->bands[NL80211_BAND_2GHZ].ht_cap, + &wl->ht_cap[NL80211_BAND_2GHZ], sizeof(*wl->ht_cap)); - memcpy(&wl->bands[IEEE80211_BAND_5GHZ], &wl1271_band_5ghz, + memcpy(&wl->bands[NL80211_BAND_5GHZ], &wl1271_band_5ghz, sizeof(wl1271_band_5ghz)); - memcpy(&wl->bands[IEEE80211_BAND_5GHZ].ht_cap, - &wl->ht_cap[IEEE80211_BAND_5GHZ], + memcpy(&wl->bands[NL80211_BAND_5GHZ].ht_cap, + &wl->ht_cap[NL80211_BAND_5GHZ], sizeof(*wl->ht_cap)); - wl->hw->wiphy->bands[IEEE80211_BAND_2GHZ] = - &wl->bands[IEEE80211_BAND_2GHZ]; - wl->hw->wiphy->bands[IEEE80211_BAND_5GHZ] = - &wl->bands[IEEE80211_BAND_5GHZ]; + wl->hw->wiphy->bands[NL80211_BAND_2GHZ] = + &wl->bands[NL80211_BAND_2GHZ]; + wl->hw->wiphy->bands[NL80211_BAND_5GHZ] = + &wl->bands[NL80211_BAND_5GHZ]; /* * allow 4 queues per mac address we support + @@ -6205,7 +6205,7 @@ struct ieee80211_hw *wlcore_alloc_hw(size_t priv_size, u32 aggr_buf_size, wl->channel = 0; wl->rx_counter = 0; wl->power_level = WL1271_DEFAULT_POWER_LEVEL; - wl->band = IEEE80211_BAND_2GHZ; + wl->band = NL80211_BAND_2GHZ; wl->channel_type = NL80211_CHAN_NO_HT; wl->flags = 0; wl->sg_enabled = true; diff --git a/drivers/net/wireless/ti/wlcore/ps.c b/drivers/net/wireless/ti/wlcore/ps.c index 4cd316e61..b36133b73 100644 --- a/drivers/net/wireless/ti/wlcore/ps.c +++ b/drivers/net/wireless/ti/wlcore/ps.c @@ -38,7 +38,7 @@ void wl1271_elp_work(struct work_struct *work) struct wl12xx_vif *wlvif; int ret; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wl = container_of(dwork, struct wl1271, elp_work); wl1271_debug(DEBUG_PSM, "elp work"); @@ -202,7 +202,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, * enable beacon early termination. * Not relevant for 5GHz and for high rates. */ - if ((wlvif->band == IEEE80211_BAND_2GHZ) && + if ((wlvif->band == NL80211_BAND_2GHZ) && (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { ret = wl1271_acx_bet_enable(wl, wlvif, true); if (ret < 0) @@ -213,7 +213,7 @@ int wl1271_ps_set_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, wl1271_debug(DEBUG_PSM, "leaving psm"); /* disable beacon early termination */ - if ((wlvif->band == IEEE80211_BAND_2GHZ) && + if ((wlvif->band == NL80211_BAND_2GHZ) && (wlvif->basic_rate < CONF_HW_BIT_RATE_9MBPS)) { ret = wl1271_acx_bet_enable(wl, wlvif, false); if (ret < 0) diff --git a/drivers/net/wireless/ti/wlcore/rx.c b/drivers/net/wireless/ti/wlcore/rx.c index 34e7e938e..c9bd294a0 100644 --- a/drivers/net/wireless/ti/wlcore/rx.c +++ b/drivers/net/wireless/ti/wlcore/rx.c @@ -64,9 +64,9 @@ static void wl1271_rx_status(struct wl1271 *wl, memset(status, 0, sizeof(struct ieee80211_rx_status)); if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG) - status->band = IEEE80211_BAND_2GHZ; + status->band = NL80211_BAND_2GHZ; else - status->band = IEEE80211_BAND_5GHZ; + status->band = NL80211_BAND_5GHZ; status->rate_idx = wlcore_rate_to_idx(wl, desc->rate, status->band); diff --git a/drivers/net/wireless/ti/wlcore/rx.h b/drivers/net/wireless/ti/wlcore/rx.h index f5a7087cf..57c056563 100644 --- a/drivers/net/wireless/ti/wlcore/rx.h +++ b/drivers/net/wireless/ti/wlcore/rx.h @@ -146,7 +146,7 @@ struct wl1271_rx_descriptor { } __packed; int wlcore_rx(struct wl1271 *wl, struct wl_fw_status *status); -u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band); +u8 wl1271_rate_to_idx(int rate, enum nl80211_band band); int wl1271_rx_filter_enable(struct wl1271 *wl, int index, bool enable, struct wl12xx_rx_filter *filter); diff --git a/drivers/net/wireless/ti/wlcore/scan.c b/drivers/net/wireless/ti/wlcore/scan.c index 1e3d51cd6..233436432 100644 --- a/drivers/net/wireless/ti/wlcore/scan.c +++ b/drivers/net/wireless/ti/wlcore/scan.c @@ -38,7 +38,7 @@ void wl1271_scan_complete_work(struct work_struct *work) struct wl12xx_vif *wlvif; int ret; - dwork = container_of(work, struct delayed_work, work); + dwork = to_delayed_work(work); wl = container_of(dwork, struct wl1271, scan_complete_work); wl1271_debug(DEBUG_SCAN, "Scanning complete"); @@ -164,7 +164,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, struct conf_sched_scan_settings *c = &wl->conf.sched_scan; u32 delta_per_probe; - if (band == IEEE80211_BAND_5GHZ) + if (band == NL80211_BAND_5GHZ) delta_per_probe = c->dwell_time_delta_per_probe_5; else delta_per_probe = c->dwell_time_delta_per_probe; @@ -215,7 +215,7 @@ wlcore_scan_get_channels(struct wl1271 *wl, channels[j].channel = req_channels[i]->hw_value; if (n_pactive_ch && - (band == IEEE80211_BAND_2GHZ) && + (band == NL80211_BAND_2GHZ) && (channels[j].channel >= 12) && (channels[j].channel <= 14) && (flags & IEEE80211_CHAN_NO_IR) && @@ -266,7 +266,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, n_channels, n_ssids, cfg->channels_2, - IEEE80211_BAND_2GHZ, + NL80211_BAND_2GHZ, false, true, 0, MAX_CHANNELS_2GHZ, &n_pactive_ch, @@ -277,7 +277,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, n_channels, n_ssids, cfg->channels_2, - IEEE80211_BAND_2GHZ, + NL80211_BAND_2GHZ, false, false, cfg->passive[0], MAX_CHANNELS_2GHZ, @@ -289,7 +289,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, n_channels, n_ssids, cfg->channels_5, - IEEE80211_BAND_5GHZ, + NL80211_BAND_5GHZ, false, true, 0, wl->max_channels_5, &n_pactive_ch, @@ -300,7 +300,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, n_channels, n_ssids, cfg->channels_5, - IEEE80211_BAND_5GHZ, + NL80211_BAND_5GHZ, true, true, cfg->passive[1], wl->max_channels_5, @@ -312,7 +312,7 @@ wlcore_set_scan_chan_params(struct wl1271 *wl, n_channels, n_ssids, cfg->channels_5, - IEEE80211_BAND_5GHZ, + NL80211_BAND_5GHZ, false, false, cfg->passive[1] + cfg->dfs, wl->max_channels_5, diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c index 020ac1a4b..cea9443c2 100644 --- a/drivers/net/wireless/ti/wlcore/spi.c +++ b/drivers/net/wireless/ti/wlcore/spi.c @@ -382,7 +382,7 @@ static int wlcore_probe_of(struct spi_device *spi, struct wl12xx_spi_glue *glue, ret = of_property_read_u32(dt_node, "ref-clock-frequency", &pdev_data->ref_clock_freq); - if (IS_ERR_VALUE(ret)) { + if (ret) { dev_err(glue->dev, "can't get reference clock frequency (%d)\n", ret); return ret; @@ -425,7 +425,7 @@ static int wl1271_probe(struct spi_device *spi) } ret = wlcore_probe_of(spi, glue, &pdev_data); - if (IS_ERR_VALUE(ret)) { + if (ret) { dev_err(glue->dev, "can't get device tree parameters (%d)\n", ret); return ret; diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c index f0ac36139..c1b8e4e9d 100644 --- a/drivers/net/wireless/ti/wlcore/tx.c +++ b/drivers/net/wireless/ti/wlcore/tx.c @@ -453,7 +453,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif, } u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, - enum ieee80211_band rate_band) + enum nl80211_band rate_band) { struct ieee80211_supported_band *band; u32 enabled_rates = 0; diff --git a/drivers/net/wireless/ti/wlcore/tx.h b/drivers/net/wireless/ti/wlcore/tx.h index 79cb3ff8b..e2ba62d92 100644 --- a/drivers/net/wireless/ti/wlcore/tx.h +++ b/drivers/net/wireless/ti/wlcore/tx.h @@ -246,9 +246,9 @@ int wlcore_tx_complete(struct wl1271 *wl); void wl12xx_tx_reset_wlvif(struct wl1271 *wl, struct wl12xx_vif *wlvif); void wl12xx_tx_reset(struct wl1271 *wl); void wl1271_tx_flush(struct wl1271 *wl); -u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum ieee80211_band band); +u8 wlcore_rate_to_idx(struct wl1271 *wl, u8 rate, enum nl80211_band band); u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set, - enum ieee80211_band rate_band); + enum nl80211_band rate_band); u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set); u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct sk_buff *skb, struct ieee80211_sta *sta); diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h index 72c31a8ed..8f28aa022 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore.h +++ b/drivers/net/wireless/ti/wlcore/wlcore.h @@ -342,7 +342,7 @@ struct wl1271 { struct wl12xx_vif *sched_vif; /* The current band */ - enum ieee80211_band band; + enum nl80211_band band; struct completion *elp_compl; struct delayed_work elp_work; @@ -517,7 +517,7 @@ void wlcore_update_inconn_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif, struct wl1271_station *wl_sta, bool in_conn); static inline void -wlcore_set_ht_cap(struct wl1271 *wl, enum ieee80211_band band, +wlcore_set_ht_cap(struct wl1271 *wl, enum nl80211_band band, struct ieee80211_sta_ht_cap *ht_cap) { memcpy(&wl->ht_cap[band], ht_cap, sizeof(*ht_cap)); diff --git a/drivers/net/wireless/ti/wlcore/wlcore_i.h b/drivers/net/wireless/ti/wlcore/wlcore_i.h index 23507ceb4..7d43b8057 100644 --- a/drivers/net/wireless/ti/wlcore/wlcore_i.h +++ b/drivers/net/wireless/ti/wlcore/wlcore_i.h @@ -392,7 +392,7 @@ struct wl12xx_vif { u8 ssid_len; /* The current band */ - enum ieee80211_band band; + enum nl80211_band band; int channel; enum nl80211_channel_type channel_type; |