diff options
-rw-r--r-- | drivers/net/wireless/orinoco.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index ec0451cbb8e1..9a2fcc0163d6 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -4777,14 +4777,14 @@ static int orinoco_ioctl_get_encodeext(struct net_device *dev, | |||
4777 | encoding->flags |= IW_ENCODE_DISABLED; | 4777 | encoding->flags |= IW_ENCODE_DISABLED; |
4778 | break; | 4778 | break; |
4779 | case IW_ENCODE_ALG_WEP: | 4779 | case IW_ENCODE_ALG_WEP: |
4780 | ext->key_len = min(le16_to_cpu(priv->keys[idx].len), | 4780 | ext->key_len = min_t(u16, le16_to_cpu(priv->keys[idx].len), |
4781 | (u16) max_key_len); | 4781 | max_key_len); |
4782 | memcpy(ext->key, priv->keys[idx].data, ext->key_len); | 4782 | memcpy(ext->key, priv->keys[idx].data, ext->key_len); |
4783 | encoding->flags |= IW_ENCODE_ENABLED; | 4783 | encoding->flags |= IW_ENCODE_ENABLED; |
4784 | break; | 4784 | break; |
4785 | case IW_ENCODE_ALG_TKIP: | 4785 | case IW_ENCODE_ALG_TKIP: |
4786 | ext->key_len = min((u16) sizeof(struct orinoco_tkip_key), | 4786 | ext->key_len = min_t(u16, sizeof(struct orinoco_tkip_key), |
4787 | (u16) max_key_len); | 4787 | max_key_len); |
4788 | memcpy(ext->key, &priv->tkip_key[idx], ext->key_len); | 4788 | memcpy(ext->key, &priv->tkip_key[idx], ext->key_len); |
4789 | encoding->flags |= IW_ENCODE_ENABLED; | 4789 | encoding->flags |= IW_ENCODE_ENABLED; |
4790 | break; | 4790 | break; |
@@ -5686,9 +5686,9 @@ static inline char *orinoco_translate_ext_scan(struct net_device *dev, | |||
5686 | 5686 | ||
5687 | /* Timestamp */ | 5687 | /* Timestamp */ |
5688 | iwe.cmd = IWEVCUSTOM; | 5688 | iwe.cmd = IWEVCUSTOM; |
5689 | iwe.u.data.length = snprintf(custom, MAX_CUSTOM_LEN, | 5689 | iwe.u.data.length = |
5690 | "tsf=%016llx", | 5690 | snprintf(custom, MAX_CUSTOM_LEN, "tsf=%016llx", |
5691 | le64_to_cpu(bss->timestamp)); | 5691 | (unsigned long long) le64_to_cpu(bss->timestamp)); |
5692 | if (iwe.u.data.length) | 5692 | if (iwe.u.data.length) |
5693 | current_ev = iwe_stream_add_point(info, current_ev, end_buf, | 5693 | current_ev = iwe_stream_add_point(info, current_ev, end_buf, |
5694 | &iwe, custom); | 5694 | &iwe, custom); |