Search Linux Wireless

Re: [RFC 2/9] mac80211: add radar detection command/event

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/26/2012 4:37 AM, Victor Goldenshtein wrote:
+	int (*hw_dfs_start_radar_detection)(struct ieee80211_hw *hw,
+					    struct ieee80211_vif *vif);

This name is getting ridiculously long -- no need for the hw_ prefix either.

+void ieee80211_radar_detected_notify(struct ieee80211_vif *vif,
+				     u16 freq, gfp_t gfp);

Btw, why not a channel pointer? Most APIs use that.

+static int ieee80211_dfs_start_radar_detection(struct wiphy *wiphy,
+					       struct net_device *dev)
+{
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+	struct ieee80211_local *local = sdata->local;
+	int ret = -ENOENT;

??? No need for a default value.

+	if (!local->ops->hw_dfs_start_radar_detection)
+		return -EOPNOTSUPP;
+
+	mutex_lock(&local->mtx);
+	ret = drv_dfs_en_radar_detection(local, sdata);
+	mutex_unlock(&local->mtx);

Why even lock here? That's not protecting anything.

+static inline int drv_dfs_en_radar_detection(struct ieee80211_local *local,
+					 struct ieee80211_sub_if_data *sdata)
+{
+	int ret;
+
+	might_sleep();
+
+	trace_drv_dfs_en_radar_detection(local, sdata);
+	ret = local->ops->hw_dfs_start_radar_detection(&local->hw,&sdata->vif);

trace_drv_ret_int()

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux