static int gdm_wimax_open(struct net_device *dev)
{
struct nic *nic = netdev_priv(dev);
- struct fsm_s *fsm = (struct fsm_s *)nic->sdk_data[SIOC_DATA_FSM].buf;
+ struct fsm_s *fsm = nic->sdk_data[SIOC_DATA_FSM].buf;
netif_start_queue(dev);
static int gdm_wimax_close(struct net_device *dev)
{
struct nic *nic = netdev_priv(dev);
- struct fsm_s *fsm = (struct fsm_s *)nic->sdk_data[SIOC_DATA_FSM].buf;
+ struct fsm_s *fsm = nic->sdk_data[SIOC_DATA_FSM].buf;
netif_stop_queue(dev);
if (src->size) {
if (!dst->buf)
return -EINVAL;
- if (copy_to_user((void __user *)dst->buf, src->buf, size))
+ if (copy_to_user(dst->buf, src->buf, size))
return -EFAULT;
}
return 0;
return -ENOMEM;
}
- if (copy_from_user(dst->buf, (void __user *)src->buf, src->size)) {
+ if (copy_from_user(dst->buf, src->buf, src->size)) {
kdelete(&dst->buf);
return -EFAULT;
}
static void gdm_update_fsm(struct net_device *dev, struct fsm_s *new_fsm)
{
struct nic *nic = netdev_priv(dev);
- struct fsm_s *cur_fsm = (struct fsm_s *)
+ struct fsm_s *cur_fsm =
nic->sdk_data[SIOC_DATA_FSM].buf;
if (!cur_fsm)
* before gdm_wimax_ioctl_set_data is called.
*/
gdm_update_fsm(dev,
- (struct fsm_s *)req->data.buf);
+ req->data.buf);
}
ret = gdm_wimax_ioctl_set_data(
&nic->sdk_data[req->data_id], &req->data);
void unregister_wimax_device(struct phy_dev *phy_dev)
{
struct nic *nic = netdev_priv(phy_dev->netdev);
- struct fsm_s *fsm = (struct fsm_s *)nic->sdk_data[SIOC_DATA_FSM].buf;
+ struct fsm_s *fsm = nic->sdk_data[SIOC_DATA_FSM].buf;
if (fsm)
fsm->m_status = M_INIT;