static int wl1251_join(struct wl1251 *wl, u8 bss_type, u8 channel, u16 beacon_interval, u8 dtim_period) { int ret; ret = wl1251_acx_frame_rates(wl, DEFAULT_HW_GEN_TX_RATE, DEFAULT_HW_GEN_MODULATION_TYPE, wl->tx_mgmt_frm_rate, wl->tx_mgmt_frm_mod); if (ret < 0) goto out; ret = wl1251_cmd_join(wl, bss_type, channel, beacon_interval, dtim_period); if (ret < 0) goto out; ret = wl1251_event_wait(wl, JOIN_EVENT_COMPLETE_ID, 100); if (ret < 0) wl1251_warning("join timeout"); out: return ret; }
static int wl1251_join(struct wl1251 *wl, u8 bss_type, u8 channel, u16 beacon_interval, u8 dtim_period) { int ret; ret = wl1251_acx_frame_rates(wl, DEFAULT_HW_GEN_TX_RATE, DEFAULT_HW_GEN_MODULATION_TYPE, wl->tx_mgmt_frm_rate, wl->tx_mgmt_frm_mod); if (ret < 0) goto out; /* * Join command applies filters, and if we are not associated, * BSSID filter must be disabled for association to work. */ if (is_zero_ether_addr(wl->bssid)) wl->rx_config &= ~CFG_BSSID_FILTER_EN; ret = wl1251_cmd_join(wl, bss_type, channel, beacon_interval, dtim_period); if (ret < 0) goto out; ret = wl1251_event_wait(wl, JOIN_EVENT_COMPLETE_ID, 100); if (ret < 0) wl1251_warning("join timeout"); out: return ret; }
static int wl1251_join(struct wl1251 *wl, u8 bss_type, u8 channel, u16 beacon_interval, u8 dtim_period) { int ret; ret = wl1251_acx_frame_rates(wl, DEFAULT_HW_GEN_TX_RATE, DEFAULT_HW_GEN_MODULATION_TYPE, wl->tx_mgmt_frm_rate, wl->tx_mgmt_frm_mod); if (ret < 0) goto out; ret = wl1251_cmd_join(wl, bss_type, channel, beacon_interval, dtim_period); if (ret < 0) goto out; /* * FIXME: we should wait for JOIN_EVENT_COMPLETE_ID but to simplify * locking we just sleep instead, for now */ msleep(10); out: return ret; }