238 * device operations
239 */
240 static int rt2661_attach(dev_info_t *, ddi_attach_cmd_t);
241 static int rt2661_detach(dev_info_t *, ddi_detach_cmd_t);
242 static int rt2661_quiesce(dev_info_t *);
243
244 /*
245 * Module Loading Data & Entry Points
246 */
247 DDI_DEFINE_STREAM_OPS(rwd_dev_ops, nulldev, nulldev, rt2661_attach,
248 rt2661_detach, nodev, NULL, D_MP, NULL, rt2661_quiesce);
249
250 static struct modldrv rwd_modldrv = {
251 &mod_driverops, /* Type of module. This one is a driver */
252 "Ralink RT2661 driver v1.1", /* short description */
253 &rwd_dev_ops /* driver specific ops */
254 };
255
256 static struct modlinkage modlinkage = {
257 MODREV_1,
258 (void *)&rwd_modldrv,
259 NULL
260 };
261
262 static int rt2661_m_stat(void *, uint_t, uint64_t *);
263 static int rt2661_m_start(void *);
264 static void rt2661_m_stop(void *);
265 static int rt2661_m_promisc(void *, boolean_t);
266 static int rt2661_m_multicst(void *, boolean_t, const uint8_t *);
267 static int rt2661_m_unicst(void *, const uint8_t *);
268 static mblk_t *rt2661_m_tx(void *, mblk_t *);
269 static void rt2661_m_ioctl(void *, queue_t *, mblk_t *);
270 static int rt2661_m_setprop(void *arg, const char *pr_name,
271 mac_prop_id_t wldp_pr_num,
272 uint_t wldp_length, const void *wldp_buf);
273 static int rt2661_m_getprop(void *arg, const char *pr_name,
274 mac_prop_id_t wldp_pr_num, uint_t wldp_length,
275 void *wldp_buf);
276 static void rt2661_m_propinfo(void *arg, const char *pr_name,
277 mac_prop_id_t wldp_pr_num, mac_prop_info_handle_t mph);
278
279 static mac_callbacks_t rt2661_m_callbacks = {
|
238 * device operations
239 */
240 static int rt2661_attach(dev_info_t *, ddi_attach_cmd_t);
241 static int rt2661_detach(dev_info_t *, ddi_detach_cmd_t);
242 static int rt2661_quiesce(dev_info_t *);
243
244 /*
245 * Module Loading Data & Entry Points
246 */
247 DDI_DEFINE_STREAM_OPS(rwd_dev_ops, nulldev, nulldev, rt2661_attach,
248 rt2661_detach, nodev, NULL, D_MP, NULL, rt2661_quiesce);
249
250 static struct modldrv rwd_modldrv = {
251 &mod_driverops, /* Type of module. This one is a driver */
252 "Ralink RT2661 driver v1.1", /* short description */
253 &rwd_dev_ops /* driver specific ops */
254 };
255
256 static struct modlinkage modlinkage = {
257 MODREV_1,
258 { (void *)&rwd_modldrv, NULL }
259 };
260
261 static int rt2661_m_stat(void *, uint_t, uint64_t *);
262 static int rt2661_m_start(void *);
263 static void rt2661_m_stop(void *);
264 static int rt2661_m_promisc(void *, boolean_t);
265 static int rt2661_m_multicst(void *, boolean_t, const uint8_t *);
266 static int rt2661_m_unicst(void *, const uint8_t *);
267 static mblk_t *rt2661_m_tx(void *, mblk_t *);
268 static void rt2661_m_ioctl(void *, queue_t *, mblk_t *);
269 static int rt2661_m_setprop(void *arg, const char *pr_name,
270 mac_prop_id_t wldp_pr_num,
271 uint_t wldp_length, const void *wldp_buf);
272 static int rt2661_m_getprop(void *arg, const char *pr_name,
273 mac_prop_id_t wldp_pr_num, uint_t wldp_length,
274 void *wldp_buf);
275 static void rt2661_m_propinfo(void *arg, const char *pr_name,
276 mac_prop_id_t wldp_pr_num, mac_prop_info_handle_t mph);
277
278 static mac_callbacks_t rt2661_m_callbacks = {
|