Home
last modified time | relevance | path

Searched refs:mors (Results 1 – 24 of 24) sorted by relevance

/linux/drivers/net/wireless/morsemicro/mm81x/
H A Dhw.h22 #define MM81X_REG_TRGR_BASE(mors) ((mors)->regs->trgr_base_address) argument
23 #define MM81X_REG_TRGR1_STS(mors) (MM81X_REG_TRGR_BASE(mors) + 0x00) argument
24 #define MM81X_REG_TRGR1_SET(mors) (MM81X_REG_TRGR_BASE(mors) + 0x04) argument
25 #define MM81X_REG_TRGR1_CLR(mors) (MM81X_REG_TRGR_BASE(mors) + 0x08) argument
26 #define MM81X_REG_TRGR1_EN(mors) (MM81X_REG_TRGR_BASE(mors) + 0x0C) argument
27 #define MM81X_REG_TRGR2_STS(mors) (MM81X_REG_TRGR_BASE(mors) + 0x10) argument
28 #define MM81X_REG_TRGR2_SET(mors) (MM81X_REG_TRGR_BASE(mors) + 0x14) argument
29 #define MM81X_REG_TRGR2_CLR(mors) (MM81X_REG_TRGR_BASE(mors) + 0x18) argument
30 #define MM81X_REG_TRGR2_EN(mors) (MM81X_REG_TRGR_BASE(mors) + 0x1C) argument
32 #define MM81X_REG_INT_BASE(mors) ((mors)->regs->irq_base_address) argument
[all …]
H A Dhw.c63 static void mm81x_hw_otp_power_up(struct mm81x *mors) in mm81x_hw_otp_power_up() argument
65 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PENVDD2, 1); in mm81x_hw_otp_power_up()
68 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PLDO, 1); in mm81x_hw_otp_power_up()
71 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PDSTB, 1); in mm81x_hw_otp_power_up()
75 static void mm81x_hw_otp_power_down(struct mm81x *mors) in mm81x_hw_otp_power_down() argument
77 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PDSTB, 0); in mm81x_hw_otp_power_down()
78 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PLDO, 0); in mm81x_hw_otp_power_down()
79 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PENVDD2, 0); in mm81x_hw_otp_power_down()
82 static void mm81x_hw_otp_read_enable(struct mm81x *mors) in mm81x_hw_otp_read_enable() argument
84 mm81x_reg32_write(mors, MM8108_REG_OTPCTRL_PTM, 0); in mm81x_hw_otp_read_enable()
[all …]
H A Dhif.h34 int (*init)(struct mm81x *mors);
35 void (*flush_tx_data)(struct mm81x *mors);
36 void (*flush_cmds)(struct mm81x *mors);
37 void (*finish)(struct mm81x *mors);
38 void (*skbq_get_tx_qs)(struct mm81x *mors, struct mm81x_skbq **qs,
40 struct mm81x_skbq *(*get_tx_cmd_queue)(struct mm81x *mors);
41 struct mm81x_skbq *(*get_tx_beacon_queue)(struct mm81x *mors);
42 struct mm81x_skbq *(*get_tx_mgmt_queue)(struct mm81x *mors);
43 struct mm81x_skbq *(*get_tx_data_queue)(struct mm81x *mors, int aci);
44 int (*handle_irq)(struct mm81x *mors, u32 status);
[all …]
H A Dbus.h18 int (*dm_read)(struct mm81x *mors, u32 addr, u8 *data, int len);
19 int (*dm_write)(struct mm81x *mors, u32 addr, const u8 *data, int len);
20 int (*reg32_read)(struct mm81x *mors, u32 addr, u32 *data);
21 int (*reg32_write)(struct mm81x *mors, u32 addr, u32 data);
22 int (*digital_reset)(struct mm81x *mors);
23 void (*set_bus_enable)(struct mm81x *mors, bool enable);
24 void (*config_burst_mode)(struct mm81x *mors, bool enable_burst);
25 void (*claim)(struct mm81x *mors);
26 void (*set_irq)(struct mm81x *mors, bool enable);
27 void (*release)(struct mm81x *mors);
[all …]
H A Dfw.c55 static void mm81x_fw_parse_info(struct mm81x *mors, const u8 *data, int length) in mm81x_fw_parse_info() argument
63 mors->bcf_address = get_unaligned_le32(tlv->val); in mm81x_fw_parse_info()
91 static int mm81x_fw_set_boot_addr(struct mm81x *mors, uint32_t addr) in mm81x_fw_set_boot_addr() argument
95 dev_dbg(mors->dev, "Overwriting boot address to 0x%x", addr); in mm81x_fw_set_boot_addr()
96 mm81x_claim_bus(mors); in mm81x_fw_set_boot_addr()
97 status = mm81x_reg32_write(mors, MM81X_REG_BOOT_ADDR(mors), addr); in mm81x_fw_set_boot_addr()
98 mm81x_release_bus(mors); in mm81x_fw_set_boot_addr()
102 static int mm81x_fw_load_fw(struct mm81x *mors, const struct firmware *fw) in mm81x_fw_load_fw() argument
112 u8 *fw_buf = devm_kmalloc(mors->dev, ROUND_BYTES_TO_WORD(fw->size), in mm81x_fw_load_fw()
119 dev_err(mors->dev, "Wrong file format"); in mm81x_fw_load_fw()
[all …]
H A Dcore.c11 static int mm81x_core_attach_regs(struct mm81x *mors) in mm81x_core_attach_regs() argument
15 mm81x_claim_bus(mors); in mm81x_core_attach_regs()
16 ret = mm81x_reg32_read(mors, MM8108_REG_CHIP_ID, &mors->chip_id); in mm81x_core_attach_regs()
17 mm81x_release_bus(mors); in mm81x_core_attach_regs()
20 dev_err(mors->dev, "failed to read chip id %d", ret); in mm81x_core_attach_regs()
24 switch (mors->chip_id) { in mm81x_core_attach_regs()
26 mors->regs = &mm8108_regs; in mm81x_core_attach_regs()
27 mors->hif.ops = &mm81x_yaps_ops; in mm81x_core_attach_regs()
36 static void mm81x_core_init_mac_addr(struct mm81x *mors) in mm81x_core_init_mac_addr() argument
38 int ret = mm81x_hw_otp_get_mac_addr(mors); in mm81x_core_init_mac_addr()
[all …]
H A Dmac.c218 static bool mm81x_tx_h_pkt_over_rts_threshold(struct mm81x *mors, in mm81x_tx_h_pkt_over_rts_threshold() argument
225 return ((skb->len + FCS_LEN) > mors->rts_threshold); in mm81x_tx_h_pkt_over_rts_threshold()
235 return ((skb->len + FCS_LEN + ccmp_len) > mors->rts_threshold); in mm81x_tx_h_pkt_over_rts_threshold()
238 static bool mm81x_tx_h_ps_filtered_for_sta(struct mm81x *mors, in mm81x_tx_h_ps_filtered_for_sta() argument
253 dev_dbg(mors->dev, "Frame for sta[%pM] PS filtered", mors_sta->addr); in mm81x_tx_h_ps_filtered_for_sta()
258 ieee80211_tx_status_skb(mors->hw, skb); in mm81x_tx_h_ps_filtered_for_sta()
266 struct mm81x *mors = hw->priv; in mm81x_mac_check_fw_disabled_chans() local
278 ret = mm81x_cmd_get_disabled_channels(mors, resp, resp_len); in mm81x_mac_check_fw_disabled_chans()
306 dev_dbg(mors->dev, "set NO_PRIMARY on %u KHz", in mm81x_mac_check_fw_disabled_chans()
312 dev_err(mors->dev, "failed to set disabled primary channels"); in mm81x_mac_check_fw_disabled_chans()
[all …]
H A Dyaps.c72 static struct mm81x_skbq *mm81x_yaps_tc_q_from_aci(struct mm81x *mors, int aci) in mm81x_yaps_tc_q_from_aci() argument
74 struct mm81x_yaps *yaps = &mors->hif.u.yaps; in mm81x_yaps_tc_q_from_aci()
81 static void mm81x_yaps_get_tx_qs(struct mm81x *mors, struct mm81x_skbq **qs, in mm81x_yaps_get_tx_qs() argument
84 *qs = mors->hif.u.yaps.data_tx_qs; in mm81x_yaps_get_tx_qs()
88 static struct mm81x_skbq *mm81x_yaps_get_bcn_tc_q(struct mm81x *mors) in mm81x_yaps_get_bcn_tc_q() argument
90 return &mors->hif.u.yaps.beacon_q; in mm81x_yaps_get_bcn_tc_q()
93 static struct mm81x_skbq *mm81x_yaps_get_mgmt_tc_q(struct mm81x *mors) in mm81x_yaps_get_mgmt_tc_q() argument
95 return &mors->hif.u.yaps.mgmt_q; in mm81x_yaps_get_mgmt_tc_q()
98 static struct mm81x_skbq *mm81x_yaps_get_tx_cmd_queue(struct mm81x *mors) in mm81x_yaps_get_tx_cmd_queue() argument
100 return &mors->hif.u.yaps.cmd_q; in mm81x_yaps_get_tx_cmd_queue()
[all …]
H A Dusb.c96 struct mm81x *mors = container_of(work, struct mm81x, usb_irq_work); in mm81x_usb_irq_work() local
98 mm81x_claim_bus(mors); in mm81x_usb_irq_work()
99 mm81x_hw_irq_handle(mors); in mm81x_usb_irq_work()
100 mm81x_release_bus(mors); in mm81x_usb_irq_work()
112 struct mm81x *mors = urb->context; in mm81x_usb_int_handler() local
113 struct mm81x_usb *musb = (struct mm81x_usb *)mors->drv_priv; in mm81x_usb_int_handler()
122 &mors->state_flags); in mm81x_usb_int_handler()
123 dev_dbg(mors->dev, in mm81x_usb_int_handler()
131 dev_err(mors->dev, "- nonzero read status received: %d", in mm81x_usb_int_handler()
141 dev_err(mors->dev, "error: resubmit urb %p err code %d", urb, in mm81x_usb_int_handler()
[all …]
H A Dskbq.c123 __mm81x_skbq_tx_status_to_skbq(struct mm81x *mors, in __mm81x_skbq_tx_status_to_skbq() argument
133 mq = mm81x_hif_get_tx_data_queue(mors, aci); in __mm81x_skbq_tx_status_to_skbq()
136 mq = mm81x_hif_get_tx_mgmt_queue(mors); in __mm81x_skbq_tx_status_to_skbq()
139 mq = mm81x_hif_get_tx_beacon_queue(mors); in __mm81x_skbq_tx_status_to_skbq()
142 dev_err(mors->dev, in __mm81x_skbq_tx_status_to_skbq()
193 static void mm81x_skbq_sta_eosp(struct mm81x *mors, struct sk_buff *skb) in mm81x_skbq_sta_eosp() argument
220 mm81x_skbq_sta_eosp(mq->mors, skb); in __mm81x_skbq_drop_pending_skb()
221 ieee80211_free_txskb(mq->mors->hw, skb); in __mm81x_skbq_drop_pending_skb()
251 static struct sk_buff *__mm81x_skbq_get_pending_by_id(struct mm81x *mors, in __mm81x_skbq_get_pending_by_id() argument
276 static void mm81x_skbq_check_tx_empty(struct mm81x *mors, struct mm81x_skbq *mq) in mm81x_skbq_check_tx_empty() argument
[all …]
H A Dcommand.c33 static int mm81x_cmd_tx(struct mm81x *mors, struct host_cmd_resp *resp, in mm81x_cmd_tx() argument
42 struct mm81x_skbq *cmd_q = mm81x_hif_get_tx_cmd_queue(mors); in mm81x_cmd_tx()
52 mutex_lock(&mors->cmd_wait); in mm81x_cmd_tx()
53 mors->cmd_seq++; in mm81x_cmd_tx()
54 if (mors->cmd_seq > HOST_CMD_HOST_ID_SEQ_MAX) in mm81x_cmd_tx()
55 mors->cmd_seq = 1; in mm81x_cmd_tx()
56 host_id = mors->cmd_seq << HOST_CMD_HOST_ID_SEQ_SHIFT; in mm81x_cmd_tx()
58 mm81x_ps_disable(mors); in mm81x_cmd_tx()
75 dev_dbg(mors->dev, "CMD 0x%04x:%04x", in mm81x_cmd_tx()
79 mutex_lock(&mors->cmd_lock); in mm81x_cmd_tx()
[all …]
H A Dsdio.c47 struct mm81x *mors = sdio_get_drvdata(func); in irq_handler() local
49 mm81x_hw_irq_handle(mors); in irq_handler()
57 struct mm81x *mors = sdio_get_drvdata(func); in mm81x_sdio_enable_irq() local
62 dev_err(mors->dev, "Failed to enable sdio irq: %d\n", ret); in mm81x_sdio_enable_irq()
78 static void mm81x_sdio_set_irq(struct mm81x *mors, bool enable) in mm81x_sdio_set_irq() argument
80 struct mm81x_sdio *sdio = (struct mm81x_sdio *)mors->drv_priv; in mm81x_sdio_set_irq()
107 struct mm81x *mors = sdio_get_drvdata(sdio->func); in mm81x_sdio_set_func_address_base() local
134 dev_dbg(mors->dev, "%s succeeded after %d retries\n", __func__, in mm81x_sdio_set_func_address_base()
141 dev_dbg(mors->dev, "%s failed (%d), retrying (%d/%d)\n", in mm81x_sdio_set_func_address_base()
155 struct mm81x *mors = sdio_get_drvdata(sdio->func); in mm81x_sdio_mem_write_block() local
[all …]
H A Dcommand.h49 int mm81x_cmd_resp_process(struct mm81x *mors, struct sk_buff *skb);
50 int mm81x_cmd_add_if(struct mm81x *mors, u16 *vif_id, const u8 *addr,
52 int mm81x_cmd_get_capabilities(struct mm81x *mors, u16 vif_id,
54 int mm81x_cmd_cfg_qos(struct mm81x *mors, struct mm81x_queue_params *params);
55 int mm81x_cmd_config_beacon_timer(struct mm81x *mors, void *mm81x_vif,
57 int mm81x_cmd_cfg_bss(struct mm81x *mors, u16 vif_id, u16 beacon_int,
59 int mm81x_cmd_set_channel(struct mm81x *mors, u32 op_chan_freq_hz,
62 int mm81x_cmd_get_max_txpower(struct mm81x *mors, s32 *out_power_mbm);
63 int mm81x_cmd_set_txpower(struct mm81x *mors, s32 *out_power_mbm,
65 int mm81x_cmd_hw_scan(struct mm81x *mors, struct mm81x_hw_scan_params *params,
[all …]
H A Dps.c16 struct mm81x *mors = container_of(mps, struct mm81x, ps); in mm81x_ps_wakeup() local
21 mm81x_set_bus_enable(mors, true); in mm81x_ps_wakeup()
27 struct mm81x *mors = container_of(mps, struct mm81x, ps); in mm81x_ps_sleep() local
33 mm81x_set_bus_enable(mors, false); in mm81x_ps_sleep()
38 struct mm81x *mors = container_of(mps, struct mm81x, ps); in mm81x_ps_evaluate() local
41 (mors->hif.event_flags & in mm81x_ps_evaluate()
49 needs_wake |= (mm81x_hif_get_tx_buffered_count(mors) > 0); in mm81x_ps_evaluate()
71 void mm81x_ps_enable(struct mm81x *mors) in mm81x_ps_enable() argument
73 struct mm81x_ps *mps = &mors->ps; in mm81x_ps_enable()
87 void mm81x_ps_disable(struct mm81x *mors) in mm81x_ps_disable() argument
[all …]
H A Drc.c44 struct mm81x *mors = mrc->mors; in mm81x_rc_timer() local
46 queue_work(mors->net_wq, &mors->mrc.work); in mm81x_rc_timer()
49 void mm81x_rc_init(struct mm81x *mors) in mm81x_rc_init() argument
51 INIT_LIST_HEAD(&mors->mrc.stas); in mm81x_rc_init()
52 spin_lock_init(&mors->mrc.lock); in mm81x_rc_init()
54 INIT_WORK(&mors->mrc.work, mm81x_rc_work); in mm81x_rc_init()
55 timer_setup(&mors->mrc.timer, mm81x_rc_timer, 0); in mm81x_rc_init()
57 mors->mrc.mors = mors; in mm81x_rc_init()
58 mod_timer(&mors->mrc.timer, jiffies + msecs_to_jiffies(100)); in mm81x_rc_init()
61 void mm81x_rc_deinit(struct mm81x *mors) in mm81x_rc_deinit() argument
[all …]
H A Dmac.h37 mm81x_rcu_dereference_vif_id(struct mm81x *mors, u8 vif_id, bool rcu) in mm81x_rcu_dereference_vif_id() argument
39 if (WARN_ON(vif_id >= ARRAY_SIZE(mors->vifs))) in mm81x_rcu_dereference_vif_id()
43 return rcu_dereference(mors->vifs[vif_id]); in mm81x_rcu_dereference_vif_id()
45 return rcu_dereference_protected(mors->vifs[vif_id], in mm81x_rcu_dereference_vif_id()
46 lockdep_is_held(&mors->hw->wiphy->mtx)); in mm81x_rcu_dereference_vif_id()
49 int mm81x_tx_h_get_attempts(struct mm81x *mors,
52 int mm81x_mac_register(struct mm81x *mors);
53 void mm81x_mac_free(struct mm81x *mors);
54 void mm81x_mac_unregister(struct mm81x *mors);
55 int mm81x_mac_event_recv(struct mm81x *mors, struct sk_buff *skb);
[all …]
H A Drc.h24 struct mm81x *mors; member
33 void mm81x_rc_init(struct mm81x *mors);
34 void mm81x_rc_deinit(struct mm81x *mors);
35 int mm81x_rc_sta_add(struct mm81x *mors, struct ieee80211_vif *vif,
37 void mm81x_rc_sta_remove(struct mm81x *mors, struct ieee80211_sta *sta);
38 void mm81x_rc_sta_fill_tx_rates(struct mm81x *mors,
42 void mm81x_rc_sta_feedback_rates(struct mm81x *mors, struct sk_buff *skb,
46 void mm81x_rc_sta_state_check(struct mm81x *mors, struct ieee80211_vif *vif,
H A Dyaps_hw.c204 void mm81x_yaps_hw_enable_irqs(struct mm81x *mors, bool enable) in mm81x_yaps_hw_enable_irqs() argument
206 mm81x_hw_irq_enable(mors, MM81X_INT_YAPS_FC_PKT_WAITING_IRQN, enable); in mm81x_yaps_hw_enable_irqs()
207 mm81x_hw_irq_enable(mors, MM81X_INT_YAPS_FC_PACKET_FREED_UP_IRQN, in mm81x_yaps_hw_enable_irqs()
211 void mm81x_yaps_hw_read_table(struct mm81x *mors, in mm81x_yaps_hw_read_table() argument
214 mm81x_yaps_hw_fill_aux_data_from_hw_tbl(mors->hif.u.yaps.aux_data, in mm81x_yaps_hw_read_table()
216 mm81x_yaps_hw_enable_irqs(mors, true); in mm81x_yaps_hw_read_table()
274 dev_err(yaps->mors->dev, "yaps invalid tc queue"); in mm81x_write_pkts_h_will_fit()
321 mm81x_bus_get_alignment(yaps->mors)); in mm81x_yaps_hw_write_pkts()
326 dev_dbg(yaps->mors->dev, "yaps lock failed %d", ret); in mm81x_yaps_hw_write_pkts()
348 ret = mm81x_dm_write(yaps->mors, in mm81x_yaps_hw_write_pkts()
[all …]
H A Dyaps.h33 struct mm81x *mors; member
67 int mm81x_yaps_init(struct mm81x *mors);
69 void mm81x_yaps_finish(struct mm81x *mors);
70 void mm81x_yaps_flush_tx_data(struct mm81x *mors);
71 void mm81x_yaps_flush_cmds(struct mm81x *mors);
74 int mm81x_yaps_get_tx_status_pending_count(struct mm81x *mors);
75 int mm81x_yaps_get_tx_buffered_count(struct mm81x *mors);
H A Dps.h17 void mm81x_ps_disable(struct mm81x *mors);
18 void mm81x_ps_enable(struct mm81x *mors);
19 int mm81x_ps_init(struct mm81x *mors);
20 void mm81x_ps_finish(struct mm81x *mors);
H A Dcore.h203 struct mm81x *mors; member
416 static inline bool mm81x_is_data_tx_allowed(struct mm81x *mors) in mm81x_is_data_tx_allowed() argument
418 return !test_bit(MM81X_STATE_DATA_TX_STOPPED, &mors->state_flags) && in mm81x_is_data_tx_allowed()
420 &mors->hif.event_flags); in mm81x_is_data_tx_allowed()
437 return mors_vif->mors; in mm81x_vif_to_mors()
447 void mm81x_beacon_irq_handle(struct mm81x *mors, u32 status);
450 int mm81x_core_init(struct mm81x *mors);
451 int mm81x_core_register(struct mm81x *mors);
452 void mm81x_core_unregister(struct mm81x *mors);
453 void mm81x_core_deinit(struct mm81x *mors);
[all …]
H A Dyaps_hw.h46 void mm81x_yaps_hw_enable_irqs(struct mm81x *mors, bool enable);
47 int mm81x_yaps_hw_init(struct mm81x *mors);
48 void mm81x_yaps_hw_finish(struct mm81x *mors);
49 void mm81x_yaps_hw_read_table(struct mm81x *mors,
H A Dskbq.h177 struct mm81x *mors; member
188 void mm81x_skbq_purge_aged(struct mm81x *mors, struct mm81x_skbq *mq);
202 void mm81x_skbq_init(struct mm81x *mors, struct mm81x_skbq *mq, u16 flags);
205 void mm81x_skbq_mon_dump(struct mm81x *mors, struct seq_file *file);
209 int mm81x_skbq_check_for_stale_tx(struct mm81x *mors, struct mm81x_skbq *mq);
210 void mm81x_skbq_may_wake_tx_queues(struct mm81x *mors);
214 void mm81x_skbq_data_traffic_pause(struct mm81x *mors);
215 void mm81x_skbq_data_traffic_resume(struct mm81x *mors);
H A Dfw.h140 int mm81x_fw_init(struct mm81x *mors, bool reset);
141 int mm81x_fw_parse_ext_host_tbl(struct mm81x *mors);