A new rumor suggests the two events are very closely linked, according to the Financial Times:

One person familiar with Yahoo's deliberations denied that the approach to Facebook was prompted by its imminent IPO. Rather, it reflected the hunt by new Yahoo chief executive Scott Thompson to boost the performance of all aspects of the company's business, the person said.

Meanwhile, Forbes argues that Yahoo should seek at least $3 billion from Facebook for patent violations. That number should be even higher if another company buys Yahoo first:

The other angle here to pay close attention to is whether some other larger party might rather own Yahoo! before reaching a settlement with Facebook rather than after. For example, Apple might rather own Yahoo!’s patents and not accept any settlement or licensing arrangement now. Instead, Apple might want to wait until the day when Facebook enters the mobile OS space or teams up with Microsoft to buy Nokia (NOK) in order to avoid being pushed behind iOS or Android to be just another app. Then, I would assume the price to Facebook of a settlement would be much higher than $3 billion.

The United States Patent and Trademark Office (USPTO) shows just how vulnerable a new technology company can be at the hands of an old company when it comes to a patent war. Yahoo has thousands of patents, although it only says some 10 to 20 apply to Facebook's business. Facebook meanwhile has 62, though it's hard to say if Facebook will argue Yahoo infringes on any of them.